ManaPlus
Namespaces | Functions | Variables
weaponsdb.cpp File Reference

(986a3bf)

#include "resources/db/weaponsdb.h"
#include "configuration.h"
#include "logger.h"
#include "utils/xmlutils.h"
#include "debug.h"

Go to the source code of this file.

Namespaces

 anonymous_namespace{weaponsdb.cpp}
 

Functions

static void loadDB (const std::string &name, WeaponsInfos &arr)
 

Variables

WeaponsInfos anonymous_namespace{weaponsdb.cpp}::mBows
 
WeaponsInfos anonymous_namespace{weaponsdb.cpp}::mSwords
 
WeaponsInfos anonymous_namespace{weaponsdb.cpp}::mShields
 
bool anonymous_namespace{weaponsdb.cpp}::mLoaded = false
 

Function Documentation

◆ loadDB()

static void loadDB ( const std::string &  name,
WeaponsInfos arr 
)
static

Definition at line 39 of file weaponsdb.cpp.

41 {
42  readXmlIntVector(paths.getStringValue("weaponsFile"),
43  "weapons",
44  name,
45  "item",
46  "id",
47  arr,
49 }
std::string getStringValue(const std::string &key) const
Configuration paths
const bool SkipError_false
Definition: skiperror.h:30
void readXmlIntVector(const std::string &fileName, const std::string &rootName, const std::string &sectionName, const std::string &itemName, const std::string &attributeName, std::vector< int > &arr, const SkipError skipError)
Definition: xmlutils.cpp:30

References Configuration::getStringValue(), paths, readXmlIntVector(), and SkipError_false.

Referenced by WeaponsDB::load().