1
This commit is contained in:
parent
a2de56c187
commit
12379921ca
@ -44,6 +44,7 @@ Android::~Android()
|
|||||||
void Android::Initialize()
|
void Android::Initialize()
|
||||||
{
|
{
|
||||||
Human::Initialize();
|
Human::Initialize();
|
||||||
|
account_id = a8::Format("2006_0000_%d", {robot_meta->id()});
|
||||||
RandSkin();
|
RandSkin();
|
||||||
GiveEquip();
|
GiveEquip();
|
||||||
RecalcBaseAttr();
|
RecalcBaseAttr();
|
||||||
|
@ -2213,7 +2213,30 @@ void Room::OnGameOver()
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
} else {
|
} 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) {
|
if (room) {
|
||||||
room->already_room_report_battle_ = true;
|
room->already_room_report_battle_ = true;
|
||||||
room->sending_room_report_battle_ = false;
|
room->sending_room_report_battle_ = false;
|
||||||
|
room->StartOverTimer();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
url.c_str(),
|
url.c_str(),
|
||||||
|
@ -64,6 +64,7 @@ class Team : public std::enable_shared_from_this<Team>
|
|||||||
void FillMFTeamFull(cs::MFTeamFull* p);
|
void FillMFTeamFull(cs::MFTeamFull* p);
|
||||||
bool AllIsDead();
|
bool AllIsDead();
|
||||||
void TrySendTeamBattleReport(Human* sender);
|
void TrySendTeamBattleReport(Human* sender);
|
||||||
|
bool IsAlreadyReportBattle() { return already_report_battle_;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SendTeamBattleReport(Human* sender);
|
void SendTeamBattleReport(Human* sender);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user