diff options
Diffstat (limited to 'src/game-server/testing.cpp')
-rw-r--r-- | src/game-server/testing.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/game-server/testing.cpp b/src/game-server/testing.cpp index 2565f3ec..61244974 100644 --- a/src/game-server/testing.cpp +++ b/src/game-server/testing.cpp @@ -14,6 +14,17 @@ static WarpAction warpA(3, 44 * 32 + 16, 80 * 32 + 16); static Rectangle rectB = { 42 * 32, 88 * 32, 5 * 32, 32 }; static WarpAction warpB(1, 58 * 32 + 16, 17 * 32 + 16); +static void dropItem(int map, int x, int y, int type) +{ + ItemClass *ic = itemManager->getItem(type); + assert(ic); + Item *i = new Item(ic, 1); + i->setMapId(map); + Point pos = { x, y }; + i->setPosition(pos); + gameState->insert(i); +} + void testingMap(int id) { switch (id) @@ -30,13 +41,8 @@ void testingMap(int id) being->setPosition(pos); gameState->insert(being); } - ItemClass *ic = itemManager->getItem(508); - assert(ic); - Item *i = new Item(ic); - i->setMapId(1); - Point pos = { 58 * 32 + 16, 20 * 32 + 16 }; - i->setPosition(pos); - gameState->insert(i); + dropItem(1, 58 * 32 + 16, 20 * 32 + 16, 508); + dropItem(1, 58 * 32 + 16, 21 * 32 + 16, 524); } break; case 3: |