public static void Deserialize(PropConfigDefine 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 PropConfigDefine GetByID(string ID, PropConfigDefine def = default(PropConfigDefine)) { PropConfigDefine ret; if (_ByID.TryGetValue(ID, out ret)) { return(ret); } if (def == default(PropConfigDefine)) { TableLogger.ErrorLine("GetByID failed, ID: {0}", ID); } return(def); }
public static void Deserialize(PropConfigDefine ins, tabtoy.DataReader reader) { int tag = -1; while (-1 != (tag = reader.ReadTag())) { switch (tag) { case 0x60000: { ins.ID = reader.ReadString(); } break; case 0x60001: { ins.Name = reader.ReadString(); } break; case 0x60002: { ins.Icon = reader.ReadString(); } break; case 0x60003: { ins.Model = reader.ReadString(); } break; case 0x10004: { ins.Quality = reader.ReadInt32(); } break; case 0x10005: { ins.Superposition = reader.ReadInt32(); } break; case 0x10006: { ins.Type = reader.ReadInt32(); } break; case 0x10007: { ins.SubType = reader.ReadInt32(); } break; case 0x10008: { ins.UseJob = reader.ReadInt32(); } break; case 0x10009: { ins.UseLevel = reader.ReadInt32(); } break; case 0x5000a: { ins.Cd = reader.ReadFloat(); } break; case 0x1000b: { ins.DayUseTimes = reader.ReadInt32(); } break; case 0x1000c: { ins.WeekUseTimes = reader.ReadInt32(); } break; case 0x1000d: { ins.DurableValue = reader.ReadInt32(); } break; case 0x1000e: { ins.ValidTime = reader.ReadInt32(); } break; case 0x1000f: { ins.UseNumber = reader.ReadInt32(); } break; case 0x60010: { ins.UseArea = reader.ReadString(); } break; case 0x10011: { ins.Consumables = reader.ReadInt32(); } break; case 0x10012: { ins.Destroy = reader.ReadInt32(); } break; case 0x10013: { ins.Trading = reader.ReadInt32(); } break; case 0x10014: { ins.Synthetic = reader.ReadInt32(); } break; case 0x10015: { ins.Decompose = reader.ReadInt32(); } break; case 0x10016: { ins.Binding = reader.ReadInt32(); } break; case 0x10017: { ins.PackLimit = reader.ReadInt32(); } break; case 0x10018: { ins.ItemValue = reader.ReadInt32(); } break; case 0x10019: { ins.SoldCost = reader.ReadInt32(); } break; case 0x1001a: { ins.PorpEffect = reader.ReadInt32(); } break; case 0x6001b: { ins.EffectParameters = reader.ReadString(); } break; case 0x6001c: { ins.PropTips = reader.ReadString(); } break; case 0x6001d: { ins.PropAccess = reader.ReadString(); } break; case 0x6001e: { ins.UseWay = reader.ReadString(); } break; } } }