[Bug Fix] Fix Silent Saylinks Sending Message to Others. (#2389)

* [Bug Fix] Fix Silent Saylinks Sending Message to Others.
Silent saylinks wouldn't send to sender, but to everyone else, so they could see what your saylinks were.

Added an optional `is_silent` bool to ChannelMessageReceived to account for this where necessary.

* Nullptr fix.
This commit is contained in:
Kinglykrab
2022-08-21 23:26:25 -04:00
committed by GitHub
parent c0d4dd4176
commit b9d8a13c76
4 changed files with 10 additions and 7 deletions
+3 -3
View File
@@ -8528,7 +8528,7 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app)
return;
}
ChannelMessageReceived(ChatChannel_Say, 0, 100, response.c_str());
ChannelMessageReceived(ChatChannel_Say, 0, 100, response.c_str(), nullptr, true);
if (!silentsaylink) {
Message(Chat::LightGray, "You say, '%s'", response.c_str());
@@ -11133,7 +11133,7 @@ void Client::Handle_OP_PopupResponse(const EQApplicationPacket *app)
if (EntityVariableExists(DIAWIND_RESPONSE_ONE_KEY.c_str())) {
response = GetEntityVariable(DIAWIND_RESPONSE_ONE_KEY.c_str());
if (!response.empty()) {
ChannelMessageReceived(8, 0, 100, response.c_str());
ChannelMessageReceived(8, 0, 100, response.c_str(), nullptr, true);
}
}
break;
@@ -11142,7 +11142,7 @@ void Client::Handle_OP_PopupResponse(const EQApplicationPacket *app)
if (EntityVariableExists(DIAWIND_RESPONSE_TWO_KEY.c_str())) {
response = GetEntityVariable(DIAWIND_RESPONSE_TWO_KEY.c_str());
if (!response.empty()) {
ChannelMessageReceived(8, 0, 100, response.c_str());
ChannelMessageReceived(8, 0, 100, response.c_str(), nullptr, true);
}
}
break;