Added alternate command sequence for clients that don't support # commands. Incoming channel messages work I think. Outgoing special msg still pretty screwed up but working on it.

This commit is contained in:
KimLS 2024-11-20 22:35:09 -08:00
parent 63331b678b
commit 0eedbea060
3 changed files with 5 additions and 4 deletions

View File

@ -2563,8 +2563,8 @@ namespace Larion
VARSTRUCT_DECODE_STRING(Sender, InBuffer);
VARSTRUCT_DECODE_STRING(Target, InBuffer);
//packet seems the same as rof2 with 5 more empty bytes before language
InBuffer += 9;
//packet seems the same as rof2 with 4 more empty bytes before language
InBuffer += 8;
uint32 Language = VARSTRUCT_DECODE_TYPE(uint32, InBuffer);
uint32 Channel = VARSTRUCT_DECODE_TYPE(uint32, InBuffer);

View File

@ -1177,7 +1177,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
}
}
if (message[0] == COMMAND_CHAR) {
if (message[0] == COMMAND_CHAR || message[0] == COMMAND_CHAR_NON_HASH) {
if (command_dispatch(this, message, false) == -2) {
if (parse->PlayerHasQuestSub(EVENT_COMMAND)) {
int i = parse->EventPlayer(EVENT_COMMAND, this, message, 0);
@ -7527,7 +7527,7 @@ void Client::GarbleMessage(char *message, uint8 variance)
int delimiter_count = 0;
// Don't garble # commands
if (message[0] == COMMAND_CHAR || message[0] == BOT_COMMAND_CHAR) {
if (message[0] == COMMAND_CHAR || message[0] == COMMAND_CHAR_NON_HASH || message[0] == BOT_COMMAND_CHAR) {
return;
}

View File

@ -8,6 +8,7 @@ class Seperator;
#include <string>
#define COMMAND_CHAR '#'
#define COMMAND_CHAR_NON_HASH '.'
typedef void (*CmdFuncPtr)(Client *, const Seperator *);