Exemplo n.º 1
0
    /// <summary>
    /// 收到队友离开
    /// </summary>
    /// <returns>The receive cancel team handle.</returns>
    /// <param name="dataBuffer">Data buffer.</param>
    /// <param name="socketID">Socket I.</param>
    CommandCallbackType PvpReceiveCancelTeamHandle(byte[] dataBuffer, int socketID)
    {
        SMsgPVPMathingLeave_SC sMsgPVPMathingLeave_SC = SMsgPVPMathingLeave_SC.ParsePackage(dataBuffer);

        PvpDataManager.Instance.SetCancelTeamInfo(sMsgPVPMathingLeave_SC);
        return(CommandCallbackType.Continue);
    }
Exemplo n.º 2
0
    public void SetCancelTeamInfo(SMsgPVPMathingLeave_SC message)
    {
        for (int i = 0; i < GroupmeberInfoList.Count; i++)
        {
            if (GroupmeberInfoList[i].dwActorID == message.dwActorID)
            {
                GroupmeberInfoList.Remove(GroupmeberInfoList[i]);
            }
        }

        if (MyActorID == message.dwActorID)
        {
            IsTeamLeader = true;
        }
        else
        {
            IsTeamLeader = false;
        }

        ShowMessage(PVPMessageType.CancelTeam, message.dwActorID);
        UIEventManager.Instance.TriggerUIEvent(UIEventType.pvpFriendCancelTeam, (int)message.dwActorID);
    }