Пример #1
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;
        }
    }
Пример #2
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;
        }
    }
Пример #3
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is RegionData))
        {
            return;
        }

        RegionData mData = (RegionData)data;

        this.instanceID = mData.instanceID;

        this.id = mData.id;

        if (mData.args != null)
        {
            float[] argsR   = mData.args;
            int     argsLen = argsR.Length;
            if (this.args == null || this.args.Length != argsLen)
            {
                this.args = new float[argsLen];
            }
            BytesControl.arrayCopy(mData.args, this.args, argsLen);
        }
        else
        {
            this.args = null;
            nullObjError("args");
        }
    }
Пример #4
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is QueryPlayerResultData))
        {
            return;
        }

        QueryPlayerResultData mData = (QueryPlayerResultData)data;

        this.queryPlayerID = mData.queryPlayerID;

        this.queryType = mData.queryType;

        if (mData.queryArgs != null)
        {
            int[] queryArgsR   = mData.queryArgs;
            int   queryArgsLen = queryArgsR.Length;
            if (this.queryArgs == null || this.queryArgs.Length != queryArgsLen)
            {
                this.queryArgs = new int[queryArgsLen];
            }
            BytesControl.arrayCopy(mData.queryArgs, this.queryArgs, queryArgsLen);
        }
        else
        {
            this.queryArgs = null;
        }

        this.isSuccess = mData.isSuccess;
    }
Пример #5
0
 protected override void copyData()
 {
     base.copyData();
     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;
     }
 }
Пример #6
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is FrameSyncCommandData))
        {
            return;
        }

        FrameSyncCommandData mData = (FrameSyncCommandData)data;

        this.index = mData.index;

        this.type = mData.type;

        if (mData.ints != null)
        {
            int[] intsR   = mData.ints;
            int   intsLen = intsR.Length;
            if (this.ints == null || this.ints.Length != intsLen)
            {
                this.ints = new int[intsLen];
            }
            BytesControl.arrayCopy(mData.ints, this.ints, intsLen);
        }
        else
        {
            this.ints = null;
            nullObjError("ints");
        }

        if (mData.floats != null)
        {
            float[] floatsR   = mData.floats;
            int     floatsLen = floatsR.Length;
            if (this.floats == null || this.floats.Length != floatsLen)
            {
                this.floats = new float[floatsLen];
            }
            BytesControl.arrayCopy(mData.floats, this.floats, floatsLen);
        }
        else
        {
            this.floats = null;
            nullObjError("floats");
        }
    }
Пример #7
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[] intsTemp = ints;
        if (intsTemp != null)
        {
            int[] intsR   = intsTemp;
            int   intsLen = intsR.Length;
            this.ints = new int[intsLen];
            BytesControl.arrayCopy(intsTemp, this.ints, intsLen);
        }
        else
        {
            this.ints = null;
        }

        float[] floatsTemp = floats;
        if (floatsTemp != null)
        {
            float[] floatsR   = floatsTemp;
            int     floatsLen = floatsR.Length;
            this.floats = new float[floatsLen];
            BytesControl.arrayCopy(floatsTemp, this.floats, floatsLen);
        }
        else
        {
            this.floats = null;
        }
    }
