diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/accounthandler.cpp | 5 | ||||
-rw-r--r-- | src/defines.h | 2 | ||||
-rw-r--r-- | src/gamehandler.cpp | 2 |
4 files changed, 11 insertions, 5 deletions
@@ -1,3 +1,10 @@ +2006-08-26 Guillaume Melquiond <guillaume.melquiond@gmail.com> + + * src/accounthandler.cpp: Set an arbitrary start position outside any + wall for testing purpose. + * src/gamehandler.cpp, src/defines.h: Send being identifier instead of + being name when saying around. + 2006-08-26 Bjørn Lindeijer <bjorn@lindeijer.nl> * src/accounthandler.cpp: Read game and chat server addresses to send diff --git a/src/accounthandler.cpp b/src/accounthandler.cpp index 783017f6..887dc193 100644 --- a/src/accounthandler.cpp +++ b/src/accounthandler.cpp @@ -179,9 +179,8 @@ AccountHandler::processMessage(NetComputer *comp, MessageIn &message) computer.setCharacter(chars[charNum]); PlayerPtr selectedChar = computer.getCharacter(); result.writeByte(ERRMSG_OK); - //std::string mapName = - // store.getMapNameFromId(selectedChar->getMapId()); - //result.writeString(mapName); + + selectedChar->setXY(600, 600); // for testing purpose selectedChar->setDestination(selectedChar->getX(), selectedChar->getY()); diff --git a/src/defines.h b/src/defines.h index 56ef210f..68ce8103 100644 --- a/src/defines.h +++ b/src/defines.h @@ -150,7 +150,7 @@ enum { PGMSG_WALK = 0x0260, // W*2 destination GPMSG_BEINGS_MOVE = 0x0280, // { L being id, W*2 position, W*2 destination }* PGMSG_SAY = 0x02A0, // S text - GPMSG_SAY = 0x02A1, // S being, S text + GPMSG_SAY = 0x02A1, // L being id, S text PGMSG_USE_ITEM = 0x0300, // L item id GPMSG_USE_RESPONSE = 0x0301, // B error PGMSG_EQUIP = 0x0302, // L item id, B slot diff --git a/src/gamehandler.cpp b/src/gamehandler.cpp index 20c073ce..6305f410 100644 --- a/src/gamehandler.cpp +++ b/src/gamehandler.cpp @@ -227,7 +227,7 @@ void GameHandler::sayAround(GameClient &computer, std::string const &text) PlayerPtr beingPtr = computer.getCharacter(); MessageOut msg(GPMSG_SAY); - msg.writeString(beingPtr->getName()); + msg.writeLong(beingPtr->getID()); msg.writeString(text); unsigned speakerMapId = beingPtr->getMapId(); |