mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-07 17:22:26 +00:00
Fatality! (Fix for event_say parse events not observing the correct parser for their situation)
This commit is contained in:
parent
c438819ed6
commit
9bdb70b2f0
@ -1111,11 +1111,19 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
|||||||
if (i == 0 && !RuleB(Chat, SuppressCommandErrors)) {
|
if (i == 0 && !RuleB(Chat, SuppressCommandErrors)) {
|
||||||
Message(Chat::Red, "Command '%s' not recognized.", message);
|
Message(Chat::Red, "Command '%s' not recognized.", message);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
if(!RuleB(Chat, SuppressCommandErrors))
|
else if (parse->PlayerHasQuestSub(EVENT_SAY)) {
|
||||||
|
int i = parse->EventPlayer(EVENT_SAY, this, message, 0);
|
||||||
|
if (i == 0 && !RuleB(Chat, SuppressCommandErrors)) {
|
||||||
Message(Chat::Red, "Command '%s' not recognized.", message);
|
Message(Chat::Red, "Command '%s' not recognized.", message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (!RuleB(Chat, SuppressCommandErrors)) {
|
||||||
|
Message(Chat::Red, "Command '%s' not recognized.", message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1128,11 +1136,18 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
|||||||
Message(Chat::Red, "Bot command '%s' not recognized.", message);
|
Message(Chat::Red, "Bot command '%s' not recognized.", message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else if (parse->PlayerHasQuestSub(EVENT_SAY)) {
|
||||||
if (!RuleB(Chat, SuppressCommandErrors))
|
int i = parse->EventPlayer(EVENT_SAY, this, message, 0);
|
||||||
|
if (i == 0 && !RuleB(Chat, SuppressCommandErrors)) {
|
||||||
Message(Chat::Red, "Bot command '%s' not recognized.", message);
|
Message(Chat::Red, "Bot command '%s' not recognized.", message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (!RuleB(Chat, SuppressCommandErrors)) {
|
||||||
|
Message(Chat::Red, "Bot command '%s' not recognized.", message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -8297,8 +8297,10 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app)
|
|||||||
parse->EventPlayer(EVENT_BOT_COMMAND, this, response.substr(1).c_str(), 0);
|
parse->EventPlayer(EVENT_BOT_COMMAND, this, response.substr(1).c_str(), 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
else {
|
||||||
parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0);
|
parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
Message(Chat::LightGray, "You say, '%s'", response.c_str());
|
Message(Chat::LightGray, "You say, '%s'", response.c_str());
|
||||||
ChannelMessageReceived(8, 0, 100, response.c_str());
|
ChannelMessageReceived(8, 0, 100, response.c_str());
|
||||||
@ -8315,8 +8317,10 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app)
|
|||||||
parse->EventPlayer(EVENT_BOT_COMMAND, this, response.substr(1).c_str(), 0);
|
parse->EventPlayer(EVENT_BOT_COMMAND, this, response.substr(1).c_str(), 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
else {
|
||||||
parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0);
|
parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
Message(Chat::LightGray, "You say, '%s'", response.c_str());
|
Message(Chat::LightGray, "You say, '%s'", response.c_str());
|
||||||
ChannelMessageReceived(8, 0, 100, response.c_str());
|
ChannelMessageReceived(8, 0, 100, response.c_str());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user