This commit is contained in:
aozhiwei 2023-03-31 21:30:48 +08:00
parent e2a2956feb
commit f01a1e9dab
4 changed files with 4 additions and 0 deletions

View File

@ -1691,6 +1691,7 @@ Hero* Creature::SummonHero(Buff* buff,
GetAttackDir(), GetAttackDir(),
pos pos
); );
hero->hero_level = GetBattleContext()->GetHeroLevel();
} }
return hero; return hero;
} }

View File

@ -16,6 +16,7 @@ public:
const mt::Hero* meta = nullptr; const mt::Hero* meta = nullptr;
bool is_pve_boss = false; bool is_pve_boss = false;
list_head entry; list_head entry;
int hero_level = 1;
Hero(); Hero();
virtual ~Hero() override; virtual ~Hero() override;

View File

@ -379,6 +379,7 @@ void Hero::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data)
p->set_dead(dead); p->set_dead(dead);
p->set_health(GetHP()); p->set_health(GetHP());
p->set_max_health(GetMaxHP()); p->set_max_health(GetMaxHP());
p->set_hero_level(hero_level);
Creature_FillBuffList(this, hum, p->mutable_buff_list()); Creature_FillBuffList(this, hum, p->mutable_buff_list());
Creature_FillEffectList(this, hum, p->mutable_effect_list()); Creature_FillEffectList(this, hum, p->mutable_effect_list());
p->set_team_id(team_id); p->set_team_id(team_id);

View File

@ -440,6 +440,7 @@ message MFHeroFull
optional float max_health = 13; // optional float max_health = 13; //
repeated MFEffect effect_list = 14; // repeated MFEffect effect_list = 14; //
optional int32 team_id = 15; //id optional int32 team_id = 15; //id
optional int32 hero_level = 16; //hero等级
} }
//- //-