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;
        }
    }
Exemple #2
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is SkillTargetData))
        {
            return;
        }

        SkillTargetData mData = (SkillTargetData)data;

        this.type = mData.type;

        this.targetInstanceID = mData.targetInstanceID;

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

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

        this.arg = mData.arg;
    }
Exemple #3
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is DamageOneData))
        {
            return;
        }

        DamageOneData mData = (DamageOneData)data;

        this.instanceID = mData.instanceID;

        this.isHit = mData.isHit;

        this.isCrit = mData.isCrit;

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

            SList <DIntData> damagesT = this.damages;
            if (!mData.damages.isEmpty())
            {
                DIntData[] damagesVValues = mData.damages.getValues();
                for (int damagesVI = 0, damagesVLen = mData.damages.length(); damagesVI < damagesVLen; ++damagesVI)
                {
                    DIntData damagesV = damagesVValues[damagesVI];
                    DIntData damagesU;
                    if (damagesV != null)
                    {
                        damagesU = (DIntData)BytesControl.createData(DIntData.dataID);
                        damagesU.copy(damagesV);
                    }
                    else
                    {
                        damagesU = null;
                        nullObjError("damagesU");
                    }

                    damagesT.add(damagesU);
                }
            }
        }
        else
        {
            this.damages = null;
            nullObjError("damages");
        }

        this.isKilled = mData.isKilled;

        this.arg = mData.arg;
    }
Exemple #4
0
    protected override void copyData()
    {
        base.copyData();
        SkillTargetData targetDataTemp = targetData;

        if (targetDataTemp != null)
        {
            this.targetData = (SkillTargetData)targetDataTemp.clone();
        }
        else
        {
            this.targetData = null;
            nullObjError("targetData");
        }

        PosDirData posDirTemp = posDir;

        if (posDirTemp != null)
        {
            this.posDir = (PosDirData)BytesControl.createData(PosDirData.dataID);
            this.posDir.copy(posDirTemp);
        }
        else
        {
            this.posDir = null;
            nullObjError("posDir");
        }
    }
Exemple #5
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");
        }
    }
    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");
        }
    }
Exemple #7
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");
        }
    }
    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;
        }

        SList <PosData> targetsTemp = targets;

        if (targetsTemp != null)
        {
            this.targets = new SList <PosData>();
            SList <PosData> targetsT = this.targets;
            if (!targetsTemp.isEmpty())
            {
                PosData[] targetsVValues = targetsTemp.getValues();
                for (int targetsVI = 0, targetsVLen = targetsTemp.length(); targetsVI < targetsVLen; ++targetsVI)
                {
                    PosData targetsV = targetsVValues[targetsVI];
                    PosData targetsU;
                    if (targetsV != null)
                    {
                        targetsU = (PosData)BytesControl.createData(PosData.dataID);
                        targetsU.copy(targetsV);
                    }
                    else
                    {
                        targetsU = null;
                        nullObjError("targetsU");
                    }

                    targetsT.add(targetsU);
                }
            }
        }
        else
        {
            this.targets = null;
            nullObjError("targets");
        }
    }
Exemple #9
0
    protected override void copyData()
    {
        base.copyData();
        DirData dirTemp = dir;

        if (dirTemp != null)
        {
            this.dir = (DirData)BytesControl.createData(DirData.dataID);
            this.dir.copy(dirTemp);
        }
        else
        {
            this.dir = null;
        }
    }
    protected override void copyData()
    {
        base.copyData();
        PosData posTemp = pos;

        if (posTemp != null)
        {
            this.pos = (PosData)BytesControl.createData(PosData.dataID);
            this.pos.copy(posTemp);
        }
        else
        {
            this.pos = null;
            nullObjError("pos");
        }
    }
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is ClientPlayerLocalCacheData))
        {
            return;
        }

        ClientPlayerLocalCacheData mData = (ClientPlayerLocalCacheData)data;

        if (mData.keep != null)
        {
            this.keep = (KeepSaveData)BytesControl.createData(KeepSaveData.dataID);
            this.keep.copy(mData.keep);
        }
        else
        {
            this.keep = null;
            nullObjError("keep");
        }
    }
