You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
615 lines
27 KiB
615 lines
27 KiB
|
|
//============================================
|
|
//--4>:
|
|
// Exported by ExcelConfigExport
|
|
//
|
|
// 此代码为工具根据配置自动生成, 请不要修改
|
|
//
|
|
//============================================
|
|
|
|
using System;
|
|
using Sog;
|
|
using System.Collections.Generic;
|
|
#if UNITY_2019_1_OR_NEWER
|
|
using GameLogic;
|
|
#endif
|
|
|
|
public partial class RaceBloodDescMgr : IConfigManager
|
|
{
|
|
//Singleton
|
|
private static RaceBloodDescMgr _instance;
|
|
private static readonly object syslock = new object();
|
|
public static RaceBloodDescMgr Instance { get { if (_instance == null) { lock (syslock) { if (_instance == null) { _instance = new RaceBloodDescMgr(); }}} return _instance; }}
|
|
|
|
public class ItemData
|
|
{
|
|
public RaceBloodDesc Item;
|
|
public int Line;
|
|
public bool ReadAlready;
|
|
}
|
|
|
|
protected SortedList<int, ItemData> m_ItemTable = new SortedList<int, ItemData>();
|
|
//for server only, m_readKeyOnly must be false
|
|
protected SortedList<int, RaceBloodDesc> m_ItemDescTable = new SortedList<int, RaceBloodDesc>();
|
|
public SortedList<int, RaceBloodDesc> ItemTable { get {
|
|
if (m_ItemDescTable.Count == 0) { foreach (var item in m_ItemTable) { m_ItemDescTable.Add(item.Key, item.Value.Item); }}
|
|
return m_ItemDescTable; } }
|
|
private TabBinFile m_tbf;
|
|
//private TabTextFile m_tf;
|
|
|
|
private int m_curAsynKey1;
|
|
|
|
public override bool InitBin(string fileName, byte[] fileContent)
|
|
{
|
|
m_ErrorCount = 0;
|
|
m_ItemTable.Clear();
|
|
m_ItemDescTable.Clear();
|
|
m_allRead = false;
|
|
m_curAsynKey1 = 0;
|
|
m_tbf = new TabBinFile(fileName, fileContent);
|
|
while (m_tbf.Next())
|
|
{
|
|
ItemData itemData = new ItemData() { Item = new RaceBloodDesc() };
|
|
var item = itemData.Item;
|
|
if (m_readKeyOnly) {m_tbf.SetCurrentCol(0); }
|
|
if (item.ReadItemBin(m_tbf, m_readKeyOnly) == false)
|
|
{
|
|
TraceLog.Error("Failed to InitBin TabManager:{0}, read line error, line: {1}", this.ToString(), m_tbf.CurrentLine);
|
|
m_ErrorCount++;
|
|
continue;
|
|
}
|
|
if (m_ItemTable.ContainsKey(item.GetKey1()))
|
|
{
|
|
TraceLog.Error("Failed to InitBin TabManager:{0}, multi key:{1}, line: {2}", this.ToString(), item.GetKey1(), m_tbf.CurrentLine);
|
|
m_ErrorCount++;
|
|
continue;
|
|
}
|
|
m_ItemTable.Add(item.GetKey1(), itemData);
|
|
if (m_readKeyOnly)
|
|
{
|
|
itemData.Line = m_tbf.CurrentLine;
|
|
}
|
|
else
|
|
{
|
|
itemData.ReadAlready = true;
|
|
}
|
|
}
|
|
if (!m_readKeyOnly)
|
|
{
|
|
m_tbf = null;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
#if UNITY_2019_1_OR_NEWER
|
|
public override bool InitBinByIL(string fileName, byte[] fileContent)
|
|
{
|
|
m_ErrorCount = 0;
|
|
m_ItemTable.Clear();
|
|
m_tbf = new TabBinFile(fileName, fileContent);
|
|
while (m_tbf.Next())
|
|
{
|
|
ItemData itemData = new ItemData() { Item = new RaceBloodDesc() };
|
|
int keyCount = 0;
|
|
if(m_readKeyOnly) { keyCount = 1;}
|
|
var item = itemData.Item;
|
|
item = item.ReadItemInIL(m_tbf, keyCount);
|
|
if (item == null)
|
|
{
|
|
TraceLog.Error("Failed to init TabManager:{0}, read line error, line: {1}", this.ToString(), m_tbf.CurrentLine);
|
|
m_ErrorCount++;
|
|
continue;
|
|
}
|
|
if (m_ItemTable.ContainsKey(item.GetKey1()))
|
|
{
|
|
TraceLog.Error("Failed to init TabManager:{0}, multi key:{1}, line: {2}", this.ToString(), item.GetKey1(), m_tbf.CurrentLine);
|
|
m_ErrorCount++;
|
|
continue;
|
|
}
|
|
m_ItemTable.Add(item.GetKey1(), itemData);
|
|
if (m_readKeyOnly)
|
|
{
|
|
itemData.Line = m_tbf.CurrentLine;
|
|
}
|
|
else
|
|
{
|
|
itemData.ReadAlready = true;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
#endif
|
|
|
|
public RaceBloodDesc GetConfig(int key)
|
|
{
|
|
ItemData itemData;
|
|
if (m_ItemTable.TryGetValue(key, out itemData) == false)
|
|
{
|
|
return null;
|
|
}
|
|
if(itemData.ReadAlready)
|
|
{
|
|
return itemData.Item;
|
|
}
|
|
if (m_tbf == null)
|
|
{
|
|
TraceLog.Error("Cfg1KeyMgrTemplate.GetConfig Failed fs null TabManager:{ 0}, read line error,", this.ToString());
|
|
return null;
|
|
}
|
|
m_tbf.SetCurrentLine(itemData.Line);
|
|
m_tbf.SetCurrentCol(0);
|
|
itemData.ReadAlready = true;
|
|
if (itemData.Item.ReadItemBin(m_tbf, false) == false)
|
|
{
|
|
TraceLog.Error("Cfg1KeyMgrTemplate.GetConfig Failed to init TabManager:{0}, read line error, line: {1}", this.ToString(), m_tbf.CurrentLine);
|
|
return null;
|
|
}
|
|
return itemData.Item;
|
|
}
|
|
|
|
|
|
|
|
public override int AsynReadBin(int maxTimes)
|
|
{
|
|
int times = 0;
|
|
if (m_allRead)
|
|
{
|
|
return times;
|
|
}
|
|
if (m_tbf == null)
|
|
{
|
|
return times;
|
|
}
|
|
for (; m_curAsynKey1 < m_ItemTable.Count && times < maxTimes; m_curAsynKey1++)
|
|
{
|
|
var itemData = m_ItemTable.Values[m_curAsynKey1];
|
|
if (itemData.ReadAlready)
|
|
{
|
|
continue;
|
|
}
|
|
m_tbf.SetCurrentLine(itemData.Line);
|
|
m_tbf.SetCurrentCol(0);
|
|
itemData.ReadAlready = true;
|
|
if (itemData.Item.ReadItemBin(m_tbf, false) == false)
|
|
{
|
|
TraceLog.Error("Cfg1KeyMgrTemplate.AsynReadBin Failed to init TabManager:{ 0}, read line error, line: { 1}", this.ToString(), m_tbf.CurrentLine);
|
|
return times;
|
|
}
|
|
times++;
|
|
}
|
|
if (m_curAsynKey1 >= m_ItemTable.Count)
|
|
{
|
|
m_allRead = true;
|
|
m_tbf = null;
|
|
}
|
|
return times;
|
|
}
|
|
|
|
}
|
|
|
|
public partial class RaceBloodDesc
|
|
{
|
|
|
|
public partial class BaseAtt
|
|
{
|
|
public int min{ get; set; } // 0//初始体力 最小值
|
|
public int max{ get; set; } // 0//初始体力 最大值
|
|
|
|
}
|
|
|
|
public static readonly string _KEY_id = "id";
|
|
public static readonly string _KEY_isDefault = "isDefault";
|
|
public static readonly string _KEY_group = "group";
|
|
public static readonly string _KEY_randomshow_8_0 = "randomshow_8_0";
|
|
public static readonly string _KEY_randomshow_8_1 = "randomshow_8_1";
|
|
public static readonly string _KEY_randomshow_8_2 = "randomshow_8_2";
|
|
public static readonly string _KEY_randomshow_8_3 = "randomshow_8_3";
|
|
public static readonly string _KEY_randomshow_8_4 = "randomshow_8_4";
|
|
public static readonly string _KEY_randomshow_8_5 = "randomshow_8_5";
|
|
public static readonly string _KEY_randomshow_8_6 = "randomshow_8_6";
|
|
public static readonly string _KEY_randomshow_8_7 = "randomshow_8_7";
|
|
public static readonly string _KEY_groundGrass = "groundGrass";
|
|
public static readonly string _KEY_groundDust = "groundDust";
|
|
public static readonly string _KEY_raceGrade_5_0 = "raceGrade_5_0";
|
|
public static readonly string _KEY_raceGrade_5_1 = "raceGrade_5_1";
|
|
public static readonly string _KEY_raceGrade_5_2 = "raceGrade_5_2";
|
|
public static readonly string _KEY_raceGrade_5_3 = "raceGrade_5_3";
|
|
public static readonly string _KEY_raceGrade_5_4 = "raceGrade_5_4";
|
|
public static readonly string _KEY_baseAtt_0_min = "baseAtt_0_min";
|
|
public static readonly string _KEY_baseAtt_0_max = "baseAtt_0_max";
|
|
public static readonly string _KEY_baseAtt_1_min = "baseAtt_1_min";
|
|
public static readonly string _KEY_baseAtt_1_max = "baseAtt_1_max";
|
|
public static readonly string _KEY_baseAtt_2_min = "baseAtt_2_min";
|
|
public static readonly string _KEY_baseAtt_2_max = "baseAtt_2_max";
|
|
public static readonly string _KEY_baseAtt_3_min = "baseAtt_3_min";
|
|
public static readonly string _KEY_baseAtt_3_max = "baseAtt_3_max";
|
|
public static readonly string _KEY_baseAtt_4_min = "baseAtt_4_min";
|
|
public static readonly string _KEY_baseAtt_4_max = "baseAtt_4_max";
|
|
public static readonly string _KEY_maxAttr_5_0 = "maxAttr_5_0";
|
|
public static readonly string _KEY_maxAttr_5_1 = "maxAttr_5_1";
|
|
public static readonly string _KEY_maxAttr_5_2 = "maxAttr_5_2";
|
|
public static readonly string _KEY_maxAttr_5_3 = "maxAttr_5_3";
|
|
public static readonly string _KEY_maxAttr_5_4 = "maxAttr_5_4";
|
|
public static readonly string _KEY_gene_40_0 = "gene_40_0";
|
|
public static readonly string _KEY_gene_40_1 = "gene_40_1";
|
|
public static readonly string _KEY_gene_40_2 = "gene_40_2";
|
|
public static readonly string _KEY_gene_40_3 = "gene_40_3";
|
|
public static readonly string _KEY_gene_40_4 = "gene_40_4";
|
|
public static readonly string _KEY_gene_40_5 = "gene_40_5";
|
|
public static readonly string _KEY_gene_40_6 = "gene_40_6";
|
|
public static readonly string _KEY_gene_40_7 = "gene_40_7";
|
|
public static readonly string _KEY_gene_40_8 = "gene_40_8";
|
|
public static readonly string _KEY_gene_40_9 = "gene_40_9";
|
|
public static readonly string _KEY_gene_40_10 = "gene_40_10";
|
|
public static readonly string _KEY_gene_40_11 = "gene_40_11";
|
|
public static readonly string _KEY_gene_40_12 = "gene_40_12";
|
|
public static readonly string _KEY_gene_40_13 = "gene_40_13";
|
|
public static readonly string _KEY_gene_40_14 = "gene_40_14";
|
|
public static readonly string _KEY_gene_40_15 = "gene_40_15";
|
|
public static readonly string _KEY_gene_40_16 = "gene_40_16";
|
|
public static readonly string _KEY_gene_40_17 = "gene_40_17";
|
|
public static readonly string _KEY_gene_40_18 = "gene_40_18";
|
|
public static readonly string _KEY_gene_40_19 = "gene_40_19";
|
|
public static readonly string _KEY_gene_40_20 = "gene_40_20";
|
|
public static readonly string _KEY_gene_40_21 = "gene_40_21";
|
|
public static readonly string _KEY_gene_40_22 = "gene_40_22";
|
|
public static readonly string _KEY_gene_40_23 = "gene_40_23";
|
|
public static readonly string _KEY_gene_40_24 = "gene_40_24";
|
|
public static readonly string _KEY_gene_40_25 = "gene_40_25";
|
|
public static readonly string _KEY_gene_40_26 = "gene_40_26";
|
|
public static readonly string _KEY_gene_40_27 = "gene_40_27";
|
|
public static readonly string _KEY_gene_40_28 = "gene_40_28";
|
|
public static readonly string _KEY_gene_40_29 = "gene_40_29";
|
|
public static readonly string _KEY_gene_40_30 = "gene_40_30";
|
|
public static readonly string _KEY_gene_40_31 = "gene_40_31";
|
|
public static readonly string _KEY_gene_40_32 = "gene_40_32";
|
|
public static readonly string _KEY_gene_40_33 = "gene_40_33";
|
|
public static readonly string _KEY_gene_40_34 = "gene_40_34";
|
|
public static readonly string _KEY_gene_40_35 = "gene_40_35";
|
|
public static readonly string _KEY_gene_40_36 = "gene_40_36";
|
|
public static readonly string _KEY_gene_40_37 = "gene_40_37";
|
|
public static readonly string _KEY_gene_40_38 = "gene_40_38";
|
|
public static readonly string _KEY_gene_40_39 = "gene_40_39";
|
|
public static readonly string _KEY_quality = "quality";
|
|
public static readonly string _KEY_release = "release";
|
|
public static readonly string _KEY_geneNum = "geneNum";
|
|
public static readonly string _KEY_geneWeight_40_0 = "geneWeight_40_0";
|
|
public static readonly string _KEY_geneWeight_40_1 = "geneWeight_40_1";
|
|
public static readonly string _KEY_geneWeight_40_2 = "geneWeight_40_2";
|
|
public static readonly string _KEY_geneWeight_40_3 = "geneWeight_40_3";
|
|
public static readonly string _KEY_geneWeight_40_4 = "geneWeight_40_4";
|
|
public static readonly string _KEY_geneWeight_40_5 = "geneWeight_40_5";
|
|
public static readonly string _KEY_geneWeight_40_6 = "geneWeight_40_6";
|
|
public static readonly string _KEY_geneWeight_40_7 = "geneWeight_40_7";
|
|
public static readonly string _KEY_geneWeight_40_8 = "geneWeight_40_8";
|
|
public static readonly string _KEY_geneWeight_40_9 = "geneWeight_40_9";
|
|
public static readonly string _KEY_geneWeight_40_10 = "geneWeight_40_10";
|
|
public static readonly string _KEY_geneWeight_40_11 = "geneWeight_40_11";
|
|
public static readonly string _KEY_geneWeight_40_12 = "geneWeight_40_12";
|
|
public static readonly string _KEY_geneWeight_40_13 = "geneWeight_40_13";
|
|
public static readonly string _KEY_geneWeight_40_14 = "geneWeight_40_14";
|
|
public static readonly string _KEY_geneWeight_40_15 = "geneWeight_40_15";
|
|
public static readonly string _KEY_geneWeight_40_16 = "geneWeight_40_16";
|
|
public static readonly string _KEY_geneWeight_40_17 = "geneWeight_40_17";
|
|
public static readonly string _KEY_geneWeight_40_18 = "geneWeight_40_18";
|
|
public static readonly string _KEY_geneWeight_40_19 = "geneWeight_40_19";
|
|
public static readonly string _KEY_geneWeight_40_20 = "geneWeight_40_20";
|
|
public static readonly string _KEY_geneWeight_40_21 = "geneWeight_40_21";
|
|
public static readonly string _KEY_geneWeight_40_22 = "geneWeight_40_22";
|
|
public static readonly string _KEY_geneWeight_40_23 = "geneWeight_40_23";
|
|
public static readonly string _KEY_geneWeight_40_24 = "geneWeight_40_24";
|
|
public static readonly string _KEY_geneWeight_40_25 = "geneWeight_40_25";
|
|
public static readonly string _KEY_geneWeight_40_26 = "geneWeight_40_26";
|
|
public static readonly string _KEY_geneWeight_40_27 = "geneWeight_40_27";
|
|
public static readonly string _KEY_geneWeight_40_28 = "geneWeight_40_28";
|
|
public static readonly string _KEY_geneWeight_40_29 = "geneWeight_40_29";
|
|
public static readonly string _KEY_geneWeight_40_30 = "geneWeight_40_30";
|
|
public static readonly string _KEY_geneWeight_40_31 = "geneWeight_40_31";
|
|
public static readonly string _KEY_geneWeight_40_32 = "geneWeight_40_32";
|
|
public static readonly string _KEY_geneWeight_40_33 = "geneWeight_40_33";
|
|
public static readonly string _KEY_geneWeight_40_34 = "geneWeight_40_34";
|
|
public static readonly string _KEY_geneWeight_40_35 = "geneWeight_40_35";
|
|
public static readonly string _KEY_geneWeight_40_36 = "geneWeight_40_36";
|
|
public static readonly string _KEY_geneWeight_40_37 = "geneWeight_40_37";
|
|
public static readonly string _KEY_geneWeight_40_38 = "geneWeight_40_38";
|
|
public static readonly string _KEY_geneWeight_40_39 = "geneWeight_40_39";
|
|
public static readonly string _KEY_life = "life";
|
|
|
|
public int id { get; set; } // //主键 血统
|
|
public int isDefault { get; set; } // //是否默认赛马 1、默认 0、非默认
|
|
public int group { get; set; } // //对应的id RaceHandbookDetail
|
|
public int[] randomshow { get; set; } // //形象随机 从RaceBase id取
|
|
public int groundGrass { get; set; } // //草场地适应性 1 - 优秀 2 -良好 3 - 一般 4 - 不可
|
|
public int groundDust { get; set; } // //沙场地适应性 1 - 优秀 2 -良好 3 - 一般 4 - 不可
|
|
public int[] raceGrade { get; set; } // //赛马属性评级,对应 体力;速度;爆发;毅力;起跑 1- D 2 - C 3 -B 4 - A 5 - S
|
|
public BaseAtt[] baseAtt { get; set; }
|
|
public int[] maxAttr { get; set; } // //最大体力
|
|
public int[] gene { get; set; } // //1代马的遗传因子范围,对应RaceGene表内id
|
|
public int quality { get; set; } // //赛马血统的品质 1.绿 2.蓝 3.紫 4.橙
|
|
public int release { get; set; } // //放生积分奖励
|
|
public int geneNum { get; set; } // //对应在我获得赛马的时候有多少个因子,为万分比的真概率
|
|
public int[] geneWeight { get; set; } // //对应字段gene的因子在随机的时候的参数
|
|
public int life { get; set; } // //赛马到期的赛季时间
|
|
|
|
public Dictionary<string, Type> listDic = new Dictionary<string, Type>();
|
|
public RaceBloodDesc()
|
|
{
|
|
randomshow = new int[8];
|
|
listDic.Add("randomshow", typeof(int));
|
|
raceGrade = new int[5];
|
|
listDic.Add("raceGrade", typeof(int));
|
|
baseAtt = new BaseAtt[5];
|
|
baseAtt[0] = new BaseAtt();
|
|
baseAtt[1] = new BaseAtt();
|
|
baseAtt[2] = new BaseAtt();
|
|
baseAtt[3] = new BaseAtt();
|
|
baseAtt[4] = new BaseAtt();
|
|
listDic.Add("baseAtt", typeof(BaseAtt));
|
|
maxAttr = new int[5];
|
|
listDic.Add("maxAttr", typeof(int));
|
|
gene = new int[40];
|
|
listDic.Add("gene", typeof(int));
|
|
geneWeight = new int[40];
|
|
listDic.Add("geneWeight", typeof(int));
|
|
}
|
|
|
|
public int GetKey1() { return id; }
|
|
|
|
public bool ReadItem(TabTextFile txf, bool readKeyOnly)
|
|
{
|
|
id = txf.Get<int>(_KEY_id);
|
|
if(readKeyOnly) { return true; }
|
|
isDefault = txf.Get<int>(_KEY_isDefault);
|
|
group = txf.Get<int>(_KEY_group);
|
|
randomshow[0] = txf.Get<int>(_KEY_randomshow_8_0);
|
|
randomshow[1] = txf.Get<int>(_KEY_randomshow_8_1);
|
|
randomshow[2] = txf.Get<int>(_KEY_randomshow_8_2);
|
|
randomshow[3] = txf.Get<int>(_KEY_randomshow_8_3);
|
|
randomshow[4] = txf.Get<int>(_KEY_randomshow_8_4);
|
|
randomshow[5] = txf.Get<int>(_KEY_randomshow_8_5);
|
|
randomshow[6] = txf.Get<int>(_KEY_randomshow_8_6);
|
|
randomshow[7] = txf.Get<int>(_KEY_randomshow_8_7);
|
|
groundGrass = txf.Get<int>(_KEY_groundGrass);
|
|
groundDust = txf.Get<int>(_KEY_groundDust);
|
|
raceGrade[0] = txf.Get<int>(_KEY_raceGrade_5_0);
|
|
raceGrade[1] = txf.Get<int>(_KEY_raceGrade_5_1);
|
|
raceGrade[2] = txf.Get<int>(_KEY_raceGrade_5_2);
|
|
raceGrade[3] = txf.Get<int>(_KEY_raceGrade_5_3);
|
|
raceGrade[4] = txf.Get<int>(_KEY_raceGrade_5_4);
|
|
baseAtt[0].min = txf.Get<int>(_KEY_baseAtt_0_min);
|
|
baseAtt[0].max = txf.Get<int>(_KEY_baseAtt_0_max);
|
|
baseAtt[1].min = txf.Get<int>(_KEY_baseAtt_1_min);
|
|
baseAtt[1].max = txf.Get<int>(_KEY_baseAtt_1_max);
|
|
baseAtt[2].min = txf.Get<int>(_KEY_baseAtt_2_min);
|
|
baseAtt[2].max = txf.Get<int>(_KEY_baseAtt_2_max);
|
|
baseAtt[3].min = txf.Get<int>(_KEY_baseAtt_3_min);
|
|
baseAtt[3].max = txf.Get<int>(_KEY_baseAtt_3_max);
|
|
baseAtt[4].min = txf.Get<int>(_KEY_baseAtt_4_min);
|
|
baseAtt[4].max = txf.Get<int>(_KEY_baseAtt_4_max);
|
|
maxAttr[0] = txf.Get<int>(_KEY_maxAttr_5_0);
|
|
maxAttr[1] = txf.Get<int>(_KEY_maxAttr_5_1);
|
|
maxAttr[2] = txf.Get<int>(_KEY_maxAttr_5_2);
|
|
maxAttr[3] = txf.Get<int>(_KEY_maxAttr_5_3);
|
|
maxAttr[4] = txf.Get<int>(_KEY_maxAttr_5_4);
|
|
gene[0] = txf.Get<int>(_KEY_gene_40_0);
|
|
gene[1] = txf.Get<int>(_KEY_gene_40_1);
|
|
gene[2] = txf.Get<int>(_KEY_gene_40_2);
|
|
gene[3] = txf.Get<int>(_KEY_gene_40_3);
|
|
gene[4] = txf.Get<int>(_KEY_gene_40_4);
|
|
gene[5] = txf.Get<int>(_KEY_gene_40_5);
|
|
gene[6] = txf.Get<int>(_KEY_gene_40_6);
|
|
gene[7] = txf.Get<int>(_KEY_gene_40_7);
|
|
gene[8] = txf.Get<int>(_KEY_gene_40_8);
|
|
gene[9] = txf.Get<int>(_KEY_gene_40_9);
|
|
gene[10] = txf.Get<int>(_KEY_gene_40_10);
|
|
gene[11] = txf.Get<int>(_KEY_gene_40_11);
|
|
gene[12] = txf.Get<int>(_KEY_gene_40_12);
|
|
gene[13] = txf.Get<int>(_KEY_gene_40_13);
|
|
gene[14] = txf.Get<int>(_KEY_gene_40_14);
|
|
gene[15] = txf.Get<int>(_KEY_gene_40_15);
|
|
gene[16] = txf.Get<int>(_KEY_gene_40_16);
|
|
gene[17] = txf.Get<int>(_KEY_gene_40_17);
|
|
gene[18] = txf.Get<int>(_KEY_gene_40_18);
|
|
gene[19] = txf.Get<int>(_KEY_gene_40_19);
|
|
gene[20] = txf.Get<int>(_KEY_gene_40_20);
|
|
gene[21] = txf.Get<int>(_KEY_gene_40_21);
|
|
gene[22] = txf.Get<int>(_KEY_gene_40_22);
|
|
gene[23] = txf.Get<int>(_KEY_gene_40_23);
|
|
gene[24] = txf.Get<int>(_KEY_gene_40_24);
|
|
gene[25] = txf.Get<int>(_KEY_gene_40_25);
|
|
gene[26] = txf.Get<int>(_KEY_gene_40_26);
|
|
gene[27] = txf.Get<int>(_KEY_gene_40_27);
|
|
gene[28] = txf.Get<int>(_KEY_gene_40_28);
|
|
gene[29] = txf.Get<int>(_KEY_gene_40_29);
|
|
gene[30] = txf.Get<int>(_KEY_gene_40_30);
|
|
gene[31] = txf.Get<int>(_KEY_gene_40_31);
|
|
gene[32] = txf.Get<int>(_KEY_gene_40_32);
|
|
gene[33] = txf.Get<int>(_KEY_gene_40_33);
|
|
gene[34] = txf.Get<int>(_KEY_gene_40_34);
|
|
gene[35] = txf.Get<int>(_KEY_gene_40_35);
|
|
gene[36] = txf.Get<int>(_KEY_gene_40_36);
|
|
gene[37] = txf.Get<int>(_KEY_gene_40_37);
|
|
gene[38] = txf.Get<int>(_KEY_gene_40_38);
|
|
gene[39] = txf.Get<int>(_KEY_gene_40_39);
|
|
quality = txf.Get<int>(_KEY_quality);
|
|
release = txf.Get<int>(_KEY_release);
|
|
geneNum = txf.Get<int>(_KEY_geneNum);
|
|
geneWeight[0] = txf.Get<int>(_KEY_geneWeight_40_0);
|
|
geneWeight[1] = txf.Get<int>(_KEY_geneWeight_40_1);
|
|
geneWeight[2] = txf.Get<int>(_KEY_geneWeight_40_2);
|
|
geneWeight[3] = txf.Get<int>(_KEY_geneWeight_40_3);
|
|
geneWeight[4] = txf.Get<int>(_KEY_geneWeight_40_4);
|
|
geneWeight[5] = txf.Get<int>(_KEY_geneWeight_40_5);
|
|
geneWeight[6] = txf.Get<int>(_KEY_geneWeight_40_6);
|
|
geneWeight[7] = txf.Get<int>(_KEY_geneWeight_40_7);
|
|
geneWeight[8] = txf.Get<int>(_KEY_geneWeight_40_8);
|
|
geneWeight[9] = txf.Get<int>(_KEY_geneWeight_40_9);
|
|
geneWeight[10] = txf.Get<int>(_KEY_geneWeight_40_10);
|
|
geneWeight[11] = txf.Get<int>(_KEY_geneWeight_40_11);
|
|
geneWeight[12] = txf.Get<int>(_KEY_geneWeight_40_12);
|
|
geneWeight[13] = txf.Get<int>(_KEY_geneWeight_40_13);
|
|
geneWeight[14] = txf.Get<int>(_KEY_geneWeight_40_14);
|
|
geneWeight[15] = txf.Get<int>(_KEY_geneWeight_40_15);
|
|
geneWeight[16] = txf.Get<int>(_KEY_geneWeight_40_16);
|
|
geneWeight[17] = txf.Get<int>(_KEY_geneWeight_40_17);
|
|
geneWeight[18] = txf.Get<int>(_KEY_geneWeight_40_18);
|
|
geneWeight[19] = txf.Get<int>(_KEY_geneWeight_40_19);
|
|
geneWeight[20] = txf.Get<int>(_KEY_geneWeight_40_20);
|
|
geneWeight[21] = txf.Get<int>(_KEY_geneWeight_40_21);
|
|
geneWeight[22] = txf.Get<int>(_KEY_geneWeight_40_22);
|
|
geneWeight[23] = txf.Get<int>(_KEY_geneWeight_40_23);
|
|
geneWeight[24] = txf.Get<int>(_KEY_geneWeight_40_24);
|
|
geneWeight[25] = txf.Get<int>(_KEY_geneWeight_40_25);
|
|
geneWeight[26] = txf.Get<int>(_KEY_geneWeight_40_26);
|
|
geneWeight[27] = txf.Get<int>(_KEY_geneWeight_40_27);
|
|
geneWeight[28] = txf.Get<int>(_KEY_geneWeight_40_28);
|
|
geneWeight[29] = txf.Get<int>(_KEY_geneWeight_40_29);
|
|
geneWeight[30] = txf.Get<int>(_KEY_geneWeight_40_30);
|
|
geneWeight[31] = txf.Get<int>(_KEY_geneWeight_40_31);
|
|
geneWeight[32] = txf.Get<int>(_KEY_geneWeight_40_32);
|
|
geneWeight[33] = txf.Get<int>(_KEY_geneWeight_40_33);
|
|
geneWeight[34] = txf.Get<int>(_KEY_geneWeight_40_34);
|
|
geneWeight[35] = txf.Get<int>(_KEY_geneWeight_40_35);
|
|
geneWeight[36] = txf.Get<int>(_KEY_geneWeight_40_36);
|
|
geneWeight[37] = txf.Get<int>(_KEY_geneWeight_40_37);
|
|
geneWeight[38] = txf.Get<int>(_KEY_geneWeight_40_38);
|
|
geneWeight[39] = txf.Get<int>(_KEY_geneWeight_40_39);
|
|
life = txf.Get<int>(_KEY_life);
|
|
return true;
|
|
}
|
|
public bool ReadItemBin(TabBinFile txf, bool readKeyOnly)
|
|
{
|
|
id = txf.GetintByIndex(_KEY_id);
|
|
if(readKeyOnly) { return true; }
|
|
isDefault = txf.GetintByIndex(_KEY_isDefault);
|
|
group = txf.GetintByIndex(_KEY_group);
|
|
randomshow[0] = txf.GetintByIndex(_KEY_randomshow_8_0);
|
|
randomshow[1] = txf.GetintByIndex(_KEY_randomshow_8_1);
|
|
randomshow[2] = txf.GetintByIndex(_KEY_randomshow_8_2);
|
|
randomshow[3] = txf.GetintByIndex(_KEY_randomshow_8_3);
|
|
randomshow[4] = txf.GetintByIndex(_KEY_randomshow_8_4);
|
|
randomshow[5] = txf.GetintByIndex(_KEY_randomshow_8_5);
|
|
randomshow[6] = txf.GetintByIndex(_KEY_randomshow_8_6);
|
|
randomshow[7] = txf.GetintByIndex(_KEY_randomshow_8_7);
|
|
groundGrass = txf.GetintByIndex(_KEY_groundGrass);
|
|
groundDust = txf.GetintByIndex(_KEY_groundDust);
|
|
raceGrade[0] = txf.GetintByIndex(_KEY_raceGrade_5_0);
|
|
raceGrade[1] = txf.GetintByIndex(_KEY_raceGrade_5_1);
|
|
raceGrade[2] = txf.GetintByIndex(_KEY_raceGrade_5_2);
|
|
raceGrade[3] = txf.GetintByIndex(_KEY_raceGrade_5_3);
|
|
raceGrade[4] = txf.GetintByIndex(_KEY_raceGrade_5_4);
|
|
baseAtt[0].min = txf.GetintByIndex(_KEY_baseAtt_0_min);
|
|
baseAtt[0].max = txf.GetintByIndex(_KEY_baseAtt_0_max);
|
|
baseAtt[1].min = txf.GetintByIndex(_KEY_baseAtt_1_min);
|
|
baseAtt[1].max = txf.GetintByIndex(_KEY_baseAtt_1_max);
|
|
baseAtt[2].min = txf.GetintByIndex(_KEY_baseAtt_2_min);
|
|
baseAtt[2].max = txf.GetintByIndex(_KEY_baseAtt_2_max);
|
|
baseAtt[3].min = txf.GetintByIndex(_KEY_baseAtt_3_min);
|
|
baseAtt[3].max = txf.GetintByIndex(_KEY_baseAtt_3_max);
|
|
baseAtt[4].min = txf.GetintByIndex(_KEY_baseAtt_4_min);
|
|
baseAtt[4].max = txf.GetintByIndex(_KEY_baseAtt_4_max);
|
|
maxAttr[0] = txf.GetintByIndex(_KEY_maxAttr_5_0);
|
|
maxAttr[1] = txf.GetintByIndex(_KEY_maxAttr_5_1);
|
|
maxAttr[2] = txf.GetintByIndex(_KEY_maxAttr_5_2);
|
|
maxAttr[3] = txf.GetintByIndex(_KEY_maxAttr_5_3);
|
|
maxAttr[4] = txf.GetintByIndex(_KEY_maxAttr_5_4);
|
|
gene[0] = txf.GetintByIndex(_KEY_gene_40_0);
|
|
gene[1] = txf.GetintByIndex(_KEY_gene_40_1);
|
|
gene[2] = txf.GetintByIndex(_KEY_gene_40_2);
|
|
gene[3] = txf.GetintByIndex(_KEY_gene_40_3);
|
|
gene[4] = txf.GetintByIndex(_KEY_gene_40_4);
|
|
gene[5] = txf.GetintByIndex(_KEY_gene_40_5);
|
|
gene[6] = txf.GetintByIndex(_KEY_gene_40_6);
|
|
gene[7] = txf.GetintByIndex(_KEY_gene_40_7);
|
|
gene[8] = txf.GetintByIndex(_KEY_gene_40_8);
|
|
gene[9] = txf.GetintByIndex(_KEY_gene_40_9);
|
|
gene[10] = txf.GetintByIndex(_KEY_gene_40_10);
|
|
gene[11] = txf.GetintByIndex(_KEY_gene_40_11);
|
|
gene[12] = txf.GetintByIndex(_KEY_gene_40_12);
|
|
gene[13] = txf.GetintByIndex(_KEY_gene_40_13);
|
|
gene[14] = txf.GetintByIndex(_KEY_gene_40_14);
|
|
gene[15] = txf.GetintByIndex(_KEY_gene_40_15);
|
|
gene[16] = txf.GetintByIndex(_KEY_gene_40_16);
|
|
gene[17] = txf.GetintByIndex(_KEY_gene_40_17);
|
|
gene[18] = txf.GetintByIndex(_KEY_gene_40_18);
|
|
gene[19] = txf.GetintByIndex(_KEY_gene_40_19);
|
|
gene[20] = txf.GetintByIndex(_KEY_gene_40_20);
|
|
gene[21] = txf.GetintByIndex(_KEY_gene_40_21);
|
|
gene[22] = txf.GetintByIndex(_KEY_gene_40_22);
|
|
gene[23] = txf.GetintByIndex(_KEY_gene_40_23);
|
|
gene[24] = txf.GetintByIndex(_KEY_gene_40_24);
|
|
gene[25] = txf.GetintByIndex(_KEY_gene_40_25);
|
|
gene[26] = txf.GetintByIndex(_KEY_gene_40_26);
|
|
gene[27] = txf.GetintByIndex(_KEY_gene_40_27);
|
|
gene[28] = txf.GetintByIndex(_KEY_gene_40_28);
|
|
gene[29] = txf.GetintByIndex(_KEY_gene_40_29);
|
|
gene[30] = txf.GetintByIndex(_KEY_gene_40_30);
|
|
gene[31] = txf.GetintByIndex(_KEY_gene_40_31);
|
|
gene[32] = txf.GetintByIndex(_KEY_gene_40_32);
|
|
gene[33] = txf.GetintByIndex(_KEY_gene_40_33);
|
|
gene[34] = txf.GetintByIndex(_KEY_gene_40_34);
|
|
gene[35] = txf.GetintByIndex(_KEY_gene_40_35);
|
|
gene[36] = txf.GetintByIndex(_KEY_gene_40_36);
|
|
gene[37] = txf.GetintByIndex(_KEY_gene_40_37);
|
|
gene[38] = txf.GetintByIndex(_KEY_gene_40_38);
|
|
gene[39] = txf.GetintByIndex(_KEY_gene_40_39);
|
|
quality = txf.GetintByIndex(_KEY_quality);
|
|
release = txf.GetintByIndex(_KEY_release);
|
|
geneNum = txf.GetintByIndex(_KEY_geneNum);
|
|
geneWeight[0] = txf.GetintByIndex(_KEY_geneWeight_40_0);
|
|
geneWeight[1] = txf.GetintByIndex(_KEY_geneWeight_40_1);
|
|
geneWeight[2] = txf.GetintByIndex(_KEY_geneWeight_40_2);
|
|
geneWeight[3] = txf.GetintByIndex(_KEY_geneWeight_40_3);
|
|
geneWeight[4] = txf.GetintByIndex(_KEY_geneWeight_40_4);
|
|
geneWeight[5] = txf.GetintByIndex(_KEY_geneWeight_40_5);
|
|
geneWeight[6] = txf.GetintByIndex(_KEY_geneWeight_40_6);
|
|
geneWeight[7] = txf.GetintByIndex(_KEY_geneWeight_40_7);
|
|
geneWeight[8] = txf.GetintByIndex(_KEY_geneWeight_40_8);
|
|
geneWeight[9] = txf.GetintByIndex(_KEY_geneWeight_40_9);
|
|
geneWeight[10] = txf.GetintByIndex(_KEY_geneWeight_40_10);
|
|
geneWeight[11] = txf.GetintByIndex(_KEY_geneWeight_40_11);
|
|
geneWeight[12] = txf.GetintByIndex(_KEY_geneWeight_40_12);
|
|
geneWeight[13] = txf.GetintByIndex(_KEY_geneWeight_40_13);
|
|
geneWeight[14] = txf.GetintByIndex(_KEY_geneWeight_40_14);
|
|
geneWeight[15] = txf.GetintByIndex(_KEY_geneWeight_40_15);
|
|
geneWeight[16] = txf.GetintByIndex(_KEY_geneWeight_40_16);
|
|
geneWeight[17] = txf.GetintByIndex(_KEY_geneWeight_40_17);
|
|
geneWeight[18] = txf.GetintByIndex(_KEY_geneWeight_40_18);
|
|
geneWeight[19] = txf.GetintByIndex(_KEY_geneWeight_40_19);
|
|
geneWeight[20] = txf.GetintByIndex(_KEY_geneWeight_40_20);
|
|
geneWeight[21] = txf.GetintByIndex(_KEY_geneWeight_40_21);
|
|
geneWeight[22] = txf.GetintByIndex(_KEY_geneWeight_40_22);
|
|
geneWeight[23] = txf.GetintByIndex(_KEY_geneWeight_40_23);
|
|
geneWeight[24] = txf.GetintByIndex(_KEY_geneWeight_40_24);
|
|
geneWeight[25] = txf.GetintByIndex(_KEY_geneWeight_40_25);
|
|
geneWeight[26] = txf.GetintByIndex(_KEY_geneWeight_40_26);
|
|
geneWeight[27] = txf.GetintByIndex(_KEY_geneWeight_40_27);
|
|
geneWeight[28] = txf.GetintByIndex(_KEY_geneWeight_40_28);
|
|
geneWeight[29] = txf.GetintByIndex(_KEY_geneWeight_40_29);
|
|
geneWeight[30] = txf.GetintByIndex(_KEY_geneWeight_40_30);
|
|
geneWeight[31] = txf.GetintByIndex(_KEY_geneWeight_40_31);
|
|
geneWeight[32] = txf.GetintByIndex(_KEY_geneWeight_40_32);
|
|
geneWeight[33] = txf.GetintByIndex(_KEY_geneWeight_40_33);
|
|
geneWeight[34] = txf.GetintByIndex(_KEY_geneWeight_40_34);
|
|
geneWeight[35] = txf.GetintByIndex(_KEY_geneWeight_40_35);
|
|
geneWeight[36] = txf.GetintByIndex(_KEY_geneWeight_40_36);
|
|
geneWeight[37] = txf.GetintByIndex(_KEY_geneWeight_40_37);
|
|
geneWeight[38] = txf.GetintByIndex(_KEY_geneWeight_40_38);
|
|
geneWeight[39] = txf.GetintByIndex(_KEY_geneWeight_40_39);
|
|
life = txf.GetintByIndex(_KEY_life);
|
|
return true;
|
|
}
|
|
#if UNITY_2019_1_OR_NEWER
|
|
public RaceBloodDesc ReadItemInIL(TabBinFile txf ,int keyCount = 0)
|
|
{
|
|
byte[] ret = txf.GetLength();
|
|
if (ret.Length == 0)
|
|
{
|
|
return null;
|
|
}
|
|
return SerializeObj.ConfigDeSerialize<RaceBloodDesc>(this, ret, txf.ColPosList, txf.listPosList, this.listDic, txf.m_stringBlock, keyCount);
|
|
}
|
|
#endif
|
|
}
|
|
|
|
|