From 38c6694b8eb2c2ca7de799d47edc718c4d5ec717 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 25 May 2017 00:23:05 +0200 Subject: More nopch fixes --- .../Scholomance/boss_darkmaster_gandling.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/server/scripts/EasternKingdoms') diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp index bb156ac2ca4..1d9432103a5 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp @@ -23,9 +23,14 @@ Category: Scholomance */ #include "ScriptMgr.h" +#include "GameObject.h" +#include "InstanceScript.h" +#include "ObjectAccessor.h" #include "ScriptedCreature.h" #include "scholomance.h" +#include "SpellInfo.h" #include "SpellScript.h" +#include "TemporarySummon.h" enum Says { @@ -59,14 +64,14 @@ class boss_darkmaster_gandling : public CreatureScript void Reset() override { _Reset(); - if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_GANDLING))) + if (GameObject* gate = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(GO_GATE_GANDLING))) gate->SetGoState(GO_STATE_ACTIVE); } void JustDied(Unit* /*killer*/) override { _JustDied(); - if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_GANDLING))) + if (GameObject* gate = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(GO_GATE_GANDLING))) gate->SetGoState(GO_STATE_ACTIVE); } @@ -78,7 +83,7 @@ class boss_darkmaster_gandling : public CreatureScript events.ScheduleEvent(EVENT_CURSE, 2000); events.ScheduleEvent(EVENT_SHADOW_PORTAL, 16000); - if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_GANDLING))) + if (GameObject* gate = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(GO_GATE_GANDLING))) gate->SetGoState(GO_STATE_READY); } @@ -353,7 +358,7 @@ class spell_shadow_portal_rooms : public SpellScriptLoader break; } - if (gate_to_close && (caster->GetMap()->GetId() == 289)) + if (gate_to_close) { for (uint8 i = 0; i < 3; ++i) { -- cgit v1.2.3