This commit is contained in:
aozhiwei 2022-09-06 16:08:56 +08:00
parent 732a58ec91
commit 4d444476b3

View File

@ -9,6 +9,7 @@
#include "creature.h"
#include "types.h"
#include "bullet.h"
#include "app.h"
class HeroAbility
{
@ -399,5 +400,8 @@ void BattleDataContext::ForceInit(long long hero_uniid,
void BattleDataContext::Init(Creature* c)
{
owner_ = c->GetWeakPtrRef();
if (!hero_ability_->hero_uniid_) {
hero_ability_->hero_uniid_ = App::Instance()->AllocTempHeroUniId();
}
}