summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-04-03 13:35:18 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-04-04 16:28:11 +0200
commit3a05c2d4e4f2229516182ebceea880d227b65708 (patch)
treed3a93585e55f1cac9a188ee0bb73b77a1db820d0 /src/net
parent31010d6d3ba6600860a9f6dd925ac3d8e3f2c830 (diff)
downloadmana-3a05c2d4e4f2229516182ebceea880d227b65708.tar.gz
mana-3a05c2d4e4f2229516182ebceea880d227b65708.tar.bz2
mana-3a05c2d4e4f2229516182ebceea880d227b65708.tar.xz
mana-3a05c2d4e4f2229516182ebceea880d227b65708.zip
Synced specials to latest manaserv changes
Reviewed-by: bjorn.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/manaserv/manaserv_protocol.h3
-rw-r--r--src/net/manaserv/specialhandler.cpp14
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)