aboutsummaryrefslogtreecommitdiff
path: root/src/game/Item.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-03-15 14:52:02 +0100
committerMachiavelli <none@none>2010-03-15 14:52:02 +0100
commitf9a3aedc14064d5f8961b428b69aaf41a08bd12e (patch)
tree3942ee1678aaf952b46fc39c71c3b5c6c0b845f1 /src/game/Item.cpp
parentc47b8a89c1ca0cba199324e0f9d67982b588ffa7 (diff)
Don't call Item::AddToUpdateQueueOf if no player is specified as parameter for Item::SetState, since in this case, only data stored in the item_instance table is altered, not that of character_inventory.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Item.cpp')
-rw-r--r--src/game/Item.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/Item.cpp b/src/game/Item.cpp
index 1a5dd558c8f..7c2a49e10af 100644
--- a/src/game/Item.cpp
+++ b/src/game/Item.cpp
@@ -625,12 +625,14 @@ void Item::SetState(ItemUpdateState state, Player *forplayer)
delete this;
return;
}
-
if (state != ITEM_UNCHANGED)
{
// new items must stay in new state until saved
- if (uState != ITEM_NEW) uState = state;
- AddToUpdateQueueOf(forplayer);
+ if (uState != ITEM_NEW)
+ uState = state;
+
+ if (forplayer)
+ AddToUpdateQueueOf(forplayer);
}
else
{