Core/Spells: Implemented SPELL_ATTR9_HASTE_AFFECTS_MELEE_ABILITY_CASTTIME
Port From (https://github.com/TrinityCore/TrinityCore/commit/0d5a1b175fbd4ae7410a84bf60645c52abf712ee)
This commit is contained in:
@@ -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