TCX_dev_zeroFive_online
parent
4fd60c4cee
commit
b5f92d9ffb
|
@ -36,7 +36,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 364.76, y: -8.9}
|
m_AnchoredPosition: {x: 364.76, y: 15}
|
||||||
m_SizeDelta: {x: 211.17, y: 77.51}
|
m_SizeDelta: {x: 211.17, y: 77.51}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &181696933
|
--- !u!222 &181696933
|
||||||
|
@ -373,7 +373,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!224 &532550089
|
--- !u!224 &532550089
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -570,7 +570,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!224 &1226409383
|
--- !u!224 &1226409383
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -682,7 +682,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 140.5, y: -25.6}
|
m_AnchoredPosition: {x: 171, y: 18}
|
||||||
m_SizeDelta: {x: 160, y: 30}
|
m_SizeDelta: {x: 160, y: 30}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &1579231202
|
--- !u!222 &1579231202
|
||||||
|
@ -974,7 +974,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: -60.6, y: 21}
|
m_AnchoredPosition: {x: -60.6, y: 18}
|
||||||
m_SizeDelta: {x: 361.9, y: 30}
|
m_SizeDelta: {x: 361.9, y: 30}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &1865435117
|
--- !u!222 &1865435117
|
||||||
|
@ -1012,13 +1012,13 @@ MonoBehaviour:
|
||||||
m_BestFit: 0
|
m_BestFit: 0
|
||||||
m_MinSize: 3
|
m_MinSize: 3
|
||||||
m_MaxSize: 40
|
m_MaxSize: 40
|
||||||
m_Alignment: 0
|
m_Alignment: 3
|
||||||
m_AlignByGeometry: 0
|
m_AlignByGeometry: 0
|
||||||
m_RichText: 1
|
m_RichText: 1
|
||||||
m_HorizontalOverflow: 0
|
m_HorizontalOverflow: 0
|
||||||
m_VerticalOverflow: 1
|
m_VerticalOverflow: 1
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: "\u4F7F\u75281\u5143\u76F4\u5145\u5361\u53EF\u589E\u52A0\u4F59\u989D\u4ECA\u65E5\u8FD8\u53EF\u5B58\u5165"
|
m_Text: "\u4ECA\u65E5\u8FD8\u53EF\u4F7F\u7528\u73B0\u91D1\u5238"
|
||||||
--- !u!1 &2068929900
|
--- !u!1 &2068929900
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -1036,7 +1036,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!224 &2068929901
|
--- !u!224 &2068929901
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -7102,9 +7102,10 @@ function NetManager.SendGmBuyGoodRequest(_id,func)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
--优惠券购买物品
|
--优惠券购买物品
|
||||||
function NetManager.SendYHQBuyGoodRequest(_id,func)
|
function NetManager.SendYHQBuyGoodRequest(_id,_buyType,func)
|
||||||
local data = PlayerInfoProto_pb.GmBuyGoodRequest()
|
local data = PlayerInfoProto_pb.GmBuyGoodRequest()
|
||||||
data.goodsId=_id
|
data.goodsId=_id
|
||||||
|
data.buyType=_buyType
|
||||||
LogError("id========================".._id)
|
LogError("id========================".._id)
|
||||||
local msg = data:SerializeToString()
|
local msg = data:SerializeToString()
|
||||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.VouchersBuyGiftRequest,MessageTypeProto_pb.TEST_BUY_GIGT_GOODS_RESPONSE,msg,function(buffer)
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.VouchersBuyGiftRequest,MessageTypeProto_pb.TEST_BUY_GIGT_GOODS_RESPONSE,msg,function(buffer)
|
||||||
|
|
|
@ -64,29 +64,68 @@ function this.Pay(id, func)
|
||||||
CheckRedPointStatus(RedPointType.GrowthPackage) --成长礼包的红点检测
|
CheckRedPointStatus(RedPointType.GrowthPackage) --成长礼包的红点检测
|
||||||
--直购商品
|
--直购商品
|
||||||
local rechargeConfig = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, id)
|
local rechargeConfig = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, id)
|
||||||
|
if rechargeConfig.OtherBuy1 then
|
||||||
local yhqNum = BagManager.GetItemCountById(108)
|
local yhqNum = BagManager.GetItemCountById(1342)
|
||||||
if yhqNum >= rechargeConfig.Price and rechargeConfig.Price > 0 then
|
local useTime = PrivilegeManager.GetPrivilegeUsedTimes(PRIVILEGE_TYPE.GM_YI_YUAN_UP_TIME)
|
||||||
local sureFunc = function()
|
local missions = ActivityGiftManager.GetActivityInfoByType(ActivityTypeDef.shuaChongTeQuan).mission
|
||||||
NetManager.SendYHQBuyGoodRequest(id)
|
local index = 1
|
||||||
end
|
if missions then
|
||||||
local cancelFunc = function()
|
for i = 1, #missions do
|
||||||
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
if missions[i].state ~= 0 then
|
||||||
PayManager.SdkPay({ Id = id, orderId = orderId })
|
index = i
|
||||||
else
|
end
|
||||||
NetManager.RequestBuyGiftGoods(id, function(msg)
|
|
||||||
this.onSdkPayResult(id)
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local args = {}
|
local privile = ConfigManager.GetConfigData(ConfigName.PrivilegeTypeConfig, 2101)
|
||||||
args[1] = "该礼包可通过消耗神话币获得,是否继续充值" .. "\n<color=\"#FF0000\">神话币剩余:" .. yhqNum .. "</color>"
|
local maxnum = privile.Condition[index][2]
|
||||||
args[2] = "神话币购买"
|
if yhqNum >= rechargeConfig.Price and rechargeConfig.Price > 0 and (maxnum - useTime) >= rechargeConfig.Price then
|
||||||
args[3] = "直接充值"
|
local sureFunc = function()
|
||||||
args[4] = sureFunc
|
NetManager.SendYHQBuyGoodRequest(id, 1)
|
||||||
args[5] = cancelFunc
|
end
|
||||||
UIManager.OpenPanel(UIName.GMCommonConfirmPanel, args)
|
local cancelFunc = function()
|
||||||
return
|
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
||||||
|
PayManager.SdkPay({ Id = id, orderId = orderId })
|
||||||
|
else
|
||||||
|
NetManager.RequestBuyGiftGoods(id, function(msg)
|
||||||
|
this.onSdkPayResult(id)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local args = {}
|
||||||
|
args[1] = "该礼包可通过消耗现金券获得,是否继续充值" ..
|
||||||
|
"\n<color=\"#FF0000\">现金券剩余:" .. yhqNum .. "</color>\n可用余额" .. (maxnum - useTime)
|
||||||
|
args[2] = "现金券购买"
|
||||||
|
args[3] = "直接充值"
|
||||||
|
args[4] = sureFunc
|
||||||
|
args[5] = cancelFunc
|
||||||
|
UIManager.OpenPanel(UIName.GMCommonConfirmPanel, args)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if rechargeConfig.OtherBuy then
|
||||||
|
local yhqNum = BagManager.GetItemCountById(108)
|
||||||
|
if yhqNum >= rechargeConfig.Price and rechargeConfig.Price > 0 then
|
||||||
|
local sureFunc = function()
|
||||||
|
NetManager.SendYHQBuyGoodRequest(id, 0)
|
||||||
|
end
|
||||||
|
local cancelFunc = function()
|
||||||
|
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
||||||
|
PayManager.SdkPay({ Id = id, orderId = orderId })
|
||||||
|
else
|
||||||
|
NetManager.RequestBuyGiftGoods(id, function(msg)
|
||||||
|
this.onSdkPayResult(id)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local args = {}
|
||||||
|
args[1] = "该礼包可通过消耗神话币获得,是否继续充值" .. "\n<color=\"#FF0000\">神话币剩余:" .. yhqNum .. "</color>"
|
||||||
|
args[2] = "神话币购买"
|
||||||
|
args[3] = "直接充值"
|
||||||
|
args[4] = sureFunc
|
||||||
|
args[5] = cancelFunc
|
||||||
|
UIManager.OpenPanel(UIName.GMCommonConfirmPanel, args)
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if rechargeConfig.BuyType == 1 then --人民币
|
if rechargeConfig.BuyType == 1 then --人民币
|
||||||
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
||||||
|
@ -148,17 +187,17 @@ function this.RequestPay(context)
|
||||||
Log("onPayCallback::" .. payResp)
|
Log("onPayCallback::" .. payResp)
|
||||||
local str = string.split(payResp, "#")
|
local str = string.split(payResp, "#")
|
||||||
local result = tonumber(str[1])
|
local result = tonumber(str[1])
|
||||||
if AppConst.SdkChannel == "TCXQUZB" or AppConst.SdkChannel == "TCXQUZB2" then
|
--if AppConst.SdkChannel == "TCXQUZB" or AppConst.SdkChannel == "TCXQUZB2" then
|
||||||
LogError("太初行quick渠道支付参数回调")
|
--LogError("太初行quick渠道支付参数回调")
|
||||||
else
|
--else
|
||||||
LogError("太初行027渠道支付参数回调")
|
--LogError("太初行027渠道支付参数回调")
|
||||||
end
|
--end
|
||||||
if result == SDK_RESULT.SUCCESS then
|
if result == SDK_RESULT.SUCCESS then
|
||||||
|
|
||||||
elseif result == SDK_RESULT.FAILED then
|
elseif result == SDK_RESULT.FAILED then
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local params = SDK.SDKPayArgs.New()
|
local params = SDK.SDKPayArgs.New()
|
||||||
|
@ -175,31 +214,31 @@ function this.RequestPay(context)
|
||||||
params.serverName = PlayerManager.serverInfo.name
|
params.serverName = PlayerManager.serverInfo.name
|
||||||
local chanel = AppConst.SdkChannel
|
local chanel = AppConst.SdkChannel
|
||||||
-- 角色相关
|
-- 角色相关
|
||||||
if chanel and (chanel == "TCXQKGM09" or chanel == "TCXQUZB" or chanel == "TCXQUZB2" or chanel == "TCXQKZB07") then
|
--if chanel and (chanel == "TCXQKGM09" or chanel == "TCXQUZB" or chanel == "TCXQUZB2" or chanel == "TCXQKZB07") then
|
||||||
LogError("太初行quick渠道支付参数"..PlayerManager.uid)
|
--LogError("太初行quick渠道支付参数"..PlayerManager.uid)
|
||||||
params.roleID = tostring(PlayerManager.uid) ..
|
params.roleID = tostring(PlayerManager.uid) ..
|
||||||
"_" ..
|
"_" ..
|
||||||
tostring(context.Id) ..
|
tostring(context.Id) ..
|
||||||
"_" ..
|
"_" ..
|
||||||
PackageManager.GetCCCode() ..
|
PackageManager.GetCCCode() ..
|
||||||
"_" ..
|
"_" ..
|
||||||
AppConst
|
AppConst
|
||||||
.Platform --.."_"..tostring(context.orderId or "0").."_"..tostring(LoginManager.ServerId)
|
.Platform --.."_"..tostring(context.orderId or "0").."_"..tostring(LoginManager.ServerId)
|
||||||
params.extension = tostring(PlayerManager.uid) ..
|
params.extension = tostring(PlayerManager.uid) ..
|
||||||
"_" ..
|
"_" ..
|
||||||
tostring(context.Id) ..
|
tostring(context.Id) ..
|
||||||
"_" ..
|
"_" ..
|
||||||
PackageManager.GetCCCode() ..
|
PackageManager.GetCCCode() ..
|
||||||
"_" ..
|
"_" ..
|
||||||
AppConst
|
AppConst
|
||||||
.Platform --.."_"..tostring(context.orderId or "0").."_"..tostring(LoginManager.ServerId)
|
.Platform --.."_"..tostring(context.orderId or "0").."_"..tostring(LoginManager.ServerId)
|
||||||
else
|
--else
|
||||||
LogError("太初行027渠道支付参数"..PlayerManager.uid)
|
--LogError("太初行027渠道支付参数"..PlayerManager.uid)
|
||||||
params.roleID = PlayerManager.uid
|
--params.roleID = PlayerManager.uid
|
||||||
--LogError("太初行027渠道支付参数"..context.RechargeId)
|
--LogError("太初行027渠道支付参数"..context.RechargeId)
|
||||||
LogError("太初行027渠道支付参数"..context.RechargeId)
|
--LogError("太初行027渠道支付参数"..context.RechargeId)
|
||||||
params.extension = context.RechargeId
|
--params.extension = context.RechargeId
|
||||||
end
|
--end
|
||||||
params.roleName = PlayerManager.nickName
|
params.roleName = PlayerManager.nickName
|
||||||
params.roleLevel = PlayerManager.level
|
params.roleLevel = PlayerManager.level
|
||||||
params.vip = tostring(VipManager.GetVipLevel())
|
params.vip = tostring(VipManager.GetVipLevel())
|
||||||
|
|
|
@ -43,7 +43,6 @@ end
|
||||||
|
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function PrayRewardItemPopup:OnOpen(_drop,_num,_chooseRewardId,_func)
|
function PrayRewardItemPopup:OnOpen(_drop,_num,_chooseRewardId,_func)
|
||||||
|
|
||||||
isPlayerAniEnd = true
|
isPlayerAniEnd = true
|
||||||
chooseRewardId = _chooseRewardId
|
chooseRewardId = _chooseRewardId
|
||||||
func = _func
|
func = _func
|
||||||
|
|
Loading…
Reference in New Issue