天地烘炉提交
parent
2814265ba7
commit
1a40cfba00
|
@ -139,7 +139,7 @@ function this.InitActivityServerData(msg, isUpdate)
|
|||
this.CheckMoneyProgress(v)
|
||||
this.mission[v.activityId] = v
|
||||
|
||||
-- LogYellow("刷新活动数据activityId:" .. v.activityId .. " value:" .. v.value)
|
||||
LogYellow("刷新活动数据activityId:" .. v.activityId .. " value:" .. v.value)
|
||||
for n, m in ipairs(v.mission) do
|
||||
--LogGreen(" 刷新活动数据missionId:" .. m.missionId .. " state:" .. m.state .. " progress:" .. m.progress)
|
||||
if (v.activityId == ActivityTypeDef.OnlineGift) then
|
||||
|
|
|
@ -117,17 +117,18 @@ function this:OnShow(_parent,_Data)
|
|||
end
|
||||
end
|
||||
elseif activityType == ActivityTypeDef.tiandihonglu then
|
||||
UpItemList = {}
|
||||
local newList = {}
|
||||
itemList = RecruitManager.GetRewardPreviewData(poolType)
|
||||
local souls = RecruitManager.GetWishTailsManSoulChips()
|
||||
for i = 1,#itemList do
|
||||
for k,v in pairs(souls) do
|
||||
if itemList[i].Reward[1] == v then
|
||||
table.insert(UpItemList,itemList[i])
|
||||
table.insert(newList,itemList[i])
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
UpItemList = newList
|
||||
else
|
||||
UpItemList = RecruitManager.GetRewardPreviewData(poolUpType)
|
||||
itemList = RecruitManager.GetRewardPreviewData(poolType)
|
||||
|
@ -167,7 +168,7 @@ function this:BuildRateData(actType,UpItem,upItemList)
|
|||
local _upRateList = {}
|
||||
if actType == ActivityTypeDef.QianKunBox then
|
||||
_upRateList = this:ReculateUpHeroRate(UpItem,upItemList,"魂印UP!",ConfigName.EquipConfig)
|
||||
rateList = this:RefreshSoulRate(UpItem,_upRateList)
|
||||
rateList = this:RefreshSoulRate(UpItem,_upRateList,ItemType.HunYin)
|
||||
elseif actType == ActivityTypeDef.LingShouBaoGe then
|
||||
local rewardData,showData,curScore = DynamicActivityManager.RecrutDetailData(activityType)
|
||||
for n,m in ipairs(upItemList) do
|
||||
|
@ -201,13 +202,11 @@ function this:BuildRateData(actType,UpItem,upItemList)
|
|||
table.insert(rateList,{id = m.Reward[1],tag = itemConfig.Name, name=m.Reward[2],value = m.Weight,color = "BDB69C" })
|
||||
end
|
||||
elseif actType == ActivityTypeDef.tiandihonglu then
|
||||
LogGreen("#upItemList"..#upItemList)
|
||||
for n,m in ipairs(upItemList) do
|
||||
local itemConfig=ConfigManager.TryGetConfigData(ConfigName.ItemConfig, m.Reward[1])
|
||||
table.insert(_upRateList,{id = m.Reward[1],tag = "法宝碎片UP!", name=itemConfig.Name,value = m.Weight,color = "AD4152"})
|
||||
end
|
||||
LogGreen("#_upRateList"..#_upRateList)
|
||||
rateList = this:RefreshNewHeroRate(upItemList,_upRateList,"法宝碎片UP!",ConfigName.HeroConfig)
|
||||
rateList = this:RefreshSoulRate(UpItem,_upRateList,ItemType.talismanSoulChip)
|
||||
end
|
||||
|
||||
for k,v in ipairs(this.ratePreList) do
|
||||
|
@ -285,18 +284,18 @@ function this:RefreshHeroRate(hero,_rateList)
|
|||
return rateList
|
||||
end
|
||||
|
||||
function this:RefreshSoulRate(soul,_rateList)
|
||||
function this:RefreshSoulRate(soul,_rateList,itemType)
|
||||
local list4={}
|
||||
local list5={}
|
||||
local list6={}
|
||||
local list7={}
|
||||
|
||||
for index, v in ipairs(soul) do
|
||||
if itemConfig[v.Reward[1]].Quantity==4 and itemConfig[v.Reward[1]].ItemType==13 then
|
||||
if itemConfig[v.Reward[1]].Quantity==4 and itemConfig[v.Reward[1]].ItemType==itemType then
|
||||
table.insert(list4,v)--紫色
|
||||
elseif itemConfig[v.Reward[1]].Quantity==5 and itemConfig[v.Reward[1]].ItemType==13 then
|
||||
elseif itemConfig[v.Reward[1]].Quantity==5 and itemConfig[v.Reward[1]].ItemType==itemType then
|
||||
table.insert(list5,v)--金色
|
||||
elseif itemConfig[v.Reward[1]].Quantity==6 and itemConfig[v.Reward[1]].ItemType==13 then
|
||||
elseif itemConfig[v.Reward[1]].Quantity==6 and itemConfig[v.Reward[1]].ItemType==itemType then
|
||||
table.insert(list6,v)--红色
|
||||
else
|
||||
table.insert(list7,v)--其他
|
||||
|
@ -308,10 +307,18 @@ function this:RefreshSoulRate(soul,_rateList)
|
|||
valueList6 = valueList6 - _rateList[i].value
|
||||
table.insert(rateList,_rateList[i])
|
||||
end
|
||||
table.insert(rateList,{tag="红色",name="其他".."红色",value = valueList6,color = "BDB69C"})
|
||||
table.insert(rateList,{tag="金色",name="金色",value=this:ReculateRate(list5),color = "BDB69C"})
|
||||
table.insert(rateList,{tag="紫色",name="紫色",value=this:ReculateRate(list4),color = "BDB69C"})
|
||||
table.insert(rateList,{tag="其他",name="其他",value=this:ReculateRate(list7),color = "BDB69C"})
|
||||
if valueList6 > 0 then
|
||||
table.insert(rateList,{tag="红色",name="其他".."红色",value = valueList6,color = "BDB69C"})
|
||||
end
|
||||
if #list5 > 0 then
|
||||
table.insert(rateList,{tag="金色",name="金色",value=this:ReculateRate(list5),color = "BDB69C"})
|
||||
end
|
||||
if #list4 > 0 then
|
||||
table.insert(rateList,{tag="紫色",name="紫色",value=this:ReculateRate(list4),color = "BDB69C"})
|
||||
end
|
||||
if #list7 > 0 then
|
||||
table.insert(rateList,{tag="其他",name="其他",value=this:ReculateRate(list7),color = "BDB69C"})
|
||||
end
|
||||
return rateList
|
||||
end
|
||||
function this:RefreshMonsterRate(UpMonster,_rateList)
|
||||
|
|
|
@ -60,6 +60,7 @@ function this:RefreshData()
|
|||
itemList[i].items[j].go = Util.GetGameObject(itemList[i].go, "ItemPos"..j)
|
||||
itemList[i].items[j].pos = Util.GetGameObject(itemList[i].items[j].go.transform, "pos")
|
||||
itemList[i].items[j].item = SubUIManager.Open(SubUIConfig.ItemView,itemList[i].items[j].pos.transform)
|
||||
itemList[i].items[j].item.frame:GetComponent("Button").enabled = false
|
||||
itemList[i].items[j].item.transform:GetComponent("RectTransform").anchoredPosition3D = Vector3.zero
|
||||
itemList[i].items[j].lv = Util.GetGameObject(itemList[i].items[j].go, "lvDi/Text"):GetComponent("Text")
|
||||
itemList[i].items[j].select = Util.GetGameObject(itemList[i].items[j].go, "select")
|
||||
|
@ -90,6 +91,7 @@ function this:RefreshData()
|
|||
itemList[i].items[j].go = newObjToParent(itemList[i].items[1].go,itemList[i].itemGrid)
|
||||
itemList[i].items[j].pos = Util.GetGameObject(itemList[i].items[j].go, "pos")
|
||||
itemList[i].items[j].item = SubUIManager.Open(SubUIConfig.ItemView,itemList[i].items[j].pos.transform)
|
||||
itemList[i].items[j].item.frame:GetComponent("Button").enabled = false
|
||||
itemList[i].items[j].item.transform.localPosition = Vector3.zero
|
||||
itemList[i].items[j].lv = Util.GetGameObject(itemList[i].items[j].go, "lvDi/Text"):GetComponent("Text")
|
||||
itemList[i].items[j].select = Util.GetGameObject(itemList[i].items[j].go, "select")
|
||||
|
@ -99,12 +101,18 @@ function this:RefreshData()
|
|||
itemList[i].items[j].lv.text = TailsManSoulManager.GetTailsmanLvById(self.curData[i].trumpChipList[j])
|
||||
itemList[i].items[j].select.gameObject:SetActive(this:CheckIsSelect(self.curData[i].trumpChipList[j]))
|
||||
Util.AddOnceClick(itemList[i].items[j].pos,function()
|
||||
if LengthOfTable(self.selectData >= 4) then
|
||||
PopupTipPanel.ShowTip("心愿碎片最多为4个!")
|
||||
else
|
||||
if this:CheckIsSelect(self.curData[i].trumpChipList[j]) then
|
||||
this:SetIsSelect(self.curData[i].trumpChipList[j])
|
||||
itemList[i].items[j].select.gameObject:SetActive(this:CheckIsSelect(self.curData[i].trumpChipList[j]))
|
||||
else
|
||||
if LengthOfTable(self.selectData) >= 4 then
|
||||
PopupTipPanel.ShowTip("心愿碎片最多为4个!")
|
||||
else
|
||||
this:SetIsSelect(self.curData[i].trumpChipList[j])
|
||||
itemList[i].items[j].select.gameObject:SetActive(this:CheckIsSelect(self.curData[i].trumpChipList[j]))
|
||||
end
|
||||
end
|
||||
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
@ -116,7 +124,7 @@ function this:SetIsSelect(id)
|
|||
local isAdd = true
|
||||
for k,v in pairs(self.selectData) do
|
||||
if v == id then
|
||||
v = nil
|
||||
table.remove(self.selectData,k)
|
||||
isAdd = false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -647,7 +647,21 @@ function this.GetWishDrawRedPointStatus()
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
function this.GetTianDiHongLuRedPointStatus()
|
||||
local lotterySetting=ConfigManager.GetConfig(ConfigName.LotterySetting)
|
||||
local activityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.tiandihonglu)
|
||||
if not activityId then
|
||||
return false
|
||||
end
|
||||
local array = ConfigManager.GetConfigDataByDoubleKey(ConfigName.LotterySetting,"ActivityId",activityId,"PerCount",1)
|
||||
local freeTimesId=lotterySetting[array.Id].FreeTimes
|
||||
local freeTime= 0
|
||||
if freeTimesId>0 then
|
||||
freeTime= PrivilegeManager.GetPrivilegeRemainValue(freeTimesId)
|
||||
RecruitManager.freeUseTimeList[freeTimesId]=freeTime
|
||||
return freeTime and freeTime >= 1
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function this.GetQiankunBoxRedPointStatus()
|
||||
|
|
|
@ -634,6 +634,8 @@ function this.RegisterRedCheckFunc()
|
|||
RPData:AddCheckFunc(RedPointType.incarnation_buddish,IncarnationManager.CheckRedData)
|
||||
RPData:AddCheckFunc(RedPointType.incarnation_demon,IncarnationManager.CheckRedData)
|
||||
RPData:AddCheckFunc(RedPointType.incarnation_taoist,IncarnationManager.CheckRedData)
|
||||
|
||||
RPData:AddCheckFunc(RedPointType.tiandihonglu,OperatingManager.GetTianDiHongLuRedPointStatus)
|
||||
end
|
||||
|
||||
-- 向红点绑定物体
|
||||
|
|
|
@ -41,9 +41,7 @@ end
|
|||
|
||||
function this.SetWishTailsManSoulChips(_datas)
|
||||
this.wishTailsManSoulChips = {}
|
||||
LogGreen("#_datas:"..tostring(LengthOfTable(_datas) ))
|
||||
for k,v in pairs(_datas) do
|
||||
LogGreen("k:"..k.." v:"..tostring(v) )
|
||||
table.insert(this.wishTailsManSoulChips,v)
|
||||
end
|
||||
end
|
||||
|
@ -51,7 +49,6 @@ end
|
|||
function this.GetWishTailsManSoulChips()
|
||||
local datas = {}
|
||||
for k,v in pairs(this.wishTailsManSoulChips) do
|
||||
LogGreen("k:"..k.." v:"..v)
|
||||
table.insert(datas,v)
|
||||
end
|
||||
return datas
|
||||
|
|
|
@ -147,7 +147,7 @@ end
|
|||
function TailsmanSoulChipLottery:refreshMagicNum()
|
||||
local actData = ActivityGiftManager.GetActivityTypeInfo(self.actType)
|
||||
local d = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySpecialConfig,"Type",self.singleRecruit.MergePool)
|
||||
self.updateTimesTip.text = string.format("召唤<color=#%s>%s次必得红色碎片</color>","A55A13",d[1].Count-math.floor(actData.value/1000))
|
||||
self.updateTimesTip.text = string.format("召唤<color=#%s>%s</color>次必得红色碎片","A55A13",d[1].Count - actData.value)
|
||||
local endTime = ActivityGiftManager.GetTaskEndTime(self.actType) - PlayerManager.serverTime
|
||||
self.updateTimesTip1.text = string.format("活动剩余时间:"..self:TimeToDHMS(endTime))
|
||||
local timeDown=CalculateSecondsNowTo_N_OClock(0)
|
||||
|
@ -241,12 +241,11 @@ end
|
|||
--五个魂印头像
|
||||
function TailsmanSoulChipLottery:contentShow()
|
||||
wishSoulData = RecruitManager.GetWishTailsManSoulChips()
|
||||
LogGreen("self.singleRecruit.DiamondBoxContain[1][1]:"..tostring(self.singleRecruit.DiamondBoxContain[1][1]))
|
||||
local iconsData = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotteryRewardConfig,"Pool",self.singleRecruit.DiamondBoxContain[1][1])
|
||||
if wishSoulData and #wishSoulData > 0 then
|
||||
else
|
||||
local li = {}
|
||||
for i = 1,#iconsData do
|
||||
for i = 1,4 do
|
||||
table.insert(li,iconsData[i].Reward[1])
|
||||
end
|
||||
RecruitManager.SetWishTailsManSoulChips(li)
|
||||
|
@ -259,9 +258,7 @@ function TailsmanSoulChipLottery:contentShow()
|
|||
if i <= #wishSoulData then
|
||||
self.icons[i].icon.gameObject:SetActive(true)
|
||||
self.icons[i].kuang.gameObject:SetActive(true)
|
||||
LogGreen("wishSoulData[i]:"..tostring(wishSoulData[i]))
|
||||
local id = wishSoulData[i]
|
||||
LogGreen("id:"..tostring(id))
|
||||
self.icons[i].icon.sprite = self.spLoader:LoadSprite(artConfig[itemConfig[id].ResourceID].Name)
|
||||
self.icons[i].kuang.sprite = self.spLoader:LoadSprite(SoulPrintSpriteByQuantity[itemConfig[id].Quantity].circle)
|
||||
--点击能查看魂印信息
|
||||
|
|
Loading…
Reference in New Issue