Defined SPELL_AURA_PREVENT_INTERRUPT and SPELL_AURA_PREVENT_CORPSE_RELEASE
This commit is contained in:
@@ -224,8 +224,8 @@ namespace Framework.Constants
|
||||
ModXpPct = 200,
|
||||
Fly = 201,
|
||||
IgnoreCombatResult = 202,
|
||||
ModAttackerMeleeCritDamage = 203,
|
||||
ModAttackerRangedCritDamage = 204,
|
||||
PreventInterrupt = 203, // NYI
|
||||
PreventCorpseRelease = 204, // NYI
|
||||
ModChargeCooldown = 205, // NYI
|
||||
ModIncreaseVehicleFlightSpeed = 206,
|
||||
ModIncreaseMountedFlightSpeed = 207,
|
||||
|
||||
@@ -1889,15 +1889,9 @@ namespace Game.Entities
|
||||
damageInfo.TargetState = VictimState.Hit;
|
||||
// Crit bonus calc
|
||||
damageInfo.damage += damageInfo.damage;
|
||||
float mod = 0.0f;
|
||||
// Apply SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE or SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE
|
||||
if (damageInfo.attackType == WeaponAttackType.RangedAttack)
|
||||
mod += damageInfo.target.GetTotalAuraModifier(AuraType.ModAttackerRangedCritDamage);
|
||||
else
|
||||
mod += damageInfo.target.GetTotalAuraModifier(AuraType.ModAttackerMeleeCritDamage);
|
||||
|
||||
// Increase crit damage from SPELL_AURA_MOD_CRIT_DAMAGE_BONUS
|
||||
mod += (GetTotalAuraMultiplierByMiscMask(AuraType.ModCritDamageBonus, damageInfo.damageSchoolMask) - 1.0f) * 100;
|
||||
float mod = (GetTotalAuraMultiplierByMiscMask(AuraType.ModCritDamageBonus, damageInfo.damageSchoolMask) - 1.0f) * 100;
|
||||
|
||||
if (mod != 0)
|
||||
MathFunctions.AddPct(ref damageInfo.damage, mod);
|
||||
|
||||
@@ -2393,15 +2393,8 @@ namespace Game.Entities
|
||||
modOwner.ApplySpellMod(spellInfo.Id, SpellModOp.CritDamageBonus, ref crit_bonus);
|
||||
damage += (int)crit_bonus;
|
||||
|
||||
// Apply SPELL_AURA_MOD_ATTACKER_RANGED_CRIT_DAMAGE or SPELL_AURA_MOD_ATTACKER_MELEE_CRIT_DAMAGE
|
||||
float critPctDamageMod = 0.0f;
|
||||
if (attackType == WeaponAttackType.RangedAttack)
|
||||
critPctDamageMod += victim.GetTotalAuraModifier(AuraType.ModAttackerRangedCritDamage);
|
||||
else
|
||||
critPctDamageMod += victim.GetTotalAuraModifier(AuraType.ModAttackerMeleeCritDamage);
|
||||
|
||||
// Increase crit damage from SPELL_AURA_MOD_CRIT_DAMAGE_BONUS
|
||||
critPctDamageMod += (GetTotalAuraMultiplierByMiscMask(AuraType.ModCritDamageBonus, (uint)spellInfo.GetSchoolMask()) - 1.0f) * 100;
|
||||
float critPctDamageMod = (GetTotalAuraMultiplierByMiscMask(AuraType.ModCritDamageBonus, (uint)spellInfo.GetSchoolMask()) - 1.0f) * 100;
|
||||
|
||||
if (critPctDamageMod != 0)
|
||||
MathFunctions.AddPct(ref damage, (int)critPctDamageMod);
|
||||
|
||||
Reference in New Issue
Block a user