diff options
author | madmaxoft <github@xoft.cz> | 2013-10-26 19:43:34 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-26 19:43:34 +0200 |
commit | 52f88b9595f28c3c14ab1868dbed1eba1093c078 (patch) | |
tree | c8e9a5174269258e5a5caa9a1a8d22fe7475a3f7 /source/MonsterConfig.cpp | |
parent | cMonster: Improved doxycomments. (diff) | |
parent | APIDump: Documented cIniFile. (diff) | |
download | cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.gz cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.bz2 cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.lz cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.xz cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.zst cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.zip |
Diffstat (limited to 'source/MonsterConfig.cpp')
-rw-r--r-- | source/MonsterConfig.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/MonsterConfig.cpp b/source/MonsterConfig.cpp index 37c7431b0..a5a1ebd49 100644 --- a/source/MonsterConfig.cpp +++ b/source/MonsterConfig.cpp @@ -55,18 +55,18 @@ cMonsterConfig::~cMonsterConfig() void cMonsterConfig::Initialize() { - cIniFile MonstersIniFile("monsters.ini"); + cIniFile MonstersIniFile; - if (!MonstersIniFile.ReadFile()) + if (!MonstersIniFile.ReadFile("monsters.ini")) { LOGWARNING("%s: Cannot read monsters.ini file, monster attributes not available", __FUNCTION__); return; } - for (int i = (int)MonstersIniFile.NumKeys(); i >= 0; i--) + for (int i = (int)MonstersIniFile.GetNumKeys(); i >= 0; i--) { sAttributesStruct Attributes; - AString Name = MonstersIniFile.KeyName(i); + AString Name = MonstersIniFile.GetKeyName(i); Attributes.m_Name = Name; Attributes.m_AttackDamage = MonstersIniFile.GetValueF(Name, "AttackDamage", 0); Attributes.m_AttackRange = MonstersIniFile.GetValueF(Name, "AttackRange", 0); |