1
This commit is contained in:
parent
d7ae16f29e
commit
732a58ec91
@ -44,6 +44,7 @@ void Android::Initialize()
|
||||
0,
|
||||
nullptr
|
||||
);
|
||||
GetBattleContext()->Init(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -397,7 +397,7 @@ void BattleDataContext::ForceInit(long long hero_uniid,
|
||||
}
|
||||
}
|
||||
|
||||
void BattleDataContext::Init()
|
||||
void BattleDataContext::Init(Creature* c)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "weakptr.h"
|
||||
|
||||
/*
|
||||
子弹命中逻辑
|
||||
@ -61,7 +62,7 @@ struct BattleDataContext
|
||||
MetaData::Equip* weapon1_meta,
|
||||
long long weapon2_uniid,
|
||||
MetaData::Equip* weapon2_meta);
|
||||
void Init();
|
||||
void Init(Creature* c);
|
||||
|
||||
private:
|
||||
void Clear();
|
||||
@ -79,6 +80,7 @@ private:
|
||||
std::shared_ptr<WeaponAbility> GetWeaponByUniId(long long weapon_uniid);
|
||||
|
||||
private:
|
||||
CreatureWeakPtr owner_;
|
||||
|
||||
std::shared_ptr<HeroAbility> hero_ability_;
|
||||
std::shared_ptr<WeaponAbility> weapon1_ability_;
|
||||
|
@ -65,6 +65,7 @@ void Car::Initialize()
|
||||
0,
|
||||
nullptr
|
||||
);
|
||||
GetBattleContext()->Init(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,7 @@ void Hero::Initialize()
|
||||
0,
|
||||
nullptr
|
||||
);
|
||||
GetBattleContext()->Init(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4084,7 +4084,9 @@ void Room::AddTeam(class MatchTeam* team)
|
||||
}
|
||||
hum->room = this;
|
||||
AddPlayer(hum, init_born_point, true);
|
||||
|
||||
hum->SetBattleContext(member->battle_context);
|
||||
hum->GetBattleContext()->Init(hum);
|
||||
hum->ProcPrepareItems(msg.prepare_items());
|
||||
hum->ProcPrepareItems2(msg.prepare_items2());
|
||||
hum->ProcSkillList(msg.skill_list());
|
||||
|
@ -202,6 +202,7 @@ void RoomMgr::_CMJoin(f8::MsgHdr& hdr, const cs::CMJoin& msg)
|
||||
hum->room = room;
|
||||
room->AddPlayer(hum);
|
||||
hum->SetBattleContext(results.at(0));
|
||||
hum->GetBattleContext()->Init(hum);
|
||||
hum->ProcPrepareItems(msg.prepare_items());
|
||||
hum->ProcPrepareItems2(msg.prepare_items2());
|
||||
hum->ProcSkillList(msg.skill_list());
|
||||
|
Loading…
x
Reference in New Issue
Block a user