From 3e48c226d0ab5135e5f5d6bb1d98ce0b3df2de2e Mon Sep 17 00:00:00 2001 From: Ovalord <1Don7H4v3@m41L.com> Date: Sat, 24 Feb 2018 17:03:34 +0100 Subject: [PATCH] Scripts/Deadmines: fixed a logic mistake at Glubtok --- .../4.3.4/custom_2018_02_21_00_world.sql | 3 -- .../Deadmines/boss_glubtok.cpp | 38 ++----------------- 2 files changed, 3 insertions(+), 38 deletions(-) diff --git a/sql/updates/world/4.3.4/custom_2018_02_21_00_world.sql b/sql/updates/world/4.3.4/custom_2018_02_21_00_world.sql index 9ba6cd71528..aafa22148b9 100644 --- a/sql/updates/world/4.3.4/custom_2018_02_21_00_world.sql +++ b/sql/updates/world/4.3.4/custom_2018_02_21_00_world.sql @@ -1,4 +1 @@ UPDATE `creature_template` SET `InhabitType`= 4 WHERE `entry` IN (48975, 49039, 49040, 48976, 49041, 49042); -DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_glubtok_fire_wall'; -INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES -(91398 ,'spell_glubtok_fire_wall'); diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_glubtok.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_glubtok.cpp index a6da2dcb843..77a9d494abf 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_glubtok.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_glubtok.cpp @@ -322,6 +322,9 @@ public: case EVENT_FIRE_WALL: for (auto itr = _firewallDummyGUIDList.begin(); itr != _firewallDummyGUIDList.end(); itr++) if (Creature* firewallDummy = ObjectAccessor::GetCreature(*me, (*itr))) + if (firewallDummy->GetEntry() != NPC_FIREWALL_PLATTER_1A + && firewallDummy->GetEntry() != NPC_FIREWALL_PLATTER_1B + && firewallDummy->GetEntry() != NPC_FIREWALL_PLATTER_1C) firewallDummy->CastSpell(firewallDummy, SPELL_FIRE_WALL); break; case EVENT_ARCANE_OVERLOAD: @@ -412,43 +415,8 @@ class spell_glubtok_blossom_targeting : public SpellScriptLoader } }; -class spell_glubtok_fire_wall : public SpellScriptLoader -{ -public: - spell_glubtok_fire_wall() : SpellScriptLoader("spell_glubtok_fire_wall") { } - - class spell_glubtok_fire_wall_AuraScript : public AuraScript - { - PrepareAuraScript(spell_glubtok_fire_wall_AuraScript); - - void HandlePeriodic(AuraEffect const* aurEff) - { - PreventDefaultAction(); - - if (Unit* caster = GetOwner()->ToUnit()) - { - if (caster->GetEntry() != NPC_FIREWALL_PLATTER_1A - && caster->GetEntry() != NPC_FIREWALL_PLATTER_1B - && caster->GetEntry() != NPC_FIREWALL_PLATTER_1C) - caster->CastSpell(caster, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell); - } - } - - void Register() - { - OnEffectPeriodic += AuraEffectPeriodicFn(spell_glubtok_fire_wall_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); - } - }; - - AuraScript* GetAuraScript() const - { - return new spell_glubtok_fire_wall_AuraScript(); - } -}; - void AddSC_boss_glubtok() { new boss_glubtok(); new spell_glubtok_blossom_targeting(); - new spell_glubtok_fire_wall(); }