diff options
Diffstat (limited to 'src/game-server/state.cpp')
-rw-r--r-- | src/game-server/state.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp index 90243742..2972bd06 100644 --- a/src/game-server/state.cpp +++ b/src/game-server/state.cpp @@ -216,9 +216,20 @@ void State::informPlayer(MapComposite *map, Player *p) if (willBeInRange ^ wereInRange) { - itemMsg.writeShort(willBeInRange ? o->getItemClass()->getDatabaseID() : 0); - itemMsg.writeShort(opos.x); - itemMsg.writeShort(opos.y); + if (oflags & NEW_ON_MAP) + { + MessageOut appearMsg(GPMSG_ITEM_APPEAR); + appearMsg.writeShort(o->getItemClass()->getDatabaseID()); + appearMsg.writeShort(opos.x); + appearMsg.writeShort(opos.y); + gameHandler->sendTo(p, appearMsg); + } + else + { + itemMsg.writeShort(willBeInRange ? o->getItemClass()->getDatabaseID() : 0); + itemMsg.writeShort(opos.x); + itemMsg.writeShort(opos.y); + } } } |