mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-21 10:11:30 +00:00
Fix for silent saylinks and EVENT_COMMAND calls
This commit is contained in:
parent
467f8d7867
commit
6366a3fa38
@ -8286,6 +8286,15 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app)
|
|||||||
if (GetTarget() && GetTarget()->IsNPC()) {
|
if (GetTarget() && GetTarget()->IsNPC()) {
|
||||||
if (silentsaylink) {
|
if (silentsaylink) {
|
||||||
parse->EventNPC(EVENT_SAY, GetTarget()->CastToNPC(), this, response.c_str(), 0);
|
parse->EventNPC(EVENT_SAY, GetTarget()->CastToNPC(), this, response.c_str(), 0);
|
||||||
|
|
||||||
|
if (response[0] == '#' && parse->PlayerHasQuestSub(EVENT_COMMAND)) {
|
||||||
|
parse->EventPlayer(EVENT_COMMAND, this, response.substr(1).c_str(), 0);
|
||||||
|
}
|
||||||
|
#ifdef BOTS
|
||||||
|
else if (response[0] == '^' && parse->PlayerHasQuestSub(EVENT_BOT_COMMAND)) {
|
||||||
|
parse->EventPlayer(EVENT_BOT_COMMAND, this, response.substr(1).c_str(), 0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0);
|
parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -8296,6 +8305,14 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (silentsaylink) {
|
if (silentsaylink) {
|
||||||
|
if (response[0] == '#' && parse->PlayerHasQuestSub(EVENT_COMMAND)) {
|
||||||
|
parse->EventPlayer(EVENT_COMMAND, this, response.substr(1).c_str(), 0);
|
||||||
|
}
|
||||||
|
#ifdef BOTS
|
||||||
|
else if (response[0] == '^' && parse->PlayerHasQuestSub(EVENT_BOT_COMMAND)) {
|
||||||
|
parse->EventPlayer(EVENT_BOT_COMMAND, this, response.substr(1).c_str(), 0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0);
|
parse->EventPlayer(EVENT_SAY, this, response.c_str(), 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -1546,6 +1546,9 @@ void PerlembParser::ExportEventVariables(
|
|||||||
Seperator sep(data);
|
Seperator sep(data);
|
||||||
ExportVar(package_name.c_str(), "command", (sep.arg[0] + 1));
|
ExportVar(package_name.c_str(), "command", (sep.arg[0] + 1));
|
||||||
ExportVar(package_name.c_str(), "args", (sep.argnum >= 1 ? (&data[strlen(sep.arg[0]) + 1]) : "0"));
|
ExportVar(package_name.c_str(), "args", (sep.argnum >= 1 ? (&data[strlen(sep.arg[0]) + 1]) : "0"));
|
||||||
|
ExportVar(package_name.c_str(), "data", objid);
|
||||||
|
ExportVar(package_name.c_str(), "text", data);
|
||||||
|
ExportVar(package_name.c_str(), "langid", extradata);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1615,6 +1618,9 @@ void PerlembParser::ExportEventVariables(
|
|||||||
Seperator sep(data);
|
Seperator sep(data);
|
||||||
ExportVar(package_name.c_str(), "bot_command", (sep.arg[0] + 1));
|
ExportVar(package_name.c_str(), "bot_command", (sep.arg[0] + 1));
|
||||||
ExportVar(package_name.c_str(), "args", (sep.argnum >= 1 ? (&data[strlen(sep.arg[0]) + 1]) : "0"));
|
ExportVar(package_name.c_str(), "args", (sep.argnum >= 1 ? (&data[strlen(sep.arg[0]) + 1]) : "0"));
|
||||||
|
ExportVar(package_name.c_str(), "data", objid);
|
||||||
|
ExportVar(package_name.c_str(), "text", data);
|
||||||
|
ExportVar(package_name.c_str(), "langid", extradata);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user