Merge branch 'master_xma_test' into master_xma_local

dev_chengFeng
JieLing 2020-10-09 17:02:03 +08:00
commit b50602d94c
12 changed files with 65 additions and 40 deletions

View File

@ -5,7 +5,7 @@
* @Created by MagicianJoker
--]]
SERVER_VERSION = 0
SERVER_VERSION = 0 -- 0 正式服 1 提审服
-- 启用功能引导
ENABLE_FUNC_GUIDE = 1 --0关闭1开启
RECHARGEABLE = true --false不可充值 true可充值

View File

@ -21,13 +21,13 @@ if not AppConst.isSDKLogin then return end
end
end
if curConfigData then
if AppConst.SdkPackageName == ConfigManager.GetConfigData(ConfigName.SpecialConfig,68).Key then
if AppConst.SdkPackageName == "com.tcxgpcsb.pass" then
LogGreen("埋点上报数据 成功 "..AppConst.SdkPackageName.." "..curConfigData.tokenAndroidTest.." "..curConfigData.Info)
this.SendCustomEvent(curConfigData.tokenAndroidTest,curConfigData.Info,curConfigData.type)
elseif AppConst.SdkPackageName == ConfigManager.GetConfigData(ConfigName.SpecialConfig,69).Key then
elseif AppConst.SdkPackageName == "com.tcxgp.pass" then
LogGreen("埋点上报数据 成功 "..AppConst.SdkPackageName.." "..curConfigData.tokenAndroidRelease.." "..curConfigData.Info)
this.SendCustomEvent(curConfigData.tokenAndroidRelease,curConfigData.Info,curConfigData.type)
elseif AppConst.SdkPackageName == ConfigManager.GetConfigData(ConfigName.SpecialConfig,70).Key then
elseif AppConst.SdkPackageName == "com.tcx.pass" then
LogGreen("埋点上报数据 成功 "..AppConst.SdkPackageName.." "..curConfigData.tokenIos.." "..curConfigData.Info)
this.SendCustomEvent(curConfigData.tokenIos,curConfigData.Info,curConfigData.type)
end

View File

