示例#1
0
    /// <summary>
    /// 读取字节流(完整版)
    /// </summary>
    protected override void toReadBytesFull(BytesReadStream stream)
    {
        stream.startReadObj();

        stream.endReadObj();
    }
示例#2
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.data = (FriendData)stream.readDataSimpleNotNull();
    }
示例#3
0
    /// <summary>
    /// 读取字节流(完整版)
    /// </summary>
    protected override void toReadBytesFull(BytesReadStream stream)
    {
        base.toReadBytesFull(stream);

        stream.startReadObj();

        this.subsectionIndex = stream.readInt();

        this.subsectionSubIndex = stream.readInt();

        this.page = stream.readInt();

        this.arg = stream.readInt();

        if (stream.readBoolean())
        {
            int listLen = stream.readLen();
            if (this.list != null)
            {
                this.list.clear();
                this.list.ensureCapacity(listLen);
            }
            else
            {
                this.list = new SList <KeyData>();
            }

            SList <KeyData> listT = this.list;
            for (int listI = listLen - 1; listI >= 0; --listI)
            {
                KeyData listV;
                if (stream.readBoolean())
                {
                    BaseData listVT = stream.readDataFullNotNull();
                    if (listVT != null)
                    {
                        if (listVT is KeyData)
                        {
                            listV = (KeyData)listVT;
                        }
                        else
                        {
                            listV = new KeyData();
                            if (!(listVT.GetType().IsAssignableFrom(typeof(KeyData))))
                            {
                                stream.throwTypeReadError(typeof(KeyData), listVT.GetType());
                            }
                            listV.shadowCopy(listVT);
                        }
                    }
                    else
                    {
                        listV = null;
                    }
                }
                else
                {
                    listV = null;
                }

                listT.add(listV);
            }
        }
        else
        {
            this.list = null;
        }

        stream.endReadObj();
    }
示例#4
0
 /// <summary>
 /// 读取字节流(简版)
 /// </summary>
 protected override void toReadBytesSimple(BytesReadStream stream)
 {
     this.key = stream.readLong();
 }
示例#5
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.playerID = stream.readLong();
    }
示例#6
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.changeData = (RoleGroupChangeData)stream.readDataSimpleNotNull();
    }
示例#7
0
 /// <summary>
 /// 从流读取单个
 /// </summary>
 protected override void readBytesOne(int type, BytesReadStream stream)
 {
     base.readBytesOne(type, stream);
 }
示例#8
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.result = (QueryPlayerResultData)stream.readDataSimpleNotNull();
    }
示例#9
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.data = (InviteRoleGroupReceiveData)stream.readDataSimpleNotNull();
    }
示例#10
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.nextDailyTime = stream.readLong();
    }
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        this.data = (RoleSocialData)stream.readDataSimpleNotNull();

        this.time = stream.readLong();
    }
示例#12
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.roleData = (RoleShowData)stream.readDataSimpleNotNull();
    }
