Esempio n. 1
0
        public CharactorDefine GetCharactorByID(int ID, CharactorDefine def = default(CharactorDefine))
        {
            CharactorDefine ret;

            if (_CharactorByID.TryGetValue(ID, out ret))
            {
                return(ret);
            }

            if (def == default(CharactorDefine))
            {
                TableLogger.ErrorLine("GetCharactorByID failed, ID: {0}", ID);
            }

            return(def);
        }
Esempio n. 2
0
        public static void Deserialize(CharactorDefine ins, tabtoy.DataReader reader)
        {
            int tag = -1;

            while (-1 != (tag = reader.ReadTag()))
            {
                switch (tag)
                {
                case 0x10000:
                {
                    ins.ID = reader.ReadInt32();
                }
                break;

                case 0x60001:
                {
                    ins.Name = reader.ReadString();
                }
                break;

                case 0x10002:
                {
                    ins.IsMain = reader.ReadInt32();
                }
                break;

                case 0x10003:
                {
                    ins.IsOpen = reader.ReadInt32();
                }
                break;

                case 0x10004:
                {
                    ins.IsOpenJX = reader.ReadInt32();
                }
                break;

                case 0x50005:
                {
                    ins.Totle = reader.ReadFloat();
                }
                break;

                case 0x10006:
                {
                    ins.Attack = reader.ReadInt32();
                }
                break;

                case 0x10007:
                {
                    ins.AP = reader.ReadInt32();
                }
                break;

                case 0x10008:
                {
                    ins.HJ = reader.ReadInt32();
                }
                break;

                case 0x10009:
                {
                    ins.FK = reader.ReadInt32();
                }
                break;

                case 0x1000a:
                {
                    ins.HP = reader.ReadInt32();
                }
                break;

                case 0x1000b:
                {
                    ins.Speed = reader.ReadInt32();
                }
                break;

                case 0x1000c:
                {
                    ins.Scale = reader.ReadInt32();
                }
                break;

                case 0x1000d:
                {
                    ins.P1 = reader.ReadInt32();
                }
                break;

                case 0x1000e:
                {
                    ins.P2 = reader.ReadInt32();
                }
                break;

                case 0x1000f:
                {
                    ins.P3 = reader.ReadInt32();
                }
                break;

                case 0x10010:
                {
                    ins.P4 = reader.ReadInt32();
                }
                break;

                case 0x10011:
                {
                    ins.P5 = reader.ReadInt32();
                }
                break;

                case 0x10012:
                {
                    ins.P6 = reader.ReadInt32();
                }
                break;

                case 0x10013:
                {
                    ins.H1 = reader.ReadInt32();
                }
                break;

                case 0x10014:
                {
                    ins.H2 = reader.ReadInt32();
                }
                break;

                case 0x10015:
                {
                    ins.H3 = reader.ReadInt32();
                }
                break;

                case 0x10016:
                {
                    ins.H4 = reader.ReadInt32();
                }
                break;

                case 0x10017:
                {
                    ins.H5 = reader.ReadInt32();
                }
                break;

                case 0x10018:
                {
                    ins.H6 = reader.ReadInt32();
                }
                break;

                case 0x10019:
                {
                    ins.NP = reader.ReadInt32();
                }
                break;

                case 0x1001a:
                {
                    ins.NH = reader.ReadInt32();
                }
                break;

                case 0x6001b:
                {
                    ins.Resource = reader.ReadString();
                }
                break;

                case 0x6001c:
                {
                    ins.PZ = reader.ReadString();
                }
                break;

                case 0x6001d:
                {
                    ins.Per = reader.ReadString();
                }
                break;

                case 0x1001e:
                {
                    ins.PerSkill = reader.ReadInt32();
                }
                break;

                case 0x1001f:
                {
                    ins.Skill1 = reader.ReadInt32();
                }
                break;

                case 0x10020:
                {
                    ins.Skill2 = reader.ReadInt32();
                }
                break;

                case 0x10021:
                {
                    ins.Skill3 = reader.ReadInt32();
                }
                break;

                case 0x10022:
                {
                    ins.Skill4 = reader.ReadInt32();
                }
                break;

                case 0x10023:
                {
                    ins.Skill5 = reader.ReadInt32();
                }
                break;

                case 0x10024:
                {
                    ins.Skill6 = reader.ReadInt32();
                }
                break;

                case 0x10025:
                {
                    ins.Skill7 = reader.ReadInt32();
                }
                break;

                case 0x10026:
                {
                    ins.TalkID = reader.ReadInt32();
                }
                break;
                }
            }
        }