@ -100,19 +100,15 @@ function this.SingleDataShow(go, data)
Util.SetGray(btnBuy, true)
end
--滚动条复用重设itemview
if itemsGrid[go] then
for i = 1, 4 do
itemsGrid[go][i].gameObject:SetActive(false)
end
for i = 1, #shows do
if itemsGrid[go][i] then
itemsGrid[go][i]:OnOpen(false, {shows[i][1],shows[i][2]}, 0.9,false,false,false,cursortingOrder)
itemsGrid[go][i].gameObject:SetActive(true)
end
end
else
itemsGrid[go]={}
for i = 1, 4 do
if not itemsGrid[go] then
itemsGrid[go] = {}
end
for k,v in pairs(itemsGrid[go]) do
v.gameObject:SetActive(false)
end
for i = 1, #shows do
if not itemsGrid[go][i] then
itemsGrid[go][i] = SubUIManager.Open(SubUIConfig.ItemView, grid.transform)
itemsGrid[go][i].gameObject:SetActive(false)
local obj= newObjToParent(shadow,itemsGrid[go][i].transform)
@ -121,11 +117,35 @@ function this.SingleDataShow(go, data)
obj:GetComponent("RectTransform").transform.localScale=Vector3.one*1.1
obj.gameObject:SetActive(true)
end
for i = 1, #shows do
itemsGrid[go][i]:OnOpen(false, {shows[i][1],shows[i][2]}, 0.9,false,false,false,cursortingOrder)
itemsGrid[go][i].gameObject:SetActive(true)
end
itemsGrid[go][i]:OnOpen(false, {shows[i][1],shows[i][2]}, 0.9,false,false,false,cursortingOrder)
itemsGrid[go][i].gameObject:SetActive(true)
end
-- if itemsGrid[go] then
-- for i = 1, 4 do
-- itemsGrid[go][i].gameObject:SetActive(false)
-- end
-- for i = 1, #shows do
-- if itemsGrid[go][i] then
-- itemsGrid[go][i]:OnOpen(false, {shows[i][1],shows[i][2]}, 0.9,false,false,false,cursortingOrder)
-- itemsGrid[go][i].gameObject:SetActive(true)
-- end
-- end
-- else
-- itemsGrid[go]={}
-- for i = 1, 4 do
-- itemsGrid[go][i] = SubUIManager.Open(SubUIConfig.ItemView, grid.transform)
-- itemsGrid[go][i].gameObject:SetActive(false)
-- local obj= newObjToParent(shadow,itemsGrid[go][i].transform)
-- obj.transform:SetAsFirstSibling()
-- obj.transform:DOAnchorPos(Vector3(0,-3,0),0)
-- obj:GetComponent("RectTransform").transform.localScale=Vector3.one*1.1
-- obj.gameObject:SetActive(true)
-- end
-- for i = 1, #shows do
-- itemsGrid[go][i]:OnOpen(false, {shows[i][1],shows[i][2]}, 0.9,false,false,false,cursortingOrder)
-- itemsGrid[go][i].gameObject:SetActive(true)
-- end
-- end
--local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FINDTREASURE_GIFT, data.id, 1)
Util.AddOnceClick(btnBuy, function()
if shopItemData.Limit <= boughtNum then

View File

@ -6,7 +6,7 @@ this.LoginWay = { Account = 0, WeChat = 1 }
local ServerVersion = SERVER_VERSION
local IsShowNotice = true
local IsShowNotice = SERVER_VERSION == 0 -- 正式服显示公告
local IsSDKLogin = AppConst.isSDK and AppConst.isSDKLogin
local IsDevelopLogin = true

View File

@ -171,6 +171,7 @@ function this.SetLevel(_level)
this.level = _level
end
function this.SetTreasureBuyStatus(hadBuy)
LogBlue("秘宝礼包购买状态:"..hadBuy)
this.hadBuyTreasure = (hadBuy == 1)
end
function this.GetLevel()

View File

@ -644,6 +644,7 @@ function this.RefreshTreasureLevel(buffer)
msg:ParseFromString(data)
LogGreen("青龙秘宝等级更新了:"..msg.level)
QinglongSerectTreasureManager.SetLevel(msg.level)
QinglongSerectTreasureManager.SetTreasureBuyStatus(msg.hadBuy)
QinglongSerectTreasureManager.UpdateTreasureState2()
end

View File

@ -178,8 +178,9 @@ function this.PlayerInfoRequest(func)
-- 试炼副本层级奖励
-- MapTrialManager.InitTrialRewardData(msg.towerReceivedReward)
TreasureOfSomebodyManagerV2.SetCurrentLevel(msg.treasureLevel)
TreasureOfSomebodyManagerV2.SetTreasureBuyStatus(msg.hadBuyTreasure)
-- TreasureOfSomebodyManagerV2.SetCurrentLevel(msg.treasureLevel)
-- LogRed("秘宝礼包购买状态1"..msg.hadBuyTreasure)
-- TreasureOfSomebodyManagerV2.SetTreasureBuyStatus(msg.hadBuyTreasure)
-- 当前波次
MonsterCampManager.monsterWave = msg.monsterAttackTime
OperatingManager.SetSignInData(msg.SignInInfo)
@ -208,6 +209,7 @@ function this.PlayerInfoRequest(func)
LuckyTurnTableManager.SetTimes(msg.hadLuckTime,msg.hadAdvanceLuckyTime)
-- LogGreen("GetPlayerInfoResponse.treasureLevel:"..msg.treasureLevel)
QinglongSerectTreasureManager.SetLevel(msg.treasureLevel)
QinglongSerectTreasureManager.SetTreasureBuyStatus(msg.hadBuyTreasure)
if func then
func(msg)
end

View File

@ -73,7 +73,7 @@ function this:Caculate(templv)
direct[id] = 0
end
direct[id] = direct[id] + num
elseif reward.Reward[j].type == 2 and treasureState > 0 then
elseif reward.Reward[j].type == 2 and treasureState then
if not direct[id] then
direct[id] = 0
end

View File

@ -103,7 +103,7 @@ function SettingInfo:RemoveListener()
end
--界面打开时调用(用于子类重写)
function SettingInfo:OnOpen()
this.cdKey:SetActive(SERVER_VERSION == 0)
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)

