public override void DealWithTeamChange(TeamChangedType type, QueueCharacter character, List <ulong> teamList, ulong characterId) { mImpl.DealWithTeamChange(this, type, character, teamList, characterId); }
public void DealWithTeamChange(QueueLogic _this, TeamChangedType type, QueueCharacter character, List <ulong> teamList, ulong characterId) { switch (type) { case TeamChangedType.Request: break; case TeamChangedType.AcceptRequest: case TeamChangedType.AcceptJoin: var queueCharacter = QueueManager.GetMatchingCharacter(characterId); if (queueCharacter != null && queueCharacter.result != null) { return; } QueueManager.PushOneCharacter(characterId, character); break; case TeamChangedType.Leave: case TeamChangedType.Kick: if (character.result == null) { QueueManager.Pop(characterId, eLeaveMatchingType.TeamChange); } break; case TeamChangedType.Disband: break; } }
public void DealWithTeamChange(ActivityFubenQueue _this, TeamChangedType type, QueueCharacter character, List <ulong> teamList, ulong characterId) { switch (type) { case TeamChangedType.Request: break; case TeamChangedType.AcceptRequest: case TeamChangedType.AcceptJoin: { var queueCharacter = QueueManager.GetMatchingCharacter(characterId); if (queueCharacter != null) { if (queueCharacter.result == null) { QueueManager.Pop(characterId, eLeaveMatchingType.TeamChange); } else { return; } } QueueManager.PushOneCharacter(characterId, character); } break; case TeamChangedType.Kick: case TeamChangedType.Leave: { //characterId离队的情况 if (character.result == null) { var characterData = character.mDatas.Find(data => data.Id == characterId); if (characterData != null) { character.mDatas.Remove(characterData); } else { Logger.Error("Can't find character data for character[{0}]", characterId); } QueueManager.Remove(characterId, eLeaveMatchingType.TeamChange); } } break; case TeamChangedType.Disband: break; } }
//处理队伍变化 public void DealWithTeamChange(TeamChangedType type, List <ulong> teamList, ulong characterId) { Pop(characterId, eLeaveMatchingType.TeamChange); if (teamList.Count == 0) { PlayerLog.WriteLog((int)LogType.QueueMessage, "DealWithTeamChange Error! Team Count == 0!!"); return; } PlayerLog.WriteLog((int)LogType.QueueMessage, "DealWithTeamChange character={0} type={1}", characterId, type); var captainId = teamList[0]; var character = GetMatchingCharacter(captainId); if (character == null) { return; } character.mLogic.DealWithTeamChange(type, character, teamList, characterId); }
//处理队伍变化 public static void DealWithTeamChange(TeamChangedType type, List <ulong> teamList, ulong characterId) { mStaticImpl.DealWithTeamChange(type, teamList, characterId); }