Core/Auras: Renamed a bunch of unknown or changed spell aura types and implemented some of them
Port From (https://github.com/TrinityCore/TrinityCore/commit/d697882dfbb16242b7aa0b915fb116a14039ac5e)
This commit is contained in:
@@ -301,7 +301,7 @@ namespace Framework.Constants
|
|||||||
Unk277 = 277, // Old ModMaxAffectedTargets. Unused 4.3.4
|
Unk277 = 277, // Old ModMaxAffectedTargets. Unused 4.3.4
|
||||||
ModDisarmRanged = 278,
|
ModDisarmRanged = 278,
|
||||||
InitializeImages = 279,
|
InitializeImages = 279,
|
||||||
Unk280 = 280, // Old ModArmorPenetrationPct Unused 4.3.4
|
ProvideSpellFocus = 280,
|
||||||
ModGuildReputationGainPct = 281, // NYI
|
ModGuildReputationGainPct = 281, // NYI
|
||||||
ModBaseHealthPct = 282,
|
ModBaseHealthPct = 282,
|
||||||
ModHealingReceived = 283, // Possibly Only For Some Spell Family Class Spells
|
ModHealingReceived = 283, // Possibly Only For Some Spell Family Class Spells
|
||||||
@@ -328,8 +328,8 @@ namespace Framework.Constants
|
|||||||
ModFakeInebriate = 304,
|
ModFakeInebriate = 304,
|
||||||
ModMinimumSpeed = 305,
|
ModMinimumSpeed = 305,
|
||||||
Unk306 = 306,
|
Unk306 = 306,
|
||||||
HealAbsorbTest = 307,
|
CastWhileWalkingBySpellLabel = 307, //NYI
|
||||||
ModCritChanceForCaster = 308,
|
ModCritChanceForCasterWithAbilities = 308,
|
||||||
ModResilience = 309, // NYI
|
ModResilience = 309, // NYI
|
||||||
ModCreatureAoeDamageAvoidance = 310,
|
ModCreatureAoeDamageAvoidance = 310,
|
||||||
Unk311 = 311,
|
Unk311 = 311,
|
||||||
@@ -337,7 +337,7 @@ namespace Framework.Constants
|
|||||||
Unk313 = 313, // Not Used In 4.3.4 - Related To Mounts
|
Unk313 = 313, // Not Used In 4.3.4 - Related To Mounts
|
||||||
PreventResurrection = 314,
|
PreventResurrection = 314,
|
||||||
UnderwaterWalking = 315,
|
UnderwaterWalking = 315,
|
||||||
PeriodicHaste = 316, // Not Used In 4.3.4 (Name From 3.3.5a)
|
SchoolAbsorbOverkill = 316, // NYI - absorbs overkill damage
|
||||||
ModSpellPowerPct = 317,
|
ModSpellPowerPct = 317,
|
||||||
Mastery = 318,
|
Mastery = 318,
|
||||||
ModMeleeHaste3 = 319,
|
ModMeleeHaste3 = 319,
|
||||||
@@ -348,7 +348,7 @@ namespace Framework.Constants
|
|||||||
OverrideUnlockedAzeriteEssenceRank = 324, // testing aura
|
OverrideUnlockedAzeriteEssenceRank = 324, // testing aura
|
||||||
LearnPvpTalent = 325, // NYI
|
LearnPvpTalent = 325, // NYI
|
||||||
PhaseGroup = 326, // Phase Related
|
PhaseGroup = 326, // Phase Related
|
||||||
Unk327 = 327, // Not Used In 4.3.4
|
PhaseAlwaysVisible = 327, // NYI - sets PhaseShiftFlags::AlwaysVisible
|
||||||
TriggerSpellOnPowerPct = 328,
|
TriggerSpellOnPowerPct = 328,
|
||||||
ModPowerGainPct = 329, // Nyi
|
ModPowerGainPct = 329, // Nyi
|
||||||
CastWhileWalking = 330,
|
CastWhileWalking = 330,
|
||||||
@@ -360,7 +360,7 @@ namespace Framework.Constants
|
|||||||
MountRestrictions = 336,
|
MountRestrictions = 336,
|
||||||
ModVendorItemsPrices = 337,
|
ModVendorItemsPrices = 337,
|
||||||
ModDurabilityLoss = 338,
|
ModDurabilityLoss = 338,
|
||||||
IncreaseSkillGainChance = 339, // Nyi
|
ModCritChanceForCaster = 339, // Nyi
|
||||||
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,
|
||||||
@@ -377,10 +377,10 @@ namespace Framework.Constants
|
|||||||
ModCamouflage = 353, // Nyi
|
ModCamouflage = 353, // Nyi
|
||||||
Unk354 = 354, // Restoration Shaman Mastery - Mod Healing Based On Target'S Health (Less = More Healing)
|
Unk354 = 354, // Restoration Shaman Mastery - Mod Healing Based On Target'S Health (Less = More Healing)
|
||||||
ModCastingSpeed = 355, // NYI
|
ModCastingSpeed = 355, // NYI
|
||||||
Unk356 = 356, // Arcane Mage Mastery - Mod Damage Based On Current Mana
|
ProvideTotemCategory = 356,
|
||||||
EnableBoss1UnitFrame = 357,
|
EnableBoss1UnitFrame = 357,
|
||||||
WorgenAlteredForm = 358,
|
WorgenAlteredForm = 358,
|
||||||
Unk359 = 359,
|
ModHealingDoneVersusAurastate = 359,
|
||||||
ProcTriggerSpellCopy = 360, // Procs The Same Spell That Caused This Proc (Dragonwrath, Tarecgosa'S Rest)
|
ProcTriggerSpellCopy = 360, // Procs The Same Spell That Caused This Proc (Dragonwrath, Tarecgosa'S Rest)
|
||||||
OverrideAutoattackWithMeleeSpell = 361, // NYI
|
OverrideAutoattackWithMeleeSpell = 361, // NYI
|
||||||
Unk362 = 362, // Not Used In 4.3.4
|
Unk362 = 362, // Not Used In 4.3.4
|
||||||
@@ -391,7 +391,7 @@ namespace Framework.Constants
|
|||||||
OverrideAutoattackWithRangedSpell = 367, // NYI
|
OverrideAutoattackWithRangedSpell = 367, // NYI
|
||||||
Unk368 = 368, // Not Used In 4.3.4
|
Unk368 = 368, // Not Used In 4.3.4
|
||||||
EnablePowerBarTimer = 369,
|
EnablePowerBarTimer = 369,
|
||||||
SetFairFarClip = 370, // Overrides Client'S View Distance Setting To Max("Fair", CurrentSetting)
|
SpellOverrideNameGroup = 370, // picks a random SpellOverrideName id from a group (group id in miscValue)
|
||||||
Unk371 = 371,
|
Unk371 = 371,
|
||||||
Unk372 = 372,
|
Unk372 = 372,
|
||||||
ModSpeedNoControl = 373, // NYI
|
ModSpeedNoControl = 373, // NYI
|
||||||
@@ -402,7 +402,7 @@ namespace Framework.Constants
|
|||||||
Unk378 = 378,
|
Unk378 = 378,
|
||||||
ModManaRegenPct = 379,
|
ModManaRegenPct = 379,
|
||||||
ModGlobalCooldownByHaste = 380, // Allows melee abilities to benefit from haste GCD reduction
|
ModGlobalCooldownByHaste = 380, // Allows melee abilities to benefit from haste GCD reduction
|
||||||
Unk381 = 381,
|
ModDamageTakenFromCasterPet = 381, // NYI
|
||||||
ModPetStatPct = 382, // NYI
|
ModPetStatPct = 382, // NYI
|
||||||
IgnoreSpellCooldown = 383,
|
IgnoreSpellCooldown = 383,
|
||||||
Unk384 = 384,
|
Unk384 = 384,
|
||||||
@@ -420,7 +420,7 @@ namespace Framework.Constants
|
|||||||
TriggerSpellOnPowerAmount = 396,
|
TriggerSpellOnPowerAmount = 396,
|
||||||
Unk397 = 397,
|
Unk397 = 397,
|
||||||
Unk398 = 398,
|
Unk398 = 398,
|
||||||
Unk399 = 399,
|
ModTimeRate = 399,
|
||||||
ModSkill2 = 400,
|
ModSkill2 = 400,
|
||||||
Unk401 = 401,
|
Unk401 = 401,
|
||||||
ModOverridePowerDisplay = 402,
|
ModOverridePowerDisplay = 402,
|
||||||
@@ -429,7 +429,7 @@ namespace Framework.Constants
|
|||||||
ModRatingPct = 405, // NYI
|
ModRatingPct = 405, // NYI
|
||||||
KeyboundOverride = 406, // NYI
|
KeyboundOverride = 406, // NYI
|
||||||
ModFear2 = 407,
|
ModFear2 = 407,
|
||||||
Unk408 = 408,
|
SetActionButtonSpellCount = 408,
|
||||||
CanTurnWhileFalling = 409,
|
CanTurnWhileFalling = 409,
|
||||||
Unk410 = 410,
|
Unk410 = 410,
|
||||||
ModMaxCharges = 411,
|
ModMaxCharges = 411,
|
||||||
@@ -445,12 +445,12 @@ namespace Framework.Constants
|
|||||||
ModAbsorbEffectsDonePct = 421, // NYI
|
ModAbsorbEffectsDonePct = 421, // NYI
|
||||||
ModAbsorbEffectsTakenPct = 422, //NYI
|
ModAbsorbEffectsTakenPct = 422, //NYI
|
||||||
Unk423 = 423,
|
Unk423 = 423,
|
||||||
Unk424 = 424,
|
CasterIgnoreLos = 424, //NYI
|
||||||
Unk425 = 425,
|
Unk425 = 425,
|
||||||
Unk426 = 426,
|
Unk426 = 426,
|
||||||
ScalePlayerLevel = 427, // NYI
|
ScalePlayerLevel = 427, // NYI
|
||||||
LinkedSummon = 428,
|
LinkedSummon = 428,
|
||||||
Unk429 = 429,
|
ModSummonDamage = 429, // NYI - increases damage done by all summons, not just controlled pets
|
||||||
PlayScene = 430,
|
PlayScene = 430,
|
||||||
ModOverrideZonePvpType = 431, // NYI
|
ModOverrideZonePvpType = 431, // NYI
|
||||||
Unk432 = 432,
|
Unk432 = 432,
|
||||||
@@ -491,11 +491,11 @@ namespace Framework.Constants
|
|||||||
ModStatBonusPct = 467,
|
ModStatBonusPct = 467,
|
||||||
TriggerSpellOnHealthPct = 468,
|
TriggerSpellOnHealthPct = 468,
|
||||||
ShowConfirmationPromptWithDifficulty = 469,
|
ShowConfirmationPromptWithDifficulty = 469,
|
||||||
Unk470 = 470,
|
ModAuraTimeRateBySpellLabel = 470, // NYI
|
||||||
ModVersatility = 471,
|
ModVersatility = 471,
|
||||||
Unk472 = 472,
|
Unk472 = 472,
|
||||||
PreventDurabilityLossFromCombat = 473,
|
PreventDurabilityLossFromCombat = 473,
|
||||||
Unk474 = 474,
|
ReplaceItemBonusTree = 474, // NYI
|
||||||
AllowUsingGameobjectsWhileMounted = 475,
|
AllowUsingGameobjectsWhileMounted = 475,
|
||||||
ModCurrencyGainLooted = 476,
|
ModCurrencyGainLooted = 476,
|
||||||
Unk477 = 477,
|
Unk477 = 477,
|
||||||
|
|||||||
@@ -3939,6 +3939,10 @@ namespace Game.Entities
|
|||||||
|
|
||||||
public bool HasItemTotemCategory(uint TotemCategory)
|
public bool HasItemTotemCategory(uint TotemCategory)
|
||||||
{
|
{
|
||||||
|
foreach (AuraEffect providedTotemCategory in GetAuraEffectsByType(AuraType.ProvideTotemCategory))
|
||||||
|
if (Global.DB2Mgr.IsTotemCategoryCompatibleWith((uint)providedTotemCategory.GetMiscValueB(), TotemCategory))
|
||||||
|
return true;
|
||||||
|
|
||||||
int inventoryEnd = InventorySlots.ItemStart + GetInventorySlotCount();
|
int inventoryEnd = InventorySlots.ItemStart + GetInventorySlotCount();
|
||||||
for (byte i = EquipmentSlot.Start; i < inventoryEnd; ++i)
|
for (byte i = EquipmentSlot.Start; i < inventoryEnd; ++i)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -781,10 +781,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
chance += victim.GetTotalAuraModifier(AuraType.ModCritChanceForCaster, aurEff =>
|
chance += victim.GetTotalAuraModifier(AuraType.ModCritChanceForCaster, aurEff =>
|
||||||
{
|
{
|
||||||
if (aurEff.GetCasterGUID() == GetGUID())
|
return aurEff.GetCasterGUID() == GetGUID();
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
chance += victim.GetTotalAuraModifier(AuraType.ModAttackerSpellAndWeaponCritChance);
|
chance += victim.GetTotalAuraModifier(AuraType.ModAttackerSpellAndWeaponCritChance);
|
||||||
|
|||||||
@@ -527,6 +527,12 @@ namespace Game.Entities
|
|||||||
|
|
||||||
float DoneTotalMod = 1.0f;
|
float DoneTotalMod = 1.0f;
|
||||||
|
|
||||||
|
// bonus against aurastate
|
||||||
|
DoneTotalMod *= GetTotalAuraMultiplier(AuraType.ModDamageDoneVersusAurastate, aurEff =>
|
||||||
|
{
|
||||||
|
return victim.HasAuraState((AuraStateType)aurEff.GetMiscValue());
|
||||||
|
});
|
||||||
|
|
||||||
// Healing done percent
|
// Healing done percent
|
||||||
DoneTotalMod *= GetTotalAuraMultiplier(AuraType.ModHealingDonePercent);
|
DoneTotalMod *= GetTotalAuraMultiplier(AuraType.ModHealingDonePercent);
|
||||||
|
|
||||||
@@ -742,11 +748,13 @@ namespace Game.Entities
|
|||||||
// for this types the bonus was already added in GetUnitCriticalChance, do not add twice
|
// for this types the bonus was already added in GetUnitCriticalChance, do not add twice
|
||||||
if (spellProto.DmgClass != SpellDmgClass.Melee && spellProto.DmgClass != SpellDmgClass.Ranged)
|
if (spellProto.DmgClass != SpellDmgClass.Melee && spellProto.DmgClass != SpellDmgClass.Ranged)
|
||||||
{
|
{
|
||||||
|
crit_chance += victim.GetTotalAuraModifier(AuraType.ModCritChanceForCasterWithAbilities, aurEff =>
|
||||||
|
{
|
||||||
|
return aurEff.GetCasterGUID() == GetGUID() && aurEff.IsAffectingSpell(spellProto);
|
||||||
|
});
|
||||||
crit_chance += victim.GetTotalAuraModifier(AuraType.ModCritChanceForCaster, aurEff =>
|
crit_chance += victim.GetTotalAuraModifier(AuraType.ModCritChanceForCaster, aurEff =>
|
||||||
{
|
{
|
||||||
if (aurEff.GetCasterGUID() == GetGUID() && aurEff.IsAffectingSpell(spellProto))
|
return aurEff.GetCasterGUID() != GetGUID();
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -735,7 +735,7 @@ namespace Game.Spells
|
|||||||
{
|
{
|
||||||
int duration = m_spellInfo.GetMaxDuration();
|
int duration = m_spellInfo.GetMaxDuration();
|
||||||
// Calculate duration of periodics affected by haste.
|
// Calculate duration of periodics affected by haste.
|
||||||
if (caster.HasAuraTypeWithAffectMask(AuraType.PeriodicHaste, m_spellInfo) || m_spellInfo.HasAttribute(SpellAttr5.HasteAffectDuration))
|
if (m_spellInfo.HasAttribute(SpellAttr5.HasteAffectDuration))
|
||||||
duration = (int)(duration * caster.m_unitData.ModCastingSpeed);
|
duration = (int)(duration * caster.m_unitData.ModCastingSpeed);
|
||||||
|
|
||||||
SetMaxDuration(duration);
|
SetMaxDuration(duration);
|
||||||
|
|||||||
@@ -983,7 +983,6 @@ namespace Game.Spells
|
|||||||
[AuraEffectHandler(AuraType.ModBlind)]
|
[AuraEffectHandler(AuraType.ModBlind)]
|
||||||
[AuraEffectHandler(AuraType.Unk335)]
|
[AuraEffectHandler(AuraType.Unk335)]
|
||||||
[AuraEffectHandler(AuraType.MountRestrictions)]
|
[AuraEffectHandler(AuraType.MountRestrictions)]
|
||||||
[AuraEffectHandler(AuraType.IncreaseSkillGainChance)]
|
|
||||||
[AuraEffectHandler(AuraType.ModResurrectedHealthByGuildMember)]
|
[AuraEffectHandler(AuraType.ModResurrectedHealthByGuildMember)]
|
||||||
[AuraEffectHandler(AuraType.ModAutoattackDamage)]
|
[AuraEffectHandler(AuraType.ModAutoattackDamage)]
|
||||||
[AuraEffectHandler(AuraType.ModSpellCooldownByHaste)]
|
[AuraEffectHandler(AuraType.ModSpellCooldownByHaste)]
|
||||||
@@ -992,16 +991,13 @@ namespace Game.Spells
|
|||||||
[AuraEffectHandler(AuraType.Unk352)]
|
[AuraEffectHandler(AuraType.Unk352)]
|
||||||
[AuraEffectHandler(AuraType.ModCamouflage)]
|
[AuraEffectHandler(AuraType.ModCamouflage)]
|
||||||
[AuraEffectHandler(AuraType.Unk354)]
|
[AuraEffectHandler(AuraType.Unk354)]
|
||||||
[AuraEffectHandler(AuraType.Unk356)]
|
|
||||||
[AuraEffectHandler(AuraType.EnableBoss1UnitFrame)]
|
[AuraEffectHandler(AuraType.EnableBoss1UnitFrame)]
|
||||||
[AuraEffectHandler(AuraType.WorgenAlteredForm)]
|
[AuraEffectHandler(AuraType.WorgenAlteredForm)]
|
||||||
[AuraEffectHandler(AuraType.Unk359)]
|
|
||||||
[AuraEffectHandler(AuraType.ProcTriggerSpellCopy)]
|
[AuraEffectHandler(AuraType.ProcTriggerSpellCopy)]
|
||||||
[AuraEffectHandler(AuraType.OverrideAutoattackWithMeleeSpell)]
|
[AuraEffectHandler(AuraType.OverrideAutoattackWithMeleeSpell)]
|
||||||
[AuraEffectHandler(AuraType.ModNextSpell)]
|
[AuraEffectHandler(AuraType.ModNextSpell)]
|
||||||
[AuraEffectHandler(AuraType.MaxFarClipPlane)]
|
[AuraEffectHandler(AuraType.MaxFarClipPlane)]
|
||||||
[AuraEffectHandler(AuraType.EnablePowerBarTimer)]
|
[AuraEffectHandler(AuraType.EnablePowerBarTimer)]
|
||||||
[AuraEffectHandler(AuraType.SetFairFarClip)]
|
|
||||||
void HandleUnused(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply) { }
|
void HandleUnused(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply) { }
|
||||||
|
|
||||||
/**************************************/
|
/**************************************/
|
||||||
|
|||||||
@@ -4737,9 +4737,12 @@ namespace Game.Spells
|
|||||||
// check spell focus object
|
// check spell focus object
|
||||||
if (m_spellInfo.RequiresSpellFocus != 0)
|
if (m_spellInfo.RequiresSpellFocus != 0)
|
||||||
{
|
{
|
||||||
focusObject = SearchSpellFocus();
|
if (!m_caster.HasAuraTypeWithMiscvalue(AuraType.ProvideSpellFocus, (int)m_spellInfo.RequiresSpellFocus))
|
||||||
if (!focusObject)
|
{
|
||||||
return SpellCastResult.RequiresSpellFocus;
|
focusObject = SearchSpellFocus();
|
||||||
|
if (!focusObject)
|
||||||
|
return SpellCastResult.RequiresSpellFocus;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
castResult = SpellCastResult.SpellCastOk;
|
castResult = SpellCastResult.SpellCastOk;
|
||||||
|
|||||||
Reference in New Issue
Block a user