示例#13
0
    /// <summary>
    /// 读取字节流(完整版)
    /// </summary>
    protected override void toReadBytesFull(BytesReadStream stream)
    {
        stream.startReadObj();

        BaseData versionT = stream.readDataFullNotNull();

        if (versionT != null)
        {
            if (versionT is SaveVersionData)
            {
                this.version = (SaveVersionData)versionT;
            }
            else
            {
                this.version = new SaveVersionData();
                if (!(versionT.GetType().IsAssignableFrom(typeof(SaveVersionData))))
                {
                    stream.throwTypeReadError(typeof(SaveVersionData), versionT.GetType());
                }
                this.version.shadowCopy(versionT);
            }
        }
        else
        {
            this.version = null;
        }

        this.serverTime = stream.readLong();

        this.isBlock = stream.readBoolean();

        this.flowStep = stream.readInt();

        this.keepSave = (KeepSaveData)stream.createData(KeepSaveData.dataID);
        this.keepSave.readBytesFull(stream);

        if (stream.readBoolean())
        {
            int clientRandomSeedsLen = stream.readLen();
            if (this.clientRandomSeeds == null || this.clientRandomSeeds.Length != clientRandomSeedsLen)
            {
                this.clientRandomSeeds = new int[clientRandomSeedsLen];
            }
            int[] clientRandomSeedsT = this.clientRandomSeeds;
            for (int clientRandomSeedsI = 0; clientRandomSeedsI < clientRandomSeedsLen; ++clientRandomSeedsI)
            {
                int clientRandomSeedsV;
                clientRandomSeedsV = stream.readInt();

                clientRandomSeedsT[clientRandomSeedsI] = clientRandomSeedsV;
            }
        }
        else
        {
            this.clientRandomSeeds = null;
        }

        this.clientRandomSeedIndex = stream.readInt();

        this.clientOfflineWorkReceiveIndex = stream.readInt();

        if (stream.readBoolean())
        {
            int gmCommandSetLen = stream.readLen();
            if (this.gmCommandSet != null)
            {
                this.gmCommandSet.clear();
                this.gmCommandSet.ensureCapacity(gmCommandSetLen);
            }
            else
            {
                this.gmCommandSet = new SSet <string>();
            }

            SSet <string> gmCommandSetT = this.gmCommandSet;
            for (int gmCommandSetI = gmCommandSetLen - 1; gmCommandSetI >= 0; --gmCommandSetI)
            {
                string gmCommandSetV;
                gmCommandSetV = stream.readUTF();

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

        this.gmType = stream.readInt();

        this.serverBornCode = stream.readInt();

        this.serverStartTime = stream.readLong();

        int logQueueLen = stream.readLen();

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

        SQueue <InfoLogData> logQueueT = this.logQueue;

        for (int logQueueI = logQueueLen - 1; logQueueI >= 0; --logQueueI)
        {
            InfoLogData logQueueV;
            BaseData    logQueueVT = stream.readDataFullNotNull();
            if (logQueueVT != null)
            {
                if (logQueueVT is InfoLogData)
                {
                    logQueueV = (InfoLogData)logQueueVT;
                }
                else
                {
                    logQueueV = new InfoLogData();
                    if (!(logQueueVT.GetType().IsAssignableFrom(typeof(InfoLogData))))
                    {
                        stream.throwTypeReadError(typeof(InfoLogData), logQueueVT.GetType());
                    }
                    logQueueV.shadowCopy(logQueueVT);
                }
            }
            else
            {
                logQueueV = null;
            }

            logQueueT.offer(logQueueV);
        }

        this.nextDailyTime = stream.readLong();

        this.createDate = (DateData)stream.createData(DateData.dataID);
        this.createDate.readBytesFull(stream);

        this.clientRandomSeedKey = stream.readInt();

        stream.endReadObj();
    }
示例#14
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        this.version = (SaveVersionData)stream.readDataSimpleNotNull();

        this.serverTime = stream.readLong();

        this.isBlock = stream.readBoolean();

        this.flowStep = stream.readInt();

        this.keepSave = (KeepSaveData)stream.createData(KeepSaveData.dataID);
        this.keepSave.readBytesSimple(stream);

        if (stream.readBoolean())
        {
            int clientRandomSeedsLen = stream.readLen();
            if (this.clientRandomSeeds == null || this.clientRandomSeeds.Length != clientRandomSeedsLen)
            {
                this.clientRandomSeeds = new int[clientRandomSeedsLen];
            }
            int[] clientRandomSeedsT = this.clientRandomSeeds;
            for (int clientRandomSeedsI = 0; clientRandomSeedsI < clientRandomSeedsLen; ++clientRandomSeedsI)
            {
                int clientRandomSeedsV;
                clientRandomSeedsV = stream.readInt();

                clientRandomSeedsT[clientRandomSeedsI] = clientRandomSeedsV;
            }
        }
        else
        {
            this.clientRandomSeeds = null;
        }

        this.clientRandomSeedIndex = stream.readInt();

        this.clientOfflineWorkReceiveIndex = stream.readInt();

        if (stream.readBoolean())
        {
            int gmCommandSetLen = stream.readLen();
            if (this.gmCommandSet != null)
            {
                this.gmCommandSet.clear();
                this.gmCommandSet.ensureCapacity(gmCommandSetLen);
            }
            else
            {
                this.gmCommandSet = new SSet <string>();
            }

            SSet <string> gmCommandSetT = this.gmCommandSet;
            for (int gmCommandSetI = gmCommandSetLen - 1; gmCommandSetI >= 0; --gmCommandSetI)
            {
                string gmCommandSetV;
                gmCommandSetV = stream.readUTF();

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

        this.gmType = stream.readInt();

        this.serverBornCode = stream.readInt();

        this.serverStartTime = stream.readLong();

        int logQueueLen = stream.readLen();

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

        SQueue <InfoLogData> logQueueT = this.logQueue;

        for (int logQueueI = logQueueLen - 1; logQueueI >= 0; --logQueueI)
        {
            InfoLogData logQueueV;
            logQueueV = (InfoLogData)stream.readDataSimpleNotNull();

            logQueueT.offer(logQueueV);
        }

        this.nextDailyTime = stream.readLong();

        this.createDate = (DateData)stream.createData(DateData.dataID);
        this.createDate.readBytesSimple(stream);

        this.clientRandomSeedKey = stream.readInt();
    }
示例#15
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.bulletInstanceID = stream.readInt();
    }
示例#16
0
    /// <summary>
    /// 读取字节流(完整版)
    /// </summary>
    protected override void toReadBytesFull(BytesReadStream stream)
    {
        stream.startReadObj();

        this.id = stream.readInt();

        this.name = stream.readUTF();

        this.groupType = stream.readInt();

        this.groupID = stream.readInt();

        this.isOpen = stream.readBoolean();

        this.priority = stream.readInt();

        int eventsLen = stream.readLen();

        if (this.events == null || this.events.Length != eventsLen)
        {
            this.events = new TriggerFuncData[eventsLen];
        }
        TriggerFuncData[] eventsT = this.events;
        for (int eventsI = 0; eventsI < eventsLen; ++eventsI)
        {
            TriggerFuncData eventsV;
            BaseData        eventsVT = stream.readDataFullNotNull();
            if (eventsVT != null)
            {
                if (eventsVT is TriggerFuncData)
                {
                    eventsV = (TriggerFuncData)eventsVT;
                }
                else
                {
                    eventsV = new TriggerFuncData();
                    if (!(eventsVT.GetType().IsAssignableFrom(typeof(TriggerFuncData))))
                    {
                        stream.throwTypeReadError(typeof(TriggerFuncData), eventsVT.GetType());
                    }
                    eventsV.shadowCopy(eventsVT);
                }
            }
            else
            {
                eventsV = null;
            }

            eventsT[eventsI] = eventsV;
        }

        int conditionsLen = stream.readLen();

        if (this.conditions == null || this.conditions.Length != conditionsLen)
        {
            this.conditions = new TriggerFuncData[conditionsLen];
        }
        TriggerFuncData[] conditionsT = this.conditions;
        for (int conditionsI = 0; conditionsI < conditionsLen; ++conditionsI)
        {
            TriggerFuncData conditionsV;
            BaseData        conditionsVT = stream.readDataFullNotNull();
            if (conditionsVT != null)
            {
                if (conditionsVT is TriggerFuncData)
                {
                    conditionsV = (TriggerFuncData)conditionsVT;
                }
                else
                {
                    conditionsV = new TriggerFuncData();
                    if (!(conditionsVT.GetType().IsAssignableFrom(typeof(TriggerFuncData))))
                    {
                        stream.throwTypeReadError(typeof(TriggerFuncData), conditionsVT.GetType());
                    }
                    conditionsV.shadowCopy(conditionsVT);
                }
            }
            else
            {
                conditionsV = null;
            }

            conditionsT[conditionsI] = conditionsV;
        }

        int actionsLen = stream.readLen();

        if (this.actions == null || this.actions.Length != actionsLen)
        {
            this.actions = new TriggerFuncData[actionsLen];
        }
        TriggerFuncData[] actionsT = this.actions;
        for (int actionsI = 0; actionsI < actionsLen; ++actionsI)
        {
            TriggerFuncData actionsV;
            BaseData        actionsVT = stream.readDataFullNotNull();
            if (actionsVT != null)
            {
                if (actionsVT is TriggerFuncData)
                {
                    actionsV = (TriggerFuncData)actionsVT;
                }
                else
                {
                    actionsV = new TriggerFuncData();
                    if (!(actionsVT.GetType().IsAssignableFrom(typeof(TriggerFuncData))))
                    {
                        stream.throwTypeReadError(typeof(TriggerFuncData), actionsVT.GetType());
                    }
                    actionsV.shadowCopy(actionsVT);
                }
            }
            else
            {
                actionsV = null;
            }

            actionsT[actionsI] = actionsV;
        }

        stream.endReadObj();
    }
示例#17
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.enterData = (SceneEnterData)stream.readDataSimpleNotNull();
    }
示例#18
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.data = (PlayerApplyRoleGroupSelfData)stream.readDataSimpleNotNull();
    }
