From 4b57962ee4c10e48956c2888199605bebdb17b8f Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Wed, 3 Apr 2013 14:32:57 +0200 Subject: 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 --- src/game-server/commandhandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game-server/commandhandler.cpp') diff --git a/src/game-server/commandhandler.cpp b/src/game-server/commandhandler.cpp index 68899e3..3596828 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(); -- cgit