Zul'Drak: Trying to fix some crashes.

--HG--
branch : trunk
This commit is contained in:
_manuel_
2010-01-12 03:13:11 -03:00
parent 4a366a5e6e
commit 1b4f8af276
@@ -475,7 +475,8 @@ struct TRINITY_DLL_DECL npc_orinoko_tuskbreakerAI : public ScriptedAI
if (m_creature->isSummon())
if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner())
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->RemoveSummons();
if (pSummoner)
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->RemoveSummons();
}
void MovementInform(uint32 uiType, uint32 uiId)
@@ -547,7 +548,8 @@ struct TRINITY_DLL_DECL npc_orinoko_tuskbreakerAI : public ScriptedAI
if (m_creature->isSummon())
if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner())
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->bEventInProgress = false;
if (pSummoner)
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->bEventInProgress = false;
}
};
@@ -594,7 +596,8 @@ struct TRINITY_DLL_DECL npc_korrak_bloodragerAI : public npc_escortAI
{
if (m_creature->isSummon())
if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner())
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->RemoveSummons();
if (pSummoner)
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->RemoveSummons();
}
void WaypointReached(uint32 uiI)
@@ -650,7 +653,8 @@ struct TRINITY_DLL_DECL npc_korrak_bloodragerAI : public npc_escortAI
if (m_creature->isSummon())
if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner())
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->bEventInProgress = false;
if (pSummoner)
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->bEventInProgress = false;
}
};
@@ -687,7 +691,8 @@ struct TRINITY_DLL_DECL npc_yggdrasAI : public ScriptedAI
{
if (m_creature->isSummon())
if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner())
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->RemoveSummons();
if (pSummoner)
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->RemoveSummons();
}
void EnterCombat(Unit* pWho)
@@ -728,7 +733,8 @@ struct TRINITY_DLL_DECL npc_yggdrasAI : public ScriptedAI
if (m_creature->isSummon())
if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner())
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->bEventInProgress = false;
if (pSummoner)
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->bEventInProgress = false;
}
};
@@ -779,7 +785,8 @@ struct TRINITY_DLL_DECL npc_stinkbeardAI : public npc_escortAI
{
if (m_creature->isSummon())
if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner())
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->RemoveSummons();
if (pSummoner)
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->RemoveSummons();
}
void WaypointReached(uint32 uiI)
@@ -839,7 +846,8 @@ struct TRINITY_DLL_DECL npc_stinkbeardAI : public npc_escortAI
{
if (m_creature->isSummon())
if (Unit* pSummoner = CAST_SUM(m_creature)->GetSummoner())
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->bEventInProgress = false;
if (pSummoner)
CAST_AI(npc_gurgthockAI,CAST_CRE(pSummoner)->AI())->bEventInProgress = false;
if (pKiller->GetTypeId() == TYPEID_PLAYER)
CAST_PLR(pKiller)->GroupEventHappens(QUEST_AMPHITHEATER_ANGUISH_MAGNATAUR, CAST_PLR(pKiller));