summaryrefslogtreecommitdiff
path: root/src/net/eathena/chathandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
commit0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch)
tree6259593b8436178ad8d981a96a8fd71eab9e04cc /src/net/eathena/chathandler.cpp
parent01773c71a4698c6f01fe70d864f922bda65506cb (diff)
downloadmv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz
mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2
mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz
mv-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip
Add strong typed int type BeingId.
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r--src/net/eathena/chathandler.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 9db670080..d31afa3c9 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -663,7 +663,7 @@ void ChatHandler::processChatDisplay(Net::MessageIn &msg)
{
const int len = msg.readInt16("len") - 17;
ChatObject *const obj = new ChatObject;
- obj->ownerId = msg.readInt32("owner account id");
+ obj->ownerId = msg.readBeingId("owner account id");
obj->chatId = msg.readInt32("chat id");
obj->maxUsers = msg.readInt16("max users");
obj->currentUsers = msg.readInt16("current users");
@@ -839,7 +839,7 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg)
BLOCK_START("ChatHandler::processBeingChat")
int chatMsgLength = msg.readInt16("len") - 8;
- Being *const being = actorManager->findBeing(msg.readInt32("being id"));
+ Being *const being = actorManager->findBeing(msg.readBeingId("being id"));
if (chatMsgLength <= 0)
{
@@ -992,7 +992,7 @@ void ChatHandler::processChatRoomAddMember(Net::MessageIn &msg)
void ChatHandler::processChatRoomSettings(Net::MessageIn &msg)
{
const int sz = msg.readInt16("len") - 17;
- const int ownerId = msg.readInt32("owner id");
+ const BeingId ownerId = msg.readBeingId("owner id");
const int chatId = msg.readInt32("chat id");
const uint16_t limit = msg.readInt16("limit");
msg.readInt16("users");
@@ -1086,7 +1086,7 @@ void ChatHandler::processChatSilence(Net::MessageIn &msg)
void ChatHandler::processChatTalkieBox(Net::MessageIn &msg)
{
UNIMPLIMENTEDPACKET;
- msg.readInt32("being id");
+ msg.readBeingId("being id");
msg.readString(80, "message");
}
@@ -1094,7 +1094,7 @@ void ChatHandler::processBattleChatMessage(Net::MessageIn &msg)
{
UNIMPLIMENTEDPACKET;
const int sz = msg.readInt16("len") - 24 - 8;
- msg.readInt32("account id");
+ msg.readBeingId("account id");
msg.readString(24, "nick");
msg.readString(sz, "message");
}
@@ -1103,7 +1103,7 @@ void ChatHandler::processScriptMessage(Net::MessageIn &msg)
{
UNIMPLIMENTEDPACKET;
const int sz = msg.readInt16("len") - 8;
- msg.readInt32("being id");
+ msg.readBeingId("being id");
msg.readString(sz, "message");
}