summaryrefslogtreecommitdiff
path: root/src/net/eathena/beinghandler.cpp
diff options
context:
space:
mode:
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