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:
@@ -91,8 +91,8 @@ namespace Framework.Constants
|
|||||||
ModDisarm = 67,
|
ModDisarm = 67,
|
||||||
ModStalked = 68,
|
ModStalked = 68,
|
||||||
SchoolAbsorb = 69,
|
SchoolAbsorb = 69,
|
||||||
ExtraAttacks = 70,
|
PeriodicWeaponPercentDamage = 70,
|
||||||
Unk71 = 71,
|
StoreTeleportReturnPoint = 71, // NYI
|
||||||
ModPowerCostSchoolPct = 72,
|
ModPowerCostSchoolPct = 72,
|
||||||
ModPowerCostSchool = 73,
|
ModPowerCostSchool = 73,
|
||||||
ReflectSpellsSchool = 74,
|
ReflectSpellsSchool = 74,
|
||||||
@@ -149,7 +149,7 @@ namespace Framework.Constants
|
|||||||
ModMeleeDamageTaken = 125,
|
ModMeleeDamageTaken = 125,
|
||||||
ModMeleeDamageTakenPct = 126,
|
ModMeleeDamageTakenPct = 126,
|
||||||
RangedAttackPowerAttackerBonus = 127,
|
RangedAttackPowerAttackerBonus = 127,
|
||||||
ModPossessPet = 128,
|
ModFixate = 128,
|
||||||
ModSpeedAlways = 129,
|
ModSpeedAlways = 129,
|
||||||
ModMountedSpeedAlways = 130,
|
ModMountedSpeedAlways = 130,
|
||||||
ModRangedAttackPowerVersus = 131,
|
ModRangedAttackPowerVersus = 131,
|
||||||
@@ -164,17 +164,17 @@ namespace Framework.Constants
|
|||||||
ModRangedHaste = 140,
|
ModRangedHaste = 140,
|
||||||
Unk141 = 141, // Old ModRangedAmmoHaste, Unused Now
|
Unk141 = 141, // Old ModRangedAmmoHaste, Unused Now
|
||||||
ModBaseResistancePct = 142,
|
ModBaseResistancePct = 142,
|
||||||
ModRecoveryRateBySpellLabel = 143, // NYI
|
ModRecoveryRateBySpellLabel = 143, // NYI
|
||||||
SafeFall = 144,
|
SafeFall = 144,
|
||||||
ModPetTalentPoints = 145,
|
ModIncreaseHealthPercent2 = 145,
|
||||||
AllowTamePetType = 146,
|
AllowTamePetType = 146,
|
||||||
MechanicImmunityMask = 147,
|
MechanicImmunityMask = 147,
|
||||||
RetainComboPoints = 148,
|
ModChargeRecoveryRate = 148, // NYI
|
||||||
ReducePushback = 149, // Reduce Pushback
|
ReducePushback = 149, // Reduce Pushback
|
||||||
ModShieldBlockvaluePct = 150,
|
ModShieldBlockvaluePct = 150,
|
||||||
TrackStealthed = 151, // Track Stealthed
|
TrackStealthed = 151, // Track Stealthed
|
||||||
ModDetectedRange = 152, // Mod Detected Range
|
ModDetectedRange = 152, // Mod Detected Range
|
||||||
Unk153 = 153, // Old SplitDamageFlat. Unused 4.3.4
|
ModAutoAttackRange = 153,
|
||||||
ModStealthLevel = 154, // Stealth Level Modifier
|
ModStealthLevel = 154, // Stealth Level Modifier
|
||||||
ModWaterBreathing = 155, // Mod Water Breathing
|
ModWaterBreathing = 155, // Mod Water Breathing
|
||||||
ModReputationGain = 156, // Mod Reputation Gain
|
ModReputationGain = 156, // Mod Reputation Gain
|
||||||
@@ -185,12 +185,12 @@ namespace Framework.Constants
|
|||||||
ModHealthRegenInCombat = 161,
|
ModHealthRegenInCombat = 161,
|
||||||
PowerBurn = 162,
|
PowerBurn = 162,
|
||||||
ModCritDamageBonus = 163,
|
ModCritDamageBonus = 163,
|
||||||
Unk164 = 164,
|
ForceBeathBar = 164, //NYI
|
||||||
MeleeAttackPowerAttackerBonus = 165,
|
MeleeAttackPowerAttackerBonus = 165,
|
||||||
ModAttackPowerPct = 166,
|
ModAttackPowerPct = 166,
|
||||||
ModRangedAttackPowerPct = 167,
|
ModRangedAttackPowerPct = 167,
|
||||||
ModDamageDoneVersus = 168,
|
ModDamageDoneVersus = 168,
|
||||||
Unk169 = 169, // Old ModCritPercentVersus. Unused 4.3.4
|
SetFFAPvp = 169,
|
||||||
DetectAmore = 170,
|
DetectAmore = 170,
|
||||||
ModSpeedNotStack = 171,
|
ModSpeedNotStack = 171,
|
||||||
ModMountedSpeedNotStack = 172,
|
ModMountedSpeedNotStack = 172,
|
||||||
@@ -202,9 +202,9 @@ namespace Framework.Constants
|
|||||||
ModMaxPowerPct = 178,
|
ModMaxPowerPct = 178,
|
||||||
ModPowerDisplay = 179,
|
ModPowerDisplay = 179,
|
||||||
ModFlatSpellDamageVersus = 180,
|
ModFlatSpellDamageVersus = 180,
|
||||||
Unk181 = 181, // Old ModFlatSpellCritDamageVersus - Possible Flat Spell Crit Damage Versus
|
ModSpellCurrencyReagentsCountPct = 181, // NYI
|
||||||
ModResistanceOfStatPercent = 182,
|
SuppressItemPassiveEffectBySpellLabel = 182, //NYI
|
||||||
ModCriticalThreat = 183,
|
ModCritChanceVersusTargetHealth = 183,
|
||||||
ModAttackerMeleeHitChance = 184,
|
ModAttackerMeleeHitChance = 184,
|
||||||
ModAttackerRangedHitChance = 185,
|
ModAttackerRangedHitChance = 185,
|
||||||
ModAttackerSpellHitChance = 186,
|
ModAttackerSpellHitChance = 186,
|
||||||
@@ -216,10 +216,10 @@ namespace Framework.Constants
|
|||||||
ModMeleeRangedHaste = 192,
|
ModMeleeRangedHaste = 192,
|
||||||
MeleeSlow = 193,
|
MeleeSlow = 193,
|
||||||
ModTargetAbsorbSchool = 194,
|
ModTargetAbsorbSchool = 194,
|
||||||
ModTargetAbilityAbsorbSchool = 195,
|
LearnSpell = 195,
|
||||||
ModCooldown = 196, // Only 24818 Noxious Breath
|
ModCooldown = 196, // Only 24818 Noxious Breath
|
||||||
ModAttackerSpellAndWeaponCritChance = 197,
|
ModAttackerSpellAndWeaponCritChance = 197,
|
||||||
Unk198 = 198, // Old ModAllWeaponSkills
|
ModCombatRatingFromCombatRating = 198,
|
||||||
Unk199 = 199, // Old ModIncreasesSpellPctToHit. Unused 4.3.4
|
Unk199 = 199, // Old ModIncreasesSpellPctToHit. Unused 4.3.4
|
||||||
ModXpPct = 200,
|
ModXpPct = 200,
|
||||||
Fly = 201,
|
Fly = 201,
|
||||||
@@ -239,13 +239,13 @@ namespace Framework.Constants
|
|||||||
ArenaPreparation = 215,
|
ArenaPreparation = 215,
|
||||||
HasteSpells = 216,
|
HasteSpells = 216,
|
||||||
ModMeleeHaste2 = 217,
|
ModMeleeHaste2 = 217,
|
||||||
Unk218 = 218, // old SPELL_AURA_HASTE_RANGED
|
AddPctModifierBySpellLabel = 218, //NYI
|
||||||
ModManaRegenFromStat = 219,
|
AddFlatModifierBySpellLabel = 219, //NYI
|
||||||
ModAbilitySchoolMask = 220, //NYI
|
ModAbilitySchoolMask = 220, //NYI
|
||||||
ModDetaunt = 221,
|
ModDetaunt = 221,
|
||||||
Unk222 = 222,
|
RemoveTransmogCost = 222,
|
||||||
Unk223 = 223,
|
RemoveBarberShopCost = 223,
|
||||||
Unk224 = 224,
|
LearnTalent = 224, // NYI
|
||||||
ModVisibilityRange = 225,
|
ModVisibilityRange = 225,
|
||||||
PeriodicDummy = 226,
|
PeriodicDummy = 226,
|
||||||
PeriodicTriggerSpellWithValue = 227,
|
PeriodicTriggerSpellWithValue = 227,
|
||||||
@@ -256,10 +256,10 @@ namespace Framework.Constants
|
|||||||
MechanicDurationMod = 232,
|
MechanicDurationMod = 232,
|
||||||
ChangeModelForAllHumanoids = 233, // Client-Side Only
|
ChangeModelForAllHumanoids = 233, // Client-Side Only
|
||||||
MechanicDurationModNotStack = 234,
|
MechanicDurationModNotStack = 234,
|
||||||
ModDispelResist = 235,
|
HoverNoHeightOffset = 235,
|
||||||
ControlVehicle = 236,
|
ControlVehicle = 236,
|
||||||
ModSpellDamageOfAttackPower = 237,
|
Unk237 = 237,
|
||||||
ModSpellHealingOfAttackPower = 238,
|
Unk238 = 238,
|
||||||
ModScale2 = 239,
|
ModScale2 = 239,
|
||||||
ModExpertise = 240,
|
ModExpertise = 240,
|
||||||
ForceMoveForward = 241,
|
ForceMoveForward = 241,
|
||||||
@@ -280,22 +280,22 @@ namespace Framework.Constants
|
|||||||
NoReagentUse = 256,
|
NoReagentUse = 256,
|
||||||
ModTargetResistBySpellClass = 257,
|
ModTargetResistBySpellClass = 257,
|
||||||
OverrideSummonedObject = 258,
|
OverrideSummonedObject = 258,
|
||||||
Unk259 = 259, // Old ModHotPct, Unused 4.3.4
|
ModHotPct = 259,
|
||||||
ScreenEffect = 260,
|
ScreenEffect = 260,
|
||||||
Phase = 261,
|
Phase = 261,
|
||||||
AbilityIgnoreAurastate = 262,
|
AbilityIgnoreAurastate = 262,
|
||||||
AllowOnlyAbility = 263,
|
DisableCastingExceptAbilities = 263,
|
||||||
Unk264 = 264,
|
DisableAttackingExceptAbilities = 264,
|
||||||
Unk265 = 265,
|
Unk265 = 265,
|
||||||
Unk266 = 266,
|
SetVignette = 266, //NYI
|
||||||
ModImmuneAuraApplySchool = 267,
|
ModImmuneAuraApplySchool = 267,
|
||||||
Unk268 = 268, // Old ModAttackPowerOfStatPercent. Unused 4.3.4
|
Unk268 = 268, // Old ModAttackPowerOfStatPercent. Unused 4.3.4
|
||||||
ModIgnoreTargetResist = 269,
|
ModIgnoreTargetResist = 269,
|
||||||
ModSchoolMaskDamageFromCaster = 270,
|
ModSchoolMaskDamageFromCaster = 270,
|
||||||
ModSpellDamageFromCaster = 271,
|
ModSpellDamageFromCaster = 271,
|
||||||
IgnoreMeleeReset = 272,
|
ModBlockValuePct = 272, //NYI
|
||||||
XRay = 273,
|
XRay = 273,
|
||||||
Unk274 = 274, // Old AbilityConsumeNoAmmo, Unused 4.3.4
|
ModBlockValueFlat = 274, //NYI
|
||||||
ModIgnoreShapeshift = 275,
|
ModIgnoreShapeshift = 275,
|
||||||
ModDamageDoneForMechanic = 276,
|
ModDamageDoneForMechanic = 276,
|
||||||
Unk277 = 277, // Old ModMaxAffectedTargets. Unused 4.3.4
|
Unk277 = 277, // Old ModMaxAffectedTargets. Unused 4.3.4
|
||||||
@@ -316,10 +316,10 @@ namespace Framework.Constants
|
|||||||
OpenStable = 292,
|
OpenStable = 292,
|
||||||
OverrideSpells = 293,
|
OverrideSpells = 293,
|
||||||
PreventRegeneratePower = 294,
|
PreventRegeneratePower = 294,
|
||||||
Unk295 = 295,
|
ModPeriodicDamageTaken = 295,
|
||||||
SetVehicleId = 296,
|
SetVehicleId = 296,
|
||||||
BlockSpellFamily = 297,
|
ModRootDisableGravity = 297, //NYI
|
||||||
Strangulate = 298,
|
ModStunDisableGravity = 298, //NYI
|
||||||
Unk299 = 299,
|
Unk299 = 299,
|
||||||
ShareDamagePct = 300,
|
ShareDamagePct = 300,
|
||||||
SchoolHealAbsorb = 301,
|
SchoolHealAbsorb = 301,
|
||||||
@@ -327,14 +327,14 @@ namespace Framework.Constants
|
|||||||
ModDamageDoneVersusAurastate = 303,
|
ModDamageDoneVersusAurastate = 303,
|
||||||
ModFakeInebriate = 304,
|
ModFakeInebriate = 304,
|
||||||
ModMinimumSpeed = 305,
|
ModMinimumSpeed = 305,
|
||||||
Unk306 = 306,
|
ModCritChanceForCaster = 306,
|
||||||
CastWhileWalkingBySpellLabel = 307, //NYI
|
CastWhileWalkingBySpellLabel = 307, //NYI
|
||||||
ModCritChanceForCasterWithAbilities = 308,
|
ModCritChanceForCasterWithAbilities = 308,
|
||||||
ModResilience = 309, // NYI
|
ModResilience = 309, // NYI
|
||||||
ModCreatureAoeDamageAvoidance = 310,
|
ModCreatureAoeDamageAvoidance = 310,
|
||||||
Unk311 = 311,
|
IgnoreCombat = 311, //NYI
|
||||||
AnimReplacementSet = 312,
|
AnimReplacementSet = 312,
|
||||||
Unk313 = 313, // Not Used In 4.3.4 - Related To Mounts
|
MountAnimReplacementSet = 313,
|
||||||
PreventResurrection = 314,
|
PreventResurrection = 314,
|
||||||
UnderwaterWalking = 315,
|
UnderwaterWalking = 315,
|
||||||
SchoolAbsorbOverkill = 316, // NYI - absorbs overkill damage
|
SchoolAbsorbOverkill = 316, // NYI - absorbs overkill damage
|
||||||
@@ -355,12 +355,12 @@ namespace Framework.Constants
|
|||||||
ForceWeather = 331,
|
ForceWeather = 331,
|
||||||
OverrideActionbarSpells = 332,
|
OverrideActionbarSpells = 332,
|
||||||
OverrideActionbarSpellsTriggered = 333, // Spells cast with this override have no cast time or power cost
|
OverrideActionbarSpellsTriggered = 333, // Spells cast with this override have no cast time or power cost
|
||||||
ModBlind = 334, // Nyi
|
AutoAttackCritChance = 334,
|
||||||
Unk335 = 335,
|
Unk335 = 335,
|
||||||
MountRestrictions = 336,
|
MountRestrictions = 336,
|
||||||
ModVendorItemsPrices = 337,
|
ModVendorItemsPrices = 337,
|
||||||
ModDurabilityLoss = 338,
|
ModDurabilityLoss = 338,
|
||||||
ModCritChanceForCaster = 339, // Nyi
|
ModCritChanceForCasterPet = 339,
|
||||||
ModResurrectedHealthByGuildMember = 340, // Increases Health Gained When Resurrected By A Guild Member By X
|
ModResurrectedHealthByGuildMember = 340, // Increases Health Gained When Resurrected By A Guild Member By X
|
||||||
ModSpellCategoryCooldown = 341,
|
ModSpellCategoryCooldown = 341,
|
||||||
ModMeleeRangedHaste2 = 342,
|
ModMeleeRangedHaste2 = 342,
|
||||||
@@ -371,11 +371,11 @@ namespace Framework.Constants
|
|||||||
ModSpellCooldownByHaste = 347,
|
ModSpellCooldownByHaste = 347,
|
||||||
ModMoneyGain = 348, // Modifies gold gains from source: [Misc = 0, Quests][Misc = 1, Loot]
|
ModMoneyGain = 348, // Modifies gold gains from source: [Misc = 0, Quests][Misc = 1, Loot]
|
||||||
ModCurrencyGain = 349,
|
ModCurrencyGain = 349,
|
||||||
ModGatheringItemsGainedPercent = 350, // Nyi
|
Unk350 = 350,
|
||||||
Unk351 = 351,
|
ModCurrencyCategoryGainPct = 351, //NYI
|
||||||
Unk352 = 352,
|
Unk352 = 352,
|
||||||
ModCamouflage = 353, // Nyi
|
ModCamouflage = 353, // Nyi
|
||||||
Unk354 = 354, // Restoration Shaman Mastery - Mod Healing Based On Target'S Health (Less = More Healing)
|
ModHealingDonePctVersusTargetHealth = 354, // NYI Restoration Shaman Mastery - Mod Healing Based On Target'S Health (Less = More Healing)
|
||||||
ModCastingSpeed = 355, // NYI
|
ModCastingSpeed = 355, // NYI
|
||||||
ProvideTotemCategory = 356,
|
ProvideTotemCategory = 356,
|
||||||
EnableBoss1UnitFrame = 357,
|
EnableBoss1UnitFrame = 357,
|
||||||
@@ -396,17 +396,17 @@ namespace Framework.Constants
|
|||||||
Unk372 = 372,
|
Unk372 = 372,
|
||||||
ModSpeedNoControl = 373, // NYI
|
ModSpeedNoControl = 373, // NYI
|
||||||
ModifyFallDamagePct = 374,
|
ModifyFallDamagePct = 374,
|
||||||
Unk375 = 375,
|
ModPossessPet = 375,
|
||||||
ModCurrencyGainFromSource = 376, // NYI
|
ModCurrencyGainFromSource = 376, // NYI
|
||||||
CastWhileWalking2 = 377, // NYI
|
CastWhileWalking2 = 377, // NYI
|
||||||
Unk378 = 378,
|
Unk378 = 378,
|
||||||
ModManaRegenPct = 379,
|
ModManaRegenPct = 379,
|
||||||
ModGlobalCooldownByHaste = 380, // Allows melee abilities to benefit from haste GCD reduction
|
Unk380 = 380,
|
||||||
ModDamageTakenFromCasterPet = 381, // NYI
|
ModDamageTakenFromCasterPet = 381, // NYI
|
||||||
ModPetStatPct = 382, // NYI
|
ModPetStatPct = 382, // NYI
|
||||||
IgnoreSpellCooldown = 383,
|
IgnoreSpellCooldown = 383,
|
||||||
Unk384 = 384,
|
Unk384 = 384,
|
||||||
ChanceOverrideAutoattackWithSpellOnSelf = 385,// NYI (with triggered spell cast by the initial caster?)
|
Unk385 = 385,
|
||||||
Unk386 = 386,
|
Unk386 = 386,
|
||||||
Unk387 = 387,
|
Unk387 = 387,
|
||||||
ModTaxiFlightSpeed = 388,
|
ModTaxiFlightSpeed = 388,
|
||||||
@@ -414,7 +414,7 @@ namespace Framework.Constants
|
|||||||
Unk390 = 390,
|
Unk390 = 390,
|
||||||
Unk391 = 391,
|
Unk391 = 391,
|
||||||
Unk392 = 392,
|
Unk392 = 392,
|
||||||
Unk393 = 393,
|
BlockSpellsInFront = 393, //NYI
|
||||||
ShowConfirmationPrompt = 394,
|
ShowConfirmationPrompt = 394,
|
||||||
AreaTrigger = 395, // NYI
|
AreaTrigger = 395, // NYI
|
||||||
TriggerSpellOnPowerAmount = 396,
|
TriggerSpellOnPowerAmount = 396,
|
||||||
@@ -426,7 +426,7 @@ namespace Framework.Constants
|
|||||||
ModOverridePowerDisplay = 402,
|
ModOverridePowerDisplay = 402,
|
||||||
OverrideSpellVisual = 403,
|
OverrideSpellVisual = 403,
|
||||||
OverrideAttackPowerBySpPct = 404,
|
OverrideAttackPowerBySpPct = 404,
|
||||||
ModRatingPct = 405, // NYI
|
ModRatingPct = 405,
|
||||||
KeyboundOverride = 406, // NYI
|
KeyboundOverride = 406, // NYI
|
||||||
ModFear2 = 407,
|
ModFear2 = 407,
|
||||||
SetActionButtonSpellCount = 408,
|
SetActionButtonSpellCount = 408,
|
||||||
@@ -434,8 +434,8 @@ namespace Framework.Constants
|
|||||||
Unk410 = 410,
|
Unk410 = 410,
|
||||||
ModMaxCharges = 411,
|
ModMaxCharges = 411,
|
||||||
Unk412 = 412,
|
Unk412 = 412,
|
||||||
Unk413 = 413,
|
ModRangedAttackDeflectChance = 413, //NYI
|
||||||
Unk414 = 414,
|
ModRangedAttackBlockChanceInFront = 414, //NYI
|
||||||
Unk415 = 415,
|
Unk415 = 415,
|
||||||
ModCooldownByHasteRegen = 416,
|
ModCooldownByHasteRegen = 416,
|
||||||
ModGlobalCooldownByHasteRegen = 417,
|
ModGlobalCooldownByHasteRegen = 417,
|
||||||
|
|||||||
@@ -6592,10 +6592,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
sbyte comboPoints = spell != null ? spell.m_comboPointGain : (sbyte)GetPower(PowerType.ComboPoints);
|
sbyte comboPoints = spell != null ? spell.m_comboPointGain : (sbyte)GetPower(PowerType.ComboPoints);
|
||||||
|
|
||||||
// without combo points lost (duration checked in aura)
|
comboPoints += count;
|
||||||
RemoveAurasByType(AuraType.RetainComboPoints);
|
|
||||||
|
|
||||||
comboPoints += (sbyte)count;
|
|
||||||
|
|
||||||
if (comboPoints > 5)
|
if (comboPoints > 5)
|
||||||
comboPoints = 5;
|
comboPoints = 5;
|
||||||
@@ -6624,9 +6621,6 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
public void ClearComboPoints()
|
public void ClearComboPoints()
|
||||||
{
|
{
|
||||||
// without combopoints lost (duration checked in aura)
|
|
||||||
RemoveAurasByType(AuraType.RetainComboPoints);
|
|
||||||
|
|
||||||
SetPower(PowerType.ComboPoints, 0);
|
SetPower(PowerType.ComboPoints, 0);
|
||||||
}
|
}
|
||||||
public byte GetComboPoints() { return (byte)GetPower(PowerType.ComboPoints); }
|
public byte GetComboPoints() { return (byte)GetPower(PowerType.ComboPoints); }
|
||||||
|
|||||||
@@ -1232,9 +1232,7 @@ namespace Game.Entities
|
|||||||
if (CanDualWield() || offhand.GetTemplate().GetFlags3().HasAnyFlag(ItemFlags3.AlwaysAllowDualWield))
|
if (CanDualWield() || offhand.GetTemplate().GetFlags3().HasAnyFlag(ItemFlags3.AlwaysAllowDualWield))
|
||||||
UpdateDamagePhysical(WeaponAttackType.OffAttack);
|
UpdateDamagePhysical(WeaponAttackType.OffAttack);
|
||||||
|
|
||||||
if (HasAuraType(AuraType.ModSpellDamageOfAttackPower) ||
|
if (HasAuraType(AuraType.OverrideSpellPowerByApPct))
|
||||||
HasAuraType(AuraType.ModSpellHealingOfAttackPower) ||
|
|
||||||
HasAuraType(AuraType.OverrideSpellPowerByApPct))
|
|
||||||
UpdateSpellDamageAndHealingBonus();
|
UpdateSpellDamageAndHealingBonus();
|
||||||
|
|
||||||
if (pet != null && pet.IsPetGhoul()) // At melee attack power change for DK pet
|
if (pet != null && pet.IsPetGhoul()) // At melee attack power change for DK pet
|
||||||
@@ -1253,15 +1251,6 @@ namespace Game.Entities
|
|||||||
float baseValue = value;
|
float baseValue = value;
|
||||||
value *= GetPctModifierValue(unitMod, UnitModifierPctType.Base); // armor percent from items
|
value *= GetPctModifierValue(unitMod, UnitModifierPctType.Base); // armor percent from items
|
||||||
value += GetFlatModifierValue(unitMod, UnitModifierFlatType.Total);
|
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);
|
value *= GetPctModifierValue(unitMod, UnitModifierPctType.Total);
|
||||||
|
|
||||||
SetArmor((int)baseValue, (int)(value - baseValue));
|
SetArmor((int)baseValue, (int)(value - baseValue));
|
||||||
|
|||||||
@@ -2474,17 +2474,6 @@ namespace Game.Entities
|
|||||||
// Ignore Absorption Auras
|
// Ignore Absorption Auras
|
||||||
float auraAbsorbMod = GetMaxPositiveAuraModifierByMiscMask(AuraType.ModTargetAbsorbSchool, (uint)damageInfo.GetSchoolMask());
|
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);
|
MathFunctions.RoundToInterval(ref auraAbsorbMod, 0.0f, 100.0f);
|
||||||
|
|
||||||
int absorbIgnoringDamage = (int)MathFunctions.CalculatePct(damageInfo.GetDamage(), auraAbsorbMod);
|
int absorbIgnoringDamage = (int)MathFunctions.CalculatePct(damageInfo.GetDamage(), auraAbsorbMod);
|
||||||
|
|||||||
@@ -78,9 +78,6 @@ namespace Game.Entities
|
|||||||
DoneAdvertisedBenefit += (int)MathFunctions.CalculatePct(GetStat(usedStat), eff.GetAmount());
|
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;
|
return DoneAdvertisedBenefit;
|
||||||
}
|
}
|
||||||
@@ -383,12 +380,6 @@ namespace Game.Entities
|
|||||||
Stats usedStat = (Stats)(i.GetSpellEffectInfo().MiscValue);
|
Stats usedStat = (Stats)(i.GetSpellEffectInfo().MiscValue);
|
||||||
advertisedBenefit += (uint)MathFunctions.CalculatePct(GetStat(usedStat), i.GetAmount());
|
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;
|
return advertisedBenefit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1034,11 +1034,6 @@ namespace Game.Spells
|
|||||||
modOwner.ApplySpellMod(GetId(), SpellModOp.ResistDispelChance, ref resistChance);
|
modOwner.ApplySpellMod(GetId(), SpellModOp.ResistDispelChance, ref resistChance);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dispel resistance from target SPELL_AURA_MOD_DISPEL_RESIST
|
|
||||||
// Only affects offensive dispels
|
|
||||||
if (offensive && auraTarget != null)
|
|
||||||
resistChance += auraTarget.GetTotalAuraModifier(AuraType.ModDispelResist);
|
|
||||||
|
|
||||||
resistChance = resistChance < 0 ? 0 : resistChance;
|
resistChance = resistChance < 0 ? 0 : resistChance;
|
||||||
resistChance = resistChance > 100 ? 100 : resistChance;
|
resistChance = resistChance > 100 ? 100 : resistChance;
|
||||||
return 100 - resistChance;
|
return 100 - resistChance;
|
||||||
|
|||||||
@@ -957,43 +957,6 @@ namespace Game.Spells
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region AuraEffect Handlers
|
#region AuraEffect Handlers
|
||||||
[AuraEffectHandler(AuraType.None)]
|
|
||||||
[AuraEffectHandler(AuraType.Unk46)]
|
|
||||||
[AuraEffectHandler(AuraType.Unk48)]
|
|
||||||
[AuraEffectHandler(AuraType.PetDamageMulti)]
|
|
||||||
[AuraEffectHandler(AuraType.ModCriticalThreat)]
|
|
||||||
[AuraEffectHandler(AuraType.ModCooldown)]
|
|
||||||
[AuraEffectHandler(AuraType.Unk214)]
|
|
||||||
[AuraEffectHandler(AuraType.ModDetaunt)]
|
|
||||||
[AuraEffectHandler(AuraType.ModSpellDamageFromHealing)]
|
|
||||||
[AuraEffectHandler(AuraType.ModTargetResistBySpellClass)]
|
|
||||||
[AuraEffectHandler(AuraType.ModDamageDoneForMechanic)]
|
|
||||||
[AuraEffectHandler(AuraType.BlockSpellFamily)]
|
|
||||||
[AuraEffectHandler(AuraType.Strangulate)]
|
|
||||||
[AuraEffectHandler(AuraType.ModCritChanceForCaster)]
|
|
||||||
[AuraEffectHandler(AuraType.Unk311)]
|
|
||||||
[AuraEffectHandler(AuraType.AnimReplacementSet)]
|
|
||||||
[AuraEffectHandler(AuraType.ModSpellPowerPct)]
|
|
||||||
[AuraEffectHandler(AuraType.OverrideUnlockedAzeriteEssenceRank)]
|
|
||||||
[AuraEffectHandler(AuraType.ModBlind)]
|
|
||||||
[AuraEffectHandler(AuraType.Unk335)]
|
|
||||||
[AuraEffectHandler(AuraType.MountRestrictions)]
|
|
||||||
[AuraEffectHandler(AuraType.ModResurrectedHealthByGuildMember)]
|
|
||||||
[AuraEffectHandler(AuraType.ModSpellCooldownByHaste)]
|
|
||||||
[AuraEffectHandler(AuraType.ModGatheringItemsGainedPercent)]
|
|
||||||
[AuraEffectHandler(AuraType.Unk351)]
|
|
||||||
[AuraEffectHandler(AuraType.Unk352)]
|
|
||||||
[AuraEffectHandler(AuraType.ModCamouflage)]
|
|
||||||
[AuraEffectHandler(AuraType.Unk354)]
|
|
||||||
[AuraEffectHandler(AuraType.EnableBoss1UnitFrame)]
|
|
||||||
[AuraEffectHandler(AuraType.WorgenAlteredForm)]
|
|
||||||
[AuraEffectHandler(AuraType.ProcTriggerSpellCopy)]
|
|
||||||
[AuraEffectHandler(AuraType.OverrideAutoattackWithMeleeSpell)]
|
|
||||||
[AuraEffectHandler(AuraType.ModNextSpell)]
|
|
||||||
[AuraEffectHandler(AuraType.MaxFarClipPlane)]
|
|
||||||
[AuraEffectHandler(AuraType.EnablePowerBarTimer)]
|
|
||||||
void HandleUnused(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply) { }
|
|
||||||
|
|
||||||
/**************************************/
|
/**************************************/
|
||||||
/*** VISIBILITY & PHASES ***/
|
/*** VISIBILITY & PHASES ***/
|
||||||
/**************************************/
|
/**************************************/
|
||||||
@@ -1949,7 +1912,7 @@ namespace Game.Spells
|
|||||||
HandleAuraModSilence(aurApp, mode, apply);
|
HandleAuraModSilence(aurApp, mode, apply);
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.AllowOnlyAbility)]
|
[AuraEffectHandler(AuraType.DisableCastingExceptAbilities)]
|
||||||
void HandleAuraAllowOnlyAbility(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
void HandleAuraAllowOnlyAbility(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||||
{
|
{
|
||||||
if (!mode.HasAnyFlag(AuraEffectHandleModes.SendForClientMask))
|
if (!mode.HasAnyFlag(AuraEffectHandleModes.SendForClientMask))
|
||||||
@@ -1963,7 +1926,7 @@ namespace Game.Spells
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// do not remove unit flag if there are more than this auraEffect of that kind on unit on unit
|
// do not remove unit flag if there are more than this auraEffect of that kind on unit on unit
|
||||||
if (target.HasAuraType(AuraType.AllowOnlyAbility))
|
if (target.HasAuraType(AuraType.DisableCastingExceptAbilities))
|
||||||
return;
|
return;
|
||||||
target.RemovePlayerFlag(PlayerFlags.AllowOnlyAbility);
|
target.RemovePlayerFlag(PlayerFlags.AllowOnlyAbility);
|
||||||
}
|
}
|
||||||
@@ -3135,38 +3098,6 @@ namespace Game.Spells
|
|||||||
target.ToPlayer().UpdateSpellDamageAndHealingBonus();
|
target.ToPlayer().UpdateSpellDamageAndHealingBonus();
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModSpellDamageOfAttackPower)]
|
|
||||||
void HandleModSpellDamagePercentFromAttackPower(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
|
||||||
{
|
|
||||||
if (!mode.HasAnyFlag((AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
Unit target = aurApp.GetTarget();
|
|
||||||
|
|
||||||
if (!target.IsTypeId(TypeId.Player))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Magic damage modifiers implemented in Unit.SpellDamageBonus
|
|
||||||
// This information for client side use only
|
|
||||||
// Recalculate bonus
|
|
||||||
target.ToPlayer().UpdateSpellDamageAndHealingBonus();
|
|
||||||
}
|
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModSpellHealingOfAttackPower)]
|
|
||||||
void HandleModSpellHealingPercentFromAttackPower(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
|
||||||
{
|
|
||||||
if (!mode.HasAnyFlag((AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
Unit target = aurApp.GetTarget();
|
|
||||||
|
|
||||||
if (!target.IsTypeId(TypeId.Player))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Recalculate bonus
|
|
||||||
target.ToPlayer().UpdateSpellDamageAndHealingBonus();
|
|
||||||
}
|
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModHealingDone)]
|
[AuraEffectHandler(AuraType.ModHealingDone)]
|
||||||
void HandleModHealingDone(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
void HandleModHealingDone(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||||
{
|
{
|
||||||
@@ -3237,29 +3168,6 @@ namespace Game.Spells
|
|||||||
target.SetHealth(Math.Max(MathFunctions.CalculatePct(target.GetMaxHealth(), healthPct), (zeroHealth ? 0 : 1ul)));
|
target.SetHealth(Math.Max(MathFunctions.CalculatePct(target.GetMaxHealth(), healthPct), (zeroHealth ? 0 : 1ul)));
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModResistanceOfStatPercent)]
|
|
||||||
void HandleAuraModResistenceOfStatPercent(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
|
||||||
{
|
|
||||||
if (!mode.HasAnyFlag((AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
Unit target = aurApp.GetTarget();
|
|
||||||
|
|
||||||
if (!target.IsTypeId(TypeId.Player))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (GetMiscValue() != (int)SpellSchoolMask.Normal)
|
|
||||||
{
|
|
||||||
// support required adding replace UpdateArmor by loop by UpdateResistence at intellect update
|
|
||||||
// and include in UpdateResistence same code as in UpdateArmor for aura mod apply.
|
|
||||||
Log.outError(LogFilter.Spells, "Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recalculate Armor
|
|
||||||
target.UpdateArmor();
|
|
||||||
}
|
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModExpertise)]
|
[AuraEffectHandler(AuraType.ModExpertise)]
|
||||||
void HandleAuraModExpertise(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
void HandleAuraModExpertise(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||||
{
|
{
|
||||||
@@ -3389,21 +3297,6 @@ namespace Game.Spells
|
|||||||
HandleModPowerRegen(aurApp, mode, apply);
|
HandleModPowerRegen(aurApp, mode, apply);
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModManaRegenFromStat)]
|
|
||||||
void HandleModManaRegen(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
|
||||||
{
|
|
||||||
if (!mode.HasAnyFlag((AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
Unit target = aurApp.GetTarget();
|
|
||||||
|
|
||||||
if (!target.IsTypeId(TypeId.Player))
|
|
||||||
return;
|
|
||||||
|
|
||||||
//Note: an increase in regen does NOT cause threat.
|
|
||||||
target.ToPlayer().UpdateManaRegen();
|
|
||||||
}
|
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModManaRegenPct)]
|
[AuraEffectHandler(AuraType.ModManaRegenPct)]
|
||||||
void HandleModManaRegenPct(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
void HandleModManaRegenPct(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||||
{
|
{
|
||||||
@@ -3709,7 +3602,15 @@ namespace Game.Spells
|
|||||||
[AuraEffectHandler(AuraType.InterruptRegen)]
|
[AuraEffectHandler(AuraType.InterruptRegen)]
|
||||||
void HandleAuraModRegenInterrupt(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
void HandleAuraModRegenInterrupt(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||||
{
|
{
|
||||||
HandleModManaRegen(aurApp, mode, apply);
|
if (!mode.HasAnyFlag(AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat))
|
||||||
|
return;
|
||||||
|
|
||||||
|
Unit target = aurApp.GetTarget();
|
||||||
|
|
||||||
|
if (!target.IsPlayer())
|
||||||
|
return;
|
||||||
|
|
||||||
|
target.ToPlayer().UpdateManaRegen();
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModWeaponCritPercent)]
|
[AuraEffectHandler(AuraType.ModWeaponCritPercent)]
|
||||||
@@ -4194,23 +4095,6 @@ namespace Game.Spells
|
|||||||
target.ToPlayer().SetNoRegentCostMask(mask);
|
target.ToPlayer().SetNoRegentCostMask(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.RetainComboPoints)]
|
|
||||||
void HandleAuraRetainComboPoints(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
|
||||||
{
|
|
||||||
if (!mode.HasAnyFlag(AuraEffectHandleModes.Real))
|
|
||||||
return;
|
|
||||||
|
|
||||||
Unit target = aurApp.GetTarget();
|
|
||||||
|
|
||||||
if (!target.IsTypeId(TypeId.Player))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// combo points was added in SPELL_EFFECT_ADD_COMBO_POINTS handler
|
|
||||||
// remove only if aura expire by time (in case combo points amount change aura removed without combo points lost)
|
|
||||||
if (!apply && aurApp.GetRemoveMode() == AuraRemoveMode.Expire)
|
|
||||||
target.ToPlayer().AddComboPoints((sbyte)-GetAmount());
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
/*** OTHERS ***/
|
/*** OTHERS ***/
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
|
|||||||
@@ -3286,17 +3286,7 @@ namespace Game.Spells
|
|||||||
|
|
||||||
if (IsAutoActionResetSpell())
|
if (IsAutoActionResetSpell())
|
||||||
{
|
{
|
||||||
bool found = false;
|
if (!m_spellInfo.HasAttribute(SpellAttr2.NotResetAutoActions))
|
||||||
var vIgnoreReset = m_caster.GetAuraEffectsByType(AuraType.IgnoreMeleeReset);
|
|
||||||
foreach (var i in vIgnoreReset)
|
|
||||||
{
|
|
||||||
if (i.IsAffectingSpell(m_spellInfo))
|
|
||||||
{
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!found && !m_spellInfo.HasAttribute(SpellAttr2.NotResetAutoActions))
|
|
||||||
{
|
{
|
||||||
m_caster.ResetAttackTimer(WeaponAttackType.BaseAttack);
|
m_caster.ResetAttackTimer(WeaponAttackType.BaseAttack);
|
||||||
if (m_caster.HaveOffhandWeapon())
|
if (m_caster.HaveOffhandWeapon())
|
||||||
@@ -4533,9 +4523,6 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_caster.HasAuraTypeWithMiscvalue(AuraType.BlockSpellFamily, (int)m_spellInfo.SpellFamilyName))
|
|
||||||
return SpellCastResult.SpellUnavailable;
|
|
||||||
|
|
||||||
bool reqCombat = true;
|
bool reqCombat = true;
|
||||||
var stateAuras = m_caster.GetAuraEffectsByType(AuraType.AbilityIgnoreAurastate);
|
var stateAuras = m_caster.GetAuraEffectsByType(AuraType.AbilityIgnoreAurastate);
|
||||||
foreach (var aura in stateAuras)
|
foreach (var aura in stateAuras)
|
||||||
@@ -5645,7 +5632,7 @@ namespace Game.Spells
|
|||||||
bool CheckSpellCancelsStun(ref uint param1)
|
bool CheckSpellCancelsStun(ref uint param1)
|
||||||
{
|
{
|
||||||
return CheckSpellCancelsAuraEffect(AuraType.ModStun, ref param1) &&
|
return CheckSpellCancelsAuraEffect(AuraType.ModStun, ref param1) &&
|
||||||
CheckSpellCancelsAuraEffect(AuraType.Strangulate, ref param1);
|
CheckSpellCancelsAuraEffect(AuraType.ModStunDisableGravity, ref param1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckSpellCancelsSilence(ref uint param1)
|
bool CheckSpellCancelsSilence(ref uint param1)
|
||||||
@@ -7232,7 +7219,7 @@ namespace Game.Spells
|
|||||||
m_spellInfo.HasAttribute(SpellAttr0.ReqAmmo) || m_spellInfo.HasAttribute(SpellAttr0.Ability);
|
m_spellInfo.HasAttribute(SpellAttr0.ReqAmmo) || m_spellInfo.HasAttribute(SpellAttr0.Ability);
|
||||||
|
|
||||||
// Apply haste rating
|
// Apply haste rating
|
||||||
if (gcd > 750 && ((m_spellInfo.StartRecoveryCategory == 133 && !isMeleeOrRangedSpell) || m_caster.HasAuraTypeWithAffectMask(AuraType.ModGlobalCooldownByHaste, m_spellInfo)))
|
if (gcd > 750 && (m_spellInfo.StartRecoveryCategory == 133 && !isMeleeOrRangedSpell))
|
||||||
{
|
{
|
||||||
gcd = (int)(gcd * m_caster.m_unitData.ModSpellHaste);
|
gcd = (int)(gcd * m_caster.m_unitData.ModSpellHaste);
|
||||||
MathFunctions.RoundToInterval(ref gcd, 750, 1500);
|
MathFunctions.RoundToInterval(ref gcd, 750, 1500);
|
||||||
|
|||||||
Reference in New Issue
Block a user