Beispiel #1
0
        public JobConfigDefine GetJobConfigByID(int ID, JobConfigDefine def = default(JobConfigDefine))
        {
            JobConfigDefine ret;

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

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

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

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

                case 0x10001:
                {
                    ins.JobType = reader.ReadInt32();
                }
                break;

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

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

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

                case 0x10005:
                {
                    ins.PhysicAtk = reader.ReadInt32();
                }
                break;

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

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

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

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