summaryrefslogtreecommitdiff
path: root/src/net/eathena/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-30 20:24:15 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-30 20:24:15 +0300
commitcee0e9966fb9ec9068aa7483cf38ff128508193b (patch)
treed48767683567c3867e2e9506e2605bc4c02239eb /src/net/eathena/beinghandler.cpp
parentcaba5e3b539f7dd4e8f47744c41b7d0e65b99a32 (diff)
downloadmv-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/beinghandler.cpp')
-rw-r--r--src/net/eathena/beinghandler.cpp26
1 files changed, 26 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