示例#19
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.level = stream.readInt();
    }
示例#20
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.id = stream.readInt();

        this.level = stream.readShort();

        this.scope = stream.readInt();

        int scopeArgsLen = stream.readLen();

        if (this.scopeArgs == null || this.scopeArgs.Length != scopeArgsLen)
        {
            this.scopeArgs = new float[scopeArgsLen];
        }
        float[] scopeArgsT = this.scopeArgs;
        for (int scopeArgsI = 0; scopeArgsI < scopeArgsLen; ++scopeArgsI)
        {
            float scopeArgsV;
            scopeArgsV = stream.readFloat();

            scopeArgsT[scopeArgsI] = scopeArgsV;
        }

        this.bullet = (DIntData)stream.createData(DIntData.dataID);
        this.bullet.readBytesSimple(stream);

        int damagesLen = stream.readLen();

        if (this.damages == null || this.damages.Length != damagesLen)
        {
            this.damages = new int[damagesLen][];
        }
        int[][] damagesT = this.damages;
        for (int damagesI = 0; damagesI < damagesLen; ++damagesI)
        {
            int[] damagesV;
            int   damagesVLen = stream.readLen();
            damagesV = new int[damagesVLen];
            int[] damagesVT = damagesV;
            for (int damagesVI = 0; damagesVI < damagesVLen; ++damagesVI)
            {
                int damagesVV;
                damagesVV = stream.readInt();

                damagesVT[damagesVI] = damagesVV;
            }

            damagesT[damagesI] = damagesV;
        }

        this.addBuffProbID = stream.readInt();

        int addBuffsLen = stream.readLen();

        if (this.addBuffs == null || this.addBuffs.Length != addBuffsLen)
        {
            this.addBuffs = new DIntData[addBuffsLen];
        }
        DIntData[] addBuffsT = this.addBuffs;
        for (int addBuffsI = 0; addBuffsI < addBuffsLen; ++addBuffsI)
        {
            DIntData addBuffsV;
            addBuffsV = (DIntData)stream.createData(DIntData.dataID);
            addBuffsV.readBytesSimple(stream);

            addBuffsT[addBuffsI] = addBuffsV;
        }

        int momentActionsLen = stream.readLen();

        if (this.momentActions == null || this.momentActions.Length != momentActionsLen)
        {
            this.momentActions = new int[momentActionsLen][];
        }
        int[][] momentActionsT = this.momentActions;
        for (int momentActionsI = 0; momentActionsI < momentActionsLen; ++momentActionsI)
        {
            int[] momentActionsV;
            int   momentActionsVLen = stream.readLen();
            momentActionsV = new int[momentActionsVLen];
            int[] momentActionsVT = momentActionsV;
            for (int momentActionsVI = 0; momentActionsVI < momentActionsVLen; ++momentActionsVI)
            {
                int momentActionsVV;
                momentActionsVV = stream.readInt();

                momentActionsVT[momentActionsVI] = momentActionsVV;
            }

            momentActionsT[momentActionsI] = momentActionsV;
        }

        this.spasticityValue = stream.readInt();

        this.attackBlowForce = stream.readInt();

        this.attackPushForce = stream.readInt();

        this.attackLiePushForce = stream.readInt();
    }
