This commit is contained in:
aozhiwei 2022-10-13 19:19:38 +08:00
parent fa0ece5716
commit 9455ae1888
2 changed files with 12 additions and 0 deletions

View File

@ -448,6 +448,12 @@ bool MatchTeam::CanCombine(MatchTeam* b)
if (b->phase_ != kMatchCombining) { if (b->phase_ != kMatchCombining) {
#ifdef DEBUG #ifdef DEBUG
a8::XPrintf("CanCombine 5\n", {}); a8::XPrintf("CanCombine 5\n", {});
#endif
return false;
}
if (GetSlotNum() != b->GetSlotNum()) {
#ifdef DEBUG
a8::XPrintf("CanCombine 31\n", {});
#endif #endif
return false; return false;
} }
@ -764,3 +770,8 @@ void MatchTeam::RemoveTeam()
} }
MatchMgr::Instance()->RemoveTeam(GetTeamUUid()); MatchMgr::Instance()->RemoveTeam(GetTeamUUid());
} }
int MatchTeam::GetSlotNum()
{
return first_member_->msg->team_slot_num();
}

View File

@ -73,6 +73,7 @@ class MatchTeam
int GetMapId(); int GetMapId();
std::list<std::shared_ptr<RawTeamMember>>& GetCurrMembers() { return curr_member_hash_; }; std::list<std::shared_ptr<RawTeamMember>>& GetCurrMembers() { return curr_member_hash_; };
std::shared_ptr<RawTeamMember> GetOwner() { return first_member_; }; std::shared_ptr<RawTeamMember> GetOwner() { return first_member_; };
int GetSlotNum();
private: private:
void Update(); void Update();