Core/Player: Fixed weapon swap macro while in combat

Closes issue #4954.

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-12-28 13:07:54 +01:00
parent 0f6533e4bd
commit 9ac813e147

View File

@@ -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());