Hey EMUDEVS!
Am trying to reduce dmg of some spells or to reduce spell dmg of one class
So I was searching but i didn't find anything useful, this is only what i find... maybe to add some checks here ?
(Ex. I want to reduce spell dmg of all priest spells for 30%)
Or if it's not possible to do like that, then is it possible to nerf spell dmg with some another way (1 per 1 spell)
Am trying to reduce dmg of some spells or to reduce spell dmg of one class
So I was searching but i didn't find anything useful, this is only what i find... maybe to add some checks here ?
(Ex. I want to reduce spell dmg of all priest spells for 30%)
Or if it's not possible to do like that, then is it possible to nerf spell dmg with some another way (1 per 1 spell)
Code:
[SIZE=1]float Unit::GetCombatRatingReduction(CombatRating cr) const
{
if (Player const* player = ToPlayer())
return player->GetRatingBonusValue(cr);
// Player's pet get resilience from owner
else if (isPet() && GetOwner())
if (Player* owner = GetOwner()->ToPlayer())
return owner->GetRatingBonusValue(cr);
return 0.0f;
}
uint32 Unit::GetCombatRatingDamageReduction(CombatRating cr, float cap, uint32 damage) const
{
float percent = std::min(GetCombatRatingReduction(cr), cap);
if ((cr == CR_RESILIENCE_PLAYER_DAMAGE_TAKEN || cr == CR_RESILIENCE_CRIT_TAKEN) && ToPlayer())
percent -= ToPlayer()->GetFloatValue(PLAYER_FIELD_MOD_RESILIENCE_PCT);
else if ((cr == CR_RESILIENCE_PLAYER_DAMAGE_TAKEN || cr == CR_RESILIENCE_CRIT_TAKEN) && GetOwner() && GetOwner()->ToPlayer())
percent -= GetOwner()->ToPlayer()->GetFloatValue(PLAYER_FIELD_MOD_RESILIENCE_PCT);
return CalculatePct(damage, percent);
}[/SIZE]