Ejemplo n.º 1
0
    protected override void copyData()
    {
        base.copyData();
        PosData nowPosTemp = nowPos;

        if (nowPosTemp != null)
        {
            this.nowPos = (PosData)BytesControl.createData(PosData.dataID);
            this.nowPos.copy(nowPosTemp);
        }
        else
        {
            this.nowPos = null;
        }

        PosData targetPosTemp = targetPos;

        if (targetPosTemp != null)
        {
            this.targetPos = (PosData)BytesControl.createData(PosData.dataID);
            this.targetPos.copy(targetPosTemp);
        }
        else
        {
            this.targetPos = null;
            nullObjError("targetPos");
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static MailRemoveRedPointRequest create(int index)
    {
        MailRemoveRedPointRequest re = (MailRemoveRedPointRequest)BytesControl.createRequest(dataID);

        re.index = index;
        return(re);
    }
Ejemplo n.º 3
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static GetAchievementRewardRequest create(int id)
    {
        GetAchievementRewardRequest re = (GetAchievementRewardRequest)BytesControl.createRequest(dataID);

        re.id = id;
        return(re);
    }
Ejemplo n.º 4
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static SocketReconnectSuccessRequest create(int lastReceiveIndex)
    {
        SocketReconnectSuccessRequest re = (SocketReconnectSuccessRequest)BytesControl.createRequest(dataID);

        re.lastReceiveIndex = lastReceiveIndex;
        return(re);
    }
Ejemplo n.º 5
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static PetWorkRequest create(int index)
    {
        PetWorkRequest re = (PetWorkRequest)BytesControl.createRequest(dataID);

        re.index = index;
        return(re);
    }
Ejemplo n.º 6
0
    protected override void copyData()
    {
        base.copyData();
        PosDirData posDirTemp = posDir;

        if (posDirTemp != null)
        {
            this.posDir = (PosDirData)BytesControl.createData(PosDirData.dataID);
            this.posDir.copy(posDirTemp);
        }
        else
        {
            this.posDir = null;
        }

        int[] argsTemp = args;
        if (argsTemp != null)
        {
            int[] argsR   = argsTemp;
            int   argsLen = argsR.Length;
            this.args = new int[argsLen];
            BytesControl.arrayCopy(argsTemp, this.args, argsLen);
        }
        else
        {
            this.args = null;
        }
    }
Ejemplo n.º 7
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is UnitPosData))
        {
            return;
        }

        UnitPosData mData = (UnitPosData)data;

        if (mData.pos != null)
        {
            this.pos = (PosData)BytesControl.createData(PosData.dataID);
            this.pos.copy(mData.pos);
        }
        else
        {
            this.pos = null;
            nullObjError("pos");
        }

        if (mData.dir != null)
        {
            this.dir = (DirData)BytesControl.createData(DirData.dataID);
            this.dir.copy(mData.dir);
        }
        else
        {
            this.dir = null;
            nullObjError("dir");
        }
    }
Ejemplo n.º 8
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static ClientSceneRadioRequest create(BaseData data)
    {
        ClientSceneRadioRequest re = (ClientSceneRadioRequest)BytesControl.createRequest(dataID);

        re.data = data;
        return(re);
    }
Ejemplo n.º 9
0
    protected override void copyData()
    {
        base.copyData();
        PosDirData nowPosTemp = nowPos;

        if (nowPosTemp != null)
        {
            this.nowPos = (PosDirData)BytesControl.createData(PosDirData.dataID);
            this.nowPos.copy(nowPosTemp);
        }
        else
        {
            this.nowPos = null;
        }

        DriveData dataTemp = data;

        if (dataTemp != null)
        {
            this.data = (DriveData)dataTemp.clone();
        }
        else
        {
            this.data = null;
            nullObjError("data");
        }
    }
Ejemplo n.º 10
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static RefuseApplyAddFriendRequest create(long playerID)
    {
        RefuseApplyAddFriendRequest re = (RefuseApplyAddFriendRequest)BytesControl.createRequest(dataID);

        re.playerID = playerID;
        return(re);
    }
Ejemplo n.º 11
0
        private ObjectPool <BaseData> createRequestPool(int type)
        {
            ObjectPool <BaseData> pool = new ObjectPool <BaseData>(() => BytesControl.getRequestByID(type));

            pool.setNeedClear(false);
            return(pool);
        }
Ejemplo n.º 12
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        base.toCopy(data);

        if (!(data is PlayerSubsectionRankToolData))
        {
            return;
        }

        PlayerSubsectionRankToolData mData = (PlayerSubsectionRankToolData)data;

        this.version = mData.version;

        this.subsectionIndex = mData.subsectionIndex;

        this.subsectionSubIndex = mData.subsectionSubIndex;

        this.value = mData.value;

        if (mData.args != null)
        {
            long[] argsR   = mData.args;
            int    argsLen = argsR.Length;
            if (this.args == null || this.args.Length != argsLen)
            {
                this.args = new long[argsLen];
            }
            BytesControl.arrayCopy(mData.args, this.args, argsLen);
        }
        else
        {
            this.args = null;
        }
    }