示例#21
0
 /// <summary>
 /// 读取全局配置表
 /// </summary>
 protected override void readGlobal(BytesReadStream stream)
 {
     global = new HGlobalReadData();
     global.readBytesSimple(stream);
 }
示例#22
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        this.ownPlayerNum = stream.readInt();

        this.playerNameLength = stream.readInt();

        this.isNameUseAreaIDAsFront = stream.readBoolean();

        this.canPlayerNameRepeat = stream.readBoolean();

        this.clientOfflineWorkTimeChangeDailyNum = stream.readInt();

        this.showNetDelayMinTime = stream.readInt();

        this.showNetDelayMaxTime = stream.readInt();

        this.activationCodeLength = stream.readInt();

        this.activationCodeUseBatch = stream.readBoolean();

        this.infoLogKeepTime = stream.readInt();

        this.infoLogKeepNum = stream.readInt();

        this.clientRandomSeedNum = stream.readInt();

        this.pageToolShowCD = stream.readInt();

        this.bigFloatWei = stream.readInt();

        this.posSendScale = stream.readFloat();

        this.directionSendScale = stream.readFloat();

        this.keepCurrentPercentAtMaxChange = stream.readBoolean();

        this.unitTurnXYSumMin = stream.readFloat();

        this.unitMovePosMaxDeviation = stream.readFloat();

        this.distanceCheckDeviation = stream.readFloat();

        this.moveSpeedMin = stream.readInt();

        this.moveSpeedMax = stream.readInt();

        this.attackSpeedMin = stream.readInt();

        this.attackSpeedMax = stream.readInt();

        this.castSpeedMin = stream.readInt();

        this.castSpeedMax = stream.readInt();

        this.useMoveSpeedRatio = stream.readFloat();

        this.hitRateArg0 = stream.readFloat();

        this.critArg0 = stream.readFloat();

        this.critDamageBaseRatio = stream.readFloat();

        this.bulletMaxLastTime = stream.readInt();

        this.sceneKeepTime = stream.readInt();

        this.attackScopeBackLength = stream.readFloat();

        this.attackScopeDefaultHeight = stream.readFloat();

        this.defaultShowFps = stream.readFloat();

        this.frameSyncCacheFrames = stream.readInt();

        this.wanderWaitTimeMin = stream.readInt();

        this.wanderWaitTimeMax = stream.readInt();

        this.wanderMoveRadius = stream.readFloat();

        this.preventNetDelayTime = stream.readInt();

        this.increaseAttributeDelay = stream.readInt();

        this.clientMoveSendMinDelay = stream.readInt();

        this.moveDirSendDelay = stream.readInt();

        this.moveDirForecastTime = stream.readInt();

        this.moveDirForecastMinDistance = stream.readFloat();

        this.mapBlockSize = stream.readFloat();

        this.mapSamplePositionRadius = stream.readFloat();

        this.monsterBackAddHPPercent = stream.readInt();

        this.ringLightBuffRefreshTime = stream.readInt();

        this.ringLightBuffLastTime = stream.readInt();

        this.fightStateOnceLastTime = stream.readInt();

        this.wakeUpCompanionDelayTime = stream.readInt();

        this.damageValueUseRealDamage = stream.readBoolean();

        this.unitBeAttackDelay = stream.readInt();

        this.unitHateDamagePercentRatio = stream.readFloat();

        this.unitSwitchHateCost = stream.readFloat();

        this.unitSwitchDistanceCost = stream.readFloat();

        this.unitSwitchBaseDistance = stream.readFloat();

        this.unitSwitchFixedCost = stream.readFloat();

        this.sceneLineNum = stream.readInt();

        this.sceneLinePlayerLimitNum = stream.readInt();

        this.bornTownID = stream.readInt();

        this.bornTownPosID = stream.readInt();

        this.matchWaitTime = stream.readInt();

        this.aoiTowerSize = stream.readFloat();

        this.aoiTowerExpandSize = stream.readFloat();

        this.aoiSeeMax = stream.readInt();

        this.pickUpRadius = stream.readFloat();

        this.cameraMinDistance = stream.readFloat();

        this.cameraMaxDistance = stream.readFloat();

        this.camera25DAngle = stream.readFloat();

        this.cameraMinAxisXAngle = stream.readFloat();

        this.cameraMaxAxisXAngle = stream.readFloat();

        this.cameraTweenTime = stream.readFloat();

        this.cameraWheelSpeed = stream.readFloat();

        this.cameraDefaultDistance = stream.readFloat();

        this.cameraRotateSpeedX = stream.readFloat();

        this.cameraRotateSpeedY = stream.readFloat();

        this.cameraScaleSpeed = stream.readFloat();

        this.levelMax = stream.readInt();

        this.mainBagGridNum = stream.readInt();

        this.mailPageEachShowNum = stream.readInt();

        this.mailSaveMaxNum = stream.readInt();

        this.mailSaveMaxTime = stream.readInt();

        this.playerMailID = stream.readInt();

        this.questCanSeeLevelD = stream.readInt();

        this.questConfigChangeVersion = stream.readInt();

        this.useOvonicFriend = stream.readBoolean();

        this.friendMaxNum = stream.readInt();

        this.friendBlackListMaxNum = stream.readInt();

        this.applyAddFriendMaxNum = stream.readInt();

        this.friendApplySaveMaxTime = stream.readInt();

        this.unionRoleGroupID = stream.readInt();

        this.teamRoleGroupID = stream.readInt();

        this.teamShareRadius = stream.readFloat();

        this.isPetUnique = stream.readBoolean();

        this.isPetNeedEquip = stream.readBoolean();
    }
