1
This commit is contained in:
parent
d9e380ddf5
commit
b7f0aae4fa
@ -296,18 +296,20 @@ void Incubator::SpawnWaveMon(int wave)
|
|||||||
a8::XParams()
|
a8::XParams()
|
||||||
.SetSender(this)
|
.SetSender(this)
|
||||||
.SetParam1(content)
|
.SetParam1(content)
|
||||||
.SetParam2(room)
|
.SetParam2(wave)
|
||||||
.SetParam3(wave),
|
.SetParam3(i),
|
||||||
[] (const a8::XParams& param)
|
[] (const a8::XParams& param)
|
||||||
{
|
{
|
||||||
|
Incubator* incubator = (Incubator*)param.sender.GetUserData();
|
||||||
MetaData::PveGeminiContent* content = (MetaData::PveGeminiContent*)param.param1.GetUserData();
|
MetaData::PveGeminiContent* content = (MetaData::PveGeminiContent*)param.param1.GetUserData();
|
||||||
Room* room = (Room*)param.param2.GetUserData();
|
Room* room = incubator->room;
|
||||||
int wave = param.param3.GetInt();
|
int wave = param.param2.GetInt();
|
||||||
|
int idx = param.param3.GetInt();
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
a8::XPrintf("wave i:%d enemys_size:%d\n", {wave, content->enemys.size()});
|
a8::XPrintf("wave i:%d enemys_size:%d\n", {wave, content->enemys.size()});
|
||||||
#endif
|
#endif
|
||||||
if (param.param3.GetInt() < content->enemys.size()) {
|
if (idx < content->enemys.size()) {
|
||||||
int enemy_id = content->enemys[param.param3.GetInt()];
|
int enemy_id = content->enemys[idx];
|
||||||
MetaData::Player* hero_meta = MetaMgr::Instance()->GetPlayer(enemy_id);
|
MetaData::Player* hero_meta = MetaMgr::Instance()->GetPlayer(enemy_id);
|
||||||
if (hero_meta) {
|
if (hero_meta) {
|
||||||
a8::Vec2 hero_pos = content->spawn_point;
|
a8::Vec2 hero_pos = content->spawn_point;
|
||||||
|
@ -494,7 +494,23 @@ message MFActivePlayerData
|
|||||||
repeated int32 inventory = 11; //库存
|
repeated int32 inventory = 11; //库存
|
||||||
|
|
||||||
optional int32 cur_weapon_idx = 15; //当前武器索引 0-4
|
optional int32 cur_weapon_idx = 15; //当前武器索引 0-4
|
||||||
repeated MFWeapon weapons = 16; //武器列表1-4 0:拳头 1:枪 2:枪 3:手雷 4:烟雾弹
|
/*
|
||||||
|
武器列表1-4
|
||||||
|
0:拳头
|
||||||
|
1:枪1
|
||||||
|
2:枪2
|
||||||
|
3:手雷
|
||||||
|
4:烟雾弹
|
||||||
|
5: 毒气弹
|
||||||
|
6: 燃烧瓶
|
||||||
|
7: 陷阱
|
||||||
|
8: 地雷
|
||||||
|
9: c4
|
||||||
|
10: 盾墙
|
||||||
|
11: 信号抢
|
||||||
|
12: 汽油桶
|
||||||
|
*/
|
||||||
|
repeated MFWeapon weapons = 16;
|
||||||
|
|
||||||
optional int32 energy_shield = 40; //能量护盾
|
optional int32 energy_shield = 40; //能量护盾
|
||||||
optional int32 max_energy_shield = 41; //最大能量护盾
|
optional int32 max_energy_shield = 41; //最大能量护盾
|
||||||
|
Loading…
x
Reference in New Issue
Block a user