Example #1
0
        public SkillDefine GetSkillByID(int ID, SkillDefine def = default(SkillDefine))
        {
            SkillDefine ret;

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

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

            return(def);
        }
Example #2
0
        public static void Deserialize(SkillDefine 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 0x60002:
                {
                    ins.Desc = reader.ReadString();
                }
                break;

                case 0x70003:
                {
                    ins.IsPassive = reader.ReadBool();
                }
                break;

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

                case 0x10005:
                {
                    ins.ModifierIDs.Add(reader.ReadInt32());
                }
                break;

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

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

                case 0x60008:
                {
                    ins.Icon = reader.ReadString();
                }
                break;

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

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