108 lines
3.2 KiB
C#
108 lines
3.2 KiB
C#
using CodeStage.AntiCheat.ObscuredTypes;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
[Serializable]
|
|
public class EquipmentCraftingTableData : TableDataBase
|
|
{
|
|
ObscuredInt _CraftingItemID;
|
|
public int n_CraftingItemID
|
|
{
|
|
get { return _CraftingItemID; }
|
|
set { _CraftingItemID = value; _CraftingItemID.RandomizeCryptoKey(); }
|
|
} // 제작할 아이템 ID
|
|
|
|
ObscuredInt _MainGoodsID;
|
|
public int n_MainGoodsID
|
|
{
|
|
get { return _MainGoodsID; }
|
|
set { _MainGoodsID = value; _MainGoodsID.RandomizeCryptoKey(); }
|
|
} // 제작할 아이템에 소모될 메인 재화 ID
|
|
|
|
ObscuredInt _MainGoodsCount;
|
|
public int n_MainGoodsCount
|
|
{
|
|
get { return _MainGoodsCount; }
|
|
set { _MainGoodsCount = value; _MainGoodsCount.RandomizeCryptoKey(); }
|
|
} // 제작할 아이템에 소모될 메인 재화 수량
|
|
|
|
ObscuredInt _MaterialValue1;
|
|
public int n_MaterialValue1
|
|
{
|
|
get { return _MaterialValue1; }
|
|
set { _MaterialValue1 = value; _MaterialValue1.RandomizeCryptoKey(); }
|
|
} // 재료1 ID
|
|
|
|
ObscuredInt _MaterialCount1;
|
|
public int n_MaterialCount1
|
|
{
|
|
get { return _MaterialCount1; }
|
|
set { _MaterialCount1 = value; _MaterialCount1.RandomizeCryptoKey(); }
|
|
} // 재료1 수량
|
|
|
|
ObscuredInt _MaterialValue2;
|
|
public int n_MaterialValue2
|
|
{
|
|
get { return _MaterialValue2; }
|
|
set { _MaterialValue2 = value; _MaterialValue2.RandomizeCryptoKey(); }
|
|
} // 재료2 ID
|
|
|
|
ObscuredInt _MaterialCount2;
|
|
public int n_MaterialCount2
|
|
{
|
|
get { return _MaterialCount2; }
|
|
set { _MaterialCount2 = value; _MaterialCount2.RandomizeCryptoKey(); }
|
|
} // 재료2 수량
|
|
|
|
ObscuredInt _MaterialValue3;
|
|
public int n_MaterialValue3
|
|
{
|
|
get { return _MaterialValue3; }
|
|
set { _MaterialValue3 = value; _MaterialValue3.RandomizeCryptoKey(); }
|
|
} // 재료3 ID
|
|
|
|
ObscuredInt _MaterialCount3;
|
|
public int n_MaterialCount3
|
|
{
|
|
get { return _MaterialCount3; }
|
|
set { _MaterialCount3 = value; _MaterialCount3.RandomizeCryptoKey(); }
|
|
} // 재료3 수량
|
|
|
|
ObscuredInt _MaterialCount;
|
|
public int MaterialCount
|
|
{
|
|
get { return _MaterialCount; }
|
|
set { _MaterialCount = value; _MaterialCount.RandomizeCryptoKey(); }
|
|
} // 재료 수량
|
|
}
|
|
|
|
public class table_equipcrafting : table_missionbase
|
|
{
|
|
public static table_equipcrafting Ins;
|
|
List<EquipmentCraftingTableData> tableDatas;
|
|
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
Ins = this;
|
|
}
|
|
|
|
protected override void Start()
|
|
{
|
|
tableDatas = JsonConvert.DeserializeObject<List<EquipmentCraftingTableData>>(json_last);
|
|
|
|
for (int i = 0; i < Get_DataList().Count; i++)
|
|
{
|
|
var temp = Get_DataList()[i];
|
|
temp.MaterialCount = temp.n_MaterialValue1 > 0 ? 1 : 0;
|
|
temp.MaterialCount += temp.n_MaterialValue2 > 0 ? 1 : 0;
|
|
temp.MaterialCount += temp.n_MaterialValue3 > 0 ? 1 : 0;
|
|
}
|
|
|
|
base.Start();
|
|
}
|
|
|
|
public EquipmentCraftingTableData Get_Data(int id) { return Get_DataList().Find(f => f.n_CraftingItemID == id); }
|
|
public List<EquipmentCraftingTableData> Get_DataList() { return tableDatas; }
|
|
} |