Ejemplo n.º 13
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static PlayerLoginRequest create(long playerID)
    {
        PlayerLoginRequest re = (PlayerLoginRequest)BytesControl.createRequest(dataID);

        re.playerID = playerID;
        return(re);
    }
    /// <summary>
    /// 创建实例
    /// </summary>
    public static CBuildingCancelLevelUpRequest create(int instanceID)
    {
        CBuildingCancelLevelUpRequest re = (CBuildingCancelLevelUpRequest)BytesControl.createRequest(dataID);

        re.instanceID = instanceID;
        return(re);
    }
    /// <summary>
    /// 创建实例
    /// </summary>
    public static PlayerReceiveChatIndexRequest create(int index)
    {
        PlayerReceiveChatIndexRequest re = (PlayerReceiveChatIndexRequest)BytesControl.createRequest(dataID);

        re.index = index;
        return(re);
    }
Ejemplo n.º 16
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static CreatePlayerRequest create(CreatePlayerData data)
    {
        CreatePlayerRequest re = (CreatePlayerRequest)BytesControl.createRequest(dataID);

        re.data = data;
        return(re);
    }
Ejemplo n.º 17
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static FrameSyncOneRequest create(FrameSyncCommandData command)
    {
        FrameSyncOneRequest re = (FrameSyncOneRequest)BytesControl.createRequest(dataID);

        re.command = command;
        return(re);
    }
Ejemplo n.º 18
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static SendClientOfflineWorkRequest create(ClientOfflineWorkData data)
    {
        SendClientOfflineWorkRequest re = (SendClientOfflineWorkRequest)BytesControl.createRequest(dataID);

        re.data = data;
        return(re);
    }
Ejemplo n.º 19
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static FuncCleanUpItemRequest create(int funcID)
    {
        FuncCleanUpItemRequest re = (FuncCleanUpItemRequest)BytesControl.createRequest(dataID);

        re.funcID = funcID;
        return(re);
    }
Ejemplo n.º 20
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static CUnitKillSelfRequest create(int instanceID)
    {
        CUnitKillSelfRequest re = (CUnitKillSelfRequest)BytesControl.createRequest(dataID);

        re.instanceID = instanceID;
        return(re);
    }
Ejemplo n.º 21
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static AckPingRequest create(int index)
    {
        AckPingRequest re = (AckPingRequest)BytesControl.createRequest(dataID);

        re.index = index;
        return(re);
    }
Ejemplo n.º 22
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static ApplyChangeRoleNameRequest create(string name)
    {
        ApplyChangeRoleNameRequest re = (ApplyChangeRoleNameRequest)BytesControl.createRequest(dataID);

        re.name = name;
        return(re);
    }
Ejemplo n.º 23
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static PlayerSwitchSceneRequest create(int token)
    {
        PlayerSwitchSceneRequest re = (PlayerSwitchSceneRequest)BytesControl.createRequest(dataID);

        re.token = token;
        return(re);
    }
Ejemplo n.º 24
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static CommitQuestRequest create(int id)
    {
        CommitQuestRequest re = (CommitQuestRequest)BytesControl.createRequest(dataID);

        re.id = id;
        return(re);
    }
Ejemplo n.º 25
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static AgreeAddFriendRequest create(long playerID)
    {
        AgreeAddFriendRequest re = (AgreeAddFriendRequest)BytesControl.createRequest(dataID);

        re.playerID = playerID;
        return(re);
    }
Ejemplo n.º 26
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static SearchPlayerRequest create(long playerID)
    {
        SearchPlayerRequest re = (SearchPlayerRequest)BytesControl.createRequest(dataID);

        re.playerID = playerID;
        return(re);
    }
Ejemplo n.º 27
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static FuncApplyCancelMatchRequest create(int funcID)
    {
        FuncApplyCancelMatchRequest re = (FuncApplyCancelMatchRequest)BytesControl.createRequest(dataID);

        re.funcID = funcID;
        return(re);
    }
Ejemplo n.º 28
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static CUnitPreBattleSureRequest create(int instanceID)
    {
        CUnitPreBattleSureRequest re = (CUnitPreBattleSureRequest)BytesControl.createRequest(dataID);

        re.instanceID = instanceID;
        return(re);
    }
    /// <summary>
    /// 创建实例
    /// </summary>
    public static RemoveFriendBlackListRequest create(long playerID)
    {
        RemoveFriendBlackListRequest re = (RemoveFriendBlackListRequest)BytesControl.createRequest(dataID);

        re.playerID = playerID;
        return(re);
    }
Ejemplo n.º 30
0
    /// <summary>
    /// 创建实例
    /// </summary>
    public static AcceptQuestRequest create(int id)
    {
        AcceptQuestRequest re = (AcceptQuestRequest)BytesControl.createRequest(dataID);

        re.id = id;
        return(re);
    }