summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-07-31 20:53:19 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-07-31 20:54:33 +0200
commit4a5b543868ad8884d8923a0aed49dec8374a39c5 (patch)
treec12c3c41a1aa5c5728370155d2aa67a8e942294d /src
parent5caaff6cd3a7ab7c89c563c60e3de3a18c78b060 (diff)
downloadmanaserv-4a5b543868ad8884d8923a0aed49dec8374a39c5.tar.gz
manaserv-4a5b543868ad8884d8923a0aed49dec8374a39c5.tar.bz2
manaserv-4a5b543868ad8884d8923a0aed49dec8374a39c5.tar.xz
manaserv-4a5b543868ad8884d8923a0aed49dec8374a39c5.zip
[UGLY HACK] allows to prevent sending client information about inventory insert
Diffstat (limited to 'src')
-rw-r--r--src/game-server/inventory.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game-server/inventory.cpp b/src/game-server/inventory.cpp
index 66880794..4f5e1811 100644
--- a/src/game-server/inventory.cpp
+++ b/src/game-server/inventory.cpp
@@ -212,7 +212,13 @@ unsigned int Inventory::insert(unsigned int itemId, unsigned int amount)
ItemClass *item = itemManager->getItem(itemId);
if (item)
- item->useTrigger(mCharacter, ITT_IN_INVY);
+ {
+ // EVIL HACK!! This allows to prevent sending the item to client.
+ // We need this hack for money items in lpc!
+ // REVERT THIS AS SOON AS POSSIBLE
+ if (item->useTrigger(mCharacter, ITT_IN_INVY))
+ return amount;
+ }
// Send that first, before checking potential removals
if (invMsg.getLength() > 2)