Core/Auras: fixed SPELL_AURA_MOD_HIT_CHANCE honoring stack rules in all cases
Port From (https://github.com/TrinityCore/TrinityCore/commit/b0a05812d23aa1ebe69045243233a5eaba064f11)
This commit is contained in:
@@ -3609,6 +3609,7 @@ namespace Game.Spells
|
|||||||
|
|
||||||
Unit target = aurApp.GetTarget();
|
Unit target = aurApp.GetTarget();
|
||||||
|
|
||||||
|
// handle stack rules
|
||||||
if (target.IsTypeId(TypeId.Player))
|
if (target.IsTypeId(TypeId.Player))
|
||||||
{
|
{
|
||||||
target.ToPlayer().UpdateMeleeHitChances();
|
target.ToPlayer().UpdateMeleeHitChances();
|
||||||
@@ -3616,8 +3617,9 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
target.ModMeleeHitChance += (apply) ? GetAmount() : (-GetAmount());
|
float value = target.GetTotalAuraModifier(AuraType.ModHitChance);
|
||||||
target.ModRangedHitChance += (apply) ? GetAmount() : (-GetAmount());
|
target.ModMeleeHitChance = value;
|
||||||
|
target.ModRangedHitChance = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user