This commit is contained in:
aozhiwei 2024-01-16 11:11:07 +08:00
parent 58c10c6eb4
commit f8d9244fe5
4 changed files with 4 additions and 4 deletions

View File

@ -1864,7 +1864,7 @@ Hero* Creature::SummonHero(Buff* buff,
GetAttackDir(),
pos
);
hero->hero_level = GetNetData()->GetHeroLevel();
hero->SetHeroLevel(GetNetData()->GetHeroLevel(), 0, nullptr);
}
return hero;
}

View File

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

View File

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

View File

@ -824,7 +824,6 @@ Hero* Room::CreateHero(Creature* master,
hero->SetAttackDir(dir);
hero->team_id = team_id;
hero->Initialize();
hero->hero_level = hero->GetNetData()->GetHeroLevel();
AddToEntityHash(hero);
AddToMoveableHash(hero);
grid_service->AddCreature(hero);