Ejemplo n.º 1
0
 public void Deserizle(RPC.DataReader dr)
 {
     for (var i = eElemType.Gold; i < eElemType.MAX; i++)
     {
         SetSecondAttrBase(eValueType.Image, CommonUtil.ElemTypeTranslate(i), (int)dr.ReadSingle());
     }
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.Def_All, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.MaxHPRate, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.MaxHP, dr.ReadInt32());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.MaxMP, dr.ReadInt32());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.Atk, dr.ReadInt32());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.Crit, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.CritRate, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.CritDef, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.CritDefRate, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.DeadlyHit, dr.ReadInt32());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.DeadlyHitRate, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.Hit, dr.ReadInt32());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.Dodge, dr.ReadInt32());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.UpHurt, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.DownHurt, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.UnusualDefRate, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.Block, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.BlockRate, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.HPRecover, dr.ReadInt32());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.MPRecover, dr.ReadInt32());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.UpExpRate, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.MoveSpeed, (int)dr.ReadSingle());
     SetSecondAttrBase(eValueType.Image, eSkillAttrIndex.DamageReflect, (int)dr.ReadSingle());
 }
Ejemplo n.º 2
0
        public void CopyUnSerialize(byte[] buffer)
        {
            CopyList.Clear();
            if (buffer == null || buffer.Length <= 0)
            {
                return;
            }
            RPC.DataReader dr    = new RPC.DataReader(buffer, 0, buffer.Length, buffer.Length);
            int            count = dr.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                int id = dr.ReadInt32();
                CopyList.Add(id);
            }
        }
Ejemplo n.º 3
0
        public void AchieveUnSerialize(byte[] buffer)
        {
            AcceptAchieveDict.Clear();
            if (buffer == null || buffer.Length <= 0)
            {
                return;
            }
            RPC.DataReader dr    = new RPC.DataReader(buffer, 0, buffer.Length, buffer.Length);
            int            count = dr.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                AcceptAchieveData data = new AcceptAchieveData();
                data.id                    = dr.ReadInt32();
                data.targetNum             = dr.ReadInt32();
                data.getReward             = dr.ReadByte();
                AcceptAchieveDict[data.id] = data;
            }
        }
Ejemplo n.º 4
0
        public void Deserizle(CSCommon.Data.RoleCom rc)
        {
            var buffer = rc.FinalValue;

            if (buffer == null || buffer.Length <= 0)
            {
                return;
            }
            RPC.DataReader dr = new RPC.DataReader(buffer, 0, buffer.Length, buffer.Length);
            value.Deserizle(dr);
            WeapFacdeid = dr.ReadInt32();
            RPC.IAutoSaveAndLoad.DaraReadList <CSCommon.Data.SkillData>(skills, dr, false);
        }
Ejemplo n.º 5
0
        public void RPC_UpdateRankDataValue(ulong roleId, string name, RPC.DataReader value)
        {
            RankData rank = GetRank(roleId);

            if (rank == null)
            {
                return;
            }
            switch (name)
            {
            case "RoleLevel":
                rank.Level = value.ReadUInt16();
                break;

            case "Fighting":
                rank.Fighting = value.ReadInt32();
                break;

            case "Exploit":
                rank.Exploit = value.ReadInt32();
                break;

            case "ExploitBox":
                rank.ExploitBox = value.ReadByte();
                break;

            case "KillEnemy":
                rank.KillEnemy = value.ReadInt32();
                break;

            case "Challenge":
                rank.Challenge = value.ReadInt32();
                break;
            }
            UPdateRankData(rank);
        }
Ejemplo n.º 6
0
        //--------------------------------------数据存取---------------------------------------------------------

        //初始化数据库数据
        public void MartialUnSerialize(PlayerInstance role, byte[] buffer)
        {
            mRole = role;
            if (buffer == null || buffer.Length <= 0)
            {
                return;
            }
            RPC.DataReader dr    = new RPC.DataReader(buffer, 0, buffer.Length, buffer.Length);
            byte           count = dr.ReadByte();

            for (byte i = 0; i < count; i++)
            {
                byte        type   = dr.ReadByte();
                BuildOutPut output = new BuildOutPut(type);
                output.mStartTime      = dr.ReadDateTime();
                output.mOutCount       = dr.ReadByte();
                output.mUpOutIndex     = dr.ReadSByte();
                output.mUpStartTime    = dr.ReadDateTime();
                output.mOutPutTotalNum = dr.ReadInt32();
                AddOutPut(output, false);
            }
            InitOutData();
        }