mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
Spell Effect for melee mitigation will no longer use same bonus
item shielding effect. Added support for spell effect melee mitigation to work on as item worn effects and AA.
This commit is contained in:
parent
0d5a0525cd
commit
83f94da43b
@ -715,7 +715,7 @@ void Mob::MeleeMitigation(Mob *attacker, int32 &damage, int32 minhit, ExtraAttac
|
||||
//reduce the damage from shielding item and aa based on the min dmg
|
||||
//spells offer pure mitigation
|
||||
damage -= (minhit * defender->itembonuses.MeleeMitigation / 100);
|
||||
damage -= (damage * defender->spellbonuses.MeleeMitigation / 100);
|
||||
damage -= (damage * (defender->spellbonuses.MeleeMitigationEffect + defender->itembonuses.MeleeMitigationEffect + defender->aabonuses.MeleeMitigationEffect) / 100);
|
||||
}
|
||||
|
||||
if (damage < 0)
|
||||
@ -757,7 +757,7 @@ int32 Mob::GetMeleeMitDmg(Mob *attacker, int32 damage, int32 minhit,
|
||||
damage -= ((int)d * interval);
|
||||
|
||||
damage -= (minhit * itembonuses.MeleeMitigation / 100);
|
||||
damage -= (damage * spellbonuses.MeleeMitigation / 100);
|
||||
damage -= (damage * (spellbonuses.MeleeMitigationEffect + itembonuses.MeleeMitigationEffect + aabonuses.MeleeMitigationEffect) / 100);
|
||||
return damage;
|
||||
}
|
||||
|
||||
@ -771,7 +771,7 @@ int32 Client::GetMeleeMitDmg(Mob *attacker, int32 damage, int32 minhit,
|
||||
// floats for the rounding issues
|
||||
float dmg_interval = (damage - minhit) / 19.0;
|
||||
float dmg_bonus = minhit - dmg_interval;
|
||||
float spellMeleeMit = spellbonuses.MeleeMitigation / 100.0;
|
||||
float spellMeleeMit = (spellbonuses.MeleeMitigationEffect + itembonuses.MeleeMitigationEffect + aabonuses.MeleeMitigationEffect) / 100.0;
|
||||
if (GetClass() == WARRIOR)
|
||||
spellMeleeMit += 0.05;
|
||||
dmg_bonus -= dmg_bonus * (itembonuses.MeleeMitigation / 100.0);
|
||||
|
||||
@ -1376,6 +1376,10 @@ void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon)
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_MeleeMitigation:
|
||||
newbon->MeleeMitigationEffect -= base1;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1796,7 +1800,7 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne
|
||||
|
||||
case SE_MeleeMitigation:
|
||||
//for some reason... this value is negative for increased mitigation
|
||||
newbon->MeleeMitigation -= effect_value;
|
||||
newbon->MeleeMitigationEffect -= effect_value;
|
||||
break;
|
||||
|
||||
case SE_CriticalHitChance:
|
||||
@ -3594,9 +3598,9 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
|
||||
break;
|
||||
|
||||
case SE_MeleeMitigation:
|
||||
spellbonuses.MeleeMitigation = effect_value;
|
||||
itembonuses.MeleeMitigation = effect_value;
|
||||
aabonuses.MeleeMitigation = effect_value;
|
||||
spellbonuses.MeleeMitigationEffect = effect_value;
|
||||
itembonuses.MeleeMitigationEffect = effect_value;
|
||||
aabonuses.MeleeMitigationEffect = effect_value;
|
||||
break;
|
||||
|
||||
case SE_CriticalHitChance:
|
||||
|
||||
@ -266,6 +266,7 @@ struct StatBonuses {
|
||||
|
||||
int16 StrikeThrough; // PoP: Strike Through %
|
||||
int16 MeleeMitigation; //i = Shielding
|
||||
int16 MeleeMitigationEffect; //i = Spell Effect Melee Mitigation
|
||||
int16 CriticalHitChance[HIGHEST_SKILL+2]; //i
|
||||
int16 CriticalSpellChance; //i
|
||||
int16 SpellCritDmgIncrease; //i
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user