public static void Deserialize(SkillConfigDefine ins, System.IO.Stream stream) { tabtoy.DataReader reader = new tabtoy.DataReader(stream); if (!reader.ReadHeader()) { throw new System.Exception(string.Format("Deserialize failed: {0}", ins.GetType())); } Deserialize(ins, reader); }
public SkillConfigDefine GetByID(int ID, SkillConfigDefine def = default(SkillConfigDefine)) { SkillConfigDefine ret; if (_ByID.TryGetValue(ID, out ret)) { return(ret); } if (def == default(SkillConfigDefine)) { TableLogger.ErrorLine("GetByID failed, ID: {0}", ID); } return(def); }
public static void Deserialize(SkillConfigDefine 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.Icon = reader.ReadString(); } break; case 0x60003: { ins.Description = reader.ReadString(); } break; case 0x60004: { ins.Remark = reader.ReadString(); } break; case 0x10005: { ins.Profession = reader.ReadInt32(); } break; case 0x10006: { ins.SkillType = reader.ReadInt32(); } break; case 0x10007: { ins.ReleaseType = reader.ReadInt32(); } break; case 0x10008: { ins.TriggerType = reader.ReadInt32(); } break; case 0x50009: { ins.TriggerProbability = reader.ReadFloat(); } break; case 0x1000a: { ins.TriggerPreID = reader.ReadInt32(); } break; case 0x5000b: { ins.ReleaseDistance = reader.ReadFloat(); } break; case 0x1000c: { ins.Target = reader.ReadInt32(); } break; case 0x5000d: { ins.SpellTime = reader.ReadFloat(); } break; case 0x5000e: { ins.LastingTime = reader.ReadFloat(); } break; case 0x7000f: { ins.CanMove = reader.ReadBool(); } break; case 0x50010: { ins.CD = reader.ReadFloat(); } break; case 0x50011: { ins.GCD = reader.ReadFloat(); } break; case 0x60012: { ins.SkillsConsumption = reader.ReadString(); } break; case 0x60013: { ins.ActionID = reader.ReadString(); } break; case 0x50014: { ins.DisplacementSpeed = reader.ReadFloat(); } break; case 0x50015: { ins.FlyingSpeed = reader.ReadFloat(); } break; case 0x60016: { ins.ReadySE = reader.ReadString(); } break; case 0x60017: { ins.ReleaseSE = reader.ReadString(); } break; case 0x60018: { ins.HitSE = reader.ReadString(); } break; case 0x10019: { ins.DamageType = reader.ReadInt32(); } break; case 0x5001a: { ins.Damage = reader.ReadFloat(); } break; case 0x5001b: { ins.AdditionDamage = reader.ReadFloat(); } break; case 0x5001c: { ins.ThreatRatio = reader.ReadFloat(); } break; case 0x1001d: { ins.PointType = reader.ReadInt32(); } break; case 0x1001e: { ins.Scope = reader.ReadInt32(); } break; case 0x5001f: { ins.Length = reader.ReadFloat(); } break; case 0x50020: { ins.Width = reader.ReadFloat(); } break; case 0x50021: { ins.Radius = reader.ReadFloat(); } break; case 0x50022: { ins.CentralAngle = reader.ReadFloat(); } break; case 0x70023: { ins.FlownAfterKill = reader.ReadBool(); } break; case 0x70024: { ins.ShockAfterKill = reader.ReadBool(); } break; case 0x60025: { ins.Event.Add(reader.ReadString()); } break; } } }