diff options
author | archshift <admin@archshift.com> | 2014-04-23 01:17:42 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-04-23 01:17:42 +0200 |
commit | e1476ebb26a3ce0b8405feb5a530cb442abd1329 (patch) | |
tree | d015ab488e45b71ed3e36dbfe172c0897ef49a00 /src | |
parent | Fireproof status getter and setter. (diff) | |
download | cuberite-e1476ebb26a3ce0b8405feb5a530cb442abd1329.tar cuberite-e1476ebb26a3ce0b8405feb5a530cb442abd1329.tar.gz cuberite-e1476ebb26a3ce0b8405feb5a530cb442abd1329.tar.bz2 cuberite-e1476ebb26a3ce0b8405feb5a530cb442abd1329.tar.lz cuberite-e1476ebb26a3ce0b8405feb5a530cb442abd1329.tar.xz cuberite-e1476ebb26a3ce0b8405feb5a530cb442abd1329.tar.zst cuberite-e1476ebb26a3ce0b8405feb5a530cb442abd1329.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/MonsterConfig.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/MonsterConfig.cpp b/src/MonsterConfig.cpp index c06bd6b6f..4b0e4bce1 100644 --- a/src/MonsterConfig.cpp +++ b/src/MonsterConfig.cpp @@ -17,6 +17,7 @@ struct cMonsterConfig::sAttributesStruct int m_AttackRange; double m_AttackRate; int m_MaxHealth; + bool m_IsFireproof; }; @@ -72,6 +73,7 @@ void cMonsterConfig::Initialize() Attributes.m_SightDistance = MonstersIniFile.GetValueI(Name, "SightDistance", 0); Attributes.m_AttackRate = MonstersIniFile.GetValueF(Name, "AttackRate", 0); Attributes.m_MaxHealth = MonstersIniFile.GetValueI(Name, "MaxHealth", 1); + Attributes.m_IsFireproof = MonstersIniFile.GetValueB(Name, "IsFireproof", false); m_pState->AttributesList.push_front(Attributes); } // for i - SplitList[] } @@ -92,6 +94,7 @@ void cMonsterConfig::AssignAttributes(cMonster * a_Monster, const AString & a_Na a_Monster->SetSightDistance(itr->m_SightDistance); a_Monster->SetAttackRate ((float)itr->m_AttackRate); a_Monster->SetMaxHealth (itr->m_MaxHealth); + a_Monster->SetFireproofStatus(itr->m_IsFireproof); return; } } // for itr - m_pState->AttributesList[] |