View File

@ -301,9 +301,13 @@ function this.ResetTreasureTaskInfo(taskList)
for i = 1, #taskList do
local taskInfoList = TypeTaskData[TaskTypeDef.TreasureOfSomeBody]
for k = #taskInfoList, 1, -1 do
local taskConfig = ConfigManager.GetConfigData(ConfigName.TreasureSunLongTaskConfig, taskInfoList[k].missionId)
if taskConfig.Type == taskList[i].type then
table.remove(TypeTaskData[TaskTypeDef.TreasureOfSomeBody], k)
if taskInfoList[k].missionId == 0 then
LogRed("服务器传来了id为0的青龙秘宝任务")
else
local taskConfig = ConfigManager.GetConfigData(ConfigName.TreasureSunLongTaskConfig, taskInfoList[k].missionId)
if taskConfig.Type == taskList[i].type then
table.remove(TypeTaskData[TaskTypeDef.TreasureOfSomeBody], k)
end
end
end
table.insert(TypeTaskData[TaskTypeDef.TreasureOfSomeBody], taskList[i].tasks[i])

View File

@ -5,7 +5,6 @@ local this=TreasureStorePopup
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
local GlobalActivity = ConfigManager.GetConfig(ConfigName.GlobalActivity)
local itemsGrid = {}
local isPlayAnim = true
function TreasureStorePopup:InitComponent()
this.panel=Util.GetGameObject(this.gameObject,"Panel")
this.backBtn=Util.GetGameObject(this.panel,"BackBtn")
@ -42,7 +41,6 @@ end
function TreasureStorePopup:OnShow()
this:RefreshPanel()
this:TimeCountDown()
isPlayAnim = true
end
function TreasureStorePopup:OnClose()
@ -79,10 +77,6 @@ function TreasureStorePopup:RefreshPanel()
this:SetScrollPre(go, allData[index])
end)
end
if isPlayAnim then
SecTorPlayAnimByScroll(this.scrollView)
isPlayAnim = false
end
this.scrollView:SetIndex(1)
end
@ -103,11 +97,7 @@ function this.SortData(allData)
end
--设置每一条
function this:SetScrollPre(root,data)
if isPlayAnim then
root.gameObject:SetActive(false)
else
root.gameObject:SetActive(true)
end
root.gameObject:SetActive(true)
local title=Util.GetGameObject(root,"Title"):GetComponent("Text")
local iRoot=Util.GetGameObject(root,"ItemRoot")
local buyBtn=Util.GetGameObject(root,"BuyBtn")

View File

@ -251,6 +251,7 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.backData.itemId,nil,self.isRewardItemPop)
end)
end
elseif _itemData.itemType == 2 then
--equip
@ -322,6 +323,9 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
self:LoadFrameEffect(itemDataConFig.Id, effectRoot)
self:SetFrameEffectLayer(effectLayer)
self:SetFrameEffectScale(self.scale * 0.7)
Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.backData.itemId,nil,self.isRewardItemPop)
end)
end
self.gameObject:GetComponent("RectTransform").localScale = Vector2.New(self.scale, self.scale)
end
@ -541,6 +545,9 @@ function ItemView:NoGetRewardShow(_reward, effectLayer, isShowAddImage)
self:LoadFrameEffect(itemDataConFig.Id, effectRoot)
self:SetFrameEffectLayer(effectLayer)
self:SetFrameEffectScale(self.scale * 0.7)
Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,itemSId,nil,self.isRewardItemPop)
end)
else
--5随机道具6符文
self.frame.sprite = Util.LoadSprite(GetQuantityImageByquality(itemConfig[itemSId].Quantity))