mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
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:
parent
99ff9ab5d9
commit
aaddf4b51b
5 changed files with 112 additions and 202 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue