summaryrefslogtreecommitdiff
path: root/src/game-server/accountconnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/accountconnection.cpp')
-rw-r--r--src/game-server/accountconnection.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/game-server/accountconnection.cpp b/src/game-server/accountconnection.cpp
index 8b517f54..44858fcd 100644
--- a/src/game-server/accountconnection.cpp
+++ b/src/game-server/accountconnection.cpp
@@ -187,16 +187,15 @@ void AccountConnection::processMessage(MessageIn &msg)
if (ItemClass *ic = itemManager->getItem(itemId))
{
- Item *item = new Item(ic, amount);
- item->setMap(m);
- Point dst(posX, posY);
- item->setPosition(dst);
+ Entity *item = Item::create(m,
+ Point(posX, posY),
+ ic, amount);
if (!GameState::insertOrDelete(item))
{
// The map is full.
LOG_WARN("Couldn't add floor item(s) " << itemId
- << " into map " << mapId);
+ << " into map " << mapId);
return;
}
}