summaryrefslogtreecommitdiff
path: root/src/game-server/testing.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-03-31 00:01:21 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-03-31 00:01:21 +0000
commita85d2b47912ea32e3ecf77632242fa6f759a0ade (patch)
tree1787bc6351d5eb315555f8bffafd0763bcea7411 /src/game-server/testing.cpp
parent4684bfb34ca0ed06c998bfe3c1369f94e8532b0d (diff)
downloadmanaserv-a85d2b47912ea32e3ecf77632242fa6f759a0ade.tar.gz
manaserv-a85d2b47912ea32e3ecf77632242fa6f759a0ade.tar.bz2
manaserv-a85d2b47912ea32e3ecf77632242fa6f759a0ade.tar.xz
manaserv-a85d2b47912ea32e3ecf77632242fa6f759a0ade.zip
Made a start with having monsters spawn using a SpawnArea.
Diffstat (limited to 'src/game-server/testing.cpp')
-rw-r--r--src/game-server/testing.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/game-server/testing.cpp b/src/game-server/testing.cpp
index 5db3557c..cd2f08fb 100644
--- a/src/game-server/testing.cpp
+++ b/src/game-server/testing.cpp
@@ -5,8 +5,8 @@
#include <cassert>
#include "defines.h"
-#include "game-server/monster.hpp"
#include "game-server/itemmanager.hpp"
+#include "game-server/spawnarea.hpp"
#include "game-server/state.hpp"
#include "game-server/trigger.hpp"
@@ -32,29 +32,21 @@ void testingMap(int id)
{
case 1:
{
+ // Create maggot spawn area
+ Rectangle maggotSpawnRect = { 720, 900, 320, 320 };
+ gameState->insert(new SpawnArea(1, maggotSpawnRect));
+
+ // Portal to map 3
gameState->insert(new TriggerArea(1, rectA, &warpA));
- for (int i = 0; i < 10; i++)
- {
- Being *being = new Monster();
- being->setSpeed(150);
- being->setSize(8);
-
- // some bogus stats for testing
- being->setAttribute(BASE_ATTR_VITALITY, 10);
-
- being->fillHitpoints();
-
- being->setMapId(1);
- Point pos(720, 900);
- being->setPosition(pos);
- gameState->insert(being);
- }
+
+ // Drop some items
dropItem(1, 58 * 32 + 16, 20 * 32 + 16, 508);
dropItem(1, 58 * 32 + 16, 21 * 32 + 16, 524);
} break;
case 3:
{
+ // Portal to map 1
gameState->insert(new TriggerArea(3, rectB, &warpB));
} break;
}