示例#23
0
        public override void readBytes(BytesReadStream stream)
        {
            base.readBytes(stream);

            md5 = stream.readUTF();
        }
示例#24
0
 /// <summary>
 /// 读取字节流(简版)
 /// </summary>
 protected override void toReadBytesSimple(BytesReadStream stream)
 {
     this.belongPlayerID = stream.readLong();
 }
示例#25
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        this.num = stream.readInt();

        this.total = stream.readLong();
    }
示例#26
0
    /// <summary>
    /// 读取字节流(完整版)
    /// </summary>
    protected override void toReadBytesFull(BytesReadStream stream)
    {
        stream.startReadObj();

        int statusLen = stream.readLen();

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

        IntBooleanMap statusT = this.status;

        for (int statusI = statusLen - 1; statusI >= 0; --statusI)
        {
            int  statusK;
            bool statusV;
            statusK = stream.readInt();

            statusV = stream.readBoolean();

            statusT.put(statusK, statusV);
        }

        int attributesLen = stream.readLen();

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

        IntIntMap attributesT = this.attributes;

        for (int attributesI = attributesLen - 1; attributesI >= 0; --attributesI)
        {
            int attributesK;
            int attributesV;
            attributesK = stream.readInt();

            attributesV = stream.readInt();

            attributesT.put(attributesK, attributesV);
        }

        int skillsLen = stream.readLen();

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

        IntObjectMap <SkillData> skillsT = this.skills;

        for (int skillsI = skillsLen - 1; skillsI >= 0; --skillsI)
        {
            SkillData skillsV;
            BaseData  skillsVT = stream.readDataFullNotNull();
            if (skillsVT != null)
            {
                if (skillsVT is SkillData)
                {
                    skillsV = (SkillData)skillsVT;
                }
                else
                {
                    skillsV = new SkillData();
                    if (!(skillsVT.GetType().IsAssignableFrom(typeof(SkillData))))
                    {
                        stream.throwTypeReadError(typeof(SkillData), skillsVT.GetType());
                    }
                    skillsV.shadowCopy(skillsVT);
                }
            }
            else
            {
                skillsV = null;
            }

            skillsT.put(skillsV.id, skillsV);
        }

        int buffsLen = stream.readLen();

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

        IntObjectMap <BuffData> buffsT = this.buffs;

        for (int buffsI = buffsLen - 1; buffsI >= 0; --buffsI)
        {
            BuffData buffsV;
            BaseData buffsVT = stream.readDataFullNotNull();
            if (buffsVT != null)
            {
                if (buffsVT is BuffData)
                {
                    buffsV = (BuffData)buffsVT;
                }
                else
                {
                    buffsV = new BuffData();
                    if (!(buffsVT.GetType().IsAssignableFrom(typeof(BuffData))))
                    {
                        stream.throwTypeReadError(typeof(BuffData), buffsVT.GetType());
                    }
                    buffsV.shadowCopy(buffsVT);
                }
            }
            else
            {
                buffsV = null;
            }

            buffsT.put(buffsV.instanceID, buffsV);
        }

        int cdsLen = stream.readLen();

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

        IntObjectMap <CDData> cdsT = this.cds;

        for (int cdsI = cdsLen - 1; cdsI >= 0; --cdsI)
        {
            CDData cdsV;
            cdsV = (CDData)stream.createData(CDData.dataID);
            cdsV.readBytesFull(stream);

            cdsT.put(cdsV.id, cdsV);
        }

        stream.endReadObj();
    }
