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.
494 lines
22 KiB
494 lines
22 KiB
1 month ago
|
|
||
|
//============================================
|
||
|
//--4>:
|
||
|
// Exported by ExcelConfigExport
|
||
|
//
|
||
|
// 此代码为工具根据配置自动生成, 请不要修改
|
||
|
//
|
||
|
//============================================
|
||
|
|
||
|
using System;
|
||
|
using Sog;
|
||
|
using System.Collections.Generic;
|
||
|
#if UNITY_2019_1_OR_NEWER
|
||
|
using GameLogic;
|
||
|
#endif
|
||
|
|
||
|
public partial class FishEquipDescMgr : IConfigManager
|
||
|
{
|
||
|
//Singleton
|
||
|
private static FishEquipDescMgr _instance;
|
||
|
private static readonly object syslock = new object();
|
||
|
public static FishEquipDescMgr Instance { get { if (_instance == null) { lock (syslock) { if (_instance == null) { _instance = new FishEquipDescMgr(); }}} return _instance; }}
|
||
|
|
||
|
public class ItemData
|
||
|
{
|
||
|
public FishEquipDesc Item;
|
||
|
public int Line;
|
||
|
public bool ReadAlready;
|
||
|
}
|
||
|
protected SortedList<int, SortedList<int, ItemData>> m_ItemTable = new SortedList<int, SortedList<int, ItemData>>();
|
||
|
|
||
|
//for server only, m_readKeyOnly must be false
|
||
|
protected SortedList<int, SortedList<int, FishEquipDesc>> m_ItemDescTable = new SortedList<int, SortedList<int, FishEquipDesc>>();
|
||
|
public SortedList<int, SortedList<int, FishEquipDesc>> ItemTable { get {
|
||
|
if (m_ItemDescTable.Count != m_ItemTable.Count) {
|
||
|
foreach (var list in m_ItemTable) {
|
||
|
if (m_ItemDescTable.ContainsKey(list.Key) == false) {
|
||
|
GetGroup(list.Key);} // GetGroup里会添加
|
||
|
}
|
||
|
}
|
||
|
return m_ItemDescTable; } }
|
||
|
|
||
|
private TabBinFile m_tbf;
|
||
|
//private TabTextFile m_tf;
|
||
|
private int m_curAsynKey1;
|
||
|
private int m_curAsynKey2;
|
||
|
|
||
|
public override bool InitBin(string fileName, byte[] fileContent)
|
||
|
{
|
||
|
m_ErrorCount = 0;
|
||
|
m_ItemTable.Clear();
|
||
|
m_ItemDescTable.Clear();
|
||
|
m_allRead = false;
|
||
|
m_curAsynKey1 = 0;
|
||
|
m_curAsynKey2 = 0;
|
||
|
m_tbf = new TabBinFile(fileName, fileContent);
|
||
|
while (m_tbf.Next())
|
||
|
{
|
||
|
ItemData itemData = new ItemData() { Item = new FishEquipDesc() };
|
||
|
var item = itemData.Item;
|
||
|
if (m_readKeyOnly) {m_tbf.SetCurrentCol(0); }
|
||
|
if (item.ReadItemBin(m_tbf, m_readKeyOnly) == false)
|
||
|
{
|
||
|
TraceLog.Error("Failed to init TabManager:{0}, read line error, line: {1}", this.ToString(), m_tbf.CurrentLine);
|
||
|
m_ErrorCount++;
|
||
|
return false;
|
||
|
}
|
||
|
if (m_ItemTable.ContainsKey(item.GetKey1()) == false)
|
||
|
{
|
||
|
m_ItemTable.Add(item.GetKey1(), new SortedList<int, ItemData>());
|
||
|
}
|
||
|
else if (m_ItemTable[item.GetKey1()].ContainsKey(item.GetKey2()))
|
||
|
{
|
||
|
TraceLog.Error("Failed to init TabManager:{0}, multi key1:{1}, key2: {2}, line: {3}",this.ToString(), item.GetKey1(), item.GetKey2(), m_tbf.CurrentLine);
|
||
|
m_ErrorCount++;
|
||
|
return false;
|
||
|
}
|
||
|
m_ItemTable[item.GetKey1()].Add(item.GetKey2(), 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 FishEquipDesc() };
|
||
|
int keyCount = 0;
|
||
|
if(m_readKeyOnly) {keyCount = 2;}
|
||
|
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()) == false)
|
||
|
{
|
||
|
m_ItemTable.Add(item.GetKey1(), new SortedList<int, ItemData>());
|
||
|
}
|
||
|
else if (m_ItemTable[item.GetKey1()].ContainsKey(item.GetKey2()))
|
||
|
{
|
||
|
TraceLog.Error("Failed to init TabManager:{0}, multi key1:{1}, key2: {2}, line: {3}",this.ToString(), item.GetKey1(), item.GetKey2(), m_tbf.CurrentLine);
|
||
|
m_ErrorCount++;
|
||
|
return false;
|
||
|
}
|
||
|
m_ItemTable[item.GetKey1()].Add(item.GetKey2(), itemData);
|
||
|
if (m_readKeyOnly)
|
||
|
{
|
||
|
itemData.Line = m_tbf.CurrentLine;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
itemData.ReadAlready = true;
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
public FishEquipDesc GetConfig(int key1, int key2)
|
||
|
{
|
||
|
SortedList<int, ItemData> itemDataGroup;
|
||
|
m_ItemTable.TryGetValue(key1, out itemDataGroup);
|
||
|
if (itemDataGroup == null) { return null; }
|
||
|
ItemData itemData;
|
||
|
itemDataGroup.TryGetValue(key2, out itemData);
|
||
|
if(itemData == null)
|
||
|
{
|
||
|
return null;
|
||
|
}
|
||
|
if(itemData.ReadAlready)
|
||
|
{
|
||
|
return itemData.Item;
|
||
|
}
|
||
|
m_tbf.SetCurrentLine(itemData.Line);
|
||
|
m_tbf.SetCurrentCol(0);
|
||
|
itemData.ReadAlready = true;
|
||
|
if (m_tbf == null)
|
||
|
{
|
||
|
TraceLog.Error("Cfg1KeyMgrTemplate.GetConfig Failed fs null TabManager:{ 0}, read line error", this.ToString());
|
||
|
return null;
|
||
|
}
|
||
|
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 int GetCountKey1(int key1)
|
||
|
{
|
||
|
int allCount = 0;
|
||
|
var group = GetGroup(key1);
|
||
|
if(group != null)
|
||
|
{
|
||
|
allCount = group.Count;
|
||
|
}
|
||
|
return allCount;
|
||
|
}
|
||
|
|
||
|
//GetGroup的时候如果是延迟读取的,一次性读取整个group
|
||
|
public SortedList<int, FishEquipDesc> GetGroup(int key1)
|
||
|
{
|
||
|
SortedList<int, ItemData> itemDataGroup;
|
||
|
m_ItemTable.TryGetValue(key1, out itemDataGroup);
|
||
|
if (itemDataGroup == null) { return null; }
|
||
|
if(m_ItemDescTable.ContainsKey(key1)) { return m_ItemDescTable[key1]; }
|
||
|
var group = new SortedList<int, FishEquipDesc>();
|
||
|
foreach (var item in itemDataGroup) {
|
||
|
if(item.Value.ReadAlready == false) { GetConfig(key1, item.Key); }
|
||
|
group.Add(item.Key, item.Value.Item); }
|
||
|
m_ItemDescTable.Add(key1, group);
|
||
|
return group;
|
||
|
}
|
||
|
|
||
|
public bool Has(int key1, int key2) { return m_ItemTable.ContainsKey(key1) && m_ItemTable[key1].ContainsKey(key2); }
|
||
|
|
||
|
public override int AsynReadBin(int maxTimes)
|
||
|
{
|
||
|
int times = 0;
|
||
|
if (m_allRead)
|
||
|
{
|
||
|
return times;
|
||
|
}
|
||
|
if (m_tbf == null)
|
||
|
{
|
||
|
return times;
|
||
|
}
|
||
|
while (times < maxTimes && m_curAsynKey1 < m_ItemTable.Count)
|
||
|
{
|
||
|
var group = m_ItemTable.Values[m_curAsynKey1];
|
||
|
if (m_curAsynKey2 >= group.Count)
|
||
|
{
|
||
|
m_curAsynKey2 = 0;
|
||
|
m_curAsynKey1++;
|
||
|
continue;
|
||
|
}
|
||
|
var itemData = group.Values[m_curAsynKey2];
|
||
|
if (itemData.ReadAlready)
|
||
|
{
|
||
|
m_curAsynKey2++;
|
||
|
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;
|
||
|
}
|
||
|
m_curAsynKey2++;
|
||
|
times++;
|
||
|
}
|
||
|
if (m_curAsynKey1 >= m_ItemTable.Count)
|
||
|
{
|
||
|
m_allRead = true;
|
||
|
m_tbf = null;
|
||
|
}
|
||
|
return times;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
public partial class FishEquipDesc
|
||
|
{
|
||
|
|
||
|
|
||
|
public static readonly string _KEY_id = "id";
|
||
|
public static readonly string _KEY_quality = "quality";
|
||
|
public static readonly string _KEY_qualityMaxLevel = "qualityMaxLevel";
|
||
|
public static readonly string _KEY_breakTask_3_0 = "breakTask_3_0";
|
||
|
public static readonly string _KEY_breakTask_3_1 = "breakTask_3_1";
|
||
|
public static readonly string _KEY_breakTask_3_2 = "breakTask_3_2";
|
||
|
public static readonly string _KEY_baseEffect_2_0 = "baseEffect_2_0";
|
||
|
public static readonly string _KEY_baseEffect_2_1 = "baseEffect_2_1";
|
||
|
public static readonly string _KEY_baseValues_2_0 = "baseValues_2_0";
|
||
|
public static readonly string _KEY_baseValues_2_1 = "baseValues_2_1";
|
||
|
public static readonly string _KEY_baseLevelValues_2_0 = "baseLevelValues_2_0";
|
||
|
public static readonly string _KEY_baseLevelValues_2_1 = "baseLevelValues_2_1";
|
||
|
public static readonly string _KEY_upgradeCostType = "upgradeCostType";
|
||
|
public static readonly string _KEY_upgradeCostItem = "upgradeCostItem";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_0 = "upgradeCostValues_50_0";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_1 = "upgradeCostValues_50_1";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_2 = "upgradeCostValues_50_2";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_3 = "upgradeCostValues_50_3";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_4 = "upgradeCostValues_50_4";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_5 = "upgradeCostValues_50_5";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_6 = "upgradeCostValues_50_6";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_7 = "upgradeCostValues_50_7";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_8 = "upgradeCostValues_50_8";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_9 = "upgradeCostValues_50_9";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_10 = "upgradeCostValues_50_10";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_11 = "upgradeCostValues_50_11";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_12 = "upgradeCostValues_50_12";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_13 = "upgradeCostValues_50_13";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_14 = "upgradeCostValues_50_14";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_15 = "upgradeCostValues_50_15";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_16 = "upgradeCostValues_50_16";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_17 = "upgradeCostValues_50_17";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_18 = "upgradeCostValues_50_18";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_19 = "upgradeCostValues_50_19";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_20 = "upgradeCostValues_50_20";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_21 = "upgradeCostValues_50_21";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_22 = "upgradeCostValues_50_22";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_23 = "upgradeCostValues_50_23";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_24 = "upgradeCostValues_50_24";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_25 = "upgradeCostValues_50_25";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_26 = "upgradeCostValues_50_26";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_27 = "upgradeCostValues_50_27";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_28 = "upgradeCostValues_50_28";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_29 = "upgradeCostValues_50_29";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_30 = "upgradeCostValues_50_30";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_31 = "upgradeCostValues_50_31";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_32 = "upgradeCostValues_50_32";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_33 = "upgradeCostValues_50_33";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_34 = "upgradeCostValues_50_34";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_35 = "upgradeCostValues_50_35";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_36 = "upgradeCostValues_50_36";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_37 = "upgradeCostValues_50_37";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_38 = "upgradeCostValues_50_38";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_39 = "upgradeCostValues_50_39";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_40 = "upgradeCostValues_50_40";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_41 = "upgradeCostValues_50_41";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_42 = "upgradeCostValues_50_42";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_43 = "upgradeCostValues_50_43";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_44 = "upgradeCostValues_50_44";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_45 = "upgradeCostValues_50_45";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_46 = "upgradeCostValues_50_46";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_47 = "upgradeCostValues_50_47";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_48 = "upgradeCostValues_50_48";
|
||
|
public static readonly string _KEY_upgradeCostValues_50_49 = "upgradeCostValues_50_49";
|
||
|
|
||
|
public int id { get; set; } // //渔具id
|
||
|
public int quality { get; set; } // //资质标识
|
||
|
public int qualityMaxLevel { get; set; } // //不同品质对应等级上限
|
||
|
public int[] breakTask { get; set; } // //不同品质突破任务,QuestEXDesc表id
|
||
|
public int[] baseEffect { get; set; } // //钓鱼属性类型
|
||
|
public int[] baseValues { get; set; } // //基础属性参数(万分比) 渔具属性=前一资质属性和+ 资质基础属性+(等级-1)*资质等级成长属性
|
||
|
public int[] baseLevelValues { get; set; } // //属性成长参数(万分比) 渔具属性=前一资质属性和+ 资质基础属性+(等级-1)*资质等级成长属性
|
||
|
public int upgradeCostType { get; set; } // //升级消耗道具类型
|
||
|
public int upgradeCostItem { get; set; } // //升级消耗道具id
|
||
|
public int[] upgradeCostValues { get; set; } // //升级消耗道具数量
|
||
|
|
||
|
public Dictionary<string, Type> listDic = new Dictionary<string, Type>();
|
||
|
public FishEquipDesc()
|
||
|
{
|
||
|
breakTask = new int[3];
|
||
|
listDic.Add("breakTask", typeof(int));
|
||
|
baseEffect = new int[2];
|
||
|
listDic.Add("baseEffect", typeof(int));
|
||
|
baseValues = new int[2];
|
||
|
listDic.Add("baseValues", typeof(int));
|
||
|
baseLevelValues = new int[2];
|
||
|
listDic.Add("baseLevelValues", typeof(int));
|
||
|
upgradeCostValues = new int[50];
|
||
|
listDic.Add("upgradeCostValues", typeof(int));
|
||
|
}
|
||
|
|
||
|
public int GetKey1() { return id; }
|
||
|
|
||
|
public int GetKey2() { return quality; }
|
||
|
|
||
|
public bool ReadItem(TabTextFile txf, bool readKeyOnly)
|
||
|
{
|
||
|
id = txf.Get<int>(_KEY_id);
|
||
|
quality = txf.Get<int>(_KEY_quality);
|
||
|
if(readKeyOnly) { return true; }
|
||
|
qualityMaxLevel = txf.Get<int>(_KEY_qualityMaxLevel);
|
||
|
breakTask[0] = txf.Get<int>(_KEY_breakTask_3_0);
|
||
|
breakTask[1] = txf.Get<int>(_KEY_breakTask_3_1);
|
||
|
breakTask[2] = txf.Get<int>(_KEY_breakTask_3_2);
|
||
|
baseEffect[0] = txf.Get<int>(_KEY_baseEffect_2_0);
|
||
|
baseEffect[1] = txf.Get<int>(_KEY_baseEffect_2_1);
|
||
|
baseValues[0] = txf.Get<int>(_KEY_baseValues_2_0);
|
||
|
baseValues[1] = txf.Get<int>(_KEY_baseValues_2_1);
|
||
|
baseLevelValues[0] = txf.Get<int>(_KEY_baseLevelValues_2_0);
|
||
|
baseLevelValues[1] = txf.Get<int>(_KEY_baseLevelValues_2_1);
|
||
|
upgradeCostType = txf.Get<int>(_KEY_upgradeCostType);
|
||
|
upgradeCostItem = txf.Get<int>(_KEY_upgradeCostItem);
|
||
|
upgradeCostValues[0] = txf.Get<int>(_KEY_upgradeCostValues_50_0);
|
||
|
upgradeCostValues[1] = txf.Get<int>(_KEY_upgradeCostValues_50_1);
|
||
|
upgradeCostValues[2] = txf.Get<int>(_KEY_upgradeCostValues_50_2);
|
||
|
upgradeCostValues[3] = txf.Get<int>(_KEY_upgradeCostValues_50_3);
|
||
|
upgradeCostValues[4] = txf.Get<int>(_KEY_upgradeCostValues_50_4);
|
||
|
upgradeCostValues[5] = txf.Get<int>(_KEY_upgradeCostValues_50_5);
|
||
|
upgradeCostValues[6] = txf.Get<int>(_KEY_upgradeCostValues_50_6);
|
||
|
upgradeCostValues[7] = txf.Get<int>(_KEY_upgradeCostValues_50_7);
|
||
|
upgradeCostValues[8] = txf.Get<int>(_KEY_upgradeCostValues_50_8);
|
||
|
upgradeCostValues[9] = txf.Get<int>(_KEY_upgradeCostValues_50_9);
|
||
|
upgradeCostValues[10] = txf.Get<int>(_KEY_upgradeCostValues_50_10);
|
||
|
upgradeCostValues[11] = txf.Get<int>(_KEY_upgradeCostValues_50_11);
|
||
|
upgradeCostValues[12] = txf.Get<int>(_KEY_upgradeCostValues_50_12);
|
||
|
upgradeCostValues[13] = txf.Get<int>(_KEY_upgradeCostValues_50_13);
|
||
|
upgradeCostValues[14] = txf.Get<int>(_KEY_upgradeCostValues_50_14);
|
||
|
upgradeCostValues[15] = txf.Get<int>(_KEY_upgradeCostValues_50_15);
|
||
|
upgradeCostValues[16] = txf.Get<int>(_KEY_upgradeCostValues_50_16);
|
||
|
upgradeCostValues[17] = txf.Get<int>(_KEY_upgradeCostValues_50_17);
|
||
|
upgradeCostValues[18] = txf.Get<int>(_KEY_upgradeCostValues_50_18);
|
||
|
upgradeCostValues[19] = txf.Get<int>(_KEY_upgradeCostValues_50_19);
|
||
|
upgradeCostValues[20] = txf.Get<int>(_KEY_upgradeCostValues_50_20);
|
||
|
upgradeCostValues[21] = txf.Get<int>(_KEY_upgradeCostValues_50_21);
|
||
|
upgradeCostValues[22] = txf.Get<int>(_KEY_upgradeCostValues_50_22);
|
||
|
upgradeCostValues[23] = txf.Get<int>(_KEY_upgradeCostValues_50_23);
|
||
|
upgradeCostValues[24] = txf.Get<int>(_KEY_upgradeCostValues_50_24);
|
||
|
upgradeCostValues[25] = txf.Get<int>(_KEY_upgradeCostValues_50_25);
|
||
|
upgradeCostValues[26] = txf.Get<int>(_KEY_upgradeCostValues_50_26);
|
||
|
upgradeCostValues[27] = txf.Get<int>(_KEY_upgradeCostValues_50_27);
|
||
|
upgradeCostValues[28] = txf.Get<int>(_KEY_upgradeCostValues_50_28);
|
||
|
upgradeCostValues[29] = txf.Get<int>(_KEY_upgradeCostValues_50_29);
|
||
|
upgradeCostValues[30] = txf.Get<int>(_KEY_upgradeCostValues_50_30);
|
||
|
upgradeCostValues[31] = txf.Get<int>(_KEY_upgradeCostValues_50_31);
|
||
|
upgradeCostValues[32] = txf.Get<int>(_KEY_upgradeCostValues_50_32);
|
||
|
upgradeCostValues[33] = txf.Get<int>(_KEY_upgradeCostValues_50_33);
|
||
|
upgradeCostValues[34] = txf.Get<int>(_KEY_upgradeCostValues_50_34);
|
||
|
upgradeCostValues[35] = txf.Get<int>(_KEY_upgradeCostValues_50_35);
|
||
|
upgradeCostValues[36] = txf.Get<int>(_KEY_upgradeCostValues_50_36);
|
||
|
upgradeCostValues[37] = txf.Get<int>(_KEY_upgradeCostValues_50_37);
|
||
|
upgradeCostValues[38] = txf.Get<int>(_KEY_upgradeCostValues_50_38);
|
||
|
upgradeCostValues[39] = txf.Get<int>(_KEY_upgradeCostValues_50_39);
|
||
|
upgradeCostValues[40] = txf.Get<int>(_KEY_upgradeCostValues_50_40);
|
||
|
upgradeCostValues[41] = txf.Get<int>(_KEY_upgradeCostValues_50_41);
|
||
|
upgradeCostValues[42] = txf.Get<int>(_KEY_upgradeCostValues_50_42);
|
||
|
upgradeCostValues[43] = txf.Get<int>(_KEY_upgradeCostValues_50_43);
|
||
|
upgradeCostValues[44] = txf.Get<int>(_KEY_upgradeCostValues_50_44);
|
||
|
upgradeCostValues[45] = txf.Get<int>(_KEY_upgradeCostValues_50_45);
|
||
|
upgradeCostValues[46] = txf.Get<int>(_KEY_upgradeCostValues_50_46);
|
||
|
upgradeCostValues[47] = txf.Get<int>(_KEY_upgradeCostValues_50_47);
|
||
|
upgradeCostValues[48] = txf.Get<int>(_KEY_upgradeCostValues_50_48);
|
||
|
upgradeCostValues[49] = txf.Get<int>(_KEY_upgradeCostValues_50_49);
|
||
|
return true;
|
||
|
}
|
||
|
public bool ReadItemBin(TabBinFile txf, bool readKeyOnly)
|
||
|
{
|
||
|
id = txf.GetintByIndex(_KEY_id);
|
||
|
quality = txf.GetintByIndex(_KEY_quality);
|
||
|
if(readKeyOnly) { return true; }
|
||
|
qualityMaxLevel = txf.GetintByIndex(_KEY_qualityMaxLevel);
|
||
|
breakTask[0] = txf.GetintByIndex(_KEY_breakTask_3_0);
|
||
|
breakTask[1] = txf.GetintByIndex(_KEY_breakTask_3_1);
|
||
|
breakTask[2] = txf.GetintByIndex(_KEY_breakTask_3_2);
|
||
|
baseEffect[0] = txf.GetintByIndex(_KEY_baseEffect_2_0);
|
||
|
baseEffect[1] = txf.GetintByIndex(_KEY_baseEffect_2_1);
|
||
|
baseValues[0] = txf.GetintByIndex(_KEY_baseValues_2_0);
|
||
|
baseValues[1] = txf.GetintByIndex(_KEY_baseValues_2_1);
|
||
|
baseLevelValues[0] = txf.GetintByIndex(_KEY_baseLevelValues_2_0);
|
||
|
baseLevelValues[1] = txf.GetintByIndex(_KEY_baseLevelValues_2_1);
|
||
|
upgradeCostType = txf.GetintByIndex(_KEY_upgradeCostType);
|
||
|
upgradeCostItem = txf.GetintByIndex(_KEY_upgradeCostItem);
|
||
|
upgradeCostValues[0] = txf.GetintByIndex(_KEY_upgradeCostValues_50_0);
|
||
|
upgradeCostValues[1] = txf.GetintByIndex(_KEY_upgradeCostValues_50_1);
|
||
|
upgradeCostValues[2] = txf.GetintByIndex(_KEY_upgradeCostValues_50_2);
|
||
|
upgradeCostValues[3] = txf.GetintByIndex(_KEY_upgradeCostValues_50_3);
|
||
|
upgradeCostValues[4] = txf.GetintByIndex(_KEY_upgradeCostValues_50_4);
|
||
|
upgradeCostValues[5] = txf.GetintByIndex(_KEY_upgradeCostValues_50_5);
|
||
|
upgradeCostValues[6] = txf.GetintByIndex(_KEY_upgradeCostValues_50_6);
|
||
|
upgradeCostValues[7] = txf.GetintByIndex(_KEY_upgradeCostValues_50_7);
|
||
|
upgradeCostValues[8] = txf.GetintByIndex(_KEY_upgradeCostValues_50_8);
|
||
|
upgradeCostValues[9] = txf.GetintByIndex(_KEY_upgradeCostValues_50_9);
|
||
|
upgradeCostValues[10] = txf.GetintByIndex(_KEY_upgradeCostValues_50_10);
|
||
|
upgradeCostValues[11] = txf.GetintByIndex(_KEY_upgradeCostValues_50_11);
|
||
|
upgradeCostValues[12] = txf.GetintByIndex(_KEY_upgradeCostValues_50_12);
|
||
|
upgradeCostValues[13] = txf.GetintByIndex(_KEY_upgradeCostValues_50_13);
|
||
|
upgradeCostValues[14] = txf.GetintByIndex(_KEY_upgradeCostValues_50_14);
|
||
|
upgradeCostValues[15] = txf.GetintByIndex(_KEY_upgradeCostValues_50_15);
|
||
|
upgradeCostValues[16] = txf.GetintByIndex(_KEY_upgradeCostValues_50_16);
|
||
|
upgradeCostValues[17] = txf.GetintByIndex(_KEY_upgradeCostValues_50_17);
|
||
|
upgradeCostValues[18] = txf.GetintByIndex(_KEY_upgradeCostValues_50_18);
|
||
|
upgradeCostValues[19] = txf.GetintByIndex(_KEY_upgradeCostValues_50_19);
|
||
|
upgradeCostValues[20] = txf.GetintByIndex(_KEY_upgradeCostValues_50_20);
|
||
|
upgradeCostValues[21] = txf.GetintByIndex(_KEY_upgradeCostValues_50_21);
|
||
|
upgradeCostValues[22] = txf.GetintByIndex(_KEY_upgradeCostValues_50_22);
|
||
|
upgradeCostValues[23] = txf.GetintByIndex(_KEY_upgradeCostValues_50_23);
|
||
|
upgradeCostValues[24] = txf.GetintByIndex(_KEY_upgradeCostValues_50_24);
|
||
|
upgradeCostValues[25] = txf.GetintByIndex(_KEY_upgradeCostValues_50_25);
|
||
|
upgradeCostValues[26] = txf.GetintByIndex(_KEY_upgradeCostValues_50_26);
|
||
|
upgradeCostValues[27] = txf.GetintByIndex(_KEY_upgradeCostValues_50_27);
|
||
|
upgradeCostValues[28] = txf.GetintByIndex(_KEY_upgradeCostValues_50_28);
|
||
|
upgradeCostValues[29] = txf.GetintByIndex(_KEY_upgradeCostValues_50_29);
|
||
|
upgradeCostValues[30] = txf.GetintByIndex(_KEY_upgradeCostValues_50_30);
|
||
|
upgradeCostValues[31] = txf.GetintByIndex(_KEY_upgradeCostValues_50_31);
|
||
|
upgradeCostValues[32] = txf.GetintByIndex(_KEY_upgradeCostValues_50_32);
|
||
|
upgradeCostValues[33] = txf.GetintByIndex(_KEY_upgradeCostValues_50_33);
|
||
|
upgradeCostValues[34] = txf.GetintByIndex(_KEY_upgradeCostValues_50_34);
|
||
|
upgradeCostValues[35] = txf.GetintByIndex(_KEY_upgradeCostValues_50_35);
|
||
|
upgradeCostValues[36] = txf.GetintByIndex(_KEY_upgradeCostValues_50_36);
|
||
|
upgradeCostValues[37] = txf.GetintByIndex(_KEY_upgradeCostValues_50_37);
|
||
|
upgradeCostValues[38] = txf.GetintByIndex(_KEY_upgradeCostValues_50_38);
|
||
|
upgradeCostValues[39] = txf.GetintByIndex(_KEY_upgradeCostValues_50_39);
|
||
|
upgradeCostValues[40] = txf.GetintByIndex(_KEY_upgradeCostValues_50_40);
|
||
|
upgradeCostValues[41] = txf.GetintByIndex(_KEY_upgradeCostValues_50_41);
|
||
|
upgradeCostValues[42] = txf.GetintByIndex(_KEY_upgradeCostValues_50_42);
|
||
|
upgradeCostValues[43] = txf.GetintByIndex(_KEY_upgradeCostValues_50_43);
|
||
|
upgradeCostValues[44] = txf.GetintByIndex(_KEY_upgradeCostValues_50_44);
|
||
|
upgradeCostValues[45] = txf.GetintByIndex(_KEY_upgradeCostValues_50_45);
|
||
|
upgradeCostValues[46] = txf.GetintByIndex(_KEY_upgradeCostValues_50_46);
|
||
|
upgradeCostValues[47] = txf.GetintByIndex(_KEY_upgradeCostValues_50_47);
|
||
|
upgradeCostValues[48] = txf.GetintByIndex(_KEY_upgradeCostValues_50_48);
|
||
|
upgradeCostValues[49] = txf.GetintByIndex(_KEY_upgradeCostValues_50_49);
|
||
|
return true;
|
||
|
}
|
||
|
#if UNITY_2019_1_OR_NEWER
|
||
|
public FishEquipDesc ReadItemInIL(TabBinFile txf ,int keyCount = 0)
|
||
|
{
|
||
|
byte[] ret = txf.GetLength();
|
||
|
if (ret.Length == 0)
|
||
|
{
|
||
|
return null;
|
||
|
}
|
||
|
return SerializeObj.ConfigDeSerialize<FishEquipDesc>(this, ret, txf.ColPosList, txf.listPosList, this.listDic, txf.m_stringBlock, keyCount);
|
||
|
}
|
||
|
#endif
|
||
|
}
|
||
|
|