56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
using cfg.ActorCfg;
|
|
using cfg.VihecleCultivateCfg;
|
|
using Framework;
|
|
using NLDPB;
|
|
using System.Collections.Generic;
|
|
|
|
public static class VehicleCulitvateLevelUpBonusTableHelper
|
|
{
|
|
public static float GetMaxValBonusByID(uint Id,BonusType bType)
|
|
{
|
|
float val = 0;
|
|
VehicleUpgradeBonusAttri mTable = TableManager.Instance.Tables.VehicleUpgradeBonusAttri;
|
|
for (int i = 0;i<mTable.DataList.Count;i++)
|
|
{
|
|
if ((mTable.DataList[i].BonusType==bType)
|
|
&& (mTable.DataList[i].ID==Id))
|
|
{
|
|
val = val + mTable.DataList[i].BonusPropertyCount;
|
|
}
|
|
}
|
|
return val;
|
|
}
|
|
public static void GetSameIDBonusList(List<DataVehicleUpgradeBonus>retList,int id)
|
|
{
|
|
VehicleUpgradeBonusAttri mTable = TableManager.Instance.Tables.VehicleUpgradeBonusAttri;
|
|
retList.Clear();
|
|
for (int i = 0; i < mTable.DataList.Count; i++)
|
|
{
|
|
if (mTable.DataList[i].ID==id)
|
|
{
|
|
retList.Add(mTable.DataList[i]);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
public static class VehicleUpgradeTableHelper
|
|
{
|
|
public static DataVehicleUpgrade Get(int ID,cfg.ActorCfg.VihecleUpgradeType utype)
|
|
{
|
|
VehicleUpgrade mTable = TableManager.Instance.Tables.VehicleUpgrade;
|
|
if(mTable.Get(ID, utype)!=null)
|
|
{
|
|
return mTable.Get(ID, utype);
|
|
}else
|
|
{
|
|
DebugUtil.LogError("VehicleUpgrade表没有Id为{0},升级类型为{1}的数据", ID, utype);
|
|
return mTable.DataList[0];
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|