diff options
| -rwxr-xr-x | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 9f1fd5b6de1..67938498a4b 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -3801,19 +3801,13 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8 Unit* target = aurApp->GetTarget(); - if (GetMiscValue() < -1 || GetMiscValue() > 4) - { - sLog->outError("WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid"); - return; - } - // save current health state float healthPct = target->GetHealthPct(); bool alive = target->isAlive(); for (int32 i = STAT_STRENGTH; i < MAX_STATS; i++) { - if (GetMiscValue() == i || GetMiscValue() == -1) + if (GetMiscValueB() & 1 << i || !GetMiscValueB()) // 0 is also used for all stats { target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_PCT, float(GetAmount()), apply); if (target->GetTypeId() == TYPEID_PLAYER || target->ToCreature()->isPet()) @@ -3823,7 +3817,7 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8 // recalculate current HP/MP after applying aura modifications (only for spells with SPELL_ATTR0_UNK4 0x00000010 flag) // this check is total bullshit i think - if (GetMiscValue() == STAT_STAMINA && (m_spellInfo->Attributes & SPELL_ATTR0_ABILITY)) + if (GetMiscValueB() & 1 << STAT_STAMINA && (m_spellInfo->Attributes & SPELL_ATTR0_ABILITY)) target->SetHealth(std::max<uint32>(uint32(healthPct * target->GetMaxHealth() * 0.01f), (alive ? 1 : 0))); } |
