[10512] Fixed cast item remove at trade enchanting in some cases

Also nit allow item use spels casts if item in trade.
This commit is contained in:
VladimirMangos 2010-09-21 10:34:01 +04:00
parent 14a240361d
commit 5e9b5a5297
3 changed files with 13 additions and 2 deletions

View file

@ -99,6 +99,14 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
return;
}
// not allow use item from trade (cheat way only)
if (pItem->IsInTrade())
{
recvPacket.rpos(recvPacket.wpos()); // prevent spam at not read packet tail
pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, pItem, NULL );
return;
}
// only allow conjured consumable, bandage, poisons (all should have the 2^21 item flag set in DB)
if (proto->Class == ITEM_CLASS_CONSUMABLE &&
!(proto->Flags & ITEM_FLAGS_USEABLE_IN_ARENA) &&