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
@@ -192,6 +192,12 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
return;
}
if (it->IsBag() && !((Bag*)it)->IsEmpty())
{
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
return;
}
AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
//we have to take deposit :
@@ -219,6 +219,12 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
return;
}
if (item->IsBag() && !((Bag*)item)->IsEmpty())
{
pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_EQUIP_ERROR, EQUIP_ERR_CAN_ONLY_DO_WITH_EMPTY_BAGS);
return;
}
items[i] = item;
}