summaryrefslogtreecommitdiffstats
path: root/src/MonsterConfig.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-04-23 09:46:06 +0200
committerMattes D <github@xoft.cz>2014-04-23 09:46:06 +0200
commit0d0e0af2d87bf7cdd34668e7f48480770a527408 (patch)
treeaac476c2553e2b816d88c036812b9139d93ffe35 /src/MonsterConfig.cpp
parentUpdated NetherFort prefabs from the Gallery server. (diff)
parentRenamed getter and setter for IsFireproof. (diff)
downloadcuberite-0d0e0af2d87bf7cdd34668e7f48480770a527408.tar
cuberite-0d0e0af2d87bf7cdd34668e7f48480770a527408.tar.gz
cuberite-0d0e0af2d87bf7cdd34668e7f48480770a527408.tar.bz2
cuberite-0d0e0af2d87bf7cdd34668e7f48480770a527408.tar.lz
cuberite-0d0e0af2d87bf7cdd34668e7f48480770a527408.tar.xz
cuberite-0d0e0af2d87bf7cdd34668e7f48480770a527408.tar.zst
cuberite-0d0e0af2d87bf7cdd34668e7f48480770a527408.zip
Diffstat (limited to 'src/MonsterConfig.cpp')
-rw-r--r--src/MonsterConfig.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/MonsterConfig.cpp b/src/MonsterConfig.cpp
index c06bd6b6f..72a3a3245 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->SetIsFireproof (itr->m_IsFireproof);
return;
}
} // for itr - m_pState->AttributesList[]