563 {
565 {
566 canBeRecalculated = false;
567
568
569 float ap = caster->GetTotalAttackPowerValue(
BASE_ATTACK);
571 float mwbMin = 0.f;
572 float mwbMax = 0.f;
574 {
577 }
578
579 float mwb = ((mwbMin + mwbMax) / 2 + ap * mws / 14000) * 0.2f;
580 amount +=
int32(caster->ApplyEffectModifiers(
GetSpellInfo(), aurEff->GetEffIndex(), mwb));
581
582
583
585 {
588 }
589 }
590 }
T AddPct(T &base, U pct)
Definition: Util.h:67
std::int32_t int32
Definition: Define.h:103
std::uint8_t uint8
Definition: Define.h:109
@ EFFECT_2
Definition: SharedDefines.h:33
@ AURA_STATE_HEALTH_ABOVE_75_PERCENT
Definition: SharedDefines.h:1315
#define MAX_ITEM_PROTO_DAMAGES
Definition: ItemTemplate.h:613
@ MINDAMAGE
Definition: Unit.h:135
@ MAXDAMAGE
Definition: Unit.h:136
@ BASE_ATTACK
Definition: Unit.h:209
SpellInfo const * GetSpellInfo() const
Definition: SpellScript.cpp:1005
Unit * GetCaster() const
Definition: SpellScript.cpp:1020
Unit * GetUnitOwner() const
Definition: SpellScript.cpp:1030