Exemple #12
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;
        }
    }
Exemple #13
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        base.toCopy(data);

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

        GUnitPosData mData = (GUnitPosData)data;

        if (mData.shootDir != null)
        {
            this.shootDir = (DirData)BytesControl.createData(DirData.dataID);
            this.shootDir.copy(mData.shootDir);
        }
        else
        {
            this.shootDir = null;
        }
    }
    protected override void copyData()
    {
        base.copyData();
        PosData posTemp = pos;

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

        DirData dirTemp = dir;

        if (dirTemp != null)
        {
            this.dir = (DirData)BytesControl.createData(DirData.dataID);
            this.dir.copy(dirTemp);
        }
        else
        {
            this.dir = null;
            nullObjError("dir");
        }

        DirData realDirTemp = realDir;

        if (realDirTemp != null)
        {
            this.realDir = (DirData)BytesControl.createData(DirData.dataID);
            this.realDir.copy(realDirTemp);
        }
        else
        {
            this.realDir = null;
        }
    }
Exemple #15
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is UnitFightData))
        {
            return;
        }

        UnitFightData mData = (UnitFightData)data;

        if (mData.status != null)
        {
            if (this.status != null)
            {
                this.status.clear();
                this.status.ensureCapacity(mData.status.size());
            }
            else
            {
                this.status = new IntBooleanMap(mData.status.size());
            }

            IntBooleanMap statusT = this.status;
            if (!mData.status.isEmpty())
            {
                int    statusKFreeValue = mData.status.getFreeValue();
                int[]  statusKKeys      = mData.status.getKeys();
                bool[] statusVValues    = mData.status.getValues();
                for (int statusKI = statusKKeys.Length - 1; statusKI >= 0; --statusKI)
                {
                    int statusK = statusKKeys[statusKI];
                    if (statusK != statusKFreeValue)
                    {
                        bool statusV = statusVValues[statusKI];
                        int  statusW;
                        bool statusU;
                        statusW = statusK;

                        statusU = statusV;

                        statusT.put(statusW, statusU);
                    }
                }
            }
        }
        else
        {
            this.status = null;
            nullObjError("status");
        }

        if (mData.attributes != null)
        {
            if (this.attributes != null)
            {
                this.attributes.clear();
                this.attributes.ensureCapacity(mData.attributes.size());
            }
            else
            {
                this.attributes = new IntIntMap(mData.attributes.size());
            }

            IntIntMap attributesT = this.attributes;
            if (!mData.attributes.isEmpty())
            {
                int   attributesKFreeValue = mData.attributes.getFreeValue();
                int[] attributesKKeys      = mData.attributes.getKeys();
                int[] attributesVValues    = mData.attributes.getValues();
                for (int attributesKI = attributesKKeys.Length - 1; attributesKI >= 0; --attributesKI)
                {
                    int attributesK = attributesKKeys[attributesKI];
                    if (attributesK != attributesKFreeValue)
                    {
                        int attributesV = attributesVValues[attributesKI];
                        int attributesW;
                        int attributesU;
                        attributesW = attributesK;

                        attributesU = attributesV;

                        attributesT.put(attributesW, attributesU);
                    }
                }
            }
        }
        else
        {
            this.attributes = null;
            nullObjError("attributes");
        }

        if (mData.skills != null)
        {
            if (this.skills != null)
            {
                this.skills.clear();
                this.skills.ensureCapacity(mData.skills.size());
            }
            else
            {
                this.skills = new IntObjectMap <SkillData>(mData.skills.size());
            }

            IntObjectMap <SkillData> skillsT = this.skills;
            if (!mData.skills.isEmpty())
            {
                SkillData[] skillsVValues = mData.skills.getValues();
                for (int skillsVI = skillsVValues.Length - 1; skillsVI >= 0; --skillsVI)
                {
                    SkillData skillsV = skillsVValues[skillsVI];
                    if (skillsV != null)
                    {
                        SkillData skillsU;
                        if (skillsV != null)
                        {
                            skillsU = (SkillData)skillsV.clone();
                        }
                        else
                        {
                            skillsU = null;
                            nullObjError("skillsU");
                        }

                        skillsT.put(skillsU.id, skillsU);
                    }
                }
            }
        }
        else
        {
            this.skills = null;
            nullObjError("skills");
        }

        if (mData.buffs != null)
        {
            if (this.buffs != null)
            {
                this.buffs.clear();
                this.buffs.ensureCapacity(mData.buffs.size());
            }
            else
            {
                this.buffs = new IntObjectMap <BuffData>(mData.buffs.size());
            }

            IntObjectMap <BuffData> buffsT = this.buffs;
            if (!mData.buffs.isEmpty())
            {
                BuffData[] buffsVValues = mData.buffs.getValues();
                for (int buffsVI = buffsVValues.Length - 1; buffsVI >= 0; --buffsVI)
                {
                    BuffData buffsV = buffsVValues[buffsVI];
                    if (buffsV != null)
                    {
                        BuffData buffsU;
                        if (buffsV != null)
                        {
                            buffsU = (BuffData)buffsV.clone();
                        }
                        else
                        {
                            buffsU = null;
                            nullObjError("buffsU");
                        }

                        buffsT.put(buffsU.instanceID, buffsU);
                    }
                }
            }
        }
        else
        {
            this.buffs = null;
            nullObjError("buffs");
        }

        if (mData.cds != null)
        {
            if (this.cds != null)
            {
                this.cds.clear();
                this.cds.ensureCapacity(mData.cds.size());
            }
            else
            {
                this.cds = new IntObjectMap <CDData>(mData.cds.size());
            }

            IntObjectMap <CDData> cdsT = this.cds;
            if (!mData.cds.isEmpty())
            {
                CDData[] cdsVValues = mData.cds.getValues();
                for (int cdsVI = cdsVValues.Length - 1; cdsVI >= 0; --cdsVI)
                {
                    CDData cdsV = cdsVValues[cdsVI];
                    if (cdsV != null)
                    {
                        CDData cdsU;
                        if (cdsV != null)
                        {
                            cdsU = (CDData)BytesControl.createData(CDData.dataID);
                            cdsU.copy(cdsV);
                        }
                        else
                        {
                            cdsU = null;
                            nullObjError("cdsU");
                        }

                        cdsT.put(cdsU.id, cdsU);
                    }
                }
            }
        }
        else
        {
            this.cds = null;
            nullObjError("cds");
        }
    }
