Core/Spell: case TOTAL_PCT\BASE_PCT should be processed by multiplicative function not additive.
Also get ride of hack in Player::HandleBaseModValue now it's unnecessary. Fixes: #855, multiplicative % count for normal school for aura 79 and may be others.
This commit is contained in:
@@ -5677,8 +5677,6 @@ void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, floa
|
|||||||
m_auraBaseMod[modGroup][modType] += apply ? amount : -amount;
|
m_auraBaseMod[modGroup][modType] += apply ? amount : -amount;
|
||||||
break;
|
break;
|
||||||
case PCT_MOD:
|
case PCT_MOD:
|
||||||
if (amount <= -100.0f)
|
|
||||||
amount = -200.0f;
|
|
||||||
ApplyPercentModFloatVar(m_auraBaseMod[modGroup][modType], amount, apply);
|
ApplyPercentModFloatVar(m_auraBaseMod[modGroup][modType], amount, apply);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -8094,7 +8092,7 @@ void Player::_ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType att
|
|||||||
if (unitModType == TOTAL_VALUE)
|
if (unitModType == TOTAL_VALUE)
|
||||||
ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS, aura->GetAmount(), apply);
|
ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS, aura->GetAmount(), apply);
|
||||||
else
|
else
|
||||||
ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, aura->GetAmount() / 100.0f, apply);
|
ApplyPercentModFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, aura->GetAmount(), apply);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13348,7 +13348,7 @@ bool Unit::HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, f
|
|||||||
break;
|
break;
|
||||||
case BASE_PCT:
|
case BASE_PCT:
|
||||||
case TOTAL_PCT:
|
case TOTAL_PCT:
|
||||||
m_auraModifiersGroup[unitMod][modifierType] += (apply ? amount : -amount) / 100.0f;
|
ApplyPercentModFloatVar(m_auraModifiersGroup[unitMod][modifierType], amount, apply);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -4518,7 +4518,7 @@ void AuraEffect::HandleModDamagePercentDone(AuraApplication const* aurApp, uint8
|
|||||||
target->HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_PCT, float (GetAmount()), apply);
|
target->HandleStatModifier(UNIT_MOD_DAMAGE_RANGED, TOTAL_PCT, float (GetAmount()), apply);
|
||||||
|
|
||||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||||
target->ToPlayer()->ApplyModSignedFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, GetAmount() / 100.0f, apply);
|
target->ToPlayer()->ApplyPercentModFloatValue(PLAYER_FIELD_MOD_DAMAGE_DONE_PCT, GetAmount(), apply);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user