diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/scripts/northrend/zuldrak.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/bindings/scripts/scripts/northrend/zuldrak.cpp b/src/bindings/scripts/scripts/northrend/zuldrak.cpp index ea306279bf9..a1e397718e5 100644 --- a/src/bindings/scripts/scripts/northrend/zuldrak.cpp +++ b/src/bindings/scripts/scripts/northrend/zuldrak.cpp @@ -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)); |