diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-04-14 21:41:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-04-14 21:41:38 +0300 |
commit | 1884c7ebfce2f9a2723da41be09cde5e7e14938e (patch) | |
tree | bd0ca87ffdacdb97af37eaf2fcdd835f7ebe877e /src/localplayer.cpp | |
parent | 91a0b8f7e497be66225e0e24679bb515daefe7cf (diff) | |
download | plus-1884c7ebfce2f9a2723da41be09cde5e7e14938e.tar.gz plus-1884c7ebfce2f9a2723da41be09cde5e7e14938e.tar.bz2 plus-1884c7ebfce2f9a2723da41be09cde5e7e14938e.tar.xz plus-1884c7ebfce2f9a2723da41be09cde5e7e14938e.zip |
Stop protected pickups flood.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 13 |
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) { |