diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-02 12:47:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-02 12:47:16 +0300 |
commit | 05f6f3e94abc5c1e1801d62100cef494e2711474 (patch) | |
tree | d3ee874dd7fa9c6b6170cae8435ea7f18eb1f102 /src | |
parent | 11caa7aeeb3a7b40823da8573576d2354b7504b5 (diff) | |
download | manaplus-05f6f3e94abc5c1e1801d62100cef494e2711474.tar.gz manaplus-05f6f3e94abc5c1e1801d62100cef494e2711474.tar.bz2 manaplus-05f6f3e94abc5c1e1801d62100cef494e2711474.tar.xz manaplus-05f6f3e94abc5c1e1801d62100cef494e2711474.zip |
Add missing const and static into net classes.
Diffstat (limited to 'src')
34 files changed, 83 insertions, 94 deletions
diff --git a/src/net/ea/gui/guildtab.cpp b/src/net/ea/gui/guildtab.cpp index 6a801bba4..5a8c78c60 100644 --- a/src/net/ea/gui/guildtab.cpp +++ b/src/net/ea/gui/guildtab.cpp @@ -127,15 +127,8 @@ void GuildTab::handleInput(const std::string &msg) if (!taGuild) return; - if (chatWindow) - { - Net::getGuildHandler()->chat(taGuild->getId(), - chatWindow->doReplace(msg)); - } - else - { - Net::getGuildHandler()->chat(taGuild->getId(), msg); - } + Net::getGuildHandler()->chat(taGuild->getId(), + ChatWindow::doReplace(msg)); } void GuildTab::showHelp() diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp index 76e204205..4a59e89b7 100644 --- a/src/net/ea/gui/partytab.cpp +++ b/src/net/ea/gui/partytab.cpp @@ -64,10 +64,7 @@ PartyTab::~PartyTab() void PartyTab::handleInput(const std::string &msg) { - if (chatWindow) - Net::getPartyHandler()->chat(chatWindow->doReplace(msg)); - else - Net::getPartyHandler()->chat(msg); + Net::getPartyHandler()->chat(ChatWindow::doReplace(msg)); } void PartyTab::showHelp() diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 94b81adb0..74f0a4ba7 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -337,7 +337,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) } } -void InventoryHandler::processPlayerInventoryRemove(Net::MessageIn &msg) const +void InventoryHandler::processPlayerInventoryRemove(Net::MessageIn &msg) { Inventory *const inventory = player_node ? PlayerInfo::getInventory() : nullptr; @@ -357,7 +357,7 @@ void InventoryHandler::processPlayerInventoryRemove(Net::MessageIn &msg) const } } -void InventoryHandler::processPlayerInventoryUse(Net::MessageIn &msg) const +void InventoryHandler::processPlayerInventoryUse(Net::MessageIn &msg) { Inventory *const inventory = player_node ? PlayerInfo::getInventory() : nullptr; @@ -380,7 +380,7 @@ void InventoryHandler::processPlayerInventoryUse(Net::MessageIn &msg) const } } -void InventoryHandler::processItemUseResponse(Net::MessageIn &msg) const +void InventoryHandler::processItemUseResponse(Net::MessageIn &msg) { Inventory *const inventory = player_node ? PlayerInfo::getInventory() : nullptr; diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index eea4dde12..6e8ecec38 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -180,11 +180,11 @@ class InventoryHandler : public Net::InventoryHandler void processPlayerInventoryAdd(Net::MessageIn &msg); - void processPlayerInventoryRemove(Net::MessageIn &msg) const; + static void processPlayerInventoryRemove(Net::MessageIn &msg); - void processPlayerInventoryUse(Net::MessageIn &msg) const; + static void processPlayerInventoryUse(Net::MessageIn &msg); - void processItemUseResponse(Net::MessageIn &msg) const; + static void processItemUseResponse(Net::MessageIn &msg); void processPlayerStorageStatus(Net::MessageIn &msg); diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp index aaab0ca3e..9ce85a59b 100644 --- a/src/net/ea/itemhandler.cpp +++ b/src/net/ea/itemhandler.cpp @@ -37,7 +37,7 @@ ItemHandler::~ItemHandler() { } -void ItemHandler::processItemVisible(Net::MessageIn &msg) const +void ItemHandler::processItemVisible(Net::MessageIn &msg) { const int id = msg.readInt32(); const int itemId = msg.readInt16(); @@ -55,7 +55,7 @@ void ItemHandler::processItemVisible(Net::MessageIn &msg) const } } -void ItemHandler::processItemDropped(Net::MessageIn &msg) const +void ItemHandler::processItemDropped(Net::MessageIn &msg) { const int id = msg.readInt32(); const int itemId = msg.readInt16(); @@ -73,7 +73,7 @@ void ItemHandler::processItemDropped(Net::MessageIn &msg) const } } -void ItemHandler::processItemRemove(Net::MessageIn &msg) const +void ItemHandler::processItemRemove(Net::MessageIn &msg) { if (actorManager) { diff --git a/src/net/ea/itemhandler.h b/src/net/ea/itemhandler.h index 8b07789f9..6bc23fb10 100644 --- a/src/net/ea/itemhandler.h +++ b/src/net/ea/itemhandler.h @@ -37,11 +37,11 @@ class ItemHandler virtual ~ItemHandler(); - void processItemVisible(Net::MessageIn &msg) const; + static void processItemVisible(Net::MessageIn &msg); - void processItemRemove(Net::MessageIn &msg) const; + static void processItemRemove(Net::MessageIn &msg); - void processItemDropped(Net::MessageIn &msg) const; + static void processItemDropped(Net::MessageIn &msg); }; } // namespace Ea diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index c6d20573d..3e5db9169 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -124,7 +124,7 @@ Vector PlayerHandler::getDefaultWalkSpeed() const return Vector(150, 150, 0); } -void PlayerHandler::processWalkResponse(Net::MessageIn &msg) const +void PlayerHandler::processWalkResponse(Net::MessageIn &msg) { BLOCK_START("PlayerHandler::processWalkResponse") /* @@ -140,7 +140,7 @@ void PlayerHandler::processWalkResponse(Net::MessageIn &msg) const BLOCK_END("PlayerHandler::processWalkResponse") } -void PlayerHandler::processPlayerWarp(Net::MessageIn &msg) const +void PlayerHandler::processPlayerWarp(Net::MessageIn &msg) { BLOCK_START("PlayerHandler::processPlayerWarp") std::string mapPath = msg.readString(16); @@ -216,7 +216,7 @@ void PlayerHandler::processPlayerWarp(Net::MessageIn &msg) const BLOCK_END("PlayerHandler::processPlayerWarp") } -void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) const +void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) { BLOCK_START("PlayerHandler::processPlayerStatUpdate1") const int type = msg.readInt16(); @@ -405,7 +405,7 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) const BLOCK_END("PlayerHandler::processPlayerStatUpdate1") } -void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg) const +void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg) { BLOCK_START("PlayerHandler::processPlayerStatUpdate2") const int type = msg.readInt16(); @@ -450,7 +450,7 @@ void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg) const BLOCK_END("PlayerHandler::processPlayerStatUpdate2") } -void PlayerHandler::processPlayerStatUpdate3(Net::MessageIn &msg) const +void PlayerHandler::processPlayerStatUpdate3(Net::MessageIn &msg) { BLOCK_START("PlayerHandler::processPlayerStatUpdate3") const int type = msg.readInt32(); @@ -464,7 +464,7 @@ void PlayerHandler::processPlayerStatUpdate3(Net::MessageIn &msg) const BLOCK_END("PlayerHandler::processPlayerStatUpdate3") } -void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg) const +void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg) { BLOCK_START("PlayerHandler::processPlayerStatUpdate4") const int type = msg.readInt16(); @@ -484,7 +484,7 @@ void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg) const BLOCK_END("PlayerHandler::processPlayerStatUpdate4") } -void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) const +void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) { BLOCK_START("PlayerHandler::processPlayerStatUpdate5") PlayerInfo::setAttribute(PlayerInfo::CHAR_POINTS, msg.readInt16()); @@ -558,7 +558,7 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) const BLOCK_END("PlayerHandler::processPlayerStatUpdate5") } -void PlayerHandler::processPlayerStatUpdate6(Net::MessageIn &msg) const +void PlayerHandler::processPlayerStatUpdate6(Net::MessageIn &msg) { BLOCK_START("PlayerHandler::processPlayerStatUpdate6") const int type = msg.readInt16(); @@ -593,7 +593,7 @@ void PlayerHandler::processPlayerStatUpdate6(Net::MessageIn &msg) const BLOCK_END("PlayerHandler::processPlayerStatUpdate6") } -void PlayerHandler::processPlayerArrowMessage(Net::MessageIn &msg) const +void PlayerHandler::processPlayerArrowMessage(Net::MessageIn &msg) { BLOCK_START("PlayerHandler::processPlayerArrowMessage") const int type = msg.readInt16(); diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h index 2bac97ac1..589874e2e 100644 --- a/src/net/ea/playerhandler.h +++ b/src/net/ea/playerhandler.h @@ -53,23 +53,23 @@ class PlayerHandler : public Net::PlayerHandler int getAttackLocation() const override final A_WARN_UNUSED; - void processWalkResponse(Net::MessageIn &msg) const; + static void processWalkResponse(Net::MessageIn &msg); - void processPlayerWarp(Net::MessageIn &msg) const; + static void processPlayerWarp(Net::MessageIn &msg); - void processPlayerStatUpdate1(Net::MessageIn &msg) const; + static void processPlayerStatUpdate1(Net::MessageIn &msg); - void processPlayerStatUpdate2(Net::MessageIn &msg) const; + static void processPlayerStatUpdate2(Net::MessageIn &msg); - void processPlayerStatUpdate3(Net::MessageIn &msg) const; + static void processPlayerStatUpdate3(Net::MessageIn &msg); - void processPlayerStatUpdate4(Net::MessageIn &msg) const; + static void processPlayerStatUpdate4(Net::MessageIn &msg); - void processPlayerStatUpdate5(Net::MessageIn &msg) const; + static void processPlayerStatUpdate5(Net::MessageIn &msg); - void processPlayerStatUpdate6(Net::MessageIn &msg) const; + static void processPlayerStatUpdate6(Net::MessageIn &msg); - void processPlayerArrowMessage(Net::MessageIn &msg) const; + static void processPlayerArrowMessage(Net::MessageIn &msg); }; } // namespace Ea diff --git a/src/net/ea/skillhandler.cpp b/src/net/ea/skillhandler.cpp index 3f5b38c68..3a5a1ab75 100644 --- a/src/net/ea/skillhandler.cpp +++ b/src/net/ea/skillhandler.cpp @@ -71,7 +71,7 @@ SkillHandler::SkillHandler() { } -void SkillHandler::processPlayerSkills(Net::MessageIn &msg) const +void SkillHandler::processPlayerSkills(Net::MessageIn &msg) { msg.readInt16(); // length const int skillCount = (msg.getLength() - 4) / 37; @@ -101,7 +101,7 @@ void SkillHandler::processPlayerSkills(Net::MessageIn &msg) const skillDialog->playUpdateEffect(updateSkill); } -void SkillHandler::processPlayerSkillUp(Net::MessageIn &msg) const +void SkillHandler::processPlayerSkillUp(Net::MessageIn &msg) { const int skillId = msg.readInt16(); const int level = msg.readInt16(); @@ -119,7 +119,7 @@ void SkillHandler::processPlayerSkillUp(Net::MessageIn &msg) const } } -void SkillHandler::processSkillFailed(Net::MessageIn &msg) const +void SkillHandler::processSkillFailed(Net::MessageIn &msg) { // Action failed (ex. sit because you have not reached the // right level) diff --git a/src/net/ea/skillhandler.h b/src/net/ea/skillhandler.h index 251388969..8dc724e0a 100644 --- a/src/net/ea/skillhandler.h +++ b/src/net/ea/skillhandler.h @@ -36,11 +36,11 @@ class SkillHandler : public Net::SkillHandler A_DELETE_COPY(SkillHandler) - void processPlayerSkills(Net::MessageIn &msg) const; + static void processPlayerSkills(Net::MessageIn &msg); - void processPlayerSkillUp(Net::MessageIn &msg) const; + static void processPlayerSkillUp(Net::MessageIn &msg); - void processSkillFailed(Net::MessageIn &msg) const; + static void processSkillFailed(Net::MessageIn &msg); }; } // namespace Ea diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp index 45948f963..9457a31db 100644 --- a/src/net/ea/tradehandler.cpp +++ b/src/net/ea/tradehandler.cpp @@ -182,7 +182,7 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg) const } } -void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) const +void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) { const int amount = msg.readInt32(); const int type = msg.readInt16(); @@ -205,7 +205,7 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) const } } -void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) const +void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) { // Trade: New Item add response (was 0x00ea, now 01b1) const int index = msg.readInt16() - INVENTORY_OFFSET; @@ -255,7 +255,7 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) const } } -void TradeHandler::processTradeOk(Net::MessageIn &msg) const +void TradeHandler::processTradeOk(Net::MessageIn &msg) { // 0 means ok from myself, 1 means ok from other; if (tradeWindow) @@ -264,7 +264,7 @@ void TradeHandler::processTradeOk(Net::MessageIn &msg) const msg.readInt8(); } -void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED) const +void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED) { NotifyManager::notify(NotifyManager::TRADE_CANCELLED); if (tradeWindow) @@ -275,7 +275,7 @@ void TradeHandler::processTradeCancel(Net::MessageIn &msg A_UNUSED) const PlayerInfo::setTrading(false); } -void TradeHandler::processTradeComplete(Net::MessageIn &msg A_UNUSED) const +void TradeHandler::processTradeComplete(Net::MessageIn &msg A_UNUSED) { NotifyManager::notify(NotifyManager::TRADE_COMPLETE); if (tradeWindow) diff --git a/src/net/ea/tradehandler.h b/src/net/ea/tradehandler.h index c3f759ef4..22a78e9e6 100644 --- a/src/net/ea/tradehandler.h +++ b/src/net/ea/tradehandler.h @@ -43,15 +43,15 @@ class TradeHandler : public Net::TradeHandler void processTradeResponse(Net::MessageIn &msg) const; - void processTradeItemAdd(Net::MessageIn &msg) const; + static void processTradeItemAdd(Net::MessageIn &msg); - void processTradeItemAddResponse(Net::MessageIn &msg) const; + static void processTradeItemAddResponse(Net::MessageIn &msg); - void processTradeOk(Net::MessageIn &msg) const; + static void processTradeOk(Net::MessageIn &msg); - void processTradeCancel(Net::MessageIn &msg) const; + static void processTradeCancel(Net::MessageIn &msg); - void processTradeComplete(Net::MessageIn &msg) const; + static void processTradeComplete(Net::MessageIn &msg); }; } // namespace Ea diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index c7d903c32..df25f40cf 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -380,7 +380,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, } } -void BeingHandler::processNameResponse2(Net::MessageIn &msg) const +void BeingHandler::processNameResponse2(Net::MessageIn &msg) { if (!actorManager || !player_node) return; diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h index 9d288b053..54271edff 100644 --- a/src/net/eathena/beinghandler.h +++ b/src/net/eathena/beinghandler.h @@ -50,7 +50,7 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler void processBeingChangeLook(Net::MessageIn &msg, const bool look2) const; - void processNameResponse2(Net::MessageIn &msg) const; + static void processNameResponse2(Net::MessageIn &msg); void processPlayerMoveUpdate(Net::MessageIn &msg, const int type) const; diff --git a/src/net/eathena/buysellhandler.cpp b/src/net/eathena/buysellhandler.cpp index 8a637e435..31a831b25 100644 --- a/src/net/eathena/buysellhandler.cpp +++ b/src/net/eathena/buysellhandler.cpp @@ -107,7 +107,7 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg) mBuyDialog->sort(); } -void BuySellHandler::processNpcSellResponse(Net::MessageIn &msg) const +void BuySellHandler::processNpcSellResponse(Net::MessageIn &msg) { switch (msg.readInt8()) { diff --git a/src/net/eathena/buysellhandler.h b/src/net/eathena/buysellhandler.h index b18df810a..38e9f5da1 100644 --- a/src/net/eathena/buysellhandler.h +++ b/src/net/eathena/buysellhandler.h @@ -41,7 +41,7 @@ class BuySellHandler final : public MessageHandler, public Ea::BuySellHandler void processNpcBuy(Net::MessageIn &msg); - void processNpcSellResponse(Net::MessageIn &msg) const; + static void processNpcSellResponse(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp index 75cbf11e8..9c7e84554 100644 --- a/src/net/eathena/gamehandler.cpp +++ b/src/net/eathena/gamehandler.cpp @@ -172,7 +172,7 @@ void GameHandler::disconnect2() const MessageOut outMsg(CMSG_CLIENT_DISCONNECT); } -void GameHandler::processMapCharId(Net::MessageIn &msg) const +void GameHandler::processMapCharId(Net::MessageIn &msg) { msg.readInt32(); // char id } diff --git a/src/net/eathena/gamehandler.h b/src/net/eathena/gamehandler.h index 2307eb089..075bc6f94 100644 --- a/src/net/eathena/gamehandler.h +++ b/src/net/eathena/gamehandler.h @@ -53,7 +53,7 @@ class GameHandler final : public MessageHandler, public Ea::GameHandler void mapLoadedEvent() const override final; - void processMapCharId(Net::MessageIn &msg) const; + static void processMapCharId(Net::MessageIn &msg); bool mustPing() const override final A_WARN_UNUSED { return true; } diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp index 685626d98..5ebec5106 100644 --- a/src/net/eathena/loginhandler.cpp +++ b/src/net/eathena/loginhandler.cpp @@ -153,7 +153,7 @@ ServerInfo *LoginHandler::getCharServer() const return &charServer; } -void LoginHandler::requestUpdateHosts() const +void LoginHandler::requestUpdateHosts() { MessageOut outMsg(CMSG_SEND_CLIENT_INFO); outMsg.writeInt8(CLIENT_PROTOCOL_VERSION); diff --git a/src/net/eathena/loginhandler.h b/src/net/eathena/loginhandler.h index 14d432585..a1d791fdf 100644 --- a/src/net/eathena/loginhandler.h +++ b/src/net/eathena/loginhandler.h @@ -66,7 +66,7 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler void processServerVersion(Net::MessageIn &msg); - void requestUpdateHosts() const; + static void requestUpdateHosts(); void processUpdateHost2(Net::MessageIn &msg) const; diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index f4f4eada5..75db7396b 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -242,14 +242,14 @@ int NpcHandler::getNpc(Net::MessageIn &msg, const bool haveLength) } void NpcHandler::processNpcCutin(Net::MessageIn &msg A_UNUSED, - const int npcId A_UNUSED) const + const int npcId A_UNUSED) { msg.readString(64); // image name msg.readInt8(); // type } void NpcHandler::processNpcViewPoint(Net::MessageIn &msg A_UNUSED, - const int npcId A_UNUSED) const + const int npcId A_UNUSED) { msg.readInt32(); // type msg.readInt32(); // x diff --git a/src/net/eathena/npchandler.h b/src/net/eathena/npchandler.h index fd565a5ed..8c2f61b55 100644 --- a/src/net/eathena/npchandler.h +++ b/src/net/eathena/npchandler.h @@ -67,9 +67,9 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler int getNpc(Net::MessageIn &msg, const bool haveLength) override final; - void processNpcCutin(Net::MessageIn &msg, const int npcId) const; + static void processNpcCutin(Net::MessageIn &msg, const int npcId); - void processNpcViewPoint(Net::MessageIn &msg, const int npcId) const; + static void processNpcViewPoint(Net::MessageIn &msg, const int npcId); }; } // namespace EAthena diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 54b4322d0..f4305f280 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -223,7 +223,7 @@ void PlayerHandler::updateStatus(const uint8_t status) const outMsg.writeInt8(0); } -void PlayerHandler::processPlayerShortcuts(Net::MessageIn &msg) const +void PlayerHandler::processPlayerShortcuts(Net::MessageIn &msg) { for (int f = 0; f < 27; f ++) { @@ -233,7 +233,7 @@ void PlayerHandler::processPlayerShortcuts(Net::MessageIn &msg) const } } -void PlayerHandler::processPlayerShowEquip(Net::MessageIn &msg) const +void PlayerHandler::processPlayerShowEquip(Net::MessageIn &msg) { msg.readInt8(); // show equip } diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h index ee7bd1e39..087c42973 100644 --- a/src/net/eathena/playerhandler.h +++ b/src/net/eathena/playerhandler.h @@ -53,8 +53,8 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler void changeAction(const Being::Action &action) const override final; void updateStatus(const uint8_t status) const override final; - void processPlayerShortcuts(Net::MessageIn &msg) const; - void processPlayerShowEquip(Net::MessageIn &msg) const; + static void processPlayerShortcuts(Net::MessageIn &msg); + static void processPlayerShowEquip(Net::MessageIn &msg); void requestOnlineList() const override final; void respawn() const override final; diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 043321cd5..76efd958e 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -389,12 +389,11 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, } } -void BeingHandler::processNameResponse2(Net::MessageIn &msg) const +void BeingHandler::processNameResponse2(Net::MessageIn &msg) { if (!actorManager || !player_node) return; - const int len = msg.readInt16(); const int beingId = msg.readInt32(); const std::string str = msg.readString(len - 8); @@ -653,7 +652,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, dstBeing->setMoveTime(); } -void BeingHandler::processBeingMove3(Net::MessageIn &msg) const +void BeingHandler::processBeingMove3(Net::MessageIn &msg) { if (serverVersion < 10) return; diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h index f35921256..f3b57b023 100644 --- a/src/net/tmwa/beinghandler.h +++ b/src/net/tmwa/beinghandler.h @@ -47,12 +47,12 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler void processBeingChangeLook(Net::MessageIn &msg, const bool look2) const; - void processNameResponse2(Net::MessageIn &msg) const; + static void processNameResponse2(Net::MessageIn &msg); void processPlayerMoveUpdate(Net::MessageIn &msg, const int type) const; - void processBeingMove3(Net::MessageIn &msg) const; + static void processBeingMove3(Net::MessageIn &msg); }; } // namespace TmwAthena diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp index 71891bdec..0be6839a7 100644 --- a/src/net/tmwa/buysellhandler.cpp +++ b/src/net/tmwa/buysellhandler.cpp @@ -114,7 +114,7 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg) mBuyDialog->sort(); } -void BuySellHandler::processNpcSellResponse(Net::MessageIn &msg) const +void BuySellHandler::processNpcSellResponse(Net::MessageIn &msg) { switch (msg.readInt8()) { diff --git a/src/net/tmwa/buysellhandler.h b/src/net/tmwa/buysellhandler.h index 9fa6caddc..a0c99908f 100644 --- a/src/net/tmwa/buysellhandler.h +++ b/src/net/tmwa/buysellhandler.h @@ -41,7 +41,7 @@ class BuySellHandler final : public MessageHandler, public Ea::BuySellHandler void processNpcBuy(Net::MessageIn &msg); - void processNpcSellResponse(Net::MessageIn &msg) const; + static void processNpcSellResponse(Net::MessageIn &msg); }; } // namespace TmwAthena diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp index 95dd59350..3797a7a54 100644 --- a/src/net/tmwa/loginhandler.cpp +++ b/src/net/tmwa/loginhandler.cpp @@ -178,7 +178,7 @@ ServerInfo *LoginHandler::getCharServer() const return &charServer; } -void LoginHandler::requestUpdateHosts() const +void LoginHandler::requestUpdateHosts() { MessageOut outMsg(CMSG_SEND_CLIENT_INFO); outMsg.writeInt8(CLIENT_PROTOCOL_VERSION); diff --git a/src/net/tmwa/loginhandler.h b/src/net/tmwa/loginhandler.h index 20ca3f52d..632f02d62 100644 --- a/src/net/tmwa/loginhandler.h +++ b/src/net/tmwa/loginhandler.h @@ -63,7 +63,7 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler void processServerVersion(Net::MessageIn &msg); - void requestUpdateHosts() const; + static void requestUpdateHosts(); void processUpdateHost2(Net::MessageIn &msg) const; diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 007c29dd6..eea74a2a5 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -233,7 +233,7 @@ void PlayerHandler::requestOnlineList() const MessageOut outMsg(CMSG_ONLINE_LIST); } -void PlayerHandler::processOnlineList(Net::MessageIn &msg) const +void PlayerHandler::processOnlineList(Net::MessageIn &msg) { if (!whoIsOnline) return; @@ -309,7 +309,7 @@ void PlayerHandler::updateStatus(const uint8_t status) const outMsg.writeInt8(0); } -void PlayerHandler::processMapMask(Net::MessageIn &msg) const +void PlayerHandler::processMapMask(Net::MessageIn &msg) { const int mask = msg.readInt32(); msg.readInt32(); // unused @@ -318,7 +318,7 @@ void PlayerHandler::processMapMask(Net::MessageIn &msg) const map->setMask(mask); } -void PlayerHandler::processMapMusic(Net::MessageIn &msg) const +void PlayerHandler::processMapMusic(Net::MessageIn &msg) { const int size = msg.readInt16() - 5; const std::string music = msg.readString(size); diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h index 5e1419119..125eea0ba 100644 --- a/src/net/tmwa/playerhandler.h +++ b/src/net/tmwa/playerhandler.h @@ -51,11 +51,11 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler void setDestination(const int x, const int y, const int direction) const override final; void changeAction(const Being::Action &action) const override final; - void processOnlineList(Net::MessageIn &msg) const; + static void processOnlineList(Net::MessageIn &msg); void requestOnlineList() const override final; void updateStatus(const uint8_t status) const override final; - void processMapMask(Net::MessageIn &msg) const; - void processMapMusic(Net::MessageIn &msg) const; + static void processMapMask(Net::MessageIn &msg); + static void processMapMusic(Net::MessageIn &msg); void respawn() const override final; }; diff --git a/src/net/tmwa/questhandler.cpp b/src/net/tmwa/questhandler.cpp index 328a379dc..73ba770ea 100644 --- a/src/net/tmwa/questhandler.cpp +++ b/src/net/tmwa/questhandler.cpp @@ -61,7 +61,7 @@ void QuestHandler::handleMessage(Net::MessageIn &msg) BLOCK_END("QuestHandler::handleMessage") } -void QuestHandler::processSetQuestVar(Net::MessageIn &msg) const +void QuestHandler::processSetQuestVar(Net::MessageIn &msg) { const int var = msg.readInt16(); // variable const int val = msg.readInt32(); // value @@ -77,7 +77,7 @@ void QuestHandler::processSetQuestVar(Net::MessageIn &msg) const } } -void QuestHandler::processPlayerQuests(Net::MessageIn &msg) const +void QuestHandler::processPlayerQuests(Net::MessageIn &msg) { const int count = (msg.readInt16() - 4) / 6; for (int f = 0; f < count; f ++) diff --git a/src/net/tmwa/questhandler.h b/src/net/tmwa/questhandler.h index 3e5e8178a..1de4ed24f 100644 --- a/src/net/tmwa/questhandler.h +++ b/src/net/tmwa/questhandler.h @@ -35,9 +35,9 @@ class QuestHandler final : public MessageHandler void handleMessage(Net::MessageIn &msg) override final; - void processSetQuestVar(Net::MessageIn &msg) const; + static void processSetQuestVar(Net::MessageIn &msg); - void processPlayerQuests(Net::MessageIn &msg) const; + static void processPlayerQuests(Net::MessageIn &msg); }; } // namespace TmwAthena |