Exemple #16
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;
    }
Exemple #17
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is MUnitCacheData))
        {
            return;
        }

        MUnitCacheData mData = (MUnitCacheData)data;

        if (mData.currentAttributes != null)
        {
            if (this.currentAttributes != null)
            {
                this.currentAttributes.clear();
                this.currentAttributes.ensureCapacity(mData.currentAttributes.size());
            }
            else
            {
                this.currentAttributes = new IntIntMap(mData.currentAttributes.size());
            }

            IntIntMap currentAttributesT = this.currentAttributes;
            if (!mData.currentAttributes.isEmpty())
            {
                int   currentAttributesKFreeValue = mData.currentAttributes.getFreeValue();
                int[] currentAttributesKKeys      = mData.currentAttributes.getKeys();
                int[] currentAttributesVValues    = mData.currentAttributes.getValues();
                for (int currentAttributesKI = currentAttributesKKeys.Length - 1; currentAttributesKI >= 0; --currentAttributesKI)
                {
                    int currentAttributesK = currentAttributesKKeys[currentAttributesKI];
                    if (currentAttributesK != currentAttributesKFreeValue)
                    {
                        int currentAttributesV = currentAttributesVValues[currentAttributesKI];
                        int currentAttributesW;
                        int currentAttributesU;
                        currentAttributesW = currentAttributesK;

                        currentAttributesU = currentAttributesV;

                        currentAttributesT.put(currentAttributesW, currentAttributesU);
                    }
                }
            }
        }
        else
        {
            this.currentAttributes = null;
            nullObjError("currentAttributes");
        }

        if (mData.buffs != null)
        {
            if (this.buffs != null)
            {
                this.buffs.clear();
                this.buffs.ensureCapacity(mData.buffs.size());
            }
            else
            {
                this.buffs = new IntObjectMap <BuffData>(mData.buffs.size());
            }

            IntObjectMap <BuffData> buffsT = this.buffs;
            if (!mData.buffs.isEmpty())
            {
                BuffData[] buffsVValues = mData.buffs.getValues();
                for (int buffsVI = buffsVValues.Length - 1; buffsVI >= 0; --buffsVI)
                {
                    BuffData buffsV = buffsVValues[buffsVI];
                    if (buffsV != null)
                    {
                        BuffData buffsU;
                        if (buffsV != null)
                        {
                            buffsU = (BuffData)buffsV.clone();
                        }
                        else
                        {
                            buffsU = null;
                            nullObjError("buffsU");
                        }

                        buffsT.put(buffsU.instanceID, buffsU);
                    }
                }
            }
        }
        else
        {
            this.buffs = null;
            nullObjError("buffs");
        }

        if (mData.cds != null)
        {
            if (this.cds != null)
            {
                this.cds.clear();
                this.cds.ensureCapacity(mData.cds.size());
            }
            else
            {
                this.cds = new IntObjectMap <CDData>(mData.cds.size());
            }

            IntObjectMap <CDData> cdsT = this.cds;
            if (!mData.cds.isEmpty())
            {
                CDData[] cdsVValues = mData.cds.getValues();
                for (int cdsVI = cdsVValues.Length - 1; cdsVI >= 0; --cdsVI)
                {
                    CDData cdsV = cdsVValues[cdsVI];
                    if (cdsV != null)
                    {
                        CDData cdsU;
                        if (cdsV != null)
                        {
                            cdsU = (CDData)BytesControl.createData(CDData.dataID);
                            cdsU.copy(cdsV);
                        }
                        else
                        {
                            cdsU = null;
                            nullObjError("cdsU");
                        }

                        cdsT.put(cdsU.id, cdsU);
                    }
                }
            }
        }
        else
        {
            this.cds = null;
            nullObjError("cds");
        }

        this.cacheTime = mData.cacheTime;
    }
