diff options
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/npchandler.cpp | 15 | ||||
-rw-r--r-- | src/net/ea/npchandler.h | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp index 03def7298..05f12c2bb 100644 --- a/src/net/ea/npchandler.cpp +++ b/src/net/ea/npchandler.cpp @@ -32,7 +32,8 @@ namespace Ea { NpcHandler::NpcHandler() : - mDialog(nullptr) + mDialog(nullptr), + mRequestLang(false) { } @@ -52,6 +53,9 @@ void NpcHandler::endShopping(const int beingId A_UNUSED) const void NpcHandler::processNpcChoice(Net::MessageIn &msg) { + getNpc(msg); + mRequestLang = false; + if (mDialog) { mDialog->choiceRequest(); @@ -65,6 +69,9 @@ void NpcHandler::processNpcChoice(Net::MessageIn &msg) void NpcHandler::processNpcMessage(Net::MessageIn &msg) { + getNpc(msg); + mRequestLang = false; + const std::string message = msg.readString(msg.getLength() - 8); // ignore future legacy npc commands. if (message.size() > 3 && message.substr(0, 3) == "###") @@ -76,6 +83,8 @@ void NpcHandler::processNpcMessage(Net::MessageIn &msg) void NpcHandler::processNpcClose(Net::MessageIn &msg A_UNUSED) { // Show the close button + getNpc(msg); + mRequestLang = false; if (mDialog) mDialog->showCloseButton(); } @@ -83,6 +92,8 @@ void NpcHandler::processNpcClose(Net::MessageIn &msg A_UNUSED) void NpcHandler::processNpcNext(Net::MessageIn &msg A_UNUSED) { // Show the next button + getNpc(msg); + mRequestLang = false; if (mDialog) mDialog->showNextButton(); } @@ -90,6 +101,8 @@ void NpcHandler::processNpcNext(Net::MessageIn &msg A_UNUSED) void NpcHandler::processNpcIntInput(Net::MessageIn &msg A_UNUSED) { // Request for an integer + getNpc(msg); + mRequestLang = false; if (mDialog) mDialog->integerRequest(0); } diff --git a/src/net/ea/npchandler.h b/src/net/ea/npchandler.h index c1bcd5cd1..81e92d84a 100644 --- a/src/net/ea/npchandler.h +++ b/src/net/ea/npchandler.h @@ -67,6 +67,8 @@ class NpcHandler notfinal : public Net::NpcHandler NpcHandler(); NpcDialog *mDialog; + + bool mRequestLang; }; } // namespace Ea |