diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-02-13 12:31:13 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-02-13 20:56:48 +0100 |
commit | 92a6fd04d44bcd405641d7297a0167e2d5aba26f (patch) | |
tree | 06df1fca07892be18a35e446965f25bcfc236d19 /src/commandhandler.cpp | |
parent | 10da00488a37cb04a2cb515c94acde7104e74506 (diff) | |
download | mana-92a6fd04d44bcd405641d7297a0167e2d5aba26f.tar.gz mana-92a6fd04d44bcd405641d7297a0167e2d5aba26f.tar.bz2 mana-92a6fd04d44bcd405641d7297a0167e2d5aba26f.tar.xz mana-92a6fd04d44bcd405641d7297a0167e2d5aba26f.zip |
Updated tmwAthena network protocol
* The code defining the message IDs and sizes are now generated by the
tools/protocol.py script in the tmwAthena repository.
* Reduced client version from 20 to 6, because that is currently the
minimum supported version, and any adjustments needed for later likely
still need to be made.
* Removed use of no longer handled messages:
- CMSG_SKILL_USE_BEING
- CMSG_SKILL_USE_POSITION
- CMSG_SKILL_USE_MAP
- SMSG_PARTY_MOVE
- CMSG_WHO_REQUEST
- SMSG_WHO_ANSWER
- SMSG_MVP
- SMSG_BEING_MOVE2
- SMSG_BEING_CHANGE_LOOKS
* Some messages were renamed to match the server side
- CMSG_PLAYER_ATTACK -> CMSG_PLAYER_CHANGE_ACT
- CMSG_PLAYER_RESTART -> CMSG_PLAYER_REBOOT
- SMSG_ADMIN_IP -> SMSG_BEING_IP_RESPONSE
Part of addressing issues #55 and #47, which we now know are about
handling SMSG_PLAYER_HP and SMSG_NPC_COMMAND respectively. The client
will now ignore them (with a warning) instead of crash.
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r-- | src/commandhandler.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 3211dcc3..c35e9ee3 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -23,17 +23,13 @@ #include "actorspritemanager.h" #include "channelmanager.h" -#include "channel.h" #include "game.h" #include "localplayer.h" #include "playerrelations.h" -#include "gui/widgets/channeltab.h" #include "gui/widgets/chattab.h" -#include "net/adminhandler.h" #include "net/chathandler.h" -#include "net/gamehandler.h" #include "net/net.h" #include "net/partyhandler.h" @@ -151,13 +147,16 @@ char CommandHandler::parseBoolean(const std::string &value) void CommandHandler::handleHelp(const std::string &args, ChatTab *tab) { - if (args == "") + if (args.empty()) { tab->chatLog(_("-- Help --")); tab->chatLog(_("/help > Display this help")); tab->chatLog(_("/where > Display map name")); - tab->chatLog(_("/who > Display number of online users")); + + if (Net::getChatHandler()->whoSupported()) + tab->chatLog(_("/who > Display number of online users")); + tab->chatLog(_("/me > Tell something about yourself")); tab->chatLog(_("/clear > Clears this window")); @@ -304,7 +303,7 @@ void CommandHandler::handleHelp(const std::string &args, ChatTab *tab) tab->chatLog(_("Command: /where")); tab->chatLog(_("This command displays the name of the current map.")); } - else if (args == "who") + else if (args == "who" && Net::getChatHandler()->whoSupported()) { tab->chatLog(_("Command: /who")); tab->chatLog(_("This command displays the number of players currently " |