Exemple #18
0
    /// <summary>
    /// 复制(深拷贝)
    /// </summary>
    protected override void toCopy(BaseData data)
    {
        if (!(data is ClientLoginResultData))
        {
            return;
        }

        ClientLoginResultData mData = (ClientLoginResultData)data;

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

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

        if (mData.areas != null)
        {
            if (this.areas != null)
            {
                this.areas.clear();
                this.areas.ensureCapacity(mData.areas.size());
            }
            else
            {
                this.areas = new IntObjectMap <AreaClientData>(mData.areas.size());
            }

            IntObjectMap <AreaClientData> areasT = this.areas;
            if (!mData.areas.isEmpty())
            {
                AreaClientData[] areasVValues = mData.areas.getValues();
                for (int areasVI = areasVValues.Length - 1; areasVI >= 0; --areasVI)
                {
                    AreaClientData areasV = areasVValues[areasVI];
                    if (areasV != null)
                    {
                        AreaClientData areasU;
                        if (areasV != null)
                        {
                            areasU = (AreaClientData)areasV.clone();
                        }
                        else
                        {
                            areasU = null;
                        }

                        areasT.put(areasU.areaID, areasU);
                    }
                }
            }
        }
        else
        {
            this.areas = null;
        }

        this.lastAreaID = mData.lastAreaID;

        if (mData.gameInfo != null)
        {
            this.gameInfo = (ClientLoginServerInfoData)mData.gameInfo.clone();
        }
        else
        {
            this.gameInfo = null;
        }
    }
Exemple #19
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;
    }