Core: Added some anti-WPE filter checks to prevent putting non-empty bags into other bags/gbank/mail/auction, original patch from mythcore

Core: Changed inventory saving - will no longer abort operation at single item fail

Closes issue #1994.

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-10-09 17:36:53 +02:00
parent a20dd32de0
commit 324de6fb4c
4 changed files with 61 additions and 32 deletions
+7
View File
@@ -1977,6 +1977,13 @@ void Guild::MoveFromCharToBank(Player * pl, uint8 PlayerBag, uint8 PlayerSlot, u
if (!pItemChar) // Problem to get item from player
return;
// prevent storing non-empty bags
if (pItemChar && pItemChar->IsBag() && !((Bag*)pItemChar)->IsEmpty())
{
pl->SendEquipError(EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS, pItemChar, NULL);
return;
}
if (!pItemChar->CanBeTraded())
{
pl->SendEquipError(EQUIP_ERR_ITEMS_CANT_BE_SWAPPED, pItemChar, NULL);