diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/account-server/dalstorage.hpp | 1 | ||||
-rw-r--r-- | src/account-server/serverhandler.cpp | 2 | ||||
-rw-r--r-- | src/game-server/effect.cpp | 2 | ||||
-rw-r--r-- | src/game-server/effect.hpp | 9 | ||||
-rw-r--r-- | src/game-server/state.cpp | 9 |
6 files changed, 20 insertions, 12 deletions
@@ -1,9 +1,16 @@ +2008-10-27 Bjørn Lindeijer <bjorn@lindeijer.nl> + + * src/account-server/serverhandler.cpp, + src/account-server/dalstorage.hpp, src/game-server/state.cpp, + src/game-server/effect.cpp, src/game-server/effect.hpp: Compile fixes + and warning fixes. + 2008-10-27 David Athay <ko2fan@gmail.com> * src/defines.h, src/account-server/serverhandler.cpp, src/account-server/dalstorage.cpp, src/account-server/dalstorage.hpp: Added changing player's character and account level. - + 2008-10-27 Philipp Sehmisch <tmw@crushnet.org> * src/scripting/lua.cpp: Added script binding for spawning effets from diff --git a/src/account-server/dalstorage.hpp b/src/account-server/dalstorage.hpp index ae1657c0..817f2ef4 100644 --- a/src/account-server/dalstorage.hpp +++ b/src/account-server/dalstorage.hpp @@ -34,6 +34,7 @@ class Character; class ChatChannel; class Guild; class Letter; +class Post; /** * A storage class that relies on DAL. diff --git a/src/account-server/serverhandler.cpp b/src/account-server/serverhandler.cpp index 1745c928..2e472b81 100644 --- a/src/account-server/serverhandler.cpp +++ b/src/account-server/serverhandler.cpp @@ -312,7 +312,7 @@ void ServerHandler::processMessage(NetComputer *comp, MessageIn &msg) int level = msg.readShort(); // get the character so we can get the account id - Character *c = getCharacter(id); + Character *c = storage->getCharacter(id, NULL); if (c) { storage->setAccountLevel(c->getAccountID(), level); diff --git a/src/game-server/effect.cpp b/src/game-server/effect.cpp index f4a6b151..eefd0594 100644 --- a/src/game-server/effect.cpp +++ b/src/game-server/effect.cpp @@ -43,5 +43,5 @@ namespace Effects effect->setPosition(pos); GameState::enqueueInsert(effect); } -}; +} diff --git a/src/game-server/effect.hpp b/src/game-server/effect.hpp index c17928ac..058bd13c 100644 --- a/src/game-server/effect.hpp +++ b/src/game-server/effect.hpp @@ -27,7 +27,6 @@ class Effect : public Object { - public: Effect(int id) : Object(OBJECT_EFFECT), mEffectId(id), mHasBeenShown(false) @@ -37,8 +36,8 @@ class Effect : public Object { return mEffectId; } // Removes effect after it has been shown - virtual void update(); - + virtual void update(); + // Called when the object has been shown to a player in the state loop void show() { mHasBeenShown = true; } @@ -51,13 +50,13 @@ class Effect : public Object namespace Effects { - // Added for convince + // Added for convince void show(int id, MapComposite *map, Point pos); // TODO: get this in sync with effects.xml enum { FIRE_BURST = 15 }; -}; +} #endif diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp index 9866d58e..ee5fe55f 100644 --- a/src/game-server/state.cpp +++ b/src/game-server/state.cpp @@ -346,9 +346,10 @@ static void informPlayer(MapComposite *map, Character *p) MessageOut itemMsg(GPMSG_ITEMS); for (FixedObjectIterator i(map->getAroundCharacterIterator(p, AROUND_AREA)); i; ++i) { - assert((*i)->getType() == OBJECT_ITEM || (*i)->getType() == OBJECT_EFFECT); - - Object *o = static_cast< Object * >(*i); + assert((*i)->getType() == OBJECT_ITEM || + (*i)->getType() == OBJECT_EFFECT); + + Object *o = *i; Point opos = o->getPosition(); int oflags = o->getUpdateFlags(); bool willBeInRange = ppos.inRangeOf(opos, AROUND_AREA); @@ -357,7 +358,7 @@ static void informPlayer(MapComposite *map, Character *p) if (willBeInRange ^ wereInRange) { - switch(o->getType()) + switch (o->getType()) { case OBJECT_ITEM: { |