Пример #8
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is SystemPartData))
        {
            return;
        }

        SystemPartData mData = (SystemPartData)data;

        if (mData.version != null)
        {
            this.version = (SaveVersionData)mData.version.clone();
        }
        else
        {
            this.version = null;
            nullObjError("version");
        }

        this.serverTime = mData.serverTime;

        this.isBlock = mData.isBlock;

        this.flowStep = mData.flowStep;

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

        if (mData.clientRandomSeeds != null)
        {
            int[] clientRandomSeedsR   = mData.clientRandomSeeds;
            int   clientRandomSeedsLen = clientRandomSeedsR.Length;
            if (this.clientRandomSeeds == null || this.clientRandomSeeds.Length != clientRandomSeedsLen)
            {
                this.clientRandomSeeds = new int[clientRandomSeedsLen];
            }
            BytesControl.arrayCopy(mData.clientRandomSeeds, this.clientRandomSeeds, clientRandomSeedsLen);
        }
        else
        {
            this.clientRandomSeeds = null;
        }

        this.clientRandomSeedIndex = mData.clientRandomSeedIndex;

        this.clientOfflineWorkReceiveIndex = mData.clientOfflineWorkReceiveIndex;

        if (mData.gmCommandSet != null)
        {
            if (this.gmCommandSet != null)
            {
                this.gmCommandSet.clear();
                this.gmCommandSet.ensureCapacity(mData.gmCommandSet.size());
            }
            else
            {
                this.gmCommandSet = new SSet <string>();
            }

            SSet <string> gmCommandSetT = this.gmCommandSet;
            if (!mData.gmCommandSet.isEmpty())
            {
                string[] gmCommandSetVKeys = mData.gmCommandSet.getKeys();
                for (int gmCommandSetVI = gmCommandSetVKeys.Length - 1; gmCommandSetVI >= 0; --gmCommandSetVI)
                {
                    if (gmCommandSetVKeys[gmCommandSetVI] != null)
                    {
                        string gmCommandSetV = gmCommandSetVKeys[gmCommandSetVI];
                        string gmCommandSetU;
                        gmCommandSetU = gmCommandSetV;

                        gmCommandSetT.add(gmCommandSetU);
                    }
                }
            }
        }
        else
        {
            this.gmCommandSet = null;
        }

        this.gmType = mData.gmType;

        this.serverBornCode = mData.serverBornCode;

        this.serverStartTime = mData.serverStartTime;

        if (mData.logQueue != null)
        {
            if (this.logQueue != null)
            {
                this.logQueue.clear();
                this.logQueue.ensureCapacity(mData.logQueue.size());
            }
            else
            {
                this.logQueue = new SQueue <InfoLogData>();
            }

            SQueue <InfoLogData> logQueueT = this.logQueue;
            if (!mData.logQueue.isEmpty())
            {
                InfoLogData[] logQueueVValues = mData.logQueue.getValues();
                int           logQueueVMark   = mData.logQueue.getMark();
                int           logQueueVStart  = mData.logQueue.getStart();
                for (int logQueueVI = 0, logQueueVLen = mData.logQueue.length(); logQueueVI < logQueueVLen; ++logQueueVI)
                {
                    InfoLogData logQueueV = logQueueVValues[(logQueueVI + logQueueVStart) & logQueueVMark];
                    InfoLogData logQueueU;
                    if (logQueueV != null)
                    {
                        logQueueU = (InfoLogData)logQueueV.clone();
                    }
                    else
                    {
                        logQueueU = null;
                        nullObjError("logQueueU");
                    }

                    logQueueT.offer(logQueueU);
                }
            }
        }
        else
        {
            this.logQueue = null;
            nullObjError("logQueue");
        }

        this.nextDailyTime = mData.nextDailyTime;

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

        this.clientRandomSeedKey = mData.clientRandomSeedKey;
    }
