diff options
author | tartalo <none@none> | 2009-11-10 15:02:20 +0100 |
---|---|---|
committer | tartalo <none@none> | 2009-11-10 15:02:20 +0100 |
commit | 5827255178f79aebbb058844cc1469eb0a57abf5 (patch) | |
tree | 816ed7d99725512172325e109f161cbe66b1126a /src | |
parent | b7ed5fd6131043be7bbfa6cc00196fae98f3b775 (diff) |
Fix #172 crash
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/scripts/northrend/borean_tundra.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp index eb787f87267..1aa943ad610 100644 --- a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp +++ b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp @@ -637,13 +637,15 @@ struct TRINITY_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_OFF); Phase_Timer = 2500; Phase = 1; + go_caribou = NULL; } void EnterCombat(Unit *who) {} void MoveInLineOfSight(Unit *who) {} void JustDied(Unit* who) { - go_caribou->SetLootState(GO_JUST_DEACTIVATED); + if (go_caribou && go_caribou->GetTypeId() == TYPEID_GAMEOBJECT) + go_caribou->SetLootState(GO_JUST_DEACTIVATED); TempSummon *summon = (TempSummon*)m_creature; if (summon) @@ -722,9 +724,9 @@ struct TRINITY_DLL_DECL npc_nesingwary_trapperAI : public ScriptedAI go_caribou->SetGoState(GO_STATE_ACTIVE); - Phase = 8; - Phase_Timer = 1000; - break; + Phase = 8; + Phase_Timer = 1000; + break; case 8: m_creature->CastSpell(m_creature,SPELL_TRAPPED,true); |