summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-30 00:01:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-30 16:37:02 +0300
commita39600b2ec8c71c74f2dad3569aba0fc0e8a9be4 (patch)
tree5beb47a433fb095ffc0a857b0804d4bc086528a7 /src/net/ea
parent194e902a7231c814a23af9e41408301f3ce413c0 (diff)
downloadmanaplus-a39600b2ec8c71c74f2dad3569aba0fc0e8a9be4.tar.gz
manaplus-a39600b2ec8c71c74f2dad3569aba0fc0e8a9be4.tar.bz2
manaplus-a39600b2ec8c71c74f2dad3569aba0fc0e8a9be4.tar.xz
manaplus-a39600b2ec8c71c74f2dad3569aba0fc0e8a9be4.zip
Remove additional parameters from processNpcSell function.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/buysellhandler.cpp7
-rw-r--r--src/net/ea/buysellhandler.h3
2 files changed, 5 insertions, 5 deletions
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp
index f8a6651ef..e9c34ac7d 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/ea/buysellhandler.cpp
@@ -39,6 +39,8 @@
#include "net/chathandler.h"
#include "net/net.h"
+#include "net/ea/eaprotocol.h"
+
#include "utils/timer.h"
#include "resources/notifytypes.h"
@@ -138,8 +140,7 @@ void BuySellHandler::processNpcBuySellChoice(Net::MessageIn &msg)
}
}
-void BuySellHandler::processNpcSell(Net::MessageIn &msg,
- const int offset) const
+void BuySellHandler::processNpcSell(Net::MessageIn &msg) const
{
msg.readInt16(); // length
const int n_items = (msg.getLength() - 4) / 10;
@@ -150,7 +151,7 @@ void BuySellHandler::processNpcSell(Net::MessageIn &msg,
for (int k = 0; k < n_items; k++)
{
- const int index = msg.readInt16() - offset;
+ const int index = msg.readInt16() - INVENTORY_OFFSET;
const int value = msg.readInt32();
msg.readInt32(); // value
diff --git a/src/net/ea/buysellhandler.h b/src/net/ea/buysellhandler.h
index 75e78a251..67400a1b3 100644
--- a/src/net/ea/buysellhandler.h
+++ b/src/net/ea/buysellhandler.h
@@ -53,8 +53,7 @@ class BuySellHandler notfinal : public Net::BuySellHandler
virtual void processNpcBuySellChoice(Net::MessageIn &msg);
- virtual void processNpcSell(Net::MessageIn &msg,
- const int offset) const;
+ virtual void processNpcSell(Net::MessageIn &msg) const;
virtual void processNpcBuyResponse(Net::MessageIn &msg) const;