Update - 1.7.0.88
EN: 1.7.0.88 CN: 1.7.0.90 JP: 1.7.0.91 KR: 1.7.0.94
This commit is contained in:
@@ -250,7 +250,7 @@ function PenguinCardActData:SendActivityPenguinCardSettleReq(nLevelId, nStar, nS
|
||||
local msgData = {
|
||||
LevelId = nLevelId,
|
||||
Star = nStar,
|
||||
Score = nScore
|
||||
Score = math.floor(nScore)
|
||||
}
|
||||
local successCallback = function(_, mapMainData)
|
||||
if not self.mapLevelData[nLevelId] or self.mapLevelData[nLevelId] and nScore > self.mapLevelData[nLevelId].nScore then
|
||||
@@ -293,10 +293,7 @@ function PenguinCardActData:SendActivityPenguinCardQuestReceiveReq(nQuestId, nGr
|
||||
max(v)
|
||||
end
|
||||
end
|
||||
UTILS.OpenReceiveByChangeInfo(mapMainData)
|
||||
if callback then
|
||||
callback(mapMainData)
|
||||
end
|
||||
UTILS.OpenReceiveByChangeInfo(mapMainData, callback)
|
||||
end
|
||||
HttpNetHandler.SendMsg(NetMsgId.Id.activity_penguin_card_quest_reward_receive_req, msgData, nil, successCallback)
|
||||
end
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
local ActivityDataBase = require("GameCore.Data.DataClass.Activity.ActivityDataBase")
|
||||
local ThrowGiftData = class("ThrowGiftData", ActivityDataBase)
|
||||
local LocalData = require("GameCore.Data.LocalData")
|
||||
function ThrowGiftData:Init()
|
||||
self.nActId = 0
|
||||
self.mapLevels = {}
|
||||
self.mapItems = {}
|
||||
self.tbNewLevel = {}
|
||||
end
|
||||
function ThrowGiftData:RefreshQuestData(questData)
|
||||
end
|
||||
@@ -16,6 +18,7 @@ function ThrowGiftData:RefreshThrowGiftData(nActId, msgData)
|
||||
for _, mapItem in ipairs(msgData.Items) do
|
||||
self.mapItems[mapItem.ItemId] = mapItem.Count
|
||||
end
|
||||
self:UpdateNewState()
|
||||
end
|
||||
function ThrowGiftData:GetActivityData()
|
||||
return {
|
||||
@@ -46,10 +49,87 @@ function ThrowGiftData:SettleLevels(nLevelId, nThrowGiftCount, nHitGiftCount, nS
|
||||
end
|
||||
self.mapLevels[nLevelId].FirstComplete = bWin or self.mapLevels[nLevelId].FirstComplete
|
||||
end
|
||||
for k, v in pairs(tbUseItems) do
|
||||
if self.mapItems[v.ItemId] == nil then
|
||||
self.mapItems[v.ItemId] = 0
|
||||
end
|
||||
self.mapItems[v.ItemId] = self.mapItems[v.ItemId] + v.Count
|
||||
end
|
||||
if callback ~= nil then
|
||||
callback()
|
||||
callback(msgData)
|
||||
end
|
||||
end
|
||||
HttpNetHandler.SendMsg(NetMsgId.Id.activity_throw_gift_settle_req, msg, nil, msgCallback)
|
||||
end
|
||||
function ThrowGiftData:GetDicFirstIn(nDicId)
|
||||
local sKey = tostring(self.nActId) .. tostring(nDicId) .. "IsFirst"
|
||||
local bIsFirst = LocalData.GetPlayerLocalData(sKey)
|
||||
if bIsFirst == nil then
|
||||
bIsFirst = true
|
||||
end
|
||||
if bIsFirst then
|
||||
LocalData.SetPlayerLocalData(sKey, false)
|
||||
end
|
||||
return bIsFirst
|
||||
end
|
||||
function ThrowGiftData:GetLevelNewStateInternal(nLevelId)
|
||||
local mapLevelCfgData = ConfigTable.GetData("ThrowGiftLevel", nLevelId)
|
||||
if mapLevelCfgData == nil then
|
||||
return false
|
||||
end
|
||||
local nOpenTime = self:GetActOpenTime()
|
||||
if mapLevelCfgData.DayOpen ~= 0 and mapLevelCfgData.DayOpen ~= nil and nOpenTime ~= 0 then
|
||||
local nServerTimeStamp = CS.ClientManager.Instance.serverTimeStamp
|
||||
local nUnlockTime = mapLevelCfgData.DayOpen * 86400 + nOpenTime
|
||||
if nUnlockTime - nServerTimeStamp <= 0 then
|
||||
local sKey = tostring(self.nActId) .. tostring(nLevelId) .. "LevelNew"
|
||||
local bIsFirst = LocalData.GetPlayerLocalData(sKey)
|
||||
if bIsFirst == nil then
|
||||
bIsFirst = true
|
||||
end
|
||||
if bIsFirst then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
function ThrowGiftData:SetLevelNew(nLevelId)
|
||||
local idx = table.indexof(self.tbNewLevel, nLevelId)
|
||||
if 0 < idx then
|
||||
table.remove(self.tbNewLevel, idx)
|
||||
end
|
||||
local sKey = tostring(self.nActId) .. tostring(nLevelId) .. "LevelNew"
|
||||
LocalData.SetPlayerLocalData(sKey, false)
|
||||
RedDotManager.SetValid(RedDotDefine.Activity_ThrowGift_NewLevel, {
|
||||
self.nActId,
|
||||
nLevelId
|
||||
}, false)
|
||||
end
|
||||
function ThrowGiftData:UpdateNewState()
|
||||
self.tbNewLevel = {}
|
||||
local foreachLevel = function(mapData)
|
||||
if mapData.ActivityId == self.nActId then
|
||||
local bNewState = self:GetLevelNewStateInternal(mapData.Id)
|
||||
if bNewState then
|
||||
table.insert(self.tbNewLevel, mapData.Id)
|
||||
end
|
||||
RedDotManager.SetValid(RedDotDefine.Activity_ThrowGift_NewLevel, {
|
||||
self.nActId,
|
||||
mapData.Id
|
||||
}, bNewState)
|
||||
end
|
||||
end
|
||||
ForEachTableLine(DataTable.ThrowGiftLevel, foreachLevel)
|
||||
local bNew = LocalData.GetPlayerLocalData("Activity_ThrowGift_New")
|
||||
RedDotManager.SetValid(RedDotDefine.Activity_ThrowGift_New, {
|
||||
self.nActId
|
||||
}, bNew ~= true)
|
||||
end
|
||||
function ThrowGiftData:GetLevelNewState(nLevelId)
|
||||
return table.indexof(self.tbNewLevel, nLevelId) > 0
|
||||
end
|
||||
function ThrowGiftData:GetNewLevels()
|
||||
return clone(self.tbNewLevel)
|
||||
end
|
||||
return ThrowGiftData
|
||||
|
||||
@@ -116,9 +116,6 @@ function PopUpData:IsNeedOwnPopUp(popUpId)
|
||||
end
|
||||
function PopUpData:IsNeedPopUp(popupId, localData)
|
||||
local cfg = ConfigTable.GetData("PopUp", popupId)
|
||||
if cfg == nil then
|
||||
return false
|
||||
end
|
||||
if cfg.PopRefreshType == GameEnum.PopRefreshType.WholeFirst then
|
||||
if nil == localData then
|
||||
return cfg.PopUpRes ~= nil
|
||||
|
||||
@@ -110,6 +110,8 @@ local RedDotDefine = {
|
||||
Activity_New_Tab = "Activity_New_Tab.<param>",
|
||||
Activity_GroupNew = "Activity_Group_New.<param>",
|
||||
Activity_BreakOut_DifficultyTap_Level = "Activity_Group_New.<param>.BreakOutLevel.<param>",
|
||||
Activity_ThrowGift_New = "Activity_ThrowGift_New.<param>",
|
||||
Activity_ThrowGift_NewLevel = "Activity_ThrowGift_New.<param>.Level.<param>",
|
||||
Phone = "Phone",
|
||||
Phone_Chat = "Phone.Chat",
|
||||
Phone_New = "Phone.Chat.New",
|
||||
|
||||
@@ -216,14 +216,16 @@ local OnClosePanel = function(listener, nPanelId)
|
||||
if type(nPanelId) == "number" then
|
||||
local bIsMainPanel = true
|
||||
if type(tbDisposablePanel) == "table" then
|
||||
for i, v in ipairs(tbDisposablePanel) do
|
||||
if v._nPanelId == nPanelId then
|
||||
local nCount = #tbDisposablePanel
|
||||
for i = nCount, 1, -1 do
|
||||
local objPanel = tbDisposablePanel[i]
|
||||
if objPanel._nPanelId == nPanelId then
|
||||
EventManager.Hit("Guide_CloseDisposablePanel", nPanelId)
|
||||
v:_PreExit()
|
||||
v:_Exit()
|
||||
v:_Destroy()
|
||||
objPanel:_PreExit()
|
||||
objPanel:_Exit()
|
||||
objPanel:_Destroy()
|
||||
table.remove(tbDisposablePanel, i)
|
||||
RemoveTbSnapShot(v)
|
||||
RemoveTbSnapShot(objPanel)
|
||||
bIsMainPanel = false
|
||||
printLog("[界面切换] 关闭了非主 Panel 界面:" .. GetPanelName(nPanelId))
|
||||
break
|
||||
@@ -314,13 +316,13 @@ local OnOpenPanel = function(listener, nPanelId, ...)
|
||||
if _bHasOpenTips == false then
|
||||
_bHasOpenTips = UTILS.CheckIsTipsPanel(v._nPanelId)
|
||||
end
|
||||
if v._nPanelId == nPanelId then
|
||||
if v._nPanelId == nPanelId and nPanelId ~= PanelId.ReceivePropsTips then
|
||||
MoveSnapShot(v)
|
||||
objTempPanel:_PreExit()
|
||||
objTempPanel:_Exit()
|
||||
objTempPanel:_Destroy()
|
||||
objTempPanel = nil
|
||||
printLog("[界面切换] 打开非主 Panel:" .. GetPanelName(nPanelId) .. " 失败,不能重复打开。")
|
||||
printError("[界面切换] 打开非主 Panel:" .. GetPanelName(nPanelId) .. " 失败,不能重复打开。")
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -546,14 +548,6 @@ function PanelManager.GetCurPanelId()
|
||||
end
|
||||
return 0
|
||||
end
|
||||
function PanelManager.GetDisposablePanelState(nPanelId)
|
||||
for i, v in ipairs(tbDisposablePanel) do
|
||||
if v._nPanelId == nPanelId then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
function PanelManager.CheckPanelOpen(nPanelId)
|
||||
if type(tbBackHistory) == "table" then
|
||||
for i, objPanel in ipairs(tbBackHistory) do
|
||||
|
||||
Reference in New Issue
Block a user