diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-10-25 14:46:19 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-10-25 15:01:43 +0200 |
commit | 20a5f67808ca6ee14117e9b7d13606cba81e0442 (patch) | |
tree | 21b458b357ad66f03d118b708732964333c7ac1f /src/game-server/item.cpp | |
parent | a931fa498a64d575c543aaa016fdd75f6e7bc6ec (diff) | |
download | manaserv-20a5f67808ca6ee14117e9b7d13606cba81e0442.tar.gz manaserv-20a5f67808ca6ee14117e9b7d13606cba81e0442.tar.xz manaserv-20a5f67808ca6ee14117e9b7d13606cba81e0442.zip |
Fixed crash when the server tries to remove unknown items
Whether it's a good idea to automatically remove unknown items from the
inventory in the first place is something to be considered.
Reviewed-by: Freeyorp
Diffstat (limited to 'src/game-server/item.cpp')
-rw-r--r-- | src/game-server/item.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game-server/item.cpp b/src/game-server/item.cpp index d2d2c1d..3568447 100644 --- a/src/game-server/item.cpp +++ b/src/game-server/item.cpp @@ -76,7 +76,9 @@ void ItemEffectScript::dispell(Being *itemUser) bool ItemClass::useTrigger(Being *itemUser, ItemTriggerType trigger) { - if (!trigger) return false; + if (!trigger) + return false; + std::pair<std::multimap< ItemTriggerType, ItemEffectInfo * >::iterator, std::multimap< ItemTriggerType, ItemEffectInfo * >::iterator> rn = mEffects.equal_range(trigger); |