diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 8ce6c018e..a7990115e 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -18746,7 +18746,7 @@ void Player::SendCooldownEvent(SpellEntry const *spellInfo, uint32 itemId, Spell void Player::UpdatePotionCooldown(Spell* spell) { - // no potion used i combat or still in combat + // no potion used in combat or still in combat if(!m_lastPotionId || isInCombat()) return; diff --git a/src/game/Player.h b/src/game/Player.h index fbc4acee8..41b01354c 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1642,6 +1642,7 @@ class MANGOS_DLL_SPEC Player : public Unit void _LoadSpellCooldowns(QueryResult *result); void _SaveSpellCooldowns(); void SetLastPotionId(uint32 item_id) { m_lastPotionId = item_id; } + uint32 GetLastPotionId() { return m_lastPotionId; } void UpdatePotionCooldown(Spell* spell = NULL); void setResurrectRequestData(uint64 guid, uint32 mapId, float X, float Y, float Z, uint32 health, uint32 mana) diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index bd1b652c2..e3186a3bc 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -112,6 +112,13 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket) } } } + + // Prevent potion drink if another potion in processing (client have potions disabled in like case) + if (pItem->IsPotion() && pUser->GetLastPotionId()) + { + pUser->SendEquipError(EQUIP_ERR_OBJECT_IS_BUSY,pItem,NULL); + return; + } } // check also BIND_WHEN_PICKED_UP and BIND_QUEST_ITEM for .additem or .additemset case by GM (not binded at adding to inventory) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index e3d63e468..715686f07 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9866" + #define REVISION_NR "9867" #endif // __REVISION_NR_H__