|
@@ -4,14 +4,10 @@ using ET;
|
|
|
|
|
|
namespace GFGGame
|
|
|
{
|
|
|
- public class CustomSuitDataManager
|
|
|
+ public class CustomSuitDataManager : Singleton<CustomSuitDataManager>
|
|
|
{
|
|
|
private static int _currentIndex;
|
|
|
public static int currentIndex { get; set; }
|
|
|
- private const int _defaultPosCount = 3;
|
|
|
- private static MonthlyCardPrivilegeCfg privilegeCfg = MonthlyCardPrivilegeCfgArray.Instance.GetCfg(MonthCardPrivilegeType.Privilege3);
|
|
|
-
|
|
|
- // private string[] posItems = new string[_defaultPosCount + privilegeCfg.value1Arr[0] + privilegeCfg.value2Arr[1]];
|
|
|
|
|
|
private static Dictionary<int, CustomSuitData> _dataDic = new Dictionary<int, CustomSuitData>();
|
|
|
public static void SaveSuit(int index, DressUpData dressUpData)
|
|
@@ -85,19 +81,53 @@ namespace GFGGame
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //检测是否是月卡位置,0默认位置
|
|
|
- public static bool CheckIsCardPos(int cardType, int pos)
|
|
|
+ public static string[] GetSuitPosItems()
|
|
|
+ {
|
|
|
+ MonthlyCardPrivilegeCfg privilegeCfg = MonthlyCardPrivilegeCfgArray.Instance.GetCfg(MonthCardPrivilegeType.Privilege3);
|
|
|
+ string[] posItems = new string[GlobalCfgArray.globalCfg.freeSuitNum + privilegeCfg.value1Arr[0] + privilegeCfg.value2Arr[0]];
|
|
|
+ for (int i = 0; i < posItems.Length; i++)
|
|
|
+ {
|
|
|
+ if (GetPosType(i) == 0)
|
|
|
+ {
|
|
|
+ posItems[i] = string.Format("我的套装{0}", NumberUtil.GetChiniseNumberText(i + 1));
|
|
|
+ }
|
|
|
+ else if (GetPosType(i) == MonthCardType.Gold)
|
|
|
+ {
|
|
|
+ if (RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.Gold))
|
|
|
+ {
|
|
|
+ posItems[i] = string.Format("我的套装{0}", NumberUtil.GetChiniseNumberText(i + 1));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ posItems[i] = "金卡开启";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (GetPosType(i) == MonthCardType.BlackGold)
|
|
|
+ {
|
|
|
+ if (RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.BlackGold))
|
|
|
+ {
|
|
|
+ posItems[i] = string.Format("我的套装{0}", NumberUtil.GetChiniseNumberText(i + 1));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ posItems[i] = "黑金卡开启";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return posItems;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //获取指定位置月卡类型
|
|
|
+ public static int GetPosType(int pos)
|
|
|
{
|
|
|
- // if (pos < _defaultPosCount) return false;
|
|
|
+ if (pos < GlobalCfgArray.globalCfg.freeSuitNum) return 0;
|
|
|
|
|
|
- // for (int i = _defaultPosCount; i < posItems.Length; i++)
|
|
|
- // {
|
|
|
- // if (cardType == MonthCardType.Gold && pos <)
|
|
|
- // {
|
|
|
+ MonthlyCardPrivilegeCfg privilegeCfg = MonthlyCardPrivilegeCfgArray.Instance.GetCfg(MonthCardPrivilegeType.Privilege3);
|
|
|
+ if (pos < GlobalCfgArray.globalCfg.freeSuitNum + privilegeCfg.value1Arr[0]) return MonthCardType.Gold;
|
|
|
+ if (pos >= GlobalCfgArray.globalCfg.freeSuitNum + privilegeCfg.value1Arr[0]) return MonthCardType.BlackGold;
|
|
|
|
|
|
- // }
|
|
|
- // }
|
|
|
- return false;
|
|
|
+ return 0;
|
|
|
}
|
|
|
}
|
|
|
}
|