summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-08 13:36:05 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-08 13:36:05 +0300
commitf6be620b3f688a4ef4bb3983d9d5fe8afef7f013 (patch)
treecc9de4463215012cb330071ae9e0cbda3c3f22a2 /src/net/ea
parentecd14ef02d48407b33a8a32505165f99885d801a (diff)
downloadmanaplus-f6be620b3f688a4ef4bb3983d9d5fe8afef7f013.tar.gz
manaplus-f6be620b3f688a4ef4bb3983d9d5fe8afef7f013.tar.bz2
manaplus-f6be620b3f688a4ef4bb3983d9d5fe8afef7f013.tar.xz
manaplus-f6be620b3f688a4ef4bb3983d9d5fe8afef7f013.zip
Remove additional parameters from most npchandlers.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/npchandler.cpp15
-rw-r--r--src/net/ea/npchandler.h2
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