summaryrefslogtreecommitdiff
path: root/src/net/ea/npcrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-22 21:44:22 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-22 21:44:22 +0300
commitab3b909187ee0a18946bff50a6bd3e8e281970f1 (patch)
tree070f99fa55315de2a4e688e5ff0397e395681d28 /src/net/ea/npcrecv.cpp
parentd27c8b53bcd8c7e8e0aa74656e32aeb688629b4b (diff)
downloadmanaverse-ab3b909187ee0a18946bff50a6bd3e8e281970f1.tar.gz
manaverse-ab3b909187ee0a18946bff50a6bd3e8e281970f1.tar.bz2
manaverse-ab3b909187ee0a18946bff50a6bd3e8e281970f1.tar.xz
manaverse-ab3b909187ee0a18946bff50a6bd3e8e281970f1.zip
Remove checking packet id in getNpc function.
Diffstat (limited to 'src/net/ea/npcrecv.cpp')
-rw-r--r--src/net/ea/npcrecv.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/net/ea/npcrecv.cpp b/src/net/ea/npcrecv.cpp
index e38a06531..fa4833447 100644
--- a/src/net/ea/npcrecv.cpp
+++ b/src/net/ea/npcrecv.cpp
@@ -44,7 +44,8 @@ namespace NpcRecv
void NpcRecv::processNpcChoice(Net::MessageIn &msg)
{
- npcHandler->getNpc(msg);
+ msg.readInt16("len");
+ npcHandler->getNpc(msg, NpcAction::Other);
mRequestLang = false;
if (mDialog)
@@ -61,7 +62,8 @@ void NpcRecv::processNpcChoice(Net::MessageIn &msg)
void NpcRecv::processNpcMessage(Net::MessageIn &msg)
{
- npcHandler->getNpc(msg);
+ msg.readInt16("len");
+ npcHandler->getNpc(msg, NpcAction::Other);
mRequestLang = false;
const std::string message = msg.readString(msg.getLength() - 8, "message");
@@ -75,7 +77,7 @@ void NpcRecv::processNpcMessage(Net::MessageIn &msg)
void NpcRecv::processNpcClose(Net::MessageIn &msg)
{
// Show the close button
- npcHandler->getNpc(msg);
+ npcHandler->getNpc(msg, NpcAction::Close);
mRequestLang = false;
if (mDialog)
mDialog->showCloseButton();
@@ -84,7 +86,7 @@ void NpcRecv::processNpcClose(Net::MessageIn &msg)
void NpcRecv::processNpcNext(Net::MessageIn &msg)
{
// Show the next button
- npcHandler->getNpc(msg);
+ npcHandler->getNpc(msg, NpcAction::Next);
mRequestLang = false;
if (mDialog)
mDialog->showNextButton();
@@ -93,7 +95,7 @@ void NpcRecv::processNpcNext(Net::MessageIn &msg)
void NpcRecv::processNpcIntInput(Net::MessageIn &msg)
{
// Request for an integer
- npcHandler->getNpc(msg);
+ npcHandler->getNpc(msg, NpcAction::Other);
mRequestLang = false;
if (mDialog)
mDialog->integerRequest(0);
@@ -102,7 +104,7 @@ void NpcRecv::processNpcIntInput(Net::MessageIn &msg)
void NpcRecv::processNpcStrInput(Net::MessageIn &msg)
{
// Request for a string
- BeingId npcId = npcHandler->getNpc(msg);
+ BeingId npcId = npcHandler->getNpc(msg, NpcAction::Other);
if (mRequestLang)
{
mRequestLang = false;
@@ -116,7 +118,7 @@ void NpcRecv::processNpcStrInput(Net::MessageIn &msg)
void NpcRecv::processNpcCommand(Net::MessageIn &msg)
{
- const BeingId npcId = npcHandler->getNpc(msg);
+ const BeingId npcId = npcHandler->getNpc(msg, NpcAction::Other);
mRequestLang = false;
const int cmd = msg.readInt16("cmd");
@@ -208,7 +210,8 @@ void NpcRecv::processNpcCommand(Net::MessageIn &msg)
void NpcRecv::processChangeTitle(Net::MessageIn &msg)
{
- npcHandler->getNpc(msg);
+ msg.readInt16("len");
+ npcHandler->getNpc(msg, NpcAction::Other);
mRequestLang = false;
const std::string str = msg.readString(-1, "title");
if (mDialog)