From 39fadb44e907ffe2209f81643ce182b03e5c6245 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 18 Sep 2014 20:25:42 +0300 Subject: Move processPlayerGuilPartyInfo from ea namespace into eathena and tmwa. --- src/net/ea/beinghandler.cpp | 29 ----------------------------- src/net/ea/beinghandler.h | 2 -- src/net/eathena/beinghandler.cpp | 29 +++++++++++++++++++++++++++++ src/net/eathena/beinghandler.h | 2 ++ src/net/tmwa/beinghandler.cpp | 29 +++++++++++++++++++++++++++++ src/net/tmwa/beinghandler.h | 2 ++ 6 files changed, 62 insertions(+), 31 deletions(-) (limited to 'src/net') diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 807c9b3ef..7e66c5dd2 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -375,35 +375,6 @@ void BeingHandler::processIpResponse(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processIpResponse") } -void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) const -{ - BLOCK_START("BeingHandler::processPlayerGuilPartyInfo") - if (!actorManager) - { - BLOCK_END("BeingHandler::processPlayerGuilPartyInfo") - return; - } - - Being *const dstBeing = actorManager->findBeing(msg.readInt32("being id")); - - if (dstBeing) - { - dstBeing->setPartyName(msg.readString(24, "party name")); - if (!guildManager || !GuildManager::getEnableGuildBot()) - { - dstBeing->setGuildName(msg.readString(24, "guild name")); - dstBeing->setGuildPos(msg.readString(24, "guild pos")); - } - else - { - msg.skip(48); - } - dstBeing->addToCache(); - msg.readString(24, "?"); - } - BLOCK_END("BeingHandler::processPlayerGuilPartyInfo") -} - void BeingHandler::processPlayerStop(Net::MessageIn &msg) const { BLOCK_START("BeingHandler::processPlayerStop") diff --git a/src/net/ea/beinghandler.h b/src/net/ea/beinghandler.h index 84758630c..ffd2b80d1 100644 --- a/src/net/ea/beinghandler.h +++ b/src/net/ea/beinghandler.h @@ -60,8 +60,6 @@ class BeingHandler notfinal : public Net::BeingHandler virtual void processIpResponse(Net::MessageIn &msg) const; - virtual void processPlayerGuilPartyInfo(Net::MessageIn &msg) const; - virtual void processPlayerStop(Net::MessageIn &msg) const; virtual void processPlayerMoveToAttack(Net::MessageIn &msg) const; diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 69f09ed8f..100fa273b 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -1775,4 +1775,33 @@ void BeingHandler::processBeingResurrect(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processBeingResurrect") } +void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) const +{ + BLOCK_START("BeingHandler::processPlayerGuilPartyInfo") + if (!actorManager) + { + BLOCK_END("BeingHandler::processPlayerGuilPartyInfo") + return; + } + + Being *const dstBeing = actorManager->findBeing(msg.readInt32("being id")); + + if (dstBeing) + { + dstBeing->setPartyName(msg.readString(24, "party name")); + if (!guildManager || !GuildManager::getEnableGuildBot()) + { + dstBeing->setGuildName(msg.readString(24, "guild name")); + dstBeing->setGuildPos(msg.readString(24, "guild pos")); + } + else + { + msg.skip(48); + } + dstBeing->addToCache(); + msg.readString(24, "?"); + } + BLOCK_END("BeingHandler::processPlayerGuilPartyInfo") +} + } // namespace EAthena diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h index 522032da1..c5e0b2562 100644 --- a/src/net/eathena/beinghandler.h +++ b/src/net/eathena/beinghandler.h @@ -107,6 +107,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler void processPlaterStatusChangeNoTick(Net::MessageIn &msg) const; void processBeingResurrect(Net::MessageIn &msg) const; + + void processPlayerGuilPartyInfo(Net::MessageIn &msg) const; }; } // namespace EAthena diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index a8fe157da..5160930a2 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -1617,4 +1617,33 @@ void BeingHandler::processBeingResurrect(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processBeingResurrect") } +void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) const +{ + BLOCK_START("BeingHandler::processPlayerGuilPartyInfo") + if (!actorManager) + { + BLOCK_END("BeingHandler::processPlayerGuilPartyInfo") + return; + } + + Being *const dstBeing = actorManager->findBeing(msg.readInt32("being id")); + + if (dstBeing) + { + dstBeing->setPartyName(msg.readString(24, "party name")); + if (!guildManager || !GuildManager::getEnableGuildBot()) + { + dstBeing->setGuildName(msg.readString(24, "guild name")); + dstBeing->setGuildPos(msg.readString(24, "guild pos")); + } + else + { + msg.skip(48); + } + dstBeing->addToCache(); + msg.readString(24, "?"); + } + BLOCK_END("BeingHandler::processPlayerGuilPartyInfo") +} + } // namespace TmwAthena diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h index 2087b5c53..7c22c3e93 100644 --- a/src/net/tmwa/beinghandler.h +++ b/src/net/tmwa/beinghandler.h @@ -85,6 +85,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler void processBeingResurrect(Net::MessageIn &msg) const; + void processPlayerGuilPartyInfo(Net::MessageIn &msg) const; + static void setServerGender(Being *const being, const uint8_t gender); -- cgit v1.2.3-70-g09d2