Пример #9
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is RolePartData))
        {
            return;
        }

        RolePartData mData = (RolePartData)data;

        this.playerID = mData.playerID;

        this.name = mData.name;

        this.userID = mData.userID;

        this.uid = mData.uid;

        this.createAreaID = mData.createAreaID;

        this.platform = mData.platform;

        this.isAdult = mData.isAdult;

        this.sex = mData.sex;

        this.vocation = mData.vocation;

        this.level = mData.level;

        this.exp = mData.exp;

        if (mData.currencies != null)
        {
            long[] currenciesR   = mData.currencies;
            int    currenciesLen = currenciesR.Length;
            if (this.currencies == null || this.currencies.Length != currenciesLen)
            {
                this.currencies = new long[currenciesLen];
            }
            BytesControl.arrayCopy(mData.currencies, this.currencies, currenciesLen);
        }
        else
        {
            this.currencies = null;
            nullObjError("currencies");
        }

        if (mData.currenciesMax != null)
        {
            long[] currenciesMaxR   = mData.currenciesMax;
            int    currenciesMaxLen = currenciesMaxR.Length;
            if (this.currenciesMax == null || this.currenciesMax.Length != currenciesMaxLen)
            {
                this.currenciesMax = new long[currenciesMaxLen];
            }
            BytesControl.arrayCopy(mData.currenciesMax, this.currenciesMax, currenciesMaxLen);
        }
        else
        {
            this.currenciesMax = null;
            nullObjError("currenciesMax");
        }

        if (mData.totalAddCurrencies != null)
        {
            long[] totalAddCurrenciesR   = mData.totalAddCurrencies;
            int    totalAddCurrenciesLen = totalAddCurrenciesR.Length;
            if (this.totalAddCurrencies == null || this.totalAddCurrencies.Length != totalAddCurrenciesLen)
            {
                this.totalAddCurrencies = new long[totalAddCurrenciesLen];
            }
            BytesControl.arrayCopy(mData.totalAddCurrencies, this.totalAddCurrencies, totalAddCurrenciesLen);
        }
        else
        {
            this.totalAddCurrencies = null;
            nullObjError("totalAddCurrencies");
        }

        this.fightForce = mData.fightForce;
    }
Пример #10
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is UnitMoveData))
        {
            return;
        }

        UnitMoveData mData = (UnitMoveData)data;

        this.baseMoveState = mData.baseMoveState;

        this.moveType = mData.moveType;

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

        if (mData.moveList != null)
        {
            if (this.moveList != null)
            {
                this.moveList.clear();
                this.moveList.ensureCapacity(mData.moveList.size());
            }
            else
            {
                this.moveList = new SList <PosData>();
            }

            SList <PosData> moveListT = this.moveList;
            if (!mData.moveList.isEmpty())
            {
                PosData[] moveListVValues = mData.moveList.getValues();
                for (int moveListVI = 0, moveListVLen = mData.moveList.length(); moveListVI < moveListVLen; ++moveListVI)
                {
                    PosData moveListV = moveListVValues[moveListVI];
                    PosData moveListU;
                    if (moveListV != null)
                    {
                        moveListU = (PosData)BytesControl.createData(PosData.dataID);
                        moveListU.copy(moveListV);
                    }
                    else
                    {
                        moveListU = null;
                    }

                    moveListT.add(moveListU);
                }
            }
        }
        else
        {
            this.moveList = null;
        }

        this.specialMoveID = mData.specialMoveID;

        if (mData.specialMoveArgs != null)
        {
            int[] specialMoveArgsR   = mData.specialMoveArgs;
            int   specialMoveArgsLen = specialMoveArgsR.Length;
            if (this.specialMoveArgs == null || this.specialMoveArgs.Length != specialMoveArgsLen)
            {
                this.specialMoveArgs = new int[specialMoveArgsLen];
            }
            BytesControl.arrayCopy(mData.specialMoveArgs, this.specialMoveArgs, specialMoveArgsLen);
        }
        else
        {
            this.specialMoveArgs = null;
        }

        this.specialMoveLastTime = mData.specialMoveLastTime;

        this.vehicleInstanceID = mData.vehicleInstanceID;

        if (mData.driveData != null)
        {
            this.driveData = (DriveData)mData.driveData.clone();
        }
        else
        {
            this.driveData = null;
        }

        if (mData.realMoveDir != null)
        {
            this.realMoveDir = (DirData)BytesControl.createData(DirData.dataID);
            this.realMoveDir.copy(mData.realMoveDir);
        }
        else
        {
            this.realMoveDir = null;
        }

        this.realMoveSpeedRatio = mData.realMoveSpeedRatio;
    }