Fixed item duplication exploit

Closes issue #3035.

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-07-20 21:37:15 +02:00
parent a7c52864b4
commit 66e068436b
@@ -12324,6 +12324,13 @@ void Player::SwapItem(uint16 src, uint16 dst)
return; return;
} }
// prevent equipping bag in the same slot from its inside
if (IsBagPos(dst) && srcbag == dstslot)
{
SendEquipError(EQUIP_ERR_ITEMS_CANT_BE_SWAPPED, pSrcItem, pDstItem);
return;
}
// DST checks // DST checks
if (pDstItem) if (pDstItem)