Violet Hold: Fix portal #2 spawning. Some minor cleansing and pointer checks
--HG-- branch : trunk
This commit is contained in:
@@ -444,7 +444,7 @@ struct npc_teleportation_portalAI : public ScriptedAI
|
||||
listOfMobs.Summon(pSummoned);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature *pSummoned)
|
||||
void SummonedMobDied(Creature *pSummoned)
|
||||
{
|
||||
listOfMobs.Despawn(pSummoned);
|
||||
}
|
||||
@@ -461,6 +461,7 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
bHasGotMovingPoints = false;
|
||||
if (pInstance)
|
||||
portalLocationID = pInstance->GetData(DATA_PORTAL_LOCATION);
|
||||
Reset();
|
||||
}
|
||||
@@ -561,7 +562,9 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
|
||||
void JustDied(Unit *unit)
|
||||
{
|
||||
Creature* portal = Unit::GetCreature((*me),pInstance->GetData64(DATA_TELEPORTATION_PORTAL));
|
||||
if (Creature* portal = Unit::GetCreature((*me),pInstance->GetData64(DATA_TELEPORTATION_PORTAL)))
|
||||
CAST_AI(npc_teleportation_portalAI,portal->AI())->SummonedMobDied(me);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_NPC_PRESENCE_AT_DOOR_REMOVE,1);
|
||||
}
|
||||
|
||||
@@ -569,6 +572,7 @@ struct violet_hold_trashAI : public npc_escortAI
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
DoCast(SPELL_DESTROY_DOOR_SEAL);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_NPC_PRESENCE_AT_DOOR_ADD,1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user