Skip to content

Commit

Permalink
fix: otserv.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
MutterPedro committed Oct 21, 2023
1 parent 8f2855f commit 4759220
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/otserv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "scriptmanager.h"
#include "server.h"

#include <fmt/format.h>
#include <fstream>

#if __has_include("gitmetadata.h")
Expand Down Expand Up @@ -263,15 +264,15 @@ void mainLoader(int, char*[], ServiceManager* services)

// load item data
std::cout << ">> Loading items... ";
if (!Item::items.loadFromOtb("data/items/items.otb")) {
if (!Items::getInstance().loadFromOTB()) {
startupErrorMessage("Unable to load items (OTB)!");
return;
}
std::cout << fmt::format("OTB v{:d}.{:d}.{:d}", Item::items.majorVersion, Item::items.minorVersion,
Item::items.buildNumber)
std::cout << fmt::format("OTB v{:d}.{:d}.{:d}", Items::getInstance().otbMajorVersion,
Items::getInstance().otbMinorVersion, Items::getInstance().otbBuildNumber)
<< std::endl;

if (!Item::items.loadFromXml()) {
if (!Items::getInstance().loadFromXML()) {
startupErrorMessage("Unable to load items (XML)!");
return;
}
Expand Down

0 comments on commit 4759220

Please sign in to comment.