This commit is contained in:
aozhiwei 2023-12-29 17:10:56 +08:00
parent b1d2275ad9
commit ba2150ae50
2 changed files with 29 additions and 20 deletions

View File

@ -1613,16 +1613,17 @@ void Human::SendUIUpdate()
notifymsg.set_boss_state(room->pve_data.boss_state);
}
if (room->IsMobaModeRoom()) {
if (room->GetMobaTeamA()) {
notifymsg.set_a_team_id(room->GetMobaTeamA()->GetTeamId());
notifymsg.set_a_kill_count(room->GetMobaTeamA()->GetKillCount());
}
if (room->GetMobaTeamB()) {
notifymsg.set_b_team_id(room->GetMobaTeamB()->GetTeamId());
notifymsg.set_b_kill_count(room->GetMobaTeamB()->GetKillCount());
}
#if 0
#if 1
if (GetTeam()->GetTeamId() == room->GetMobaTeamA()->GetTeamId()) {
if (room->GetMobaTeamA()) {
notifymsg.set_a_team_id(room->GetMobaTeamB()->GetTeamId());
notifymsg.set_a_kill_count(room->GetMobaTeamB()->GetKillCount());
}
if (room->GetMobaTeamB()) {
notifymsg.set_b_team_id(room->GetMobaTeamA()->GetTeamId());
notifymsg.set_b_kill_count(room->GetMobaTeamA()->GetKillCount());
}
} else {
if (room->GetMobaTeamA()) {
notifymsg.set_a_team_id(room->GetMobaTeamA()->GetTeamId());
notifymsg.set_a_kill_count(room->GetMobaTeamA()->GetKillCount());
@ -1631,16 +1632,23 @@ void Human::SendUIUpdate()
notifymsg.set_b_team_id(room->GetMobaTeamB()->GetTeamId());
notifymsg.set_b_kill_count(room->GetMobaTeamB()->GetKillCount());
}
} else {
if (room->GetMobaTeamA()) {
notifymsg.set_b_team_id(room->GetMobaTeamA()->GetTeamId());
notifymsg.set_b_kill_count(room->GetMobaTeamA()->GetKillCount());
}
if (room->GetMobaTeamB()) {
notifymsg.set_a_team_id(room->GetMobaTeamB()->GetTeamId());
notifymsg.set_a_kill_count(room->GetMobaTeamB()->GetKillCount());
}
}
#else
if (room->GetMobaTeamA()) {
notifymsg.set_a_team_id(room->GetMobaTeamA()->GetTeamId());
notifymsg.set_a_kill_count(room->GetMobaTeamA()->GetKillCount());
}
if (room->GetMobaTeamB()) {
notifymsg.set_b_team_id(room->GetMobaTeamB()->GetTeamId());
notifymsg.set_b_kill_count(room->GetMobaTeamB()->GetKillCount());
}
#endif
#ifdef MYDEBUG
a8::XPrintf("zzzzzzzzzzzzz self_team_id:%d data:%s\n",
{
GetTeam()->GetTeamId(),
f8::PbToJson(&notifymsg)
});
#endif
}
SendNotifyMsg(notifymsg);

View File

@ -351,7 +351,8 @@ void Room::AddPlayer(Player* hum, std::shared_ptr<BornPoint> init_born_point, bo
}
#if 1
if (IsMobaModeRoom()) {
hum->side = a8::RandEx(1, 2);
//hum->side = a8::RandEx(1, 2);
hum->side = 1;
CreateAndroid(7);
std::vector<Human*> humans;
for (auto& pair : human_hash_) {
@ -406,7 +407,7 @@ void Room::AddPlayer(Player* hum, std::shared_ptr<BornPoint> init_born_point, bo
}
},
&hum->xtimer_attacher);
#ifdef MYDEBUG1
#ifdef MYDEBUG
for (auto& pair : human_hash_) {
a8::XPrintf("moba check uniid:%d team_id:%d side:%d\n",
{