Core/Spells: Implemented SPELL_ATTR6_ALLOW_EQUIP_WHILE_CASTING
Port From (https://github.com/TrinityCore/TrinityCore/commit/24434c687d8662eff42202c96d11c45fcf00e2f0)
This commit is contained in:
@@ -4942,8 +4942,15 @@ namespace Game.Entities
|
||||
if (IsInCombat() && (pProto.GetClass() == ItemClass.Weapon || pProto.GetInventoryType() == InventoryType.Relic) && m_weaponChangeTimer != 0)
|
||||
return InventoryResult.ItemCooldown;
|
||||
|
||||
if (IsNonMeleeSpellCast(false))
|
||||
return InventoryResult.ClientLockedOut;
|
||||
Spell currentGenericSpell = GetCurrentSpell(CurrentSpellTypes.Generic);
|
||||
if (currentGenericSpell != null)
|
||||
if (!currentGenericSpell.GetSpellInfo().HasAttribute(SpellAttr6.AllowEquipWhileCasting))
|
||||
return InventoryResult.ClientLockedOut;
|
||||
|
||||
Spell currentChanneledSpell = GetCurrentSpell(CurrentSpellTypes.Channeled);
|
||||
if (currentChanneledSpell != null)
|
||||
if (!currentChanneledSpell.GetSpellInfo().HasAttribute(SpellAttr6.AllowEquipWhileCasting))
|
||||
return InventoryResult.ClientLockedOut;
|
||||
}
|
||||
|
||||
ContentTuningLevels? requiredLevels = null;
|
||||
|
||||
Reference in New Issue
Block a user