- 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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user