diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-04-04 16:41:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-04-04 16:41:09 +0300 |
commit | 05a196194b8270c1ae2e63f8ae31f8a492022388 (patch) | |
tree | a00c9c9a009d562db1a95b3f8f77428df0169a21 /src/net | |
parent | 6f06cd42b8e56aaae2be853a31d73d0115a39c2a (diff) | |
download | manaplus-05a196194b8270c1ae2e63f8ae31f8a492022388.tar.gz manaplus-05a196194b8270c1ae2e63f8ae31f8a492022388.tar.bz2 manaplus-05a196194b8270c1ae2e63f8ae31f8a492022388.tar.xz manaplus-05a196194b8270c1ae2e63f8ae31f8a492022388.zip |
Show unimplimented packet debug message on each unsupported packets parameters.
Diffstat (limited to 'src/net')
30 files changed, 92 insertions, 94 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 54f13472e..1af57becb 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -246,12 +246,7 @@ void BeingHandler::processBeingAction(Net::MessageIn &msg) } break; default: - logger->log("QQQ1 SMSG_BEING_ACTION:"); - if (srcBeing) - logger->log("srcBeing:" + toString(srcBeing->getId())); - if (dstBeing) - logger->log("dstBeing:" + toString(dstBeing->getId())); - logger->log("type: " + toString(type)); + UNIMPLIMENTEDPACKET; break; } BLOCK_END("BeingHandler::processBeingAction") diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp index 95d05bf1e..a08b2b9e6 100644 --- a/src/net/ea/chathandler.cpp +++ b/src/net/ea/chathandler.cpp @@ -98,7 +98,8 @@ std::string ChatHandler::getLastWhisperNick() return nick; } -void ChatHandler::processWhisperResponseContinue(const uint8_t type) +void ChatHandler::processWhisperResponseContinue(Net::MessageIn &msg, + const uint8_t type) { const std::string nick = getPopLastWhisperNick(); switch (type) @@ -137,11 +138,7 @@ void ChatHandler::processWhisperResponseContinue(const uint8_t type) } break; default: - if (logger) - { - logger->log("QQQ SMSG_WHISPER_RESPONSE:" - + toString(type)); - } + UNIMPLIMENTEDPACKET; break; } BLOCK_END("ChatHandler::processWhisperResponse") diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h index 2ed9282f8..c58c6e534 100644 --- a/src/net/ea/chathandler.h +++ b/src/net/ea/chathandler.h @@ -53,7 +53,8 @@ class ChatHandler notfinal : public Net::ChatHandler void clear() override final; - static void processWhisperResponseContinue(const uint8_t type); + static void processWhisperResponseContinue(Net::MessageIn &msg, + const uint8_t type); protected: static std::string getPopLastWhisperNick(); diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp index 40c6b5256..a88025b7f 100644 --- a/src/net/ea/npchandler.cpp +++ b/src/net/ea/npchandler.cpp @@ -194,7 +194,7 @@ void NpcHandler::processNpcCommand(Net::MessageIn &msg) break; } default: - logger->log("unknown npc command: %d", cmd); + UNIMPLIMENTEDPACKET; break; } } diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 03f210f73..f30a0a83f 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -83,7 +83,8 @@ void PartyHandler::processPartyCreate(Net::MessageIn &msg) NotifyManager::notify(NotifyTypes::PARTY_CREATED); } -void PartyHandler::processPartySettingsContinue(const int16_t exp, +void PartyHandler::processPartySettingsContinue(Net::MessageIn &msg, + const int16_t exp, const int16_t item) { switch (exp) @@ -107,7 +108,7 @@ void PartyHandler::processPartySettingsContinue(const int16_t exp, NotifyManager::notify(NotifyTypes::PARTY_EXP_SHARE_ERROR); break; default: - logger->log("QQQ Unknown party exp option: %d\n", exp); + UNIMPLIMENTEDPACKET; break; } @@ -132,7 +133,7 @@ void PartyHandler::processPartySettingsContinue(const int16_t exp, NotifyManager::notify(NotifyTypes::PARTY_ITEM_SHARE_ERROR); break; default: - logger->log("QQQ Unknown party item option: %d\n", exp); + UNIMPLIMENTEDPACKET; break; } } diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h index 24a1d95ec..12dec8c6c 100644 --- a/src/net/ea/partyhandler.h +++ b/src/net/ea/partyhandler.h @@ -67,7 +67,8 @@ class PartyHandler notfinal : public Net::PartyHandler static void processPartyUpdateCoords(Net::MessageIn &msg); - static void processPartySettingsContinue(const int16_t exp, + static void processPartySettingsContinue(Net::MessageIn &msg, + const int16_t exp, const int16_t item); static Net::PartyShare::Type mShareExp; diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index eb6f8d0af..c12dc081e 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -173,7 +173,7 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) return; } - playerHandler->setStat(type, value, -1, true); + playerHandler->setStat(msg, type, value, -1, true); BLOCK_END("PlayerHandler::processPlayerStatUpdate1") } @@ -182,7 +182,7 @@ void PlayerHandler::processPlayerStatUpdate2(Net::MessageIn &msg) BLOCK_START("PlayerHandler::processPlayerStatUpdate2") const int type = msg.readInt16("type"); const int value = msg.readInt32("value"); - playerHandler->setStat(type, value, -1, true); + playerHandler->setStat(msg, type, value, -1, true); BLOCK_END("PlayerHandler::processPlayerStatUpdate2") } @@ -193,7 +193,7 @@ void PlayerHandler::processPlayerStatUpdate3(Net::MessageIn &msg) const int base = msg.readInt32("base"); const int bonus = msg.readInt32("bonus"); - playerHandler->setStat(type, base, bonus, false); + playerHandler->setStat(msg, type, base, bonus, false); BLOCK_END("PlayerHandler::processPlayerStatUpdate3") } @@ -213,7 +213,7 @@ void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg) NotifyManager::notify(NotifyTypes::SKILL_RAISE_ERROR); } - playerHandler->setStat(type, value, -1, true); + playerHandler->setStat(msg, type, value, -1, true); BLOCK_END("PlayerHandler::processPlayerStatUpdate4") } @@ -223,7 +223,7 @@ void PlayerHandler::processPlayerStatUpdate6(Net::MessageIn &msg) const int type = msg.readInt16("type"); const int value = msg.readUInt8("value"); if (statusWindow) - playerHandler->setStat(type, value, -1, true); + playerHandler->setStat(msg, type, value, -1, true); BLOCK_END("PlayerHandler::processPlayerStatUpdate6") } @@ -240,7 +240,7 @@ void PlayerHandler::processPlayerArrowMessage(Net::MessageIn &msg) // arrows equiped break; default: - logger->log("QQQQ 0x013b: Unhandled message %i", type); + UNIMPLIMENTEDPACKET; break; } BLOCK_END("PlayerHandler::processPlayerArrowMessage") @@ -256,7 +256,8 @@ bool PlayerHandler::canUseMagic() const if (mod != -1) \ PlayerInfo::setStatMod(stat, mod) -void PlayerHandler::setStat(const int type, +void PlayerHandler::setStat(Net::MessageIn &msg, + const int type, const int base, const int mod, const bool notify) const @@ -450,8 +451,7 @@ void PlayerHandler::setStat(const int type, break; default: - logger->log("Error: Unknown stat set: %d, values: %d, %d", - type, base, mod); + UNIMPLIMENTEDPACKET; break; } } diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h index 6b5d0d0b8..b0d20be6e 100644 --- a/src/net/ea/playerhandler.h +++ b/src/net/ea/playerhandler.h @@ -53,7 +53,8 @@ class PlayerHandler notfinal : public Net::PlayerHandler Vector getDefaultWalkSpeed() const override final A_WARN_UNUSED; - void setStat(const int type, + void setStat(Net::MessageIn &msg, + const int type, const int base, const int mod, const bool notify) const override; diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 747df5d9d..7667edcbb 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -412,7 +412,8 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) } } -Being *BeingHandler::createBeing2(const int id, +Being *BeingHandler::createBeing2(Net::MessageIn &msg, + const int id, const int16_t job, const BeingType::BeingType beingType) { @@ -449,6 +450,7 @@ Being *BeingHandler::createBeing2(const int id, break; case BeingType::CHAT: default: + UNIMPLIMENTEDPACKET; type = ActorType::Monster; logger->log("not supported object type: %d, job: %d", static_cast<int>(beingType), static_cast<int>(job)); @@ -505,10 +507,11 @@ void BeingHandler::processBeingChangeLook2(Net::MessageIn &msg) if (!localPlayer || !dstBeing) return; - processBeingChangeLookContinue(dstBeing, type, id, id2); + processBeingChangeLookContinue(msg, dstBeing, type, id, id2); } -void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing, +void BeingHandler::processBeingChangeLookContinue(Net::MessageIn &msg, + Being *const dstBeing, const uint8_t type, const int id, const int id2) @@ -612,10 +615,7 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing, localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL4); break; default: - logger->log("QQQ3 CHANGE_LOOKS: unsupported type: " - "%d, id: %d", type, id); - logger->log("ID: " + toString(dstBeing->getId())); - logger->log("name: " + toString(dstBeing->getName())); + UNIMPLIMENTEDPACKET; break; } } @@ -661,7 +661,7 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg) if (actorManager->isBlocked(id) == true) return; - dstBeing = createBeing2(id, job, type); + dstBeing = createBeing2(msg, id, job, type); if (!dstBeing) return; @@ -830,7 +830,7 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg) if (actorManager->isBlocked(id) == true) return; - dstBeing = createBeing2(id, job, type); + dstBeing = createBeing2(msg, id, job, type); if (!dstBeing) return; @@ -998,7 +998,7 @@ void BeingHandler::processBeingSpawn(Net::MessageIn &msg) if (actorManager->isBlocked(id) == true) return; - dstBeing = createBeing2(id, job, type); + dstBeing = createBeing2(msg, id, job, type); if (!dstBeing) return; @@ -1325,12 +1325,7 @@ void BeingHandler::processBeingAction2(Net::MessageIn &msg) } break; default: - logger->log("QQQ1 SMSG_BEING_ACTION:"); - if (srcBeing) - logger->log("srcBeing:" + toString(srcBeing->getId())); - if (dstBeing) - logger->log("dstBeing:" + toString(dstBeing->getId())); - logger->log("type: " + toString(type)); + UNIMPLIMENTEDPACKET; break; } BLOCK_END("BeingHandler::processBeingAction2") @@ -1485,7 +1480,9 @@ void BeingHandler::processBeingSoundEffect(Net::MessageIn &msg) msg.readInt32("source being id"); } -void BeingHandler::applyPlayerAction(Being *const being, const uint8_t type) +void BeingHandler::applyPlayerAction(Net::MessageIn &msg, + Being *const being, + const uint8_t type) { switch (type) { @@ -1509,9 +1506,7 @@ void BeingHandler::applyPlayerAction(Being *const being, const uint8_t type) default: // need set stand state? - logger->log("QQQ2 SMSG_PLAYER_UPDATE_1:" + toString(type)); - logger->log("being id:" + toString(being->getId())); - logger->log("being name:" + being->getName()); + UNIMPLIMENTEDPACKET; break; } } @@ -1683,7 +1678,7 @@ void BeingHandler::processBeingFakeName(Net::MessageIn &msg) msg.readUInt8("sy"); msg.skip(4, "unsued"); - Being *const dstBeing = createBeing2(id, job, type); + Being *const dstBeing = createBeing2(msg, id, job, type); dstBeing->setSubtype(job, 0); dstBeing->setTileCoords(x, y); dstBeing->setDirection(dir); @@ -1701,7 +1696,7 @@ void BeingHandler::processBeingStatUpdate1(Net::MessageIn &msg) if (type != Ea::MANNER) { - logger->log("Error: unknown being stat type: %d", type); + UNIMPLIMENTEDPACKET; return; } dstBeing->setManner(value); diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h index 78f12af80..f6fb1df78 100644 --- a/src/net/eathena/beinghandler.h +++ b/src/net/eathena/beinghandler.h @@ -47,7 +47,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler void requestRanks(const Rank::Rank rank) const override final; protected: - static Being *createBeing2(const int id, + static Being *createBeing2(Net::MessageIn &msg, + const int id, const int16_t job, const BeingType::BeingType beingType); @@ -81,7 +82,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler static void processBeingChangeDirection(Net::MessageIn &msg); - static void processBeingChangeLookContinue(Being *const dstBeing, + static void processBeingChangeLookContinue(Net::MessageIn &msg, + Being *const dstBeing, const uint8_t type, const int id, const int id2); @@ -92,7 +94,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler static void processBeingSoundEffect(Net::MessageIn &msg); - static void applyPlayerAction(Being *const being, + static void applyPlayerAction(Net::MessageIn &msg, + Being *const being, const uint8_t type); void viewPlayerEquipment(const Being *const being); diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index f813dce6e..f01c3abae 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -521,8 +521,7 @@ void CharServerHandler::processPincodeStatus(Net::MessageIn &msg) case 8: // pincode was incorrect break; default: - logger->log("processPincodeStatus: unknown pin state: %d", - static_cast<int>(state)); + UNIMPLIMENTEDPACKET; break; } } diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index de66468e2..1dfeb7ccb 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -638,7 +638,7 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg) return; } } - processWhisperResponseContinue(type); + processWhisperResponseContinue(msg, type); } void ChatHandler::processChatIgnoreList(Net::MessageIn &msg) diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 278ca03bb..22d01e7a5 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -525,7 +525,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) break; default: pickup = Pickup::UNKNOWN; - logger->log("unknown pickup type: %d", err); + UNIMPLIMENTEDPACKET; break; } if (localPlayer) diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp index 35797b21a..26c93212b 100644 --- a/src/net/eathena/loginhandler.cpp +++ b/src/net/eathena/loginhandler.cpp @@ -236,6 +236,7 @@ void LoginHandler::processLoginError2(Net::MessageIn &msg) default: // TRANSLATORS: error message errorMessage = _("Unknown error."); + UNIMPLIMENTEDPACKET; break; } client->setState(STATE_ERROR); diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp index cf4a0c290..c8fdff4b2 100644 --- a/src/net/eathena/mailhandler.cpp +++ b/src/net/eathena/mailhandler.cpp @@ -112,7 +112,7 @@ void MailHandler::processMailOpen(Net::MessageIn &msg) break; default: - logger->log("unknown mail window open flag: %d", flag); + UNIMPLIMENTEDPACKET; break; } } diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index dd654f616..87b30eb52 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -268,7 +268,7 @@ void PartyHandler::processPartySettings(Net::MessageIn &msg) msg.readInt32("party exp"); const int16_t exp = msg.readInt8("exp"); const int16_t item = msg.readInt8("item"); - processPartySettingsContinue(exp, item); + processPartySettingsContinue(msg, exp, item); } void PartyHandler::processPartyInfo(Net::MessageIn &msg) diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 23990ee2d..aa0cb4f20 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -482,7 +482,7 @@ void PlayerHandler::processPlayerGetExp(Net::MessageIn &msg) else if (stat == 2) localPlayer->addJobMessage(exp); else - logger->log("unknown exp type"); + UNIMPLIMENTEDPACKET; } // need show particle depend on isQuest flag, for now ignored } @@ -563,12 +563,13 @@ void PlayerHandler::processPlayerSkillMessage(Net::MessageIn &msg) msg.readInt32("type"); } -void PlayerHandler::setStat(const int type, +void PlayerHandler::setStat(Net::MessageIn &msg, + const int type, const int base, const int mod, const bool notify) const { - Ea::PlayerHandler::setStat(type, base, mod, notify); + Ea::PlayerHandler::setStat(msg, type, base, mod, notify); } void PlayerHandler::processNotifyMapInfo(Net::MessageIn &msg) diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h index edd6cd897..22a2cd56e 100644 --- a/src/net/eathena/playerhandler.h +++ b/src/net/eathena/playerhandler.h @@ -70,7 +70,8 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler void setViewEquipment(const bool allow) const override final; protected: - void setStat(const int type, + void setStat(Net::MessageIn &msg, + const int type, const int base, const int mod, const bool notify) const override final; diff --git a/src/net/eathena/skillhandler.cpp b/src/net/eathena/skillhandler.cpp index af6dd2857..413ff103f 100644 --- a/src/net/eathena/skillhandler.cpp +++ b/src/net/eathena/skillhandler.cpp @@ -414,6 +414,7 @@ void SkillHandler::processSkillFailed(Net::MessageIn &msg) txt.append(_("You're carrying to much to do this!")); break; default: + UNIMPLIMENTEDPACKET; break; } diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index 65951d1e8..562e250b2 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -256,8 +256,7 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) break; default: NotifyManager::notify(NotifyTypes::TRADE_ADD_ERROR); - logger->log("QQQ SMSG_TRADE_ITEM_ADD_RESPONSE: " - + toString(res)); + UNIMPLIMENTEDPACKET; break; } } diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h index 10eac7462..2cdfdf062 100644 --- a/src/net/playerhandler.h +++ b/src/net/playerhandler.h @@ -27,6 +27,8 @@ #include "enums/being/beingaction.h" +#include "net/messagein.h" + namespace Net { @@ -95,7 +97,8 @@ class PlayerHandler notfinal virtual void setViewEquipment(const bool allow) const = 0; - virtual void setStat(const int type, + virtual void setStat(Net::MessageIn &msg, + const int type, const int base, const int mod, const bool notify) const = 0; diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 33c1db769..7ce768d62 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -277,7 +277,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg) BLOCK_END("BeingHandler::processBeingChangeLook") return; } - processBeingChangeLookContinue(dstBeing, type, id, id2); + processBeingChangeLookContinue(msg, dstBeing, type, id, id2); BLOCK_END("BeingHandler::processBeingChangeLook") } @@ -312,11 +312,12 @@ void BeingHandler::processBeingChangeLook2(Net::MessageIn &msg) BLOCK_END("BeingHandler::processBeingChangeLook") return; } - processBeingChangeLookContinue(dstBeing, type, id, id2); + processBeingChangeLookContinue(msg, dstBeing, type, id, id2); BLOCK_END("BeingHandler::processBeingChangeLook") } -void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing, +void BeingHandler::processBeingChangeLookContinue(Net::MessageIn &msg, + Being *const dstBeing, const uint8_t type, const int id, const int id2) @@ -413,10 +414,7 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing, dstBeing->setLook(static_cast<uint16_t>(id)); break; default: - logger->log("QQQ3 CHANGE_LOOKS: unsupported type: " - "%d, id: %d", type, id); - logger->log("ID: " + toString(dstBeing->getId())); - logger->log("name: " + toString(dstBeing->getName())); + UNIMPLIMENTEDPACKET; break; } } @@ -556,7 +554,7 @@ void BeingHandler::processPlayerUpdate1(Net::MessageIn &msg) if (gmstatus & 0x80) dstBeing->setGM(true); - applyPlayerAction(dstBeing, msg.readUInt8("action type")); + applyPlayerAction(msg, dstBeing, msg.readUInt8("action type")); const int level = static_cast<int>(msg.readUInt8("level")); if (level) dstBeing->setLevel(level); @@ -708,7 +706,7 @@ void BeingHandler::processPlayerUpdate2(Net::MessageIn &msg) if (gmstatus & 0x80) dstBeing->setGM(true); - applyPlayerAction(dstBeing, msg.readUInt8("action type")); + applyPlayerAction(msg, dstBeing, msg.readUInt8("action type")); const int level = static_cast<int>(msg.readUInt8("level")); if (level) dstBeing->setLevel(level); @@ -1440,7 +1438,9 @@ void BeingHandler::setServerGender(Being *const being, const uint8_t gender) } } -void BeingHandler::applyPlayerAction(Being *const being, const uint8_t type) +void BeingHandler::applyPlayerAction(Net::MessageIn &msg, + Being *const being, + const uint8_t type) { switch (type) { @@ -1463,10 +1463,7 @@ void BeingHandler::applyPlayerAction(Being *const being, const uint8_t type) break; default: - // need set stand state? - logger->log("QQQ2 SMSG_PLAYER_UPDATE_1:" + toString(type)); - logger->log("being id:" + toString(being->getId())); - logger->log("being name:" + being->getName()); + UNIMPLIMENTEDPACKET; break; } } diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h index f2117e2bc..0fcb62872 100644 --- a/src/net/tmwa/beinghandler.h +++ b/src/net/tmwa/beinghandler.h @@ -72,7 +72,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler static void processBeingChangeDirection(Net::MessageIn &msg); - static void processBeingChangeLookContinue(Being *const dstBeing, + static void processBeingChangeLookContinue(Net::MessageIn &msg, + Being *const dstBeing, const uint8_t type, const int id, const int id2); @@ -86,7 +87,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler static void setServerGender(Being *const being, const uint8_t gender); - static void applyPlayerAction(Being *const being, + static void applyPlayerAction(Net::MessageIn &msg, + Being *const being, const uint8_t type); static void processBeingSelfEffect(Net::MessageIn &msg); diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index c60c1f600..4a4810c58 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -464,7 +464,7 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg) BLOCK_START("ChatHandler::processWhisperResponse") const uint8_t type = msg.readUInt8("response"); - processWhisperResponseContinue(type); + processWhisperResponseContinue(msg, type); } void ChatHandler::joinChat(const ChatObject *const chat A_UNUSED, diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 7fedc5574..28db6fa69 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -384,7 +384,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) break; default: pickup = Pickup::UNKNOWN; - logger->log("unknown pickup type: %d", err); + UNIMPLIMENTEDPACKET; break; } if (localPlayer) diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp index 84f39affc..6d9e448f0 100644 --- a/src/net/tmwa/partyhandler.cpp +++ b/src/net/tmwa/partyhandler.cpp @@ -216,7 +216,7 @@ void PartyHandler::processPartySettings(Net::MessageIn &msg) // These seem to indicate the sharing mode for exp and items const int16_t exp = msg.readInt16("share exp"); const int16_t item = msg.readInt16("share items"); - processPartySettingsContinue(exp, item); + processPartySettingsContinue(msg, exp, item); } void PartyHandler::processPartyInfo(Net::MessageIn &msg) diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index f5ccad489..48f86daa9 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -398,7 +398,8 @@ void PlayerHandler::setViewEquipment(const bool allow A_UNUSED) const { } -void PlayerHandler::setStat(const int type, +void PlayerHandler::setStat(Net::MessageIn &msg, + const int type, const int base, const int mod, const bool notify) const @@ -408,7 +409,7 @@ void PlayerHandler::setStat(const int type, localPlayer->setGMLevel(base); return; } - Ea::PlayerHandler::setStat(type, base, mod, notify); + Ea::PlayerHandler::setStat(msg, type, base, mod, notify); } } // namespace TmwAthena diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h index 1ca4c0ab8..062e00db6 100644 --- a/src/net/tmwa/playerhandler.h +++ b/src/net/tmwa/playerhandler.h @@ -79,7 +79,8 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler void setViewEquipment(const bool allow) const override final; protected: - void setStat(const int type, + void setStat(Net::MessageIn &msg, + const int type, const int base, const int mod, const bool notify) const override final; diff --git a/src/net/tmwa/skillhandler.cpp b/src/net/tmwa/skillhandler.cpp index 424a8ad6b..1567d576a 100644 --- a/src/net/tmwa/skillhandler.cpp +++ b/src/net/tmwa/skillhandler.cpp @@ -210,8 +210,7 @@ void SkillHandler::processSkillFailed(Net::MessageIn &msg) txt = _("Cannot shout!"); break; default: - logger->log("QQQ SMSG_SKILL_FAILED: bskill " - + toString(bskill)); + UNIMPLIMENTEDPACKET; break; } @@ -263,8 +262,7 @@ void SkillHandler::processSkillFailed(Net::MessageIn &msg) default: // TRANSLATORS: error message txt.append(_("Huh? What's that?")); - logger->log("QQQ SMSG_SKILL_FAILED: reason " - + toString(reason)); + UNIMPLIMENTEDPACKET; break; } } @@ -285,8 +283,7 @@ void SkillHandler::processSkillFailed(Net::MessageIn &msg) txt = _("Poison had no effect..."); break; default: - logger->log("QQQ SMSG_SKILL_FAILED: skillId " - + toString(skillId)); + UNIMPLIMENTEDPACKET; break; } } diff --git a/src/net/tmwa/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp index 574c30bf1..f734a2e43 100644 --- a/src/net/tmwa/tradehandler.cpp +++ b/src/net/tmwa/tradehandler.cpp @@ -267,6 +267,7 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) break; default: NotifyManager::notify(NotifyTypes::TRADE_ADD_ERROR); + UNIMPLIMENTEDPACKET; logger->log("QQQ SMSG_TRADE_ITEM_ADD_RESPONSE: " + toString(res)); break; |