[9867] Prevent another potion drink until combat end.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
zhenya 2010-05-11 11:19:10 +04:00 committed by VladimirMangos
parent 3a2c28ca68
commit fd131fb408
4 changed files with 10 additions and 2 deletions

View file

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