1
This commit is contained in:
parent
a2de56c187
commit
12379921ca
@ -44,6 +44,7 @@ Android::~Android()
|
||||
void Android::Initialize()
|
||||
{
|
||||
Human::Initialize();
|
||||
account_id = a8::Format("2006_0000_%d", {robot_meta->id()});
|
||||
RandSkin();
|
||||
GiveEquip();
|
||||
RecalcBaseAttr();
|
||||
|
@ -2213,7 +2213,30 @@ void Room::OnGameOver()
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
TryRoomReport(0);
|
||||
xtimer.SetIntervalEx
|
||||
(SERVER_FRAME_RATE / 0.5,
|
||||
[this, frameno = GetFrameNo()] (int event, const a8::Args* args)
|
||||
{
|
||||
if (a8::TIMER_EXEC_EVENT == event) {
|
||||
bool all_sent = true;
|
||||
TraverseTeams
|
||||
(
|
||||
[&all_sent] (Team* team) -> bool
|
||||
{
|
||||
if (team->HasPlayer() && team->IsViewTeam() &&
|
||||
!team->IsAlreadyReportBattle()) {
|
||||
all_sent = false;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
if (all_sent) {
|
||||
TryRoomReport(0);
|
||||
xtimer.DeleteCurrentTimer();
|
||||
}
|
||||
}
|
||||
},
|
||||
&xtimer_attacher_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3955,6 +3978,7 @@ void Room::TryRoomReport(int try_count)
|
||||
if (room) {
|
||||
room->already_room_report_battle_ = true;
|
||||
room->sending_room_report_battle_ = false;
|
||||
room->StartOverTimer();
|
||||
}
|
||||
},
|
||||
url.c_str(),
|
||||
|
@ -64,6 +64,7 @@ class Team : public std::enable_shared_from_this<Team>
|
||||
void FillMFTeamFull(cs::MFTeamFull* p);
|
||||
bool AllIsDead();
|
||||
void TrySendTeamBattleReport(Human* sender);
|
||||
bool IsAlreadyReportBattle() { return already_report_battle_;}
|
||||
|
||||
private:
|
||||
void SendTeamBattleReport(Human* sender);
|
||||
|
Loading…
x
Reference in New Issue
Block a user