1
This commit is contained in:
parent
aa29a33b97
commit
20de4d231c
@ -47,6 +47,7 @@
|
|||||||
#include "mt/MapThing.h"
|
#include "mt/MapThing.h"
|
||||||
#include "mt/Text.h"
|
#include "mt/Text.h"
|
||||||
#include "mt/Map.h"
|
#include "mt/Map.h"
|
||||||
|
#include "mt/BattleHeroGrow.h"
|
||||||
|
|
||||||
#include "buff/sprint.h"
|
#include "buff/sprint.h"
|
||||||
|
|
||||||
@ -3931,7 +3932,17 @@ void Creature::AdjustMobaBornDir()
|
|||||||
|
|
||||||
void Creature::SetHeroLevel(int level, int exp, const mt::BattleHeroGrow* grow_meta)
|
void Creature::SetHeroLevel(int level, int exp, const mt::BattleHeroGrow* grow_meta)
|
||||||
{
|
{
|
||||||
|
for (int buff_uniid : grow_buff_list_) {
|
||||||
|
RemoveBuffByUniId(buff_uniid);
|
||||||
|
}
|
||||||
|
grow_buff_list_.clear();
|
||||||
|
for (auto handle : grow_attr_list_) {
|
||||||
|
GetAbility()->RemoveAttr(handle);
|
||||||
|
}
|
||||||
|
grow_attr_list_.clear();
|
||||||
|
hero_level_ = level;
|
||||||
|
hero_exp_ = exp;
|
||||||
|
hero_grow_meta_ = grow_meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Creature::GetHeroLevel()
|
int Creature::GetHeroLevel()
|
||||||
@ -3946,5 +3957,8 @@ int Creature::GetHeroExp()
|
|||||||
|
|
||||||
int Creature::GetHeroMaxExp()
|
int Creature::GetHeroMaxExp()
|
||||||
{
|
{
|
||||||
|
if (hero_grow_meta_) {
|
||||||
|
return hero_grow_meta_->levelExp();
|
||||||
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user