This commit is contained in:
aozhiwei 2023-10-10 15:12:08 +08:00
parent 232bb08253
commit edcc69953c
3 changed files with 9 additions and 0 deletions

View File

@ -168,6 +168,9 @@ void FrameMaker::PostProcess(cs::SMUpdate* msg, Room* room, Human* hum, FrameDat
if (room->IsPveRoom()) {
int left_time = room->GetIncubator()->GetPveLeftTime();
msg->set_game_left_time(left_time);
} else if (room->IsMobaModeRoom()) {
int left_time = room->GetMobaLeftTime();
msg->set_game_left_time(left_time);
}
room->GetSandTable()->FillMFSandTable(msg, hum, framedata);
}

View File

@ -3694,3 +3694,8 @@ bool Room::IsNewerMap()
{
return map_instance->map_id == 2003;
}
int Room::GetMobaLeftTime()
{
return mt::Param::s().moba_revive_time - (GetFrameNo() * FRAME_RATE_MS / 1000);
}

View File

@ -276,6 +276,7 @@ public:
int GetMaxTeamNum();
bool IsMiniMap();
bool IsNewerMap();
int GetMobaLeftTime();
private:
void ShuaAndroid();