Avoid access to bag item prototype for getting bag size, use related item update field instead as more fast source.

This commit is contained in:
VladimirMangos 2008-11-01 21:08:39 +03:00
parent 3162a8dc61
commit 6f6ec21b72
5 changed files with 112 additions and 202 deletions

View file

@ -859,12 +859,12 @@ bool ChatHandler::HandleItemMoveCommand(const char* args)
srcslot = (uint8)atoi(pParam1);
dstslot = (uint8)atoi(pParam2);
uint16 src = ((INVENTORY_SLOT_BAG_0 << 8) | srcslot);
uint16 dst = ((INVENTORY_SLOT_BAG_0 << 8) | dstslot);
if(srcslot==dstslot)
return true;
uint16 src = ((INVENTORY_SLOT_BAG_0 << 8) | srcslot);
uint16 dst = ((INVENTORY_SLOT_BAG_0 << 8) | dstslot);
m_session->GetPlayer()->SwapItem( src, dst );
return true;