Core/Spells: Implemented SPELL_ATTR6_ALLOW_EQUIP_WHILE_CASTING
Port From (https://github.com/TrinityCore/TrinityCore/commit/24434c687d8662eff42202c96d11c45fcf00e2f0)
This commit is contained in:
@@ -1809,7 +1809,7 @@ namespace Framework.Constants
|
|||||||
AiPrimaryRangedAttack = 0x4000, /*Nyi*/ // Ai Primary Ranged Attack
|
AiPrimaryRangedAttack = 0x4000, /*Nyi*/ // Ai Primary Ranged Attack
|
||||||
NoPushback = 0x8000, /*Nyi*/ // No Pushback
|
NoPushback = 0x8000, /*Nyi*/ // No Pushback
|
||||||
NoJumpPathing = 0x10000, /*Nyi*/ // No Jump Pathing
|
NoJumpPathing = 0x10000, /*Nyi*/ // No Jump Pathing
|
||||||
AllowEquipWhileCasting = 0x20000, /*Nyi*/ // Allow Equip While Casting
|
AllowEquipWhileCasting = 0x20000, // Allow Equip While Casting
|
||||||
OriginateFromController = 0x40000, // Originate From Controller Description Client Will Prevent Casting If Not Possessed, Charmer Will Be Caster For All Intents And Purposes
|
OriginateFromController = 0x40000, // Originate From Controller Description Client Will Prevent Casting If Not Possessed, Charmer Will Be Caster For All Intents And Purposes
|
||||||
DelayCombatTimerDuringCast = 0x80000, /*Nyi*/ // Delay Combat Timer During Cast
|
DelayCombatTimerDuringCast = 0x80000, /*Nyi*/ // Delay Combat Timer During Cast
|
||||||
AuraIconOnlyForCasterLimit10 = 0x100000, // Aura Icon Only For Caster (Limit 10) (Client Only)
|
AuraIconOnlyForCasterLimit10 = 0x100000, // Aura Icon Only For Caster (Limit 10) (Client Only)
|
||||||
|
|||||||
@@ -4942,7 +4942,14 @@ namespace Game.Entities
|
|||||||
if (IsInCombat() && (pProto.GetClass() == ItemClass.Weapon || pProto.GetInventoryType() == InventoryType.Relic) && m_weaponChangeTimer != 0)
|
if (IsInCombat() && (pProto.GetClass() == ItemClass.Weapon || pProto.GetInventoryType() == InventoryType.Relic) && m_weaponChangeTimer != 0)
|
||||||
return InventoryResult.ItemCooldown;
|
return InventoryResult.ItemCooldown;
|
||||||
|
|
||||||
if (IsNonMeleeSpellCast(false))
|
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;
|
return InventoryResult.ClientLockedOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user