public static void Deserialize(TalkConfigDefine ins, tabtoy.DataReader reader) { int tag = -1; while (-1 != (tag = reader.ReadTag())) { switch (tag) { case 0x60000: { ins.ID = reader.ReadString(); } break; case 0x10001: { ins.Desc = reader.ReadInt32(); } break; case 0x10002: { ins.FixedTalk = reader.ReadInt32(); } break; case 0x10003: { ins.RandomTalk = reader.ReadInt32(); } break; } } }
public static void Deserialize(TalkConfigDefine 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 TalkConfigDefine GetByID(string ID, TalkConfigDefine def = default(TalkConfigDefine)) { TalkConfigDefine ret; if (_ByID.TryGetValue(ID, out ret)) { return(ret); } if (def == default(TalkConfigDefine)) { TableLogger.ErrorLine("GetByID failed, ID: {0}", ID); } return(def); }