From db1d3323103f15c3d31378b9e94982191855d984 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 13 Sep 2016 21:57:12 +0300 Subject: Add fake packets from network.xml if packet unused. --- src/resources/db/networkdb.cpp | 7 +++++++ src/resources/db/networkdb.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'src/resources') diff --git a/src/resources/db/networkdb.cpp b/src/resources/db/networkdb.cpp index afab56af3..c430d0f7a 100644 --- a/src/resources/db/networkdb.cpp +++ b/src/resources/db/networkdb.cpp @@ -21,6 +21,7 @@ #include "resources/db/networkdb.h" #include "configuration.h" +#include "logger.h" #include "utils/xmlutils.h" @@ -39,6 +40,7 @@ void NetworkDb::load() if (mLoaded) unload(); + logger->log1("Initializing network database..."); loadXmlFile(paths.getStringValue("networkFile"), SkipError_false); loadXmlFile(paths.getStringValue("networkPatchFile"), SkipError_true); loadXmlDir("networkPatchDir", loadXmlFile); @@ -63,3 +65,8 @@ void NetworkDb::unload() mInPackets.clear(); mLoaded = false; } + +const NetworkInfos &NetworkDb::getFakePackets() +{ + return mInPackets; +} diff --git a/src/resources/db/networkdb.h b/src/resources/db/networkdb.h index 822925fa0..899fc6cda 100644 --- a/src/resources/db/networkdb.h +++ b/src/resources/db/networkdb.h @@ -43,6 +43,8 @@ namespace NetworkDb * Clear the chars data */ void unload(); + + const NetworkInfos &getFakePackets(); } // namespace NetworkDb #endif // RESOURCES_DB_NETWORKDB_H -- cgit v1.2.3-70-g09d2