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
@@ -91,8 +91,8 @@ namespace Framework.Constants
ModDisarm = 67,
ModStalked = 68,
SchoolAbsorb = 69,
ExtraAttacks = 70,
Unk71 = 71,
PeriodicWeaponPercentDamage = 70,
StoreTeleportReturnPoint = 71, // NYI
ModPowerCostSchoolPct = 72,
ModPowerCostSchool = 73,
ReflectSpellsSchool = 74,
@@ -149,7 +149,7 @@ namespace Framework.Constants
ModMeleeDamageTaken = 125,
ModMeleeDamageTakenPct = 126,
RangedAttackPowerAttackerBonus = 127,
ModPossessPet = 128,
ModFixate = 128,
ModSpeedAlways = 129,
ModMountedSpeedAlways = 130,
ModRangedAttackPowerVersus = 131,
@@ -164,17 +164,17 @@ namespace Framework.Constants
ModRangedHaste = 140,
Unk141 = 141, // Old ModRangedAmmoHaste, Unused Now
ModBaseResistancePct = 142,
ModRecoveryRateBySpellLabel = 143, // NYI
ModRecoveryRateBySpellLabel = 143, // NYI
SafeFall = 144,
ModPetTalentPoints = 145,
ModIncreaseHealthPercent2 = 145,
AllowTamePetType = 146,
MechanicImmunityMask = 147,
RetainComboPoints = 148,
ModChargeRecoveryRate = 148, // NYI
ReducePushback = 149, // Reduce Pushback
ModShieldBlockvaluePct = 150,
TrackStealthed = 151, // Track Stealthed
ModDetectedRange = 152, // Mod Detected Range
Unk153 = 153, // Old SplitDamageFlat. Unused 4.3.4
ModAutoAttackRange = 153,
ModStealthLevel = 154, // Stealth Level Modifier
ModWaterBreathing = 155, // Mod Water Breathing
ModReputationGain = 156, // Mod Reputation Gain
@@ -185,12 +185,12 @@ namespace Framework.Constants
ModHealthRegenInCombat = 161,
PowerBurn = 162,
ModCritDamageBonus = 163,
Unk164 = 164,
ForceBeathBar = 164, //NYI
MeleeAttackPowerAttackerBonus = 165,
ModAttackPowerPct = 166,
ModRangedAttackPowerPct = 167,
ModDamageDoneVersus = 168,
Unk169 = 169, // Old ModCritPercentVersus. Unused 4.3.4
SetFFAPvp = 169,
DetectAmore = 170,
ModSpeedNotStack = 171,
ModMountedSpeedNotStack = 172,
@@ -202,9 +202,9 @@ namespace Framework.Constants
ModMaxPowerPct = 178,
ModPowerDisplay = 179,
ModFlatSpellDamageVersus = 180,
Unk181 = 181, // Old ModFlatSpellCritDamageVersus - Possible Flat Spell Crit Damage Versus
ModResistanceOfStatPercent = 182,
ModCriticalThreat = 183,
ModSpellCurrencyReagentsCountPct = 181, // NYI
SuppressItemPassiveEffectBySpellLabel = 182, //NYI
ModCritChanceVersusTargetHealth = 183,
ModAttackerMeleeHitChance = 184,
ModAttackerRangedHitChance = 185,
ModAttackerSpellHitChance = 186,
@@ -216,10 +216,10 @@ namespace Framework.Constants
ModMeleeRangedHaste = 192,
MeleeSlow = 193,
ModTargetAbsorbSchool = 194,
ModTargetAbilityAbsorbSchool = 195,
LearnSpell = 195,
ModCooldown = 196, // Only 24818 Noxious Breath
ModAttackerSpellAndWeaponCritChance = 197,
Unk198 = 198, // Old ModAllWeaponSkills
ModCombatRatingFromCombatRating = 198,
Unk199 = 199, // Old ModIncreasesSpellPctToHit. Unused 4.3.4
ModXpPct = 200,
Fly = 201,
@@ -239,13 +239,13 @@ namespace Framework.Constants
ArenaPreparation = 215,
HasteSpells = 216,
ModMeleeHaste2 = 217,
Unk218 = 218, // old SPELL_AURA_HASTE_RANGED
ModManaRegenFromStat = 219,
AddPctModifierBySpellLabel = 218, //NYI
AddFlatModifierBySpellLabel = 219, //NYI
ModAbilitySchoolMask = 220, //NYI
ModDetaunt = 221,
Unk222 = 222,
Unk223 = 223,
Unk224 = 224,
RemoveTransmogCost = 222,
RemoveBarberShopCost = 223,
LearnTalent = 224, // NYI
ModVisibilityRange = 225,
PeriodicDummy = 226,
PeriodicTriggerSpellWithValue = 227,
@@ -256,10 +256,10 @@ namespace Framework.Constants
MechanicDurationMod = 232,
ChangeModelForAllHumanoids = 233, // Client-Side Only
MechanicDurationModNotStack = 234,
ModDispelResist = 235,
HoverNoHeightOffset = 235,
ControlVehicle = 236,
ModSpellDamageOfAttackPower = 237,
ModSpellHealingOfAttackPower = 238,
Unk237 = 237,
Unk238 = 238,
ModScale2 = 239,
ModExpertise = 240,
ForceMoveForward = 241,
@@ -280,22 +280,22 @@ namespace Framework.Constants
NoReagentUse = 256,
ModTargetResistBySpellClass = 257,
OverrideSummonedObject = 258,
Unk259 = 259, // Old ModHotPct, Unused 4.3.4
ModHotPct = 259,
ScreenEffect = 260,
Phase = 261,
AbilityIgnoreAurastate = 262,
AllowOnlyAbility = 263,
Unk264 = 264,
DisableCastingExceptAbilities = 263,
DisableAttackingExceptAbilities = 264,
Unk265 = 265,
Unk266 = 266,
SetVignette = 266, //NYI
ModImmuneAuraApplySchool = 267,
Unk268 = 268, // Old ModAttackPowerOfStatPercent. Unused 4.3.4
ModIgnoreTargetResist = 269,
ModSchoolMaskDamageFromCaster = 270,
ModSpellDamageFromCaster = 271,
IgnoreMeleeReset = 272,
ModBlockValuePct = 272, //NYI
XRay = 273,
Unk274 = 274, // Old AbilityConsumeNoAmmo, Unused 4.3.4
ModBlockValueFlat = 274, //NYI
ModIgnoreShapeshift = 275,
ModDamageDoneForMechanic = 276,
Unk277 = 277, // Old ModMaxAffectedTargets. Unused 4.3.4
@@ -316,10 +316,10 @@ namespace Framework.Constants
OpenStable = 292,
OverrideSpells = 293,
PreventRegeneratePower = 294,
Unk295 = 295,
ModPeriodicDamageTaken = 295,
SetVehicleId = 296,
BlockSpellFamily = 297,
Strangulate = 298,
ModRootDisableGravity = 297, //NYI
ModStunDisableGravity = 298, //NYI
Unk299 = 299,
ShareDamagePct = 300,
SchoolHealAbsorb = 301,
@@ -327,14 +327,14 @@ namespace Framework.Constants
ModDamageDoneVersusAurastate = 303,
ModFakeInebriate = 304,
ModMinimumSpeed = 305,
Unk306 = 306,
ModCritChanceForCaster = 306,
CastWhileWalkingBySpellLabel = 307, //NYI
ModCritChanceForCasterWithAbilities = 308,
ModResilience = 309, // NYI
ModCreatureAoeDamageAvoidance = 310,
Unk311 = 311,
IgnoreCombat = 311, //NYI
AnimReplacementSet = 312,
Unk313 = 313, // Not Used In 4.3.4 - Related To Mounts
MountAnimReplacementSet = 313,
PreventResurrection = 314,
UnderwaterWalking = 315,
SchoolAbsorbOverkill = 316, // NYI - absorbs overkill damage
@@ -355,12 +355,12 @@ namespace Framework.Constants
ForceWeather = 331,
OverrideActionbarSpells = 332,
OverrideActionbarSpellsTriggered = 333, // Spells cast with this override have no cast time or power cost
ModBlind = 334, // Nyi
AutoAttackCritChance = 334,
Unk335 = 335,
MountRestrictions = 336,
ModVendorItemsPrices = 337,
ModDurabilityLoss = 338,
ModCritChanceForCaster = 339, // Nyi
ModCritChanceForCasterPet = 339,
ModResurrectedHealthByGuildMember = 340, // Increases Health Gained When Resurrected By A Guild Member By X
ModSpellCategoryCooldown = 341,
ModMeleeRangedHaste2 = 342,
@@ -371,11 +371,11 @@ namespace Framework.Constants
ModSpellCooldownByHaste = 347,
ModMoneyGain = 348, // Modifies gold gains from source: [Misc = 0, Quests][Misc = 1, Loot]
ModCurrencyGain = 349,
ModGatheringItemsGainedPercent = 350, // Nyi
Unk351 = 351,
Unk350 = 350,
ModCurrencyCategoryGainPct = 351, //NYI
Unk352 = 352,
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
ProvideTotemCategory = 356,
EnableBoss1UnitFrame = 357,
@@ -396,17 +396,17 @@ namespace Framework.Constants
Unk372 = 372,
ModSpeedNoControl = 373, // NYI
ModifyFallDamagePct = 374,
Unk375 = 375,
ModPossessPet = 375,
ModCurrencyGainFromSource = 376, // NYI
CastWhileWalking2 = 377, // NYI
Unk378 = 378,
ModManaRegenPct = 379,
ModGlobalCooldownByHaste = 380, // Allows melee abilities to benefit from haste GCD reduction
Unk380 = 380,
ModDamageTakenFromCasterPet = 381, // NYI
ModPetStatPct = 382, // NYI
IgnoreSpellCooldown = 383,
Unk384 = 384,
ChanceOverrideAutoattackWithSpellOnSelf = 385,// NYI (with triggered spell cast by the initial caster?)
Unk385 = 385,
Unk386 = 386,
Unk387 = 387,
ModTaxiFlightSpeed = 388,
@@ -414,7 +414,7 @@ namespace Framework.Constants
Unk390 = 390,
Unk391 = 391,
Unk392 = 392,
Unk393 = 393,
BlockSpellsInFront = 393, //NYI
ShowConfirmationPrompt = 394,
AreaTrigger = 395, // NYI
TriggerSpellOnPowerAmount = 396,
@@ -426,7 +426,7 @@ namespace Framework.Constants
ModOverridePowerDisplay = 402,
OverrideSpellVisual = 403,
OverrideAttackPowerBySpPct = 404,
ModRatingPct = 405, // NYI
ModRatingPct = 405,
KeyboundOverride = 406, // NYI
ModFear2 = 407,
SetActionButtonSpellCount = 408,
@@ -434,8 +434,8 @@ namespace Framework.Constants
Unk410 = 410,
ModMaxCharges = 411,
Unk412 = 412,
Unk413 = 413,
Unk414 = 414,
ModRangedAttackDeflectChance = 413, //NYI
ModRangedAttackBlockChanceInFront = 414, //NYI
Unk415 = 415,
ModCooldownByHasteRegen = 416,
ModGlobalCooldownByHasteRegen = 417,
+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;
}
-5
View File
@@ -1034,11 +1034,6 @@ namespace Game.Spells
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 > 100 ? 100 : resistChance;
return 100 - resistChance;
+11 -127
View File
@@ -957,43 +957,6 @@ namespace Game.Spells
#endregion
#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 ***/
/**************************************/
@@ -1949,7 +1912,7 @@ namespace Game.Spells
HandleAuraModSilence(aurApp, mode, apply);
}
[AuraEffectHandler(AuraType.AllowOnlyAbility)]
[AuraEffectHandler(AuraType.DisableCastingExceptAbilities)]
void HandleAuraAllowOnlyAbility(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
if (!mode.HasAnyFlag(AuraEffectHandleModes.SendForClientMask))
@@ -1963,7 +1926,7 @@ namespace Game.Spells
else
{
// 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;
target.RemovePlayerFlag(PlayerFlags.AllowOnlyAbility);
}
@@ -3135,38 +3098,6 @@ namespace Game.Spells
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)]
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)));
}
[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)]
void HandleAuraModExpertise(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
@@ -3389,21 +3297,6 @@ namespace Game.Spells
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)]
void HandleModManaRegenPct(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
{
@@ -3709,7 +3602,15 @@ namespace Game.Spells
[AuraEffectHandler(AuraType.InterruptRegen)]
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)]
@@ -4194,23 +4095,6 @@ namespace Game.Spells
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 ***/
/*********************************************************/
+3 -16
View File
@@ -3286,17 +3286,7 @@ namespace Game.Spells
if (IsAutoActionResetSpell())
{
bool found = false;
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))
if (!m_spellInfo.HasAttribute(SpellAttr2.NotResetAutoActions))
{
m_caster.ResetAttackTimer(WeaponAttackType.BaseAttack);
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;
var stateAuras = m_caster.GetAuraEffectsByType(AuraType.AbilityIgnoreAurastate);
foreach (var aura in stateAuras)
@@ -5645,7 +5632,7 @@ namespace Game.Spells
bool CheckSpellCancelsStun(ref uint param1)
{
return CheckSpellCancelsAuraEffect(AuraType.ModStun, ref param1) &&
CheckSpellCancelsAuraEffect(AuraType.Strangulate, ref param1);
CheckSpellCancelsAuraEffect(AuraType.ModStunDisableGravity, ref param1);
}
bool CheckSpellCancelsSilence(ref uint param1)
@@ -7232,7 +7219,7 @@ namespace Game.Spells
m_spellInfo.HasAttribute(SpellAttr0.ReqAmmo) || m_spellInfo.HasAttribute(SpellAttr0.Ability);
// 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);
MathFunctions.RoundToInterval(ref gcd, 750, 1500);