Fix monsters in outdoor combat showing up as empties

- And cut out few more legacy bits from the monster class
This commit is contained in:
2014-04-19 02:04:12 -04:00
parent f8b40ec2ea
commit 211cf06b5c
4 changed files with 11 additions and 10 deletions

View File

@@ -17,7 +17,6 @@
cMonster& cMonster::operator = (legacy::monster_record_type& old){
int i;
m_num = old.m_num;
level = old.level;
//m_name = old.m_name;
health = old.health;
@@ -28,8 +27,8 @@ cMonster& cMonster::operator = (legacy::monster_record_type& old){
skill = old.skill;
for(i = 0; i < 3; i++) a[i] = old.a[i];
// TODO: These two bits of data belong in a[]
a1_type = old.a1_type;
a23_type = old.a23_type;
a[0].type = old.a1_type;
a[1].type = a[2].type = old.a23_type;
m_type = (eMonsterType) old.m_type;
speed = old.speed;
ap = old.ap;
@@ -78,6 +77,10 @@ cCreature::cCreature(){
target = 6;
}
cCreature::cCreature(int num) : cCreature() {
number = num;
}
cCreature& cCreature::operator = (legacy::creature_start_type old){
number = old.number;
start_attitude = old.start_attitude;

View File

@@ -103,7 +103,6 @@ public:
unsigned char extra1, extra2;
operator std::string();
};
m_num_t m_num; // TODO: This probably shouldn't be necessary. Consider why it is, and determine if it can be removed
unsigned char level;
std::string m_name;
short health; // TODO: Move health, mp and max_mp to cCreature
@@ -113,7 +112,6 @@ public:
unsigned char armor;
unsigned char skill;
cAttack a[3];
unsigned char a1_type,a23_type; // TODO: Delete in favour of type field of cAttack
eMonsterType m_type;
unsigned char speed;
unsigned char ap; // TODO: Move ap to cCreature
@@ -172,6 +170,7 @@ public:
location targ_loc;
cCreature();
cCreature(int num);
cCreature& operator = (legacy::creature_data_type old);
cCreature& operator = (legacy::creature_start_type old);