From f9d969a9d6d00c1aefaf8bf22d0378d1856fdb16 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 18 Apr 2024 11:51:36 +0800 Subject: [PATCH] 1 --- server/gameserver/commands.cc | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/server/gameserver/commands.cc b/server/gameserver/commands.cc index 1f785abe..3287f552 100644 --- a/server/gameserver/commands.cc +++ b/server/gameserver/commands.cc @@ -88,7 +88,6 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg) } else if (cmd == "start_world") { room->stop_world = false; } else if (cmd == "chiji") { - #if MYDEBUG if (room->IsMobaModeRoom()) { while (GetTeam()->GetKillCount() <100) { GetTeam()->IncKillCount(); @@ -108,9 +107,33 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg) }, &xtimer_attacher); } - #endif + } else if (cmd == "!chiji") { + if (room->IsMobaModeRoom()) { + Team* team = room->GetMobaTeamA(); + while (team->GetKillCount() <100) { + team->IncKillCount(); + } + if (!room->moba_over_timer.expired()) { + room->xtimer.ModifyTime(room->moba_over_timer, 0); + } + } else { + BeKill(VP_Gas, + TEXT("battle_server_killer_gas", "毒圈"), + VW_Gas, + VP_Gas, + TEXT("battle_server_killer_gas", "毒圈")); + room->debug_params[119] = 1; + room->xtimer.SetTimeoutEx + (1, + [this] (int event, const a8::Args* args) + { + if (a8::TIMER_EXEC_EVENT == event) { + room->GetIncubator()->ShowHand(); + } + }, + &xtimer_attacher); + } } else if (cmd == "disable_gas_damage") { - #if MYDEBUG room->debug_params[120] = 1; room->xtimer.SetTimeoutEx (SERVER_FRAME_RATE * 60 * 10, @@ -121,7 +144,6 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg) } }, &xtimer_attacher); - #endif } else if (cmd == "add_hp") { if (cmds.size() > 1) { float hp = a8::XValue(cmds[1]).GetDouble();