Core/Spells: Implemented SPELL_ATTR9_HASTE_AFFECTS_MELEE_ABILITY_CASTTIME
Port From (https://github.com/TrinityCore/TrinityCore/commit/0d5a1b175fbd4ae7410a84bf60645c52abf712ee)
This commit is contained in:
@@ -1979,7 +1979,7 @@ namespace Framework.Constants
|
||||
TargetMustBeGrounded = 0x400, // Target Must Be Grounded
|
||||
AllowWhileBanishedAuraState = 0x800, // Doesn't seem to be doing anything, banish behaves like a regular stun now - tested on patch 10.2.7 with spell 17767 (doesn't have this attribute, only SPELL_ATTR5_ALLOW_WHILE_STUNNED and was castable while banished)
|
||||
FaceUnitTargetUponCompletionOfJumpCharge = 0x1000, // Face unit target upon completion of jump charge
|
||||
Slam = 0x2000, // 13
|
||||
HasteAffectsMeleeAbilityCasttime = 0x2000, // Haste Affects Melee Ability Casttime
|
||||
UsableInRatedBattlegrounds = 0x4000, // 14 Can Be Used In Rated Battlegrounds
|
||||
Unk15 = 0x8000, // 15
|
||||
Unk16 = 0x10000, // 16
|
||||
|
||||
@@ -2041,6 +2041,8 @@ namespace Game.Entities
|
||||
castTime = 0;
|
||||
else if (!(spellInfo.HasAttribute(SpellAttr0.IsAbility) || spellInfo.HasAttribute(SpellAttr0.IsTradeskill) || spellInfo.HasAttribute(SpellAttr3.IgnoreCasterModifiers)) && ((IsPlayer() && spellInfo.SpellFamilyName != 0) || IsCreature()))
|
||||
castTime = unitCaster.CanInstantCast() ? 0 : (int)(castTime * unitCaster.m_unitData.ModCastingSpeed);
|
||||
else if (spellInfo.HasAttribute(SpellAttr0.IsAbility) && spellInfo.HasAttribute(SpellAttr9.HasteAffectsMeleeAbilityCasttime))
|
||||
castTime = (int)(castTime * unitCaster.m_modAttackSpeedPct[(int)WeaponAttackType.BaseAttack]);
|
||||
else if (spellInfo.HasAttribute(SpellAttr0.UsesRangedSlot) && !spellInfo.HasAttribute(SpellAttr2.AutoRepeat))
|
||||
castTime = (int)(castTime * unitCaster.m_modAttackSpeedPct[(int)WeaponAttackType.RangedAttack]);
|
||||
else if (Global.SpellMgr.IsPartOfSkillLine(SkillType.Cooking, spellInfo.Id) && unitCaster.HasAura(67556)) // cooking with Chef Hat.
|
||||
|
||||
Reference in New Issue
Block a user