ManaPlus
|
Functions | |
void | load () |
void | unload () |
void | loadXmlFile (const std::string &fileName, const SkipError skipError) |
std::string | formatCurrency (const int value) |
std::string | formatCurrency64 (const int64_t value) |
std::string | formatCurrency (std::string name, const int value) |
std::string | formatCurrency64 (std::string name, const int64_t value) |
std::string | formatWeight (const int value) |
bool | existsCurrency (const std::string &name) |
bool UnitsDb::existsCurrency | ( | const std::string & | name | ) |
Definition at line 357 of file unitsdb.cpp.
References anonymous_namespace{unitsdb.cpp}::mCurrencies.
Referenced by NPCDB::loadXmlFile().
std::string UnitsDb::formatCurrency | ( | const int | value | ) |
Formats the given number in the correct currency format.
Definition at line 324 of file unitsdb.cpp.
References anonymous_namespace{unitsdb.cpp}::defaultCurrency, and formatUnit().
Referenced by CharSelectDialog::action(), BankWindow::bankMoneyChanged(), InventoryWindow::mouseMoved(), EAthena::VendingRecv::processReport(), TradeWindow::setMoney(), EAthena::PlayerHandler::setStat(), TmwAthena::PlayerHandler::setStat(), StatusWindow::StatusWindow(), SellDialog::updateButtonsAndLabels(), BuyDialog::updateButtonsAndLabels(), ShopItem::updateDisplayName(), and StatusWindow::updateMoneyBar().
std::string UnitsDb::formatCurrency | ( | std::string | name, |
const int | value | ||
) |
Formats the given number in the correct currency format.
Definition at line 335 of file unitsdb.cpp.
References DEFAULT_CURRENCY, formatUnit(), and anonymous_namespace{unitsdb.cpp}::mCurrencies.
std::string UnitsDb::formatCurrency64 | ( | const int64_t | value | ) |
Definition at line 329 of file unitsdb.cpp.
References CAST_S32, anonymous_namespace{unitsdb.cpp}::defaultCurrency, and formatUnit().
Referenced by StatusWindow::attributeChanged(), and CharacterDisplay::mouseMoved().
std::string UnitsDb::formatCurrency64 | ( | std::string | name, |
const int64_t | value | ||
) |
Definition at line 343 of file unitsdb.cpp.
References CAST_S32, DEFAULT_CURRENCY, formatUnit(), and anonymous_namespace{unitsdb.cpp}::mCurrencies.
std::string UnitsDb::formatWeight | ( | const int | value | ) |
Formats the given number in the correct weight/mass format.
Definition at line 352 of file unitsdb.cpp.
References anonymous_namespace{unitsdb.cpp}::defaultWeight, and formatUnit().
Referenced by ItemPopup::setItem(), InventoryWindow::updateWeight(), and StatusWindow::updateWeightBar().
void UnitsDb::load | ( | ) |
Loads and parses the units.xml file (if found).
Definition at line 73 of file unitsdb.cpp.
References anonymous_namespace{unitsdb.cpp}::UnitDescription::conversion, anonymous_namespace{unitsdb.cpp}::defaultCurrency, anonymous_namespace{unitsdb.cpp}::defaultWeight, Configuration::getStringValue(), loadXmlDir, loadXmlFile(), Logger::log1(), logger, paths, SkipError_false, and SkipError_true.
Referenced by DbManager::loadDb().
void UnitsDb::loadXmlFile | ( | const std::string & | fileName, |
const SkipError | skipError | ||
) |
Definition at line 200 of file unitsdb.cpp.
References DEFAULT_CURRENCY, anonymous_namespace{unitsdb.cpp}::defaultCurrency, anonymous_namespace{unitsdb.cpp}::defaultWeight, fileName, for_each_xml_child_node, XML::getProperty(), Configuration::getStringValue(), loadCurrencies(), loadUnit(), loadXmlFile(), Logger::log(), logger, anonymous_namespace{unitsdb.cpp}::mCurrencies, paths, XML::Document::rootNode(), and UseVirtFs_true.
void UnitsDb::unload | ( | ) |
Definition at line 120 of file unitsdb.cpp.
References Logger::log1(), logger, and anonymous_namespace{unitsdb.cpp}::mCurrencies.
Referenced by DbManager::unloadDb().