summaryrefslogtreecommitdiff
path: root/src/game-server/commandhandler.cpp
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-04-03 14:32:57 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-04-03 21:52:03 +0200
commit4b57962ee4c10e48956c2888199605bebdb17b8f (patch)
tree261b141a1ad61a64e93a7b99a8c68debfb48d055 /src/game-server/commandhandler.cpp
parent4a8080dcf73dab2b6e62b8500fec3bb996bcbf17 (diff)
downloadmanaserv-4b57962ee4c10e48956c2888199605bebdb17b8f.tar.gz
manaserv-4b57962ee4c10e48956c2888199605bebdb17b8f.tar.bz2
manaserv-4b57962ee4c10e48956c2888199605bebdb17b8f.tar.xz
manaserv-4b57962ee4c10e48956c2888199605bebdb17b8f.zip
Moved the Monster class to a Component
Things done: - Allowed to create new Attributes outside of the protected scope of Being - Moved Monster to MonsterComponent - Some minor cleanup in the Attribute setting code of monsters
Diffstat (limited to 'src/game-server/commandhandler.cpp')
-rw-r--r--src/game-server/commandhandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game-server/commandhandler.cpp b/src/game-server/commandhandler.cpp
index 68899e3c..35968286 100644
--- a/src/game-server/commandhandler.cpp
+++ b/src/game-server/commandhandler.cpp
@@ -732,7 +732,8 @@ static void handleSpawn(Character *player, std::string &args)
// create the monsters and put them on the map
for (int i = 0; i < value; ++i)
{
- Being *monster = new Monster(mc);
+ Being *monster = new Being(OBJECT_MONSTER);
+ monster->addComponent(new MonsterComponent(*monster, mc));
monster->setMap(map);
monster->setPosition(pos);
monster->clearDestination();