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"); } }
/// <summary> /// 创建实例 /// </summary> public static MailRemoveRedPointRequest create(int index) { MailRemoveRedPointRequest re = (MailRemoveRedPointRequest)BytesControl.createRequest(dataID); re.index = index; return(re); }
/// <summary> /// 创建实例 /// </summary> public static GetAchievementRewardRequest create(int id) { GetAchievementRewardRequest re = (GetAchievementRewardRequest)BytesControl.createRequest(dataID); re.id = id; return(re); }
/// <summary> /// 创建实例 /// </summary> public static SocketReconnectSuccessRequest create(int lastReceiveIndex) { SocketReconnectSuccessRequest re = (SocketReconnectSuccessRequest)BytesControl.createRequest(dataID); re.lastReceiveIndex = lastReceiveIndex; return(re); }
/// <summary> /// 创建实例 /// </summary> public static PetWorkRequest create(int index) { PetWorkRequest re = (PetWorkRequest)BytesControl.createRequest(dataID); re.index = index; return(re); }
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; } }
/// <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"); } }
/// <summary> /// 创建实例 /// </summary> public static ClientSceneRadioRequest create(BaseData data) { ClientSceneRadioRequest re = (ClientSceneRadioRequest)BytesControl.createRequest(dataID); re.data = data; return(re); }
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"); } }
/// <summary> /// 创建实例 /// </summary> public static RefuseApplyAddFriendRequest create(long playerID) { RefuseApplyAddFriendRequest re = (RefuseApplyAddFriendRequest)BytesControl.createRequest(dataID); re.playerID = playerID; return(re); }
private ObjectPool <BaseData> createRequestPool(int type) { ObjectPool <BaseData> pool = new ObjectPool <BaseData>(() => BytesControl.getRequestByID(type)); pool.setNeedClear(false); return(pool); }
/// <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; } }
/// <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); }
/// <summary> /// 创建实例 /// </summary> public static CreatePlayerRequest create(CreatePlayerData data) { CreatePlayerRequest re = (CreatePlayerRequest)BytesControl.createRequest(dataID); re.data = data; return(re); }
/// <summary> /// 创建实例 /// </summary> public static FrameSyncOneRequest create(FrameSyncCommandData command) { FrameSyncOneRequest re = (FrameSyncOneRequest)BytesControl.createRequest(dataID); re.command = command; return(re); }
/// <summary> /// 创建实例 /// </summary> public static SendClientOfflineWorkRequest create(ClientOfflineWorkData data) { SendClientOfflineWorkRequest re = (SendClientOfflineWorkRequest)BytesControl.createRequest(dataID); re.data = data; return(re); }
/// <summary> /// 创建实例 /// </summary> public static FuncCleanUpItemRequest create(int funcID) { FuncCleanUpItemRequest re = (FuncCleanUpItemRequest)BytesControl.createRequest(dataID); re.funcID = funcID; return(re); }
/// <summary> /// 创建实例 /// </summary> public static CUnitKillSelfRequest create(int instanceID) { CUnitKillSelfRequest re = (CUnitKillSelfRequest)BytesControl.createRequest(dataID); re.instanceID = instanceID; return(re); }
/// <summary> /// 创建实例 /// </summary> public static AckPingRequest create(int index) { AckPingRequest re = (AckPingRequest)BytesControl.createRequest(dataID); re.index = index; return(re); }
/// <summary> /// 创建实例 /// </summary> public static ApplyChangeRoleNameRequest create(string name) { ApplyChangeRoleNameRequest re = (ApplyChangeRoleNameRequest)BytesControl.createRequest(dataID); re.name = name; return(re); }
/// <summary> /// 创建实例 /// </summary> public static PlayerSwitchSceneRequest create(int token) { PlayerSwitchSceneRequest re = (PlayerSwitchSceneRequest)BytesControl.createRequest(dataID); re.token = token; return(re); }
/// <summary> /// 创建实例 /// </summary> public static CommitQuestRequest create(int id) { CommitQuestRequest re = (CommitQuestRequest)BytesControl.createRequest(dataID); re.id = id; return(re); }
/// <summary> /// 创建实例 /// </summary> public static AgreeAddFriendRequest create(long playerID) { AgreeAddFriendRequest re = (AgreeAddFriendRequest)BytesControl.createRequest(dataID); re.playerID = playerID; return(re); }
/// <summary> /// 创建实例 /// </summary> public static SearchPlayerRequest create(long playerID) { SearchPlayerRequest re = (SearchPlayerRequest)BytesControl.createRequest(dataID); re.playerID = playerID; return(re); }
/// <summary> /// 创建实例 /// </summary> public static FuncApplyCancelMatchRequest create(int funcID) { FuncApplyCancelMatchRequest re = (FuncApplyCancelMatchRequest)BytesControl.createRequest(dataID); re.funcID = funcID; return(re); }
/// <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); }
/// <summary> /// 创建实例 /// </summary> public static AcceptQuestRequest create(int id) { AcceptQuestRequest re = (AcceptQuestRequest)BytesControl.createRequest(dataID); re.id = id; return(re); }