From 1e9af56a67ae3765291361d9bf01e9009cfb4dcc Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Wed, 28 Dec 2011 02:10:05 +0000 Subject: - Implemented Drops from Burning animals - added right monster health and attack strength - refactored the Pawn/Monster/Player class a little bit - changed some namings to fit the style git-svn-id: http://mc-server.googlecode.com/svn/trunk@140 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cMonsterConfig.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/cMonsterConfig.cpp') diff --git a/source/cMonsterConfig.cpp b/source/cMonsterConfig.cpp index 456da1fc3..1226c74e2 100644 --- a/source/cMonsterConfig.cpp +++ b/source/cMonsterConfig.cpp @@ -17,6 +17,7 @@ struct cMonsterConfig::sAttributesStruct float m_AttackDamage; float m_AttackRange; float m_AttackRate; + int m_MaxHealth; }; struct cMonsterConfig::sMonsterConfigState @@ -68,6 +69,8 @@ void cMonsterConfig::Initialize() { printf("Got SightDistance: %3.3f \n",Attributes.m_SightDistance); Attributes.m_AttackRate = (float)MonstersIniFile.GetValueF(SplitList[i].c_str(),"AttackRate",0); printf("Got AttackRate: %3.3f \n",Attributes.m_AttackRate); + Attributes.m_MaxHealth = MonstersIniFile.GetValueI(SplitList[i].c_str(),"MaxHealth",0); + printf("Got MaxHealth: %d \n",Attributes.m_MaxHealth); m_pState->AttributesList.push_front(Attributes); } } @@ -84,6 +87,7 @@ void cMonsterConfig::AssignAttributes(cMonster *m, const char* n) m->SetAttackRange(itr->m_AttackRange); m->SetSightDistance(itr->m_SightDistance); m->SetAttackRate((int)itr->m_AttackRate); + m->SetMaxHealth((int)itr->m_AttackRate); } } } -- cgit v1.2.3