diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/npchandler.cpp | 19 | ||||
-rw-r--r-- | src/net/ea/npchandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/npchandler.cpp | 8 |
3 files changed, 11 insertions, 18 deletions
diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp index 5a2140f7a..ef43acd25 100644 --- a/src/net/ea/npchandler.cpp +++ b/src/net/ea/npchandler.cpp @@ -109,18 +109,19 @@ void NpcHandler::processNpcIntInput(Net::MessageIn &msg A_UNUSED) mDialog->integerRequest(0); } -void NpcHandler::processNpcStrInput(Net::MessageIn &msg A_UNUSED) +void NpcHandler::processNpcStrInput(Net::MessageIn &msg) { // Request for a string - if (mDialog) + int npcId = getNpc(msg); + if (mRequestLang) + { + mRequestLang = false; + stringInput(npcId, getLangSimple()); + } + else if (mDialog) + { mDialog->textRequest(""); -} - -void NpcHandler::processLangReuqest(Net::MessageIn &msg A_UNUSED, - const int npcId) -{ - mRequestLang = false; - stringInput(npcId, getLangSimple()); + } } } // namespace Ea diff --git a/src/net/ea/npchandler.h b/src/net/ea/npchandler.h index 11ffacb59..81e92d84a 100644 --- a/src/net/ea/npchandler.h +++ b/src/net/ea/npchandler.h @@ -63,8 +63,6 @@ class NpcHandler notfinal : public Net::NpcHandler void processNpcStrInput(Net::MessageIn &msg); - void processLangReuqest(Net::MessageIn &msg, const int npcId); - protected: NpcHandler(); diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp index 5339666be..81b1b9222 100644 --- a/src/net/tmwa/npchandler.cpp +++ b/src/net/tmwa/npchandler.cpp @@ -88,14 +88,8 @@ void NpcHandler::handleMessage(Net::MessageIn &msg) break; case SMSG_NPC_STR_INPUT: - { - const int npcId = getNpc(msg); - if (mRequestLang) - processLangReuqest(msg, npcId); - else - processNpcStrInput(msg); + processNpcStrInput(msg); break; - } case SMSG_NPC_COMMAND: processNpcCommand(msg); |