aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclick <none@none>2010-11-07 22:28:03 +0100
committerclick <none@none>2010-11-07 22:28:03 +0100
commit44850aab07663d7cb24ed24dd4e7d224b98abfb8 (patch)
treeeb2d5fd834b7f99ff3dc1df92532a3d228afbbf8
parentc58e227ffac4466a3e9d57ee85f91e4fe22abaa6 (diff)
Core: Disallow moving currency tokens out of their hidden bag - fix by leak
--HG-- branch : trunk
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 56c85871059..07e56dafe89 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -11190,6 +11190,15 @@ uint8 Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *pI
if (pItem->IsBindedNotWith(this))
return EQUIP_ERR_DONT_OWN_THAT_ITEM;
+ // Currency tokens are not supposed to be swapped out of their hidden bag
+ uint8 pItemslot = pItem->GetSlot();
+ if (pItemslot >= CURRENCYTOKEN_SLOT_START && pItemslot < CURRENCYTOKEN_SLOT_END)
+ {
+ sLog.outError("Possible hacking attempt: Player %s [guid: %u] tried to move token [guid: %u, entry: %u] out of the currency bag!",
+ GetName(), GetGUIDLow(), pItem->GetGUIDLow(), pProto->ItemId);
+ return EQUIP_ERR_ITEMS_CANT_BE_SWAPPED;
+ }
+
// check count of items (skip for auto move for same player from bank)
uint8 res = CanTakeMoreSimilarItems(pItem);
if (res != EQUIP_ERR_OK)