Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[master] Mage - Ice Barrier #19110

Closed
ArcaneFox opened this issue Feb 11, 2017 · 5 comments
Closed

[master] Mage - Ice Barrier #19110

ArcaneFox opened this issue Feb 11, 2017 · 5 comments

Comments

@ArcaneFox
Copy link

Description:
Ice Barrier is outdated.

Current behaviour:
Ice Barrier is outdated.

Expected behaviour:
Ice Barrier should updated to 7.1.5

Steps to reproduce the problem:

  1. Select Mage
  2. Level up to 26
  3. Change spec to Frost

Branch(es): master

TC rev. hash/commit: 8aacc07

TDB version: 703.00 + updates

Operating system: Windows 10 64-bit

@ArcaneFox
Copy link
Author

ArcaneFox commented Feb 11, 2017

Possible fix:

enum IceBarrier
{
    SPELL_MAGE_CHILLED    = 205708
}

// 11426 - Ice Barrier [7.1.5]
class spell_mage_ice_barrier : public SpellScriptLoader
{
   public:
       spell_mage_ice_barrier() : SpellScriptLoader("spell_mage_ice_barrier") { }

       class spell_mage_ice_barrier_AuraScript : public AuraScript
       {
           PrepareAuraScript(spell_mage_ice_barrier_AuraScript);

           bool Validate(SpellInfo const* /*spell*/) override
           {
               if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_CHILLED))
                   return false;
               return true;
           }

           void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
           {
               canBeRecalculated = false;
               if (Unit* caster = GetCaster())
                   amount += int32(10.0f * caster->SpellBaseHealingBonusDone(GetSpellInfo()->GetSchoolMask()));
           }

           void HandleHit(AuraEffect* /*aurEff*/, DamageInfo& dmgInfo, uint32 & /*absorbAmount*/)
           {
               if (Unit* target = dmgInfo.GetAttacker())
                   GetCaster()->CastSpell(target, SPELL_MAGE_CHILLED, true);
           }

           void Register() override
           {
                DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_ice_barrier_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
                AfterEffectAbsorb += AuraEffectAbsorbFn(spell_mage_ice_barrier_AuraScript::HandleHit, EFFECT_0);
           }
       };

       AuraScript* GetAuraScript() const override
       {
           return new spell_mage_ice_barrier_AuraScript();
       }
};

@HannibalRoG
Copy link
Contributor

@ArcaneFox I will try it and leave you right if it works or not.

@zgn1988
Copy link
Contributor

zgn1988 commented Feb 13, 2017

           void HandleHit(AuraEffect* /*aurEff*/, DamageInfo& dmgInfo, uint32 & /*absorbAmount*/)
           {
               if (Unit* target = dmgInfo.GetAttacker())
                   GetCaster()->CastSpell(target, SPELL_MAGE_CHILLED, true);
           }

hm, logic?

           void HandleHit(AuraEffect* /*aurEff*/, DamageInfo& dmgInfo, uint32 & /*absorbAmount*/)
           {
               Unit* caster = GetCaster();
               if (Unit* target = dmgInfo.GetAttacker())
                   caster->CastSpell(target, SPELL_MAGE_CHILLED, true);
           }

@DoctorKraft
Copy link
Contributor

Fixed in e13f82d can be closed

@ghost
Copy link

ghost commented Mar 22, 2017

Closed by commit e13f82d (as stated in PR #19138 ).

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants