diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/manaserv/manaserv_protocol.h | 3 | ||||
-rw-r--r-- | src/net/manaserv/specialhandler.cpp | 14 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/net/manaserv/manaserv_protocol.h b/src/net/manaserv/manaserv_protocol.h index aa1976f1..79dbc542 100644 --- a/src/net/manaserv/manaserv_protocol.h +++ b/src/net/manaserv/manaserv_protocol.h @@ -127,8 +127,9 @@ enum { GPMSG_ITEMS = 0x0281, // { W item id, W*2 position }* PGMSG_ATTACK = 0x0290, // W being id GPMSG_BEING_ATTACK = 0x0291, // W being id, B direction, B attack Id - PGMSG_USE_SPECIAL = 0x0292, // B specialID + PGMSG_USE_SPECIAL_ON_BEING = 0x0292, // B specialID, W being id GPMSG_SPECIAL_STATUS = 0x0293, // { B specialID, D current, D max, D recharge } + PGMSG_USE_SPECIAL_ON_POINT = 0x0294, // B specialID, W*2 position PGMSG_SAY = 0x02A0, // S text GPMSG_SAY = 0x02A1, // W being id, S text GPMSG_NPC_CHOICE = 0x02B0, // W being id, { S text }* diff --git a/src/net/manaserv/specialhandler.cpp b/src/net/manaserv/specialhandler.cpp index fa98cd48..4cd0ce2b 100644 --- a/src/net/manaserv/specialhandler.cpp +++ b/src/net/manaserv/specialhandler.cpp @@ -44,19 +44,27 @@ void SpecialHandler::handleMessage(Net::MessageIn &msg) void SpecialHandler::use(int id) { - MessageOut msg(PGMSG_USE_SPECIAL); + MessageOut msg(PGMSG_USE_SPECIAL_ON_BEING); msg.writeInt8(id); + msg.writeInt16(0); gameServerConnection->send(msg); } void SpecialHandler::use(int id, int level, int beingId) { - // TODO + MessageOut msg(PGMSG_USE_SPECIAL_ON_BEING); + msg.writeInt8(id); + msg.writeInt16(beingId); + gameServerConnection->send(msg); } void SpecialHandler::use(int id, int level, int x, int y) { - // TODO + MessageOut msg(PGMSG_USE_SPECIAL_ON_POINT); + msg.writeInt8(id); + msg.writeInt16(x); + msg.writeInt16(y); + gameServerConnection->send(msg); } void SpecialHandler::use(int id, const std::string &map) |