1
This commit is contained in:
parent
8196130498
commit
93d19816de
@ -2641,6 +2641,9 @@ void Room::SendSMTeamFull(Human* hum)
|
|||||||
|
|
||||||
void Room::OnTeamPartChg(Human* hum)
|
void Room::OnTeamPartChg(Human* hum)
|
||||||
{
|
{
|
||||||
|
if (!IsMobaModeRoom()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (hpchg_human_hash_.empty()) {
|
if (hpchg_human_hash_.empty()) {
|
||||||
hpchg_human_hash_[hum->GetUniId()] = hum;
|
hpchg_human_hash_[hum->GetUniId()] = hum;
|
||||||
xtimer.SetTimeoutWpEx
|
xtimer.SetTimeoutWpEx
|
||||||
@ -2648,6 +2651,17 @@ void Room::OnTeamPartChg(Human* hum)
|
|||||||
[this] (int event, const a8::Args* args)
|
[this] (int event, const a8::Args* args)
|
||||||
{
|
{
|
||||||
if (a8::TIMER_EXEC_EVENT == event) {
|
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();
|
hpchg_human_hash_.clear();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user