diff --git a/server/gameserver/pbutils.cc b/server/gameserver/pbutils.cc index f5c4bf39..839fe636 100644 --- a/server/gameserver/pbutils.cc +++ b/server/gameserver/pbutils.cc @@ -2641,6 +2641,9 @@ void Room::SendSMTeamFull(Human* hum) void Room::OnTeamPartChg(Human* hum) { + if (!IsMobaModeRoom()) { + return; + } if (hpchg_human_hash_.empty()) { hpchg_human_hash_[hum->GetUniId()] = hum; xtimer.SetTimeoutWpEx @@ -2648,6 +2651,17 @@ void Room::OnTeamPartChg(Human* hum) [this] (int event, const a8::Args* args) { if (a8::TIMER_EXEC_EVENT == event) { + cs::SMTeamPartNotify notify_msg; + for (auto& pair : hpchg_human_hash_) { + pair.second->FillMFTeamPart(notify_msg.add_members()); + } + TraversePlayerList + ( + [¬ify_msg] (Player* hum) -> bool + { + hum->SendNotifyMsg(notify_msg); + return true; + }); hpchg_human_hash_.clear(); } },