mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
Better check client inventory pos data received in some client packets to skip invalid cases.
This commit is contained in:
parent
6f6ec21b72
commit
d54e53c709
4 changed files with 122 additions and 0 deletions
|
|
@ -862,6 +862,12 @@ bool ChatHandler::HandleItemMoveCommand(const char* args)
|
|||
if(srcslot==dstslot)
|
||||
return true;
|
||||
|
||||
if(!m_session->GetPlayer()->IsValidPos(INVENTORY_SLOT_BAG_0,srcslot))
|
||||
return false;
|
||||
|
||||
if(!m_session->GetPlayer()->IsValidPos(INVENTORY_SLOT_BAG_0,dstslot))
|
||||
return false;
|
||||
|
||||
uint16 src = ((INVENTORY_SLOT_BAG_0 << 8) | srcslot);
|
||||
uint16 dst = ((INVENTORY_SLOT_BAG_0 << 8) | dstslot);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue