diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-30 20:24:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-30 20:24:15 +0300 |
commit | cee0e9966fb9ec9068aa7483cf38ff128508193b (patch) | |
tree | d48767683567c3867e2e9506e2605bc4c02239eb /src/net/eathena | |
parent | caba5e3b539f7dd4e8f47744c41b7d0e65b99a32 (diff) | |
download | mv-cee0e9966fb9ec9068aa7483cf38ff128508193b.tar.gz mv-cee0e9966fb9ec9068aa7483cf38ff128508193b.tar.bz2 mv-cee0e9966fb9ec9068aa7483cf38ff128508193b.tar.xz mv-cee0e9966fb9ec9068aa7483cf38ff128508193b.zip |
eathena: add packet SMSG_BEING_FAKE_NAME 0x0078.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 26 | ||||
-rw-r--r-- | src/net/eathena/beinghandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 |
3 files changed, 29 insertions, 0 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index c51651f38..56f894097 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -105,6 +105,7 @@ BeingHandler::BeingHandler(const bool enableSync) : SMSG_PLAYER_HP, SMSG_SKILL_AUTO_CAST, SMSG_RANKS_LIST, + SMSG_BEING_FAKE_NAME, 0 }; handledMessages = _messages; @@ -282,6 +283,10 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) processRanksList(msg); break; + case SMSG_BEING_FAKE_NAME: + processBeingFakeName(msg); + break; + default: break; } @@ -1860,4 +1865,25 @@ void BeingHandler::processBeingRemoveSkil(Net::MessageIn &msg) const msg.readInt32("skill unit id"); } +void BeingHandler::processBeingFakeName(Net::MessageIn &msg) const +{ + const BeingType::BeingType type = static_cast<BeingType::BeingType>( + msg.readUInt8("object type")); + const int id = msg.readInt32("npc id"); + msg.skip(8, "unused"); + const int job = msg.readInt16("class?"); // 111 + msg.skip(30, "unused"); + uint16_t x, y; + uint8_t dir; + msg.readCoordinates(x, y, dir, "position"); + msg.readUInt8("sx"); + msg.readUInt8("sy"); + msg.skip(4, "unsued"); + + Being *const dstBeing = createBeing2(id, job, type); + dstBeing->setSubtype(job, 0); + dstBeing->setTileCoords(x, y); + dstBeing->setDirection(dir); +} + } // namespace EAthena diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h index 9bd811f10..dab13a57e 100644 --- a/src/net/eathena/beinghandler.h +++ b/src/net/eathena/beinghandler.h @@ -115,6 +115,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler void processPlayerGuilPartyInfo(Net::MessageIn &msg) const; void processBeingRemoveSkil(Net::MessageIn &msg) const; + + void processBeingFakeName(Net::MessageIn &msg) const; }; } // namespace EAthena diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index c5b4d5c0d..45356938e 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -91,6 +91,7 @@ #define SMSG_ITEM_DROPPED 0x084b /**< An item is dropped */ #define SMSG_ITEM_REMOVE 0x00a1 /**< An item disappers */ #define SMSG_BEING_VISIBLE 0x0915 +#define SMSG_BEING_FAKE_NAME 0x0078 #define SMSG_BEING_MOVE 0x0914 /**< A nearby monster moves */ #define SMSG_BEING_SPAWN 0x090f /**< A being spawns nearby */ #define SMSG_BEING_MOVE2 0x0086 /**< New eAthena being moves */ |