summaryrefslogtreecommitdiff
path: root/src/game-server/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/inventory.cpp')
-rw-r--r--src/game-server/inventory.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/game-server/inventory.cpp b/src/game-server/inventory.cpp
index bec5961b..e33e94a1 100644
--- a/src/game-server/inventory.cpp
+++ b/src/game-server/inventory.cpp
@@ -224,7 +224,14 @@ unsigned Inventory::insert(unsigned itemId, unsigned amount)
break;
}
- item->useTrigger(mCharacter, ITT_IN_INVY);
+ if (item)
+ {
+ // 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)