This commit is contained in:
aozhiwei 2022-10-27 17:55:53 +08:00
parent edf9df5821
commit b070f90760
2 changed files with 23 additions and 13 deletions

View File

@ -2488,17 +2488,23 @@ void Human::SendBattleReport()
} }
std::string data; std::string data;
params->ToUrlEncodeStr(data); params->ToUrlEncodeStr(data);
HttpProxy::Instance()->HttpGet if (stats.is_run_away) {
( sending_battlereport_ = false;
a8::XParams() already_report_battle_ = true;
.SetSender(room->GetRoomUuid()) SendGameOver();
.SetParam1(account_id) } else {
.SetParam2(data), HttpProxy::Instance()->HttpGet
on_ok, (
on_error, a8::XParams()
url.c_str(), .SetSender(room->GetRoomUuid())
*params.get() .SetParam1(account_id)
); .SetParam2(data),
on_ok,
on_error,
url.c_str(),
*params.get()
);
}
} }
void Human::ProcLootSkin(AddItemDTO& dto) void Human::ProcLootSkin(AddItemDTO& dto)

View File

@ -1107,7 +1107,9 @@ void Player::_CMGameOver(f8::MsgHdr& hdr, const cs::CMGameOver& msg)
if (!dead) { if (!dead) {
BeKill(GetUniId(), name, 0); BeKill(GetUniId(), name, 0);
} }
if (room->GetGasData().GetGasMode() == GasInactive) { if (room->GetGasData().GetGasMode() == GasInactive ||
HasBuffEffect(kBET_Fly) ||
HasBuffEffect(kBET_Jump)) {
stats.is_run_away = true; stats.is_run_away = true;
} }
SendGameOver(); SendGameOver();
@ -1128,7 +1130,9 @@ void Player::_CMLeave(f8::MsgHdr& hdr, const cs::CMLeave& msg)
leave_ = true; leave_ = true;
leave_frameno_ = room->GetFrameNo(); leave_frameno_ = room->GetFrameNo();
} }
if (room->GetGasData().GetGasMode() == GasInactive) { if (room->GetGasData().GetGasMode() == GasInactive ||
HasBuffEffect(kBET_Fly) ||
HasBuffEffect(kBET_Jump)) {
stats.is_run_away = true; stats.is_run_away = true;
} }
cs::SMLeave respmsg; cs::SMLeave respmsg;