summaryrefslogtreecommitdiff
path: root/src/resources/db/networkdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-13 23:15:31 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-13 23:15:31 +0300
commit0fc8851faef219be6a3e161946fd6a09930efeb0 (patch)
tree10e6af31050715ad1267fe87cd00b81bcb0eb2f3 /src/resources/db/networkdb.cpp
parentdb1d3323103f15c3d31378b9e94982191855d984 (diff)
downloadmanaverse-0fc8851faef219be6a3e161946fd6a09930efeb0.tar.gz
manaverse-0fc8851faef219be6a3e161946fd6a09930efeb0.tar.bz2
manaverse-0fc8851faef219be6a3e161946fd6a09930efeb0.tar.xz
manaverse-0fc8851faef219be6a3e161946fd6a09930efeb0.zip
Add support for removepacket tag in network.xml
Diffstat (limited to 'src/resources/db/networkdb.cpp')
-rw-r--r--src/resources/db/networkdb.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/resources/db/networkdb.cpp b/src/resources/db/networkdb.cpp
index c430d0f7a..70a5b814f 100644
--- a/src/resources/db/networkdb.cpp
+++ b/src/resources/db/networkdb.cpp
@@ -32,7 +32,8 @@
namespace
{
bool mLoaded = false;
- NetworkInfos mInPackets;
+ NetworkInPacketInfos mInPackets;
+ NetworkRemovePacketInfos mRemovePackets;
} // namespace
void NetworkDb::load()
@@ -58,15 +59,29 @@ void NetworkDb::loadXmlFile(const std::string &fileName,
"len",
mInPackets,
skipError);
+
+ readXmlIntVector(fileName,
+ "network",
+ "inpackets",
+ "removepacket",
+ "id",
+ mRemovePackets,
+ skipError);
}
void NetworkDb::unload()
{
mInPackets.clear();
+ mRemovePackets.clear();
mLoaded = false;
}
-const NetworkInfos &NetworkDb::getFakePackets()
+const NetworkInPacketInfos &NetworkDb::getFakePackets()
{
return mInPackets;
}
+
+const NetworkRemovePacketInfos &NetworkDb::getRemovePackets()
+{
+ return mRemovePackets;
+}