diff options
-rw-r--r-- | sql/updates/world/2012_07_06_00_world_spell_script_names.sql | 1 | ||||
-rw-r--r-- | src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp | 47 |
2 files changed, 12 insertions, 36 deletions
diff --git a/sql/updates/world/2012_07_06_00_world_spell_script_names.sql b/sql/updates/world/2012_07_06_00_world_spell_script_names.sql new file mode 100644 index 00000000000..676ac430a9d --- /dev/null +++ b/sql/updates/world/2012_07_06_00_world_spell_script_names.sql @@ -0,0 +1 @@ +UPDATE `spell_script_names` SET `spell_id` = 42787 WHERE `spell_id` = 42784; diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index 0454274401c..3975d77aa25 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -501,9 +501,9 @@ class spell_astromancer_wrath_of_the_astromancer : public SpellScriptLoader public: spell_astromancer_wrath_of_the_astromancer() : SpellScriptLoader("spell_astromancer_wrath_of_the_astromancer") { } - class spell_astromancer_wrath_of_the_astromancer_SpellScript : public SpellScript + class spell_astromancer_wrath_of_the_astromancer_AuraScript : public AuraScript { - PrepareSpellScript(spell_astromancer_wrath_of_the_astromancer_SpellScript); + PrepareAuraScript(spell_astromancer_wrath_of_the_astromancer_AuraScript); bool Validate(SpellInfo const* /*SpellEntry*/) { @@ -512,50 +512,25 @@ class spell_astromancer_wrath_of_the_astromancer : public SpellScriptLoader return true; } - bool Load() + void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - _targetCount = 0; - return true; - } - - void CountTargets(std::list<WorldObject*>& targetList) - { - _targetCount = targetList.size(); - } - - void HandleDummy(SpellEffIndex /* effIndex */) - { - if (Unit* caster = GetOriginalCaster()) - if (Unit* target = GetHitUnit()) - { - if (!target->isAlive() || !_targetCount) - return; - - int32 damage = 10000 / _targetCount; - - SpellNonMeleeDamage damageInfo(caster, target, GetSpellInfo()->Id, GetSpellInfo()->SchoolMask); - damageInfo.damage = damage; + // Final heal only on duration end + if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) + return; - caster->CalcAbsorbResist(target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &damageInfo.absorb, &damageInfo.resist, GetSpellInfo()); - caster->DealDamageMods(target, damageInfo.damage, &damageInfo.absorb); - caster->SendSpellNonMeleeDamageLog(&damageInfo); - caster->DealSpellDamage(&damageInfo, false); - } + Unit* target = GetUnitOwner(); + target->CastSpell(target, GetSpellInfo()->Effects[EFFECT_1].CalcValue(),false); } - private: - int32 _targetCount; - void Register() { - OnEffectHitTarget += SpellEffectFn(spell_astromancer_wrath_of_the_astromancer_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_astromancer_wrath_of_the_astromancer_SpellScript::CountTargets, EFFECT_0, TARGET_DEST_CASTER_RADIUS); + AfterEffectRemove += AuraEffectRemoveFn(spell_astromancer_wrath_of_the_astromancer_AuraScript::AfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); } }; - SpellScript* GetSpellScript() const + AuraScript* GetAuraScript() const { - return new spell_astromancer_wrath_of_the_astromancer_SpellScript(); + return new spell_astromancer_wrath_of_the_astromancer_AuraScript(); } }; |