mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[8897] More stricted checks for store operations.
* Use stricted definition valid pos for expected explicit pos cases * Prevent attempts add bag to self at autostore.
This commit is contained in:
parent
d48ce8b717
commit
5186046c5e
5 changed files with 20 additions and 18 deletions
|
|
@ -2011,10 +2011,11 @@ bool ChatHandler::HandleItemMoveCommand(const char* args)
|
|||
if(srcslot==dstslot)
|
||||
return true;
|
||||
|
||||
if(!m_session->GetPlayer()->IsValidPos(INVENTORY_SLOT_BAG_0,srcslot))
|
||||
if(!m_session->GetPlayer()->IsValidPos(INVENTORY_SLOT_BAG_0, srcslot, true))
|
||||
return false;
|
||||
|
||||
if(!m_session->GetPlayer()->IsValidPos(INVENTORY_SLOT_BAG_0,dstslot))
|
||||
// can be autostore pos
|
||||
if(!m_session->GetPlayer()->IsValidPos(INVENTORY_SLOT_BAG_0,dstslot, false))
|
||||
return false;
|
||||
|
||||
uint16 src = ((INVENTORY_SLOT_BAG_0 << 8) | srcslot);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue