TCX_dev_zeroFive_online
parent
b5f92d9ffb
commit
1965f6135b
|
@ -94,7 +94,7 @@ end
|
|||
|
||||
function GMChangePanel:ShowTopInfo()
|
||||
local num=BagManager.GetItemCountById(1367)
|
||||
this.info.text="使用1元直充卡可增加余额今日还可存入"
|
||||
--this.info.text="使用1元直充卡可增加余额今日还可存入"
|
||||
local allTimes = PrivilegeManager.GetPrivilegeNumber(PRIVILEGE_TYPE.GM_YI_YUAN_UP_TIME)
|
||||
local useTime=PrivilegeManager.GetPrivilegeUsedTimes(PRIVILEGE_TYPE.GM_YI_YUAN_UP_TIME)
|
||||
local leftTimes = PrivilegeManager.GetPrivilegeRemainValue(PRIVILEGE_TYPE.GM_YI_YUAN_UP_TIME)
|
||||
|
|
|
@ -66,21 +66,12 @@ function this.Pay(id, func)
|
|||
local rechargeConfig = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, id)
|
||||
if rechargeConfig.OtherBuy1 then
|
||||
local yhqNum = BagManager.GetItemCountById(1342)
|
||||
local useTime = PrivilegeManager.GetPrivilegeUsedTimes(PRIVILEGE_TYPE.GM_YI_YUAN_UP_TIME)
|
||||
local missions = ActivityGiftManager.GetActivityInfoByType(ActivityTypeDef.shuaChongTeQuan).mission
|
||||
local index = 1
|
||||
if missions then
|
||||
for i = 1, #missions do
|
||||
if missions[i].state ~= 0 then
|
||||
index = i
|
||||
end
|
||||
end
|
||||
end
|
||||
local privile = ConfigManager.GetConfigData(ConfigName.PrivilegeTypeConfig, 2101)
|
||||
local maxnum = privile.Condition[index][2]
|
||||
if yhqNum >= rechargeConfig.Price and rechargeConfig.Price > 0 and (maxnum - useTime) >= rechargeConfig.Price then
|
||||
local leftTimes = PrivilegeManager.GetPrivilegeRemainValue(PRIVILEGE_TYPE.GM_YI_YUAN_UP_TIME)
|
||||
if yhqNum >= rechargeConfig.Price and rechargeConfig.Price > 0 and leftTimes >= rechargeConfig.Price then
|
||||
local sureFunc = function()
|
||||
NetManager.SendYHQBuyGoodRequest(id, 1)
|
||||
NetManager.SendYHQBuyGoodRequest(id, 1,function()
|
||||
PrivilegeManager.SetPrivilegeUsedTimes(PRIVILEGE_TYPE.GM_YI_YUAN_UP_TIME,rechargeConfig.Price)
|
||||
end)
|
||||
end
|
||||
local cancelFunc = function()
|
||||
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
||||
|
@ -93,7 +84,7 @@ function this.Pay(id, func)
|
|||
end
|
||||
local args = {}
|
||||
args[1] = "该礼包可通过消耗现金券获得,是否继续充值" ..
|
||||
"\n<color=\"#FF0000\">现金券剩余:" .. yhqNum .. "</color>\n可用余额" .. (maxnum - useTime)
|
||||
"\n<color=\"#FF0000\">现金券剩余:" .. yhqNum .. "</color>\n可用余额" .. leftTimes
|
||||
args[2] = "现金券购买"
|
||||
args[3] = "直接充值"
|
||||
args[4] = sureFunc
|
||||
|
|
Loading…
Reference in New Issue