Scripts/Deadmines: fixed a logic mistake at Glubtok

This commit is contained in:
Ovalord
2018-02-24 17:03:34 +01:00
parent 4540969ac8
commit 3e48c226d0
2 changed files with 3 additions and 38 deletions

View File

@@ -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');

View File

@@ -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();
}