fix(Core/Items): count stats programatically instead of manually set (#22564)
Co-authored-by: heyitsbench <benjymansy123@gmail.com>
This commit is contained in:
parent
b711c55c1e
commit
9ad7cef3c4
7 changed files with 146 additions and 85 deletions
|
|
@ -174,6 +174,23 @@ void Player::ApplySpellPowerBonus(int32 amount, bool apply)
|
|||
ApplyModInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + i, amount, apply);
|
||||
}
|
||||
|
||||
void Player::ApplySpellDamageBonus(int32 amount, bool apply)
|
||||
{
|
||||
apply = _ModifyUInt32(apply, m_baseSpellDamage, amount);
|
||||
|
||||
// For speed just update for client
|
||||
for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
|
||||
ApplyModInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + i, amount, apply);
|
||||
}
|
||||
|
||||
void Player::ApplySpellHealingBonus(int32 amount, bool apply)
|
||||
{
|
||||
apply = _ModifyUInt32(apply, m_baseSpellHealing, amount);
|
||||
|
||||
// For speed just update for client
|
||||
ApplyModUInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS, amount, apply);
|
||||
}
|
||||
|
||||
void Player::UpdateSpellDamageAndHealingBonus()
|
||||
{
|
||||
// Magic damage modifiers implemented in Unit::SpellDamageBonusDone
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue