This commit is contained in:
aozhiwei 2022-09-28 15:13:49 +08:00
parent d9e380ddf5
commit b7f0aae4fa
2 changed files with 25 additions and 7 deletions

View File

@ -296,18 +296,20 @@ void Incubator::SpawnWaveMon(int wave)
a8::XParams()
.SetSender(this)
.SetParam1(content)
.SetParam2(room)
.SetParam3(wave),
.SetParam2(wave)
.SetParam3(i),
[] (const a8::XParams& param)
{
Incubator* incubator = (Incubator*)param.sender.GetUserData();
MetaData::PveGeminiContent* content = (MetaData::PveGeminiContent*)param.param1.GetUserData();
Room* room = (Room*)param.param2.GetUserData();
int wave = param.param3.GetInt();
Room* room = incubator->room;
int wave = param.param2.GetInt();
int idx = param.param3.GetInt();
#ifdef DEBUG
a8::XPrintf("wave i:%d enemys_size:%d\n", {wave, content->enemys.size()});
#endif
if (param.param3.GetInt() < content->enemys.size()) {
int enemy_id = content->enemys[param.param3.GetInt()];
if (idx < content->enemys.size()) {
int enemy_id = content->enemys[idx];
MetaData::Player* hero_meta = MetaMgr::Instance()->GetPlayer(enemy_id);
if (hero_meta) {
a8::Vec2 hero_pos = content->spawn_point;

View File

@ -494,7 +494,23 @@ message MFActivePlayerData
repeated int32 inventory = 11; //
optional int32 cur_weapon_idx = 15; // 0-4
repeated MFWeapon weapons = 16; //1-4 0 1 2 3 4
/*
1-4
0
11
22
3
4
5:
6:
7:
8:
9: c4
10:
11:
12:
*/
repeated MFWeapon weapons = 16;
optional int32 energy_shield = 40; //
optional int32 max_energy_shield = 41; //