using System.Collections.Generic;
|
|
// 通用的读config方法
|
public partial class PhantasmPavilionManager : GameSystemManager<PhantasmPavilionManager>
|
{
|
public bool Has(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return false;
|
return handler.HasTableKey(id);
|
}
|
public List<int> GetTableKeys(PhantasmPavilionType type)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return new List<int>();
|
return handler.GetKeyList();
|
}
|
public string GetName(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return string.Empty;
|
if (!Has(type, id))
|
return string.Empty;
|
return handler.GetName(id);
|
}
|
public int GetExpireMinutes(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return 0;
|
if (!Has(type, id))
|
return 0;
|
return handler.GetExpireMinutes(id);
|
}
|
|
public int GetUnlockWay(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return 0;
|
if (!Has(type, id))
|
return 0;
|
return handler.GetUnlockWay(id);
|
}
|
|
public int GetUnlockValue(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return 0;
|
if (!Has(type, id))
|
return 0;
|
return handler.GetUnlockValue(id);
|
}
|
|
public int GetUnlockNeedCnt(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return 0;
|
if (!Has(type, id))
|
return 0;
|
return handler.GetUnlockNeedCnt(id);
|
}
|
|
public int GetUpNeedCnt(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return 0;
|
if (!Has(type, id))
|
return 0;
|
return handler.GetUpNeedCnt(id);
|
}
|
public int GetStarMax(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return 0;
|
if (!Has(type, id))
|
return 0;
|
return handler.GetStarMax(id);
|
}
|
|
public int[] GetAttrIDList(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return null;
|
if (!Has(type, id))
|
return null;
|
return handler.GetAttrIDList(id);
|
}
|
public int[] GetInitAttrValueList(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return null;
|
if (!Has(type, id))
|
return null;
|
return handler.GetInitAttrValueList(id);
|
}
|
|
public int[] GetAttrPerStarAddList(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return null;
|
if (!Has(type, id))
|
return null;
|
return handler.GetAttrPerStarAddList(id);
|
}
|
|
public int GetResourceType(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return 0;
|
if (!Has(type, id))
|
return 0;
|
return handler.GetResourceType(id);
|
}
|
|
public string GetResourceValue(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return string.Empty;
|
if (!Has(type, id))
|
return string.Empty;
|
return handler.GetResourceValue(id);
|
}
|
|
public string GetGetWayString(PhantasmPavilionType type, int id)
|
{
|
if (!TryGetHandlerValue(type, out var handler))
|
return string.Empty;
|
if (!Has(type, id))
|
return string.Empty;
|
return handler.GetGetWayString(id);
|
}
|
}
|