示例#27
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.role = (PlayerLoginData)stream.readDataSimpleNotNull();
    }
示例#28
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        int statusLen = stream.readLen();

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

        IntBooleanMap statusT = this.status;

        for (int statusI = statusLen - 1; statusI >= 0; --statusI)
        {
            int  statusK;
            bool statusV;
            statusK = stream.readInt();

            statusV = stream.readBoolean();

            statusT.put(statusK, statusV);
        }

        int attributesLen = stream.readLen();

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

        IntIntMap attributesT = this.attributes;

        for (int attributesI = attributesLen - 1; attributesI >= 0; --attributesI)
        {
            int attributesK;
            int attributesV;
            attributesK = stream.readInt();

            attributesV = stream.readInt();

            attributesT.put(attributesK, attributesV);
        }

        int skillsLen = stream.readLen();

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

        IntObjectMap <SkillData> skillsT = this.skills;

        for (int skillsI = skillsLen - 1; skillsI >= 0; --skillsI)
        {
            SkillData skillsV;
            skillsV = (SkillData)stream.readDataSimpleNotNull();

            skillsT.put(skillsV.id, skillsV);
        }

        int buffsLen = stream.readLen();

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

        IntObjectMap <BuffData> buffsT = this.buffs;

        for (int buffsI = buffsLen - 1; buffsI >= 0; --buffsI)
        {
            BuffData buffsV;
            buffsV = (BuffData)stream.readDataSimpleNotNull();

            buffsT.put(buffsV.instanceID, buffsV);
        }

        int cdsLen = stream.readLen();

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

        IntObjectMap <CDData> cdsT = this.cds;

        for (int cdsI = cdsLen - 1; cdsI >= 0; --cdsI)
        {
            CDData cdsV;
            cdsV = (CDData)stream.createData(CDData.dataID);
            cdsV.readBytesSimple(stream);

            cdsT.put(cdsV.id, cdsV);
        }
    }
示例#29
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.id = stream.readInt();

        this.name = stream.readUTF();

        this.existType = stream.readInt();

        this.packageName = stream.readUTF();

        this.layer = stream.readInt();

        int doMomentsLen = stream.readLen();

        if (this.doMoments == null || this.doMoments.Length != doMomentsLen)
        {
            this.doMoments = new int[doMomentsLen];
        }
        int[] doMomentsT = this.doMoments;
        for (int doMomentsI = 0; doMomentsI < doMomentsLen; ++doMomentsI)
        {
            int doMomentsV;
            doMomentsV = stream.readInt();

            doMomentsT[doMomentsI] = doMomentsV;
        }

        int showConditionsLen = stream.readLen();

        if (this.showConditions == null || this.showConditions.Length != showConditionsLen)
        {
            this.showConditions = new int[showConditionsLen][];
        }
        int[][] showConditionsT = this.showConditions;
        for (int showConditionsI = 0; showConditionsI < showConditionsLen; ++showConditionsI)
        {
            int[] showConditionsV;
            int   showConditionsVLen = stream.readLen();
            showConditionsV = new int[showConditionsVLen];
            int[] showConditionsVT = showConditionsV;
            for (int showConditionsVI = 0; showConditionsVI < showConditionsVLen; ++showConditionsVI)
            {
                int showConditionsVV;
                showConditionsVV = stream.readInt();

                showConditionsVT[showConditionsVI] = showConditionsVV;
            }

            showConditionsT[showConditionsI] = showConditionsV;
        }

        this.isModal = stream.readBoolean();

        this.modalColor = stream.readUTF();

        int activityIDsLen = stream.readLen();

        if (this.activityIDs == null || this.activityIDs.Length != activityIDsLen)
        {
            this.activityIDs = new int[activityIDsLen];
        }
        int[] activityIDsT = this.activityIDs;
        for (int activityIDsI = 0; activityIDsI < activityIDsLen; ++activityIDsI)
        {
            int activityIDsV;
            activityIDsV = stream.readInt();

            activityIDsT[activityIDsI] = activityIDsV;
        }

        int functionIDsLen = stream.readLen();

        if (this.functionIDs == null || this.functionIDs.Length != functionIDsLen)
        {
            this.functionIDs = new int[functionIDsLen];
        }
        int[] functionIDsT = this.functionIDs;
        for (int functionIDsI = 0; functionIDsI < functionIDsLen; ++functionIDsI)
        {
            int functionIDsV;
            functionIDsV = stream.readInt();

            functionIDsT[functionIDsI] = functionIDsV;
        }
    }
示例#30
0
    /// <summary>
    /// 读取字节流(简版)
    /// </summary>
    protected override void toReadBytesSimple(BytesReadStream stream)
    {
        base.toReadBytesSimple(stream);

        this.id = stream.readInt();

        this.name = stream.readUTF();

        this.type = stream.readInt();

        this.secondType = stream.readInt();

        this.singlePlusMax = stream.readInt();

        this.totalPlusMax = stream.readInt();

        this.itemLevel = stream.readInt();

        this.limitLevel = stream.readInt();

        int limitVocationsLen = stream.readLen();

        if (this.limitVocations == null || this.limitVocations.Length != limitVocationsLen)
        {
            this.limitVocations = new int[limitVocationsLen];
        }
        int[] limitVocationsT = this.limitVocations;
        for (int limitVocationsI = 0; limitVocationsI < limitVocationsLen; ++limitVocationsI)
        {
            int limitVocationsV;
            limitVocationsV = stream.readInt();

            limitVocationsT[limitVocationsI] = limitVocationsV;
        }

        this.bindByGet = stream.readBoolean();

        this.bindByUse = stream.readBoolean();

        this.canTrade = stream.readBoolean();

        this.sellPrice = stream.readInt();

        this.needRedPoint = stream.readBoolean();

        this.sortIndex = stream.readInt();

        this.icon = stream.readUTF();

        this.fieldItemModelID = stream.readInt();

        this.explain = stream.readUTF();

        this.enableTime = stream.readUTF();

        this.isUnique = stream.readBoolean();

        int baseAttributesLen = stream.readLen();

        if (this.baseAttributes == null || this.baseAttributes.Length != baseAttributesLen)
        {
            this.baseAttributes = new DIntData[baseAttributesLen];
        }
        DIntData[] baseAttributesT = this.baseAttributes;
        for (int baseAttributesI = 0; baseAttributesI < baseAttributesLen; ++baseAttributesI)
        {
            DIntData baseAttributesV;
            baseAttributesV = (DIntData)stream.createData(DIntData.dataID);
            baseAttributesV.readBytesSimple(stream);

            baseAttributesT[baseAttributesI] = baseAttributesV;
        }

        int equipActionsLen = stream.readLen();

        if (this.equipActions == null || this.equipActions.Length != equipActionsLen)
        {
            this.equipActions = new int[equipActionsLen][];
        }
        int[][] equipActionsT = this.equipActions;
        for (int equipActionsI = 0; equipActionsI < equipActionsLen; ++equipActionsI)
        {
            int[] equipActionsV;
            int   equipActionsVLen = stream.readLen();
            equipActionsV = new int[equipActionsVLen];
            int[] equipActionsVT = equipActionsV;
            for (int equipActionsVI = 0; equipActionsVI < equipActionsVLen; ++equipActionsVI)
            {
                int equipActionsVV;
                equipActionsVV = stream.readInt();

                equipActionsVT[equipActionsVI] = equipActionsVV;
            }

            equipActionsT[equipActionsI] = equipActionsV;
        }

        int useConditionsLen = stream.readLen();

        if (this.useConditions == null || this.useConditions.Length != useConditionsLen)
        {
            this.useConditions = new int[useConditionsLen][];
        }
        int[][] useConditionsT = this.useConditions;
        for (int useConditionsI = 0; useConditionsI < useConditionsLen; ++useConditionsI)
        {
            int[] useConditionsV;
            int   useConditionsVLen = stream.readLen();
            useConditionsV = new int[useConditionsVLen];
            int[] useConditionsVT = useConditionsV;
            for (int useConditionsVI = 0; useConditionsVI < useConditionsVLen; ++useConditionsVI)
            {
                int useConditionsVV;
                useConditionsVV = stream.readInt();

                useConditionsVT[useConditionsVI] = useConditionsVV;
            }

            useConditionsT[useConditionsI] = useConditionsV;
        }

        int useActionsLen = stream.readLen();

        if (this.useActions == null || this.useActions.Length != useActionsLen)
        {
            this.useActions = new int[useActionsLen][];
        }
        int[][] useActionsT = this.useActions;
        for (int useActionsI = 0; useActionsI < useActionsLen; ++useActionsI)
        {
            int[] useActionsV;
            int   useActionsVLen = stream.readLen();
            useActionsV = new int[useActionsVLen];
            int[] useActionsVT = useActionsV;
            for (int useActionsVI = 0; useActionsVI < useActionsVLen; ++useActionsVI)
            {
                int useActionsVV;
                useActionsVV = stream.readInt();

                useActionsVT[useActionsVI] = useActionsVV;
            }

            useActionsT[useActionsI] = useActionsV;
        }

        this.passEnterBag = stream.readBoolean();

        this.useCostItemNum = stream.readBoolean();

        this.progressBarID = stream.readInt();

        this.tradeDefaultPrice = stream.readInt();

        this.tradePriceMin = stream.readInt();

        this.tradePriceMax = stream.readInt();
    }