summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-03 20:45:24 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:56 +0300
commit5a90cfe600073fbae6d097080ee88fd41cdcbeb7 (patch)
tree319c34f2cb259d9d8f55bba743182a2d511106c4 /src/net
parentdb1548f44fb972c0c60b742dfece7e1f442e0378 (diff)
downloadplus-5a90cfe600073fbae6d097080ee88fd41cdcbeb7.tar.gz
plus-5a90cfe600073fbae6d097080ee88fd41cdcbeb7.tar.bz2
plus-5a90cfe600073fbae6d097080ee88fd41cdcbeb7.tar.xz
plus-5a90cfe600073fbae6d097080ee88fd41cdcbeb7.zip
Move processItemDropped from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/itemhandler.cpp18
-rw-r--r--src/net/ea/itemhandler.h2
-rw-r--r--src/net/eathena/itemhandler.cpp20
-rw-r--r--src/net/eathena/itemhandler.h3
-rw-r--r--src/net/tmwa/itemhandler.cpp20
-rw-r--r--src/net/tmwa/itemhandler.h3
6 files changed, 46 insertions, 20 deletions
diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp
index e5ed730a0..4a5286aee 100644
--- a/src/net/ea/itemhandler.cpp
+++ b/src/net/ea/itemhandler.cpp
@@ -57,24 +57,6 @@ void ItemHandler::processItemVisible(Net::MessageIn &msg)
}
}
-void ItemHandler::processItemDropped(Net::MessageIn &msg)
-{
- const int id = msg.readInt32();
- const int itemId = msg.readInt16();
- const uint8_t identify = msg.readUInt8(); // identify flag
- const int x = msg.readInt16();
- const int y = msg.readInt16();
- const int subX = static_cast<int>(msg.readInt8());
- const int subY = static_cast<int>(msg.readInt8());
- const int amount = msg.readInt16();
-
- if (actorManager)
- {
- actorManager->createItem(id, itemId,
- x, y, amount, identify, subX, subY);
- }
-}
-
void ItemHandler::processItemRemove(Net::MessageIn &msg)
{
if (actorManager)
diff --git a/src/net/ea/itemhandler.h b/src/net/ea/itemhandler.h
index ff57d5c9f..fea164d69 100644
--- a/src/net/ea/itemhandler.h
+++ b/src/net/ea/itemhandler.h
@@ -47,8 +47,6 @@ class ItemHandler notfinal
static void processItemVisible(Net::MessageIn &msg);
static void processItemRemove(Net::MessageIn &msg);
-
- static void processItemDropped(Net::MessageIn &msg);
};
} // namespace Ea
diff --git a/src/net/eathena/itemhandler.cpp b/src/net/eathena/itemhandler.cpp
index 10a773c13..ba55fa381 100644
--- a/src/net/eathena/itemhandler.cpp
+++ b/src/net/eathena/itemhandler.cpp
@@ -22,6 +22,8 @@
#include "net/eathena/itemhandler.h"
+#include "actormanager.h"
+
#include "net/eathena/protocol.h"
#include "debug.h"
@@ -64,4 +66,22 @@ void ItemHandler::handleMessage(Net::MessageIn &msg)
}
}
+void ItemHandler::processItemDropped(Net::MessageIn &msg)
+{
+ const int id = msg.readInt32();
+ const int itemId = msg.readInt16();
+ const uint8_t identify = msg.readUInt8(); // identify flag
+ const int x = msg.readInt16();
+ const int y = msg.readInt16();
+ const int subX = static_cast<int>(msg.readInt8());
+ const int subY = static_cast<int>(msg.readInt8());
+ const int amount = msg.readInt16();
+
+ if (actorManager)
+ {
+ actorManager->createItem(id, itemId,
+ x, y, amount, identify, subX, subY);
+ }
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/itemhandler.h b/src/net/eathena/itemhandler.h
index e8aa1b626..8b453bee4 100644
--- a/src/net/eathena/itemhandler.h
+++ b/src/net/eathena/itemhandler.h
@@ -38,6 +38,9 @@ class ItemHandler final : public MessageHandler, public Ea::ItemHandler
A_DELETE_COPY(ItemHandler)
void handleMessage(Net::MessageIn &msg) override final;
+
+ protected:
+ static void processItemDropped(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/tmwa/itemhandler.cpp b/src/net/tmwa/itemhandler.cpp
index 3b41d5bbc..95d1d0971 100644
--- a/src/net/tmwa/itemhandler.cpp
+++ b/src/net/tmwa/itemhandler.cpp
@@ -22,6 +22,8 @@
#include "net/tmwa/itemhandler.h"
+#include "actormanager.h"
+
#include "net/tmwa/protocol.h"
#include "debug.h"
@@ -66,4 +68,22 @@ void ItemHandler::handleMessage(Net::MessageIn &msg)
BLOCK_END("ItemHandler::handleMessage")
}
+void ItemHandler::processItemDropped(Net::MessageIn &msg)
+{
+ const int id = msg.readInt32();
+ const int itemId = msg.readInt16();
+ const uint8_t identify = msg.readUInt8(); // identify flag
+ const int x = msg.readInt16();
+ const int y = msg.readInt16();
+ const int subX = static_cast<int>(msg.readInt8());
+ const int subY = static_cast<int>(msg.readInt8());
+ const int amount = msg.readInt16();
+
+ if (actorManager)
+ {
+ actorManager->createItem(id, itemId,
+ x, y, amount, identify, subX, subY);
+ }
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/itemhandler.h b/src/net/tmwa/itemhandler.h
index 5203da929..8caeda785 100644
--- a/src/net/tmwa/itemhandler.h
+++ b/src/net/tmwa/itemhandler.h
@@ -38,6 +38,9 @@ class ItemHandler final : public MessageHandler, public Ea::ItemHandler
A_DELETE_COPY(ItemHandler)
void handleMessage(Net::MessageIn &msg) override final;
+
+ protected:
+ static void processItemDropped(Net::MessageIn &msg);
};
} // namespace TmwAthena