Core/Auras: Rename many old aura types to their new meaning

Port From (https://github.com/TrinityCore/TrinityCore/commit/bd7c714c97beb04eb815b0aa175badfb6933ccf1)
This commit is contained in:
hondacrx
2021-02-22 15:05:41 -05:00
parent 76a351e7de
commit 7ae358bd71
8 changed files with 62 additions and 233 deletions
+1 -7
View File
@@ -6592,10 +6592,7 @@ namespace Game.Entities
sbyte comboPoints = spell != null ? spell.m_comboPointGain : (sbyte)GetPower(PowerType.ComboPoints);
// without combo points lost (duration checked in aura)
RemoveAurasByType(AuraType.RetainComboPoints);
comboPoints += (sbyte)count;
comboPoints += count;
if (comboPoints > 5)
comboPoints = 5;
@@ -6624,9 +6621,6 @@ namespace Game.Entities
}
public void ClearComboPoints()
{
// without combopoints lost (duration checked in aura)
RemoveAurasByType(AuraType.RetainComboPoints);
SetPower(PowerType.ComboPoints, 0);
}
public byte GetComboPoints() { return (byte)GetPower(PowerType.ComboPoints); }
+1 -12
View File
@@ -1232,9 +1232,7 @@ namespace Game.Entities
if (CanDualWield() || offhand.GetTemplate().GetFlags3().HasAnyFlag(ItemFlags3.AlwaysAllowDualWield))
UpdateDamagePhysical(WeaponAttackType.OffAttack);
if (HasAuraType(AuraType.ModSpellDamageOfAttackPower) ||
HasAuraType(AuraType.ModSpellHealingOfAttackPower) ||
HasAuraType(AuraType.OverrideSpellPowerByApPct))
if (HasAuraType(AuraType.OverrideSpellPowerByApPct))
UpdateSpellDamageAndHealingBonus();
if (pet != null && pet.IsPetGhoul()) // At melee attack power change for DK pet
@@ -1253,15 +1251,6 @@ namespace Game.Entities
float baseValue = value;
value *= GetPctModifierValue(unitMod, UnitModifierPctType.Base); // armor percent from items
value += GetFlatModifierValue(unitMod, UnitModifierFlatType.Total);
//add dynamic flat mods
var mResbyIntellect = GetAuraEffectsByType(AuraType.ModResistanceOfStatPercent);
foreach (var i in mResbyIntellect)
{
if (Convert.ToBoolean(i.GetMiscValue() & (int)SpellSchoolMask.Normal))
value += MathFunctions.CalculatePct(GetStat((Stats)i.GetMiscValueB()), i.GetAmount());
}
value *= GetPctModifierValue(unitMod, UnitModifierPctType.Total);
SetArmor((int)baseValue, (int)(value - baseValue));
-11
View File
@@ -2474,17 +2474,6 @@ namespace Game.Entities
// Ignore Absorption Auras
float auraAbsorbMod = GetMaxPositiveAuraModifierByMiscMask(AuraType.ModTargetAbsorbSchool, (uint)damageInfo.GetSchoolMask());
auraAbsorbMod = Math.Max(auraAbsorbMod, (float)GetMaxPositiveAuraModifier(AuraType.ModTargetAbilityAbsorbSchool, aurEff =>
{
if (!Convert.ToBoolean(aurEff.GetMiscValue() & (int)damageInfo.GetSchoolMask()))
return false;
if (!aurEff.IsAffectingSpell(damageInfo.GetSpellInfo()))
return false;
return true;
}));
MathFunctions.RoundToInterval(ref auraAbsorbMod, 0.0f, 100.0f);
int absorbIgnoringDamage = (int)MathFunctions.CalculatePct(damageInfo.GetDamage(), auraAbsorbMod);
-9
View File
@@ -78,9 +78,6 @@ namespace Game.Entities
DoneAdvertisedBenefit += (int)MathFunctions.CalculatePct(GetStat(usedStat), eff.GetAmount());
}
}
// ... and attack power
DoneAdvertisedBenefit += (int)MathFunctions.CalculatePct(GetTotalAttackPowerValue(WeaponAttackType.BaseAttack), GetTotalAuraModifierByMiscMask(AuraType.ModSpellDamageOfAttackPower, (int)schoolMask));
}
return DoneAdvertisedBenefit;
}
@@ -383,12 +380,6 @@ namespace Game.Entities
Stats usedStat = (Stats)(i.GetSpellEffectInfo().MiscValue);
advertisedBenefit += (uint)MathFunctions.CalculatePct(GetStat(usedStat), i.GetAmount());
}
// ... and attack power
var mHealingDonebyAP = GetAuraEffectsByType(AuraType.ModSpellHealingOfAttackPower);
foreach (var i in mHealingDonebyAP)
if (Convert.ToBoolean(i.GetMiscValue() & (int)schoolMask))
advertisedBenefit += (uint)MathFunctions.CalculatePct(GetTotalAttackPowerValue(WeaponAttackType.BaseAttack), i.GetAmount());
}
return advertisedBenefit;
}