[Dialogue] Add support for Dialogue Window buttons. (#1546)

* [Dialogue] Add support for Dialogue Window buttons.
- Also changes "mysterious" identifier to "{mysterious}".
- Both button names are required for anything to show up, otherwise it defaults to Yes/No similar to Client::SendFullPopup.

* Move SetEntityVariable so responses can override default button response.

* Add negativeid support so you can override button two popup ID.

* Fix log.

* Update dialogue_window.cpp

Convert button names to strings and negativeid to secondrespondid.
This commit is contained in:
Kinglykrab authored and GitHub committed 2021-09-19 16:24:04 -07:00
1 parent c15c54e920
commit 6a5face0aa
3 files changed
+141 -16

No files matched your search

+12 -3
View File
@@ -11155,9 +11155,18 @@ void Client::Handle_OP_PopupResponse(const EQApplicationPacket *app)
return;
break;
case POPUPID_DIAWIND:
if (EntityVariableExists(DIAWIND_RESPONSE_KEY.c_str())) {
response = GetEntityVariable(DIAWIND_RESPONSE_KEY.c_str());
case POPUPID_DIAWIND_ONE:
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());
}
}
break;
case POPUPID_DIAWIND_TWO:
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());
}