mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 05:43:12 +01:00
Core/Player: Fixed weapon swap macro while in combat
Closes issue #4954. --HG-- branch : trunk
This commit is contained in:
@@ -11040,7 +11040,7 @@ uint8 Player::CanEquipItem(uint8 slot, uint16 &dest, Item *pItem, bool swap, boo
|
||||
return EQUIP_ERR_NOT_DURING_ARENA_MATCH;
|
||||
}
|
||||
|
||||
if (isInCombat()&& pProto->Class == ITEM_CLASS_WEAPON && m_weaponChangeTimer != 0)
|
||||
if (isInCombat()&& (pProto->Class == ITEM_CLASS_WEAPON || pProto->InventoryType == INVTYPE_RELIC) && m_weaponChangeTimer != 0)
|
||||
return EQUIP_ERR_CANT_DO_RIGHT_NOW; // maybe exist better err
|
||||
|
||||
if (IsNonMeleeSpellCasted(false))
|
||||
@@ -11752,7 +11752,7 @@ Item* Player::EquipItem(uint16 pos, Item *pItem, bool update)
|
||||
{
|
||||
m_weaponChangeTimer = spellProto->StartRecoveryTime;
|
||||
|
||||
CastSpell(this, cooldownSpell, false); // Needed for server side GCD
|
||||
AddGlobalCooldown(spellProto, NULL); // NULL spell is safe (needed for serverside GCD
|
||||
|
||||
WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+4);
|
||||
data << uint64(GetGUID());
|
||||
|
||||
Reference in New Issue
Block a user