mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 11:48:37 +00:00
[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:
+12
-3
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user