|
@@ -88,7 +88,6 @@ namespace GFGGame
|
|
MonthlyCardPrivilegeCfg privilegeCfg = MonthlyCardPrivilegeCfgArray.Instance.GetCfg(MonthCardPrivilegeType.Privilege1);
|
|
MonthlyCardPrivilegeCfg privilegeCfg = MonthlyCardPrivilegeCfgArray.Instance.GetCfg(MonthCardPrivilegeType.Privilege1);
|
|
|
|
|
|
string iconUrl = "";
|
|
string iconUrl = "";
|
|
- bool isFirstBuy = false;
|
|
|
|
bool isGot = false;
|
|
bool isGot = false;
|
|
long endTime = 0;
|
|
long endTime = 0;
|
|
int privilegeCount = 0;
|
|
int privilegeCount = 0;
|
|
@@ -98,7 +97,6 @@ namespace GFGGame
|
|
case ConstStoreSubId.STORE_MONTH_GOLD_CARD:
|
|
case ConstStoreSubId.STORE_MONTH_GOLD_CARD:
|
|
iconUrl = "ui://Store/MonthCard_Icon";
|
|
iconUrl = "ui://Store/MonthCard_Icon";
|
|
monthCfg = MonthlyCardCfgArray.Instance.GetCfg(MonthCardType.Gold);
|
|
monthCfg = MonthlyCardCfgArray.Instance.GetCfg(MonthCardType.Gold);
|
|
- isFirstBuy = GameGlobal.myNumericComponent.GetAsInt(NumericType.MonthCardGoldFirstBuy) <= 0;
|
|
|
|
endTime = GameGlobal.myNumericComponent.GetAsLong(NumericType.MonthCardGoldEndTime);
|
|
endTime = GameGlobal.myNumericComponent.GetAsLong(NumericType.MonthCardGoldEndTime);
|
|
isGot = GameGlobal.myNumericComponent.GetAsInt(NumericType.MonthCardGoldReward) > 0;
|
|
isGot = GameGlobal.myNumericComponent.GetAsInt(NumericType.MonthCardGoldReward) > 0;
|
|
for (int i = 0; i < MonthlyCardPrivilegeCfgArray.Instance.dataArray.Length; i++)
|
|
for (int i = 0; i < MonthlyCardPrivilegeCfgArray.Instance.dataArray.Length; i++)
|
|
@@ -116,7 +114,6 @@ namespace GFGGame
|
|
case ConstStoreSubId.STORE_MONTH_BLACK_CARD:
|
|
case ConstStoreSubId.STORE_MONTH_BLACK_CARD:
|
|
iconUrl = "ui://Store/MonthCard_Icon";
|
|
iconUrl = "ui://Store/MonthCard_Icon";
|
|
monthCfg = MonthlyCardCfgArray.Instance.GetCfg(MonthCardType.BlackGold);
|
|
monthCfg = MonthlyCardCfgArray.Instance.GetCfg(MonthCardType.BlackGold);
|
|
- isFirstBuy = GameGlobal.myNumericComponent.GetAsInt(NumericType.MonthCardBlackGoldFirstBuy) <= 0;
|
|
|
|
endTime = GameGlobal.myNumericComponent.GetAsLong(NumericType.MonthCardBlackGoldEndTime);
|
|
endTime = GameGlobal.myNumericComponent.GetAsLong(NumericType.MonthCardBlackGoldEndTime);
|
|
isGot = GameGlobal.myNumericComponent.GetAsInt(NumericType.MonthCardBlackGoldReward) > 0;
|
|
isGot = GameGlobal.myNumericComponent.GetAsInt(NumericType.MonthCardBlackGoldReward) > 0;
|
|
for (int i = 0; i < MonthlyCardPrivilegeCfgArray.Instance.dataArray.Length; i++)
|
|
for (int i = 0; i < MonthlyCardPrivilegeCfgArray.Instance.dataArray.Length; i++)
|
|
@@ -139,11 +136,19 @@ namespace GFGGame
|
|
_ui.m_txtTime.visible = endTime > TimeHelper.ServerNow();
|
|
_ui.m_txtTime.visible = endTime > TimeHelper.ServerNow();
|
|
_ui.m_loaCard.url = iconUrl;
|
|
_ui.m_loaCard.url = iconUrl;
|
|
ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(monthCfg.shopId);
|
|
ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(monthCfg.shopId);
|
|
- _ui.m_btnBuy.m_txtOriginalPrice.text = shopCfg.price.ToString();
|
|
|
|
- _ui.m_btnBuy.m_grpOriginalPrice.visible = isFirstBuy && shopCfg.oncePrice < shopCfg.price;
|
|
|
|
- int price = isFirstBuy ? shopCfg.oncePrice : shopCfg.price;
|
|
|
|
|
|
+ if(shopCfg.onceShopId > 0)
|
|
|
|
+ {
|
|
|
|
+ //如果配置了首次购买物品,使用特殊物品购买
|
|
|
|
+ if(ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.onceShopId) <= 0)
|
|
|
|
+ {
|
|
|
|
+ shopCfg = ShopCfgArray.Instance.GetCfg(shopCfg.onceShopId);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ _ui.m_btnBuy.m_txtOriginalPrice.text = shopCfg.originalPrice.ToString();
|
|
|
|
+ _ui.m_btnBuy.m_grpOriginalPrice.visible = shopCfg.price < shopCfg.originalPrice;
|
|
|
|
+ int price = shopCfg.price;
|
|
_ui.m_btnBuy.m_txtPrice.text = price.ToString();
|
|
_ui.m_btnBuy.m_txtPrice.text = price.ToString();
|
|
- _ui.m_btnBuy.target.data = monthCfg.shopId;
|
|
|
|
|
|
+ _ui.m_btnBuy.target.data = shopCfg.id;
|
|
_ui.m_txtTips.SetVar("value", (price * 10).ToString()).FlushVars();
|
|
_ui.m_txtTips.SetVar("value", (price * 10).ToString()).FlushVars();
|
|
_ui.m_txtTips.SetVar("day", monthCfg.limitDays.ToString()).FlushVars();
|
|
_ui.m_txtTips.SetVar("day", monthCfg.limitDays.ToString()).FlushVars();
|
|
|
|
|