62 if (!MonstersIniFile.
ReadFile(
"monsters.ini"))
64 LOGWARNING(
"%s: Cannot read monsters.ini file, monster attributes not available", __FUNCTION__);
68 for (
int i = static_cast<int>(MonstersIniFile.
GetNumKeys()); i >= 0; i--)
90 std::list<sAttributesStruct>::const_iterator itr;
93 if (itr->m_Name.compare(a_Name) == 0)
98 a_Monster->
SetAttackRate (static_cast<float>(itr->m_AttackRate));
99 a_Monster->
SetMaxHealth (static_cast<float>(itr->m_MaxHealth));
void SetSightDistance(int a_SightDistance)
int GetNumKeys(void) const
Returns number of keys currently in the ini.
sMonsterConfigState * m_pState
int GetValueI(const AString &keyname, const AString &valuename, const int defValue=0) const
void SetIsFireproof(bool a_IsFireproof)
Sets whether the entity is fireproof.
void SetAttackRate(float a_AttackRate)
bool ReadFile(const AString &a_FileName, bool a_AllowExampleRedirect=true)
Reads the contents of the specified ini file If the file doesn't exist and a_AllowExampleRedirect is ...
void SetMaxHealth(float a_MaxHealth)
Sets the maximum value for the health.
void SetAttackDamage(int a_AttackDamage)
void LOGWARNING(const char *a_Format, fmt::ArgList a_ArgList)
AString GetKeyName(const int keyID) const
bool GetValueB(const AString &keyname, const AString &valuename, const bool defValue=false) const
std::list< sAttributesStruct > AttributesList
void SetAttackRange(int a_AttackRange)
double GetValueF(const AString &keyname, const AString &valuename, const double defValue=0) const
void AssignAttributes(cMonster *a_Monster, const AString &a_Name)
void SetBurnsInDaylight(bool a_BurnsInDaylight)