summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-14 21:41:38 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-14 21:41:38 +0300
commit1884c7ebfce2f9a2723da41be09cde5e7e14938e (patch)
treebd0ca87ffdacdb97af37eaf2fcdd835f7ebe877e /src/localplayer.cpp
parent91a0b8f7e497be66225e0e24679bb515daefe7cf (diff)
downloadmanaverse-1884c7ebfce2f9a2723da41be09cde5e7e14938e.tar.gz
manaverse-1884c7ebfce2f9a2723da41be09cde5e7e14938e.tar.bz2
manaverse-1884c7ebfce2f9a2723da41be09cde5e7e14938e.tar.xz
manaverse-1884c7ebfce2f9a2723da41be09cde5e7e14938e.zip
Stop protected pickups flood.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index f422493ea..2718b9fe0 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -1322,10 +1322,21 @@ void LocalPlayer::stopAttack()
}
void LocalPlayer::pickedUp(const ItemInfo &itemInfo, int amount,
- unsigned char color, unsigned char fail)
+ unsigned char color, int floorItemId,
+ unsigned char fail)
{
if (fail)
{
+ if (actorSpriteManager && floorItemId)
+ {
+ FloorItem *item = actorSpriteManager->findItem(floorItemId);
+ if (item)
+ {
+ if (!item->getShowMsg())
+ return;
+ item->setShowMsg(false);
+ }
+ }
const char* msg;
switch (fail)
{