Update - 1.12.0.120

EN: 1.12.0.120
CN: 1.12.0.120
JP: 1.12.0.124
KR: 1.12.0.124
This commit is contained in:
SL1900
2026-06-30 14:30:00 +09:00
parent 061d344bf2
commit 80af235e05
826 changed files with 625145 additions and 81163 deletions
@@ -685,7 +685,8 @@ function ActivityAvgData:RefreshAvgRedDot()
end
local actGroupData = PlayerData.Activity:GetActivityGroupDataById(nActGroupId)
local bActGroupUnlock = actGroupData:IsUnlock()
local bNew = isUnlock and isNew and not isClicked and isOpen and bActGroupUnlock
local bActGroupOpen = actGroupData:CheckActivityGroupOpen()
local bNew = isUnlock and isNew and not isClicked and isOpen and bActGroupUnlock and bActGroupOpen
if bNew == true then
tbActGroupRedDot[nActGroupId] = true
end
@@ -973,6 +974,7 @@ function ActivityAvgData:SendMsg_STORY_DONE(callBack, tbBattleEvents)
end
self.mapTempCL = {}
self.mapTempLatestCnt = {}
local sOldPid = PlayerData.Avg:GetPersonalityId()
func_overwrite(self.mapTempPersonality, self.mapPersonality)
self.mapTempPersonality = {}
self.mapTempPersonalityCnt = {}
@@ -981,6 +983,7 @@ function ActivityAvgData:SendMsg_STORY_DONE(callBack, tbBattleEvents)
local actChapterConfig = ConfigTable.GetData("ActivityStoryChapter", self.CURRENT_ACTIVITY_ID)
local tbActPersonality, tbActPersonalityFactor = self:_FilterPersonalityByChapter(actChapterConfig.ChapterId)
PlayerData.Avg:RefreshActPersonalityData(actChapterConfig.ChapterId, tbActPersonality, tbActPersonalityFactor)
PlayerData.Avg:PersonalityChangedUpload(sOldPid)
if callBack ~= nil then
callBack(mapChangeInfo)
end
@@ -0,0 +1,169 @@
local ActivityDataBase = require("GameCore.Data.DataClass.Activity.ActivityDataBase")
local DoubleDropsActData = class("DoubleDropsActData", ActivityDataBase)
local mapInsType = {
[GameEnum.instanceType.DailyInstance] = GameEnum.OpenFuncType.DailyInstance,
[GameEnum.instanceType.RegionBoss] = GameEnum.OpenFuncType.RegionBoss,
[GameEnum.instanceType.SkillInstance] = GameEnum.OpenFuncType.SkillInstance,
[GameEnum.instanceType.CharGemInstance] = GameEnum.OpenFuncType.CharGemInstance
}
function DoubleDropsActData:Init()
self.nDailyUseTimes = 0
self.nDailyMaxTimes = 0
self.tbInstanceType = {}
self.tbOpenFuncType = {}
self.nRewardType = 0
self.tbQuests = {}
self:InitConfig()
end
function DoubleDropsActData:InitConfig()
if CacheTable.Get("_ActivityDoubleQuest") == nil or next(CacheTable.Get("_ActivityDoubleQuest")) == nil then
local funcForeach = function(mapData)
CacheTable.InsertData("_ActivityDoubleQuest", mapData.ActivityId, mapData)
end
ForEachTableLine(ConfigTable.Get("ActivityDoubleQuest"), funcForeach)
end
local mapDoubleCfg = ConfigTable.GetData("ActivityDouble", self.nActId)
if mapDoubleCfg == nil then
return
end
self.nDailyMaxTimes = mapDoubleCfg.DailyTimes
self.tbInstanceType = mapDoubleCfg.InstanceType
self.tbOpenFuncType = {}
for _, v in ipairs(mapDoubleCfg.InstanceType) do
table.insert(self.tbOpenFuncType, mapInsType[v])
end
self.nRewardType = mapDoubleCfg.RewardType
end
function DoubleDropsActData:RefreshDoubleDropsActData(nActId, msgData)
self.nDailyUseTimes = msgData.DailyUseTimes
if msgData.Quests == nil or #msgData.Quests == 0 then
self.tbQuests = {}
local tbQuest = CacheTable.GetData("_ActivityDoubleQuest", nActId)
if tbQuest ~= nil then
for _, v in ipairs(tbQuest) do
local tbJson = decodeJson(v.QuestParams)
local questData = {
nId = v.Id,
nStatus = AllEnum.ActQuestStatus.UnComplete,
progress = {
Cur = 0,
Max = tbJson[#tbJson]
}
}
table.insert(self.tbQuests, questData)
end
end
else
self:CacheAllQuestData(msgData.Quests)
end
end
function DoubleDropsActData:UpdateDoubleCount(nCount)
self.nDailyUseTimes = nCount
end
function DoubleDropsActData:QuestServer2Client(nStatus)
if nStatus == 0 then
return AllEnum.ActQuestStatus.UnComplete
elseif nStatus == 1 then
return AllEnum.ActQuestStatus.Complete
else
return AllEnum.ActQuestStatus.Received
end
end
function DoubleDropsActData:CacheAllQuestData(questListData)
self.tbQuests = {}
for _, v in pairs(questListData) do
local questData = {
nId = v.Id,
nStatus = self:QuestServer2Client(v.Status),
progress = v.Progress[1]
}
table.insert(self.tbQuests, questData)
end
self:RefreshRedDot()
end
function DoubleDropsActData:RefreshQuestData(msgData)
local questData = {
nId = msgData.Id,
nStatus = self:QuestServer2Client(msgData.Status),
progress = msgData.Progress[1]
}
for k, v in ipairs(self.tbQuests) do
if v.nId == msgData.Id then
self.tbQuests[k] = questData
break
end
end
self:RefreshRedDot()
end
function DoubleDropsActData:RefreshRedDot()
local bRedDot = false
for _, questData in ipairs(self.tbQuests) do
bRedDot = bRedDot or questData.nStatus == AllEnum.ActQuestStatus.Complete
if bRedDot then
break
end
end
RedDotManager.SetValid(RedDotDefine.Activity_Tab, self.nActId, bRedDot)
RedDotManager.SetValid(RedDotDefine.Activity_DoubleDrop_Quest, self.nActId, bRedDot)
end
function DoubleDropsActData:GetAllQuests()
return self.tbQuests
end
function DoubleDropsActData:GetDoubleDropsTimes()
return self.nDailyUseTimes, self.nDailyMaxTimes
end
function DoubleDropsActData:GetDoubleFuncType()
return self.tbOpenFuncType
end
function DoubleDropsActData:GetInstanceType()
return self.tbInstanceType
end
function DoubleDropsActData:CheckInstanceType(nType)
return table.indexof(self.tbInstanceType, nType) > 0
end
function DoubleDropsActData:GetRewardType()
return self.nRewardType
end
function DoubleDropsActData:GetDropString()
local str1, str2 = "", ""
if self.nRewardType == GameEnum.activityDoubleRewardType.Double then
str1 = orderedFormat(ConfigTable.GetUIText("Double_Drops_Double_Count_1"), self.nDailyMaxTimes - self.nDailyUseTimes, self.nDailyMaxTimes)
str2 = ConfigTable.GetUIText("Double_Drops_Double_Count_2")
elseif self.nRewardType == GameEnum.activityDoubleRewardType.Triple then
str1 = orderedFormat(ConfigTable.GetUIText("Double_Drops_Triple_Count_1"), self.nDailyMaxTimes - self.nDailyUseTimes, self.nDailyMaxTimes)
str2 = ConfigTable.GetUIText("Double_Drops_Triple_Count_2")
end
return str1, str2
end
function DoubleDropsActData:GetDropActString()
local str = ""
if self.nRewardType == GameEnum.activityDoubleRewardType.Double then
str = orderedFormat(ConfigTable.GetUIText("Double_Drops_Act_Double_Count"), self.nDailyMaxTimes - self.nDailyUseTimes, self.nDailyMaxTimes)
elseif self.nRewardType == GameEnum.activityDoubleRewardType.Triple then
str = orderedFormat(ConfigTable.GetUIText("Double_Drops_Triple_Count_1"), self.nDailyMaxTimes - self.nDailyUseTimes, self.nDailyMaxTimes)
end
return str
end
function DoubleDropsActData:SendReceiveQuestReward(nQuestId, callback)
local netCallback = function(_, netMsg)
for k, v in ipairs(self.tbQuests) do
if v.nStatus == AllEnum.ActQuestStatus.Complete then
v.nStatus = AllEnum.ActQuestStatus.Received
end
end
self:RefreshRedDot()
local receiveCallback = function()
if type(callback) == "function" then
callback()
end
EventManager.Hit("ReceiveDoubleDropQuest")
end
UTILS.OpenReceiveByChangeInfo(netMsg, receiveCallback)
end
local mapSendMsg = {
ActivityId = self.nActId,
QuestId = nQuestId or 0
}
HttpNetHandler.SendMsg(NetMsgId.Id.activity_double_quest_reward_receive_req, mapSendMsg, nil, netCallback)
end
return DoubleDropsActData
@@ -12,6 +12,8 @@ function GoldenSpyData:Init()
self.tbLevelData = {}
self.cacheEnterFloorList = {}
self:AddListeners()
self.nGroupId = 0
self.nLevelId = 0
end
function GoldenSpyData:AddListeners()
EventManager.Add(EventId.IsNewDay, self, self.OnEvent_NewDay)
@@ -174,7 +176,13 @@ function GoldenSpyData:RefreshRedDot()
end
local actGroupId = ConfigTable.GetData("Activity", self.nActId).MidGroupId
for _, groupData in pairs(self.tbLevelGroupData) do
if CS.ClientManager.Instance.serverTimeStamp < groupData.nStartTime and groupData.nStartTime ~= 0 then
local isOpen = self:CheckActivityOpen()
if not isOpen then
RedDotManager.SetValid(RedDotDefine.Activity_GoldenSpy_Group, {
actGroupId,
groupData.nId
}, false)
elseif CS.ClientManager.Instance.serverTimeStamp < groupData.nStartTime and groupData.nStartTime ~= 0 then
RedDotManager.SetValid(RedDotDefine.Activity_GoldenSpy_Group, {
actGroupId,
groupData.nId
@@ -194,9 +202,17 @@ function GoldenSpyData:RefreshRedDot()
end
function GoldenSpyData:StartLevel(groupId, levelId)
self.nGroupId = groupId
self.nLevelId = levelId
self.GoldenSpyLevelData:InitData()
self.GoldenSpyLevelData:StartLevel(levelId)
EventManager.Hit(EventId.OpenPanel, PanelId.GoldenSpyPanel, self.nActId, self.nGroupId, levelId)
local config = ConfigTable.GetData("GoldenSpyControl", self.nActId)
if config == nil then
return
end
EventManager.Hit(EventId.OpenPanel, config.LevelPanelId, self.nActId, self.nGroupId, levelId)
end
function GoldenSpyData:GetLastLevelData()
return self.nGroupId, self.nLevelId
end
function GoldenSpyData:FinishLevel(levelId, data, callback)
local items = {}
@@ -221,7 +237,7 @@ function GoldenSpyData:FinishLevel(levelId, data, callback)
Items = items,
Skills = skills
}
local callback = function(_, msgData)
local msgCallback = function(_, msgData)
local oldLevelData = self:GetLevelDataById(levelId)
local levelCfg = ConfigTable.GetData("GoldenSpyLevel", levelId)
local levelData = {
@@ -231,10 +247,10 @@ function GoldenSpyData:FinishLevel(levelId, data, callback)
}
self:UpdateLevelData(levelData)
if callback ~= nil then
callback()
callback(msgData)
end
end
HttpNetHandler.SendMsg(NetMsgId.Id.activity_gds_settle_req, mapMsg, nil, callback)
HttpNetHandler.SendMsg(NetMsgId.Id.activity_gds_settle_req, mapMsg, nil, msgCallback)
end
function GoldenSpyData:EnterFloor(floorId)
if table.indexof(self.cacheEnterFloorList, floorId) == 0 then
@@ -248,4 +264,53 @@ function GoldenSpyData:GetFloorIsNew(floorId)
end
return false
end
function GoldenSpyData:GetNextLevel(nGroupId, nCurLevelId)
local groupCfg = ConfigTable.GetData("GoldenSpyLevelGroup", nGroupId)
if groupCfg == nil then
return nil, nil
end
local levelList = groupCfg.LevelList
local nIndex = table.indexof(levelList, nCurLevelId)
if nIndex == 0 then
return nil, nil
end
if nIndex < #levelList then
return nGroupId, levelList[nIndex + 1]
end
local nNextGroupId = self:GetNextGroup(nGroupId)
if nNextGroupId == nil then
return nil, nil
end
local nextGroupData = self:GetLevelGroupDataById(nNextGroupId)
if nextGroupData == nil then
return nil, nil
end
local nextGroupConfig = ConfigTable.GetData("GoldenSpyLevelGroup", nNextGroupId)
if nextGroupConfig == nil then
return nil, nil
end
if CS.ClientManager.Instance.serverTimeStamp < nextGroupData.nStartTime and nextGroupData.nStartTime ~= 0 then
return nil, nil
elseif not self:CheckPreGroupPassByGroupId(nNextGroupId) then
return nil, nil
else
return nNextGroupId, nextGroupConfig.LevelList[1]
end
end
function GoldenSpyData:GetNextGroup(nCurGroupId)
local tbGroupList = ConfigTable.GetData("GoldenSpyControl", self.nActId).LevelGroupList
local nIndex = table.indexof(tbGroupList, nCurGroupId)
if nIndex == #tbGroupList then
return nil
end
return tbGroupList[nIndex + 1]
end
function GoldenSpyData:GetPreGroup(nCurGroupId)
local tbGroupList = ConfigTable.GetData("GoldenSpyControl", self.nActId).LevelGroupList
local nIndex = table.indexof(tbGroupList, nCurGroupId)
if nIndex == 1 then
return nil
end
return tbGroupList[nIndex - 1]
end
return GoldenSpyData
@@ -0,0 +1,70 @@
local ActivityGroupDataBase = require("GameCore.Data.DataClass.Activity.ActivityGroupDataBase")
local GunStorm_10109Data = class("GunStorm_10109Data", ActivityGroupDataBase)
function GunStorm_10109Data:Init()
self.tbAllActivity = {}
self.nCGActivityId = 0
self.sCGPath = ""
self.bPlayedCG = false
self:ParseActivity()
end
function GunStorm_10109Data:ParseActivity()
if self.actGroupConfig == nil then
self.actGroupConfig = ConfigTable.GetData("ActivityGroup", self.nActGroupId)
end
if self.actGroupConfig == nil then
printError("ActivityGroup config not found for id: " .. tostring(self.nActGroupId))
return
end
local sJson = self.actGroupConfig.Enter
local tbJson = decodeJson(sJson)
if tbJson == nil then
printError("ActivityGroup Enter json is nil for id: " .. tostring(self.nActGroupId))
end
for _, activity in pairs(tbJson) do
local data = {
ActivityId = activity[1],
Index = activity[2],
PanelId = activity[3]
}
table.insert(self.tbAllActivity, data)
end
local sCgJson = self.actGroupConfig.CG
if sCgJson ~= nil then
local tbCGJson = decodeJson(sCgJson)
if tbCGJson and 2 <= #tbCGJson then
self.nCGActivityId = tonumber(tbCGJson[1])
self.sCGPath = tbCGJson[2]
end
end
end
function GunStorm_10109Data:GetActivityDataByIndex(nIndex)
for _, activity in pairs(self.tbAllActivity) do
if activity.Index == nIndex then
return activity
end
end
end
function GunStorm_10109Data:PlayCG()
self:SendMsg_CG_READ(self.nCGActivityId)
end
function GunStorm_10109Data:GetActivityGroupCGPlayed()
if self.bPlayedCG then
return true
end
return PlayerData.Activity:IsCGPlayed(self.nCGActivityId)
end
function GunStorm_10109Data:IsActivityInActivityGroup(nActivityId)
for _, activity in pairs(self.tbAllActivity) do
if activity.ActivityId == nActivityId then
return true, self.nActGroupId
end
end
return false
end
function GunStorm_10109Data:SendMsg_CG_READ(nActivityId)
local Callback = function()
self.bPlayedCG = true
end
HttpNetHandler.SendMsg(NetMsgId.Id.activity_cg_read_req, {nActivityId}, nil, Callback)
end
return GunStorm_10109Data
@@ -120,7 +120,7 @@ function PeriodicQuestActData:GetCanReceiveRewardGroup()
local nGroupId = 0
local nCurDay = self:GetCurOpenDay()
for _, v in pairs(self.tbAllQuestList) do
if nCurDay >= v.nDay and v.nStatus == AllEnum.ActQuestStatus.Complete and nGroupId < v.nGroupId then
if nCurDay >= v.nDay and v.nStatus == AllEnum.ActQuestStatus.Complete and (0 == nGroupId or nGroupId > v.nGroupId) then
nGroupId = v.nGroupId
end
end
@@ -27,10 +27,12 @@ local WinterNight_10105Data = require("GameCore.Data.DataClass.Activity.WinterNi
local Postal_10106Data = require("GameCore.Data.DataClass.Activity.Postal_10106Data")
local Viewfinder_10107Data = require("GameCore.Data.DataClass.Activity.Viewfinder_10107Data")
local Tech_10108Data = require("GameCore.Data.DataClass.Activity.Tech_10108Data")
local GunStorm_10109Data = require("GameCore.Data.DataClass.Activity.GunStorm_10109Data")
local PenguinCardActData = require("GameCore.Data.DataClass.Activity.PenguinCardActData")
local GoldenSpyData = require("GameCore.Data.DataClass.Activity.GoldenSpyData")
local Solodance_20102Data = require("GameCore.Data.DataClass.Activity.Solodance_20102Data")
local SwimTheme_11100Data = require("GameCore.Data.DataClass.Activity.SwimTheme_11100Data")
local DoubleDropsActData = require("GameCore.Data.DataClass.Activity.DoubleDropsActData")
function PlayerActivityData:Init()
self.bCacheActData = false
self.tbAllActivity = {}
@@ -142,6 +144,8 @@ function PlayerActivityData:CacheAllActivityData(mapNetMsg)
self:RefreshPenguinCardActData(nActId, v.PenguinCard)
elseif actCfg.ActivityType == GameEnum.activityType.GoldenSpy then
self:RefreshGoldenSpyActData(nActId, v.GDS)
elseif actCfg.ActivityType == GameEnum.activityType.Double then
self:RefreshDoubleDropsActData(nActId, v.Double)
end
end
end
@@ -239,6 +243,8 @@ function PlayerActivityData:CreateActivityIns(actData)
actIns = PenguinCardActData.new(actData)
elseif actCfg.ActivityType == GameEnum.activityType.GoldenSpy then
actIns = GoldenSpyData.new(actData)
elseif actCfg.ActivityType == GameEnum.activityType.Double then
actIns = DoubleDropsActData.new(actData)
end
if actIns ~= nil then
self.tbAllActivity[actData.Id] = actIns
@@ -302,6 +308,13 @@ end
function PlayerActivityData:GetActivityDataById(nActId)
return self.tbAllActivity[nActId] or nil
end
function PlayerActivityData:GetActivityDataByType(nActType)
for _, v in pairs(self.tbAllActivity) do
if v:GetActType() == nActType then
return v
end
end
end
function PlayerActivityData:CacheActivityGroupData()
local foreachActGroup = function(mapData)
self:CreateActivityGroupIns(mapData)
@@ -346,6 +359,8 @@ function PlayerActivityData:CreateActivityGroupIns(actData)
actIns = SwimTheme_11100Data.new(actData)
elseif actCfg.ActivityThemeType == GameEnum.activityThemeType.Tech_10108 then
actIns = Tech_10108Data.new(actData)
elseif actCfg.ActivityThemeType == GameEnum.activityThemeType.GunStorm_10109 then
actIns = GunStorm_10109Data.new(actData)
end
self.tbAllActivityGroup[actData.Id] = actIns
PlayerData.ActivityAvg:RefreshAvgRedDot()
@@ -474,7 +489,11 @@ function PlayerActivityData:RefreshSingleQuest(questData)
if nil ~= self.tbAllActivity[questData.ActivityId] then
self.tbAllActivity[questData.ActivityId]:RefreshQuestData(questData)
end
elseif actCfg.ActivityType == GameEnum.activityType.PenguinCard and nil ~= self.tbAllActivity[questData.ActivityId] then
elseif actCfg.ActivityType == GameEnum.activityType.PenguinCard then
if nil ~= self.tbAllActivity[questData.ActivityId] then
self.tbAllActivity[questData.ActivityId]:RefreshQuestData(questData)
end
elseif actCfg.ActivityType == GameEnum.activityType.Double and nil ~= self.tbAllActivity[questData.ActivityId] then
self.tbAllActivity[questData.ActivityId]:RefreshQuestData(questData)
end
end
@@ -617,6 +636,11 @@ end
function PlayerActivityData:IsCGPlayed(nActId)
return table.indexof(self.tbReadedCG, nActId) > 0
end
function PlayerActivityData:RefreshDoubleDropsActData(nActId, msgData)
if nil ~= self.tbAllActivity[nActId] then
self.tbAllActivity[nActId]:RefreshDoubleDropsActData(nActId, msgData)
end
end
function PlayerActivityData:GetActivityBannerList()
local tbList = {}
for _, v in pairs(self.tbAllActivity) do
+28
View File
@@ -532,6 +532,30 @@ function AvgData:MarkChoosedPersonality(sAvgId, nGroupId, nIndex, nFactor)
nCurCnt = nCurCnt + 1
self.mapTempPersonalityCnt[sAvgId][nGroupId][nIndex] = nCurCnt
end
function AvgData:GetPersonalityId()
local _, _, sFace = self:CalcPersonality(1)
return sFace and tostring(sFace) or ""
end
function AvgData:PersonalityChangedUpload(sOldPersonalityId)
local sNewPersonalityId = self:GetPersonalityId()
if sOldPersonalityId == sNewPersonalityId then
return
end
local tabEvt = {}
table.insert(tabEvt, {
"before_personality",
sOldPersonalityId
})
table.insert(tabEvt, {
"after_personality",
sNewPersonalityId
})
table.insert(tabEvt, {
"role_id",
tostring(PlayerData.Base._nPlayerId)
})
NovaAPI.UserEventUpload("personality_change", tabEvt)
end
function AvgData:CalcPersonality(nId)
local cfgData_SRP = ConfigTable.GetData("StoryRolePersonality", nId)
local tbPersonalityBaseNum = cfgData_SRP.BaseValue
@@ -940,11 +964,15 @@ function AvgData:SendMsg_STORY_DONE(callBack, tbBattleEvents)
end
self.mapTempCL = {}
self.mapTempLatestCnt = {}
local sOldPid = next(self.mapTempPersonality) ~= nil and self:GetPersonalityId()
func_overwrite(self.mapTempPersonality, self.mapPersonality)
self.mapTempPersonality = {}
self.mapTempPersonalityCnt = {}
func_overwrite(self.mapTempPersonalityFactor, self.mapPersonalityFactor)
self.mapTempPersonalityFactor = {}
if sOldPid then
self:PersonalityChangedUpload(sOldPid)
end
if callBack ~= nil then
callBack(mapChangeInfo)
end
@@ -1241,6 +1241,10 @@ function PlayerBaseData:Event_CreateRole()
"role_id",
tostring(self._nPlayerId)
})
table.insert(tab_1, {
"personality_id",
PlayerData.Avg:GetPersonalityId()
})
NovaAPI.UserEventUpload("role_login", tab_1)
end
function PlayerBaseData:PrologueEventUpload(index)
@@ -241,7 +241,7 @@ function PlayerDailyInstanceData:MsgSettleDailyInstance(nLevelId, nBuildId, nSta
}
end
if callback ~= nil then
callback(mapMsgData.Select, mapMsgData.First, mapMsgData.Exp, mapMsgData.Change)
callback(mapMsgData.Select, mapMsgData.First, mapMsgData.DoubleItems, mapMsgData.Exp, mapMsgData.Change)
end
self:EventUpload(1, nLevelId, nBuildId)
end
@@ -146,6 +146,7 @@ function PlayerDiscData:GetDiscSkillByNote(tbDisc, tbHasNote, nNeedNote)
end
end
table.insert(tbSkill, {
nCurLevel = nCurLayer,
nId = nSubSkillId,
tbNote = tbNote,
nMaxLayerNoteNeed = nMaxLayerNoteNeed
@@ -205,6 +206,7 @@ function PlayerDiscData:GetDiscSkillByNoteCurrentLevel(tbDisc, tbHasNote, nNeedN
end
end
table.insert(tbSkill, {
nCurLevel = nCurLayer,
nId = nSubSkillId,
tbNote = tbNote,
nMaxLayerNoteNeed = nMaxLayerNoteNeed
@@ -219,7 +219,7 @@ function PlayerEquipmentInstanceData:MsgSettleEquipmentInstance(nLevelId, nBuild
}
end
if callback ~= nil then
callback(mapMsgData.AwardItems, mapMsgData.FirstItems, mapMsgData.SurpriseItems, mapMsgData.Exp, mapMsgData.Change)
callback(mapMsgData.AwardItems, mapMsgData.FirstItems, mapMsgData.SurpriseItems, mapMsgData.DoubleItems, mapMsgData.Exp, mapMsgData.Change)
end
self._EndTime = CS.ClientManager.Instance.serverTimeStampWithTimeZone
local tabUpLevel = {}
@@ -687,6 +687,20 @@ function PlayerMallData:CollectEnqueue(nOrderId, nType)
if not self._tbOrderCollect then
self._tbOrderCollect = {}
end
if self._bProcessingOrder and #self._tbOrderCollect == 0 then
local bHasWait = false
for _, v in pairs(self._tbWaitingOrderCollect) do
if v.nOrderId == nOrderId then
bHasWait = true
printError("订单:" .. nOrderId .. " 重复进入等待列表")
break
end
end
if not bHasWait then
table.insert(self._tbWaitingOrderCollect, {nOrderId = nOrderId, nType = nType})
end
return
end
table.insert(self._tbOrderCollect, {nOrderId = nOrderId, nType = nType})
end
function PlayerMallData:SendBattlePassOrderReq(nMode, nVersion, callback)
+162 -32
View File
@@ -6,6 +6,8 @@ function PlayerPhoneData:Init()
self.tbChatMsgCache = {}
self.tbPhoneMsgChoiceTarget = {}
self.tbPhoneMsgGroupData = {}
self.tbPhoneMsgGroupMeta = {}
self.tbPhoneMsgMetaParsed = {}
self.tbHistoryMsg = {}
self.tbHistorySelection = {}
self.tbNewChatList = {}
@@ -35,6 +37,8 @@ end
function PlayerPhoneData:GetChatState(chatData)
if chatData.nProcess == 0 then
return AllEnum.PhoneChatState.New
elseif chatData.nAllProcess == nil then
return AllEnum.PhoneChatState.UnComplete
elseif chatData.nProcess < chatData.nAllProcess then
return AllEnum.PhoneChatState.UnComplete
elseif chatData.nProcess >= chatData.nAllProcess then
@@ -44,17 +48,19 @@ end
function PlayerPhoneData:CreateNewChat(mapMsgData)
local chatData = {}
chatData.nChatId = mapMsgData.Id
chatData.nProcess = mapMsgData.Process
chatData.tbSelection = mapMsgData.Options
local chatAvgMsg = self:GetAVGPhoneMsg(chatData.nChatId)
if nil == chatAvgMsg then
return
chatData.nProcess = mapMsgData.Process or 0
chatData.tbSelection = mapMsgData.Options or {}
chatData.bHistoryParsed = false
local chatCfg = ConfigTable.GetData("Chat", chatData.nChatId)
if chatCfg == nil then
return nil
end
chatData.avgMsg = chatAvgMsg
chatData.nAllProcess = #chatAvgMsg
chatData.nStatus = self:GetChatState(chatData)
if chatData.nProcess > 0 then
self:ParseAvgHistoryPhoneMsgData(chatData.nChatId, chatData.avgMsg, chatData.nProcess, chatData.tbSelection)
if not self:EnsureChatAvgMetaLoaded(chatData) then
return nil
end
else
chatData.nStatus = self:GetChatState(chatData)
end
return chatData
end
@@ -117,7 +123,8 @@ function PlayerPhoneData:RefreshChatProcess(nAddressId, nChatId, nProcess, tbSel
chatData.nProcess = nProcess
if nil ~= tbSelection then
chatData.tbSelection = tbSelection
local data = chatData.avgMsg[lastProcess]
self:EnsureChatAvgLoaded(chatData)
local data = chatData.avgMsg and chatData.avgMsg[lastProcess]
if data ~= nil and data.cmd == "SetPhoneMsgChoiceBegin" then
local nGroupId = tonumber(data.param[1]) or 0
if nGroupId == #tbSelection then
@@ -140,7 +147,8 @@ function PlayerPhoneData:RefreshChatProcess(nAddressId, nChatId, nProcess, tbSel
end
end
chatData.nStatus = self:GetChatState(chatData)
self:UpdateHistoryPhoneMsgData(nChatId, chatData.avgMsg[nProcess], nProcess)
chatData.bHistoryParsed = false
self:ClearHistoryPhoneMsgData(nChatId)
end
self:RefreshAddressStatus(nAddressId)
end
@@ -375,6 +383,9 @@ function PlayerPhoneData:CheckNewChat(nAddressId, callback)
end
function PlayerPhoneData:GetNextProcess(nAddressId, nChatId, nProcess)
local chatData = self:GetChatData(nAddressId, nChatId)
if not self:EnsureChatAvgLoaded(chatData) then
return nProcess
end
local nNextProcess = nProcess
local tbMsg = chatData.avgMsg[nNextProcess]
if nil ~= tbMsg and tbMsg.cmd == "SetPhoneMsgChoiceJumpTo" then
@@ -396,7 +407,9 @@ function PlayerPhoneData:CheckChatComplete(nChatId)
local dataAddress = self.tbAddressBook[nAddressId]
if nil ~= dataAddress and nil ~= dataAddress.tbChatList then
local chatData = dataAddress.tbChatList[nChatId]
return chatData.nProcess >= chatData.nAllProcess
if self:EnsureChatAvgMetaLoaded(chatData) then
return chatData.nProcess >= chatData.nAllProcess
end
end
end
printError(string.format("聊天未解锁,请检查配置!!chatId = [%s])", nChatId))
@@ -430,17 +443,10 @@ end
function PlayerPhoneData:GetAVGPhoneMsg(nChatId, sLanguage)
local chatCfg = ConfigTable.GetData("Chat", nChatId)
if nil ~= chatCfg then
if sLanguage == nil then
sLanguage = Settings.sCurrentTxtLanguage
end
local nCurLanguageIdx = GetLanguageIndex(sLanguage)
local sAvgCfgPath = GetAvgLuaRequireRoot(nCurLanguageIdx) .. "Config/" .. chatCfg.AVGId
local sAvgCfgPath = self:GetAVGPhoneCfgPath(chatCfg, sLanguage)
if nil == self.tbChatMsgCache[sAvgCfgPath] then
local ok, tbAllAvgCfg = pcall(require, sAvgCfgPath)
if not ok then
printError("AvgId对应的配置文件没有找到,path:" .. sAvgCfgPath .. ". error: " .. tbAllAvgCfg)
return
else
local tbAllAvgCfg = self:LoadAVGPhoneCfg(chatCfg, sLanguage)
if tbAllAvgCfg ~= nil then
self.tbChatMsgCache[sAvgCfgPath] = {}
local sMsgGroup
for i, v in ipairs(tbAllAvgCfg) do
@@ -449,8 +455,13 @@ function PlayerPhoneData:GetAVGPhoneMsg(nChatId, sLanguage)
self.tbChatMsgCache[sAvgCfgPath][sMsgGroup] = {}
self.tbPhoneMsgGroupData[chatCfg.AVGId .. sMsgGroup] = {}
self.tbPhoneMsgGroupData[chatCfg.AVGId .. sMsgGroup].nStartCmdId = i
self.tbPhoneMsgGroupMeta[chatCfg.AVGId .. sMsgGroup] = {nStartCmdId = i, nAllProcess = 0}
elseif v.cmd ~= "End" then
table.insert(self.tbChatMsgCache[sAvgCfgPath][sMsgGroup], v)
local tbMeta = self.tbPhoneMsgGroupMeta[chatCfg.AVGId .. sMsgGroup]
if tbMeta ~= nil then
tbMeta.nAllProcess = tbMeta.nAllProcess + 1
end
if v.cmd == "SetPhoneMsgChoiceBegin" then
if self.tbPhoneMsgChoiceTarget[chatCfg.AVGId .. sMsgGroup] == nil then
self.tbPhoneMsgChoiceTarget[chatCfg.AVGId .. sMsgGroup] = {}
@@ -494,6 +505,7 @@ function PlayerPhoneData:GetAVGPhoneMsg(nChatId, sLanguage)
end
end
end
self.tbPhoneMsgMetaParsed[sAvgCfgPath] = true
end
end
if nil ~= self.tbChatMsgCache[sAvgCfgPath] then
@@ -501,6 +513,93 @@ function PlayerPhoneData:GetAVGPhoneMsg(nChatId, sLanguage)
end
end
end
function PlayerPhoneData:GetAVGPhoneCfgPath(chatCfg, sLanguage)
if chatCfg == nil then
return nil
end
if sLanguage == nil then
sLanguage = Settings.sCurrentTxtLanguage
end
local nCurLanguageIdx = GetLanguageIndex(sLanguage)
return GetAvgLuaRequireRoot(nCurLanguageIdx) .. "Config/" .. chatCfg.AVGId
end
function PlayerPhoneData:LoadAVGPhoneCfg(chatCfg, sLanguage)
local sAvgCfgPath = self:GetAVGPhoneCfgPath(chatCfg, sLanguage)
if sAvgCfgPath == nil then
return nil
end
local ok, tbAllAvgCfg = pcall(require, sAvgCfgPath)
if not ok then
printError("AvgId对应的配置文件没有找到,path:" .. sAvgCfgPath .. ". error: " .. tbAllAvgCfg)
return nil
end
return tbAllAvgCfg, sAvgCfgPath
end
function PlayerPhoneData:ParseAVGPhoneMeta(chatCfg, sLanguage)
local tbAllAvgCfg, sAvgCfgPath = self:LoadAVGPhoneCfg(chatCfg, sLanguage)
if tbAllAvgCfg == nil then
return nil
end
if self.tbPhoneMsgMetaParsed[sAvgCfgPath] then
return sAvgCfgPath
end
local sMsgGroup
for i, v in ipairs(tbAllAvgCfg) do
if v.cmd == "SetGroupId" then
sMsgGroup = v.param[1]
local sKey = chatCfg.AVGId .. sMsgGroup
self.tbPhoneMsgGroupMeta[sKey] = {nStartCmdId = i, nAllProcess = 0}
elseif v.cmd ~= "End" and sMsgGroup ~= nil then
local sKey = chatCfg.AVGId .. sMsgGroup
local tbMeta = self.tbPhoneMsgGroupMeta[sKey]
if tbMeta ~= nil then
tbMeta.nAllProcess = tbMeta.nAllProcess + 1
end
end
end
self.tbPhoneMsgMetaParsed[sAvgCfgPath] = true
return sAvgCfgPath
end
function PlayerPhoneData:GetAVGPhoneMsgMeta(nChatId, sLanguage)
local chatCfg = ConfigTable.GetData("Chat", nChatId)
if chatCfg ~= nil then
local sKey = chatCfg.AVGId .. chatCfg.AVGGroupId
if self.tbPhoneMsgGroupMeta[sKey] == nil then
self:ParseAVGPhoneMeta(chatCfg, sLanguage)
end
return self.tbPhoneMsgGroupMeta[sKey]
end
end
function PlayerPhoneData:EnsureChatAvgMetaLoaded(chatData)
if chatData == nil then
return false
end
if chatData.nAllProcess ~= nil then
return true
end
local tbMeta = self:GetAVGPhoneMsgMeta(chatData.nChatId)
if tbMeta == nil then
return false
end
chatData.nAllProcess = tbMeta.nAllProcess
chatData.nStatus = self:GetChatState(chatData)
return true
end
function PlayerPhoneData:EnsureChatAvgLoaded(chatData)
if chatData == nil then
return false
end
if chatData.avgMsg ~= nil then
return true
end
chatData.avgMsg = self:GetAVGPhoneMsg(chatData.nChatId)
if chatData.avgMsg == nil then
return false
end
chatData.nAllProcess = #chatData.avgMsg
chatData.nStatus = self:GetChatState(chatData)
return true
end
function PlayerPhoneData:ParseAvgHistoryPhoneMsgData(nChatId, tbMsgData, nProcess, tbSelection)
self:ClearHistoryPhoneMsgData(nChatId)
if nil ~= tbMsgData then
@@ -565,10 +664,31 @@ function PlayerPhoneData:ParseAvgHistoryPhoneMsgData(nChatId, tbMsgData, nProces
end
end
end
function PlayerPhoneData:EnsureChatHistoryParsed(chatData)
if chatData == nil then
return
end
if chatData.bHistoryParsed == true then
return
end
if not self:EnsureChatAvgLoaded(chatData) then
return
end
if chatData.nProcess ~= nil and chatData.nProcess > 0 then
self:ParseAvgHistoryPhoneMsgData(chatData.nChatId, chatData.avgMsg, chatData.nProcess, chatData.tbSelection)
else
self:ClearHistoryPhoneMsgData(chatData.nChatId)
end
chatData.bHistoryParsed = true
end
function PlayerPhoneData:GetAvgStartCmdId(nChatId)
local chatCfg = ConfigTable.GetData("Chat", nChatId)
if chatCfg ~= nil then
local tbData = self.tbPhoneMsgGroupData[chatCfg.AVGId .. chatCfg.AVGGroupId]
local sKey = chatCfg.AVGId .. chatCfg.AVGGroupId
local tbData = self.tbPhoneMsgGroupData[sKey]
if tbData == nil then
tbData = self:GetAVGPhoneMsgMeta(nChatId)
end
if tbData ~= nil then
return tbData.nStartCmdId
end
@@ -606,39 +726,53 @@ function PlayerPhoneData:UpdateHistoryPhoneMsgData(nChatId, tbMsgData, nProcess)
}
table.insert(self.tbHistoryMsg[nChatId], data)
end
function PlayerPhoneData:GetHistoryPhoneMsgData(nChatId)
function PlayerPhoneData:GetHistoryPhoneMsgData(nChatId, chatData)
if chatData ~= nil then
self:EnsureChatHistoryParsed(chatData)
end
if self.tbHistoryMsg[nChatId] == nil then
self.tbHistoryMsg[nChatId] = {}
end
return self.tbHistoryMsg[nChatId]
end
function PlayerPhoneData:GetHistoryPhoneSelectionData(nChatId)
function PlayerPhoneData:GetHistoryPhoneSelectionData(nChatId, chatData)
if chatData ~= nil then
self:EnsureChatHistoryParsed(chatData)
end
if self.tbHistorySelection[nChatId] == nil then
self.tbHistorySelection[nChatId] = {}
end
return self.tbHistorySelection[nChatId]
end
function PlayerPhoneData:GetChatMsg(chatData, nIndex)
self:EnsureChatAvgLoaded(chatData)
local avgGroupMsg = chatData.avgMsg
if nil ~= avgGroupMsg then
if nIndex == 1 then
return avgGroupMsg[nIndex]
else
self:EnsureChatHistoryParsed(chatData)
local tbChatList = self.tbHistoryMsg[chatData.nChatId]
return tbChatList[#tbChatList]
if tbChatList ~= nil then
return tbChatList[#tbChatList]
end
end
end
end
function PlayerPhoneData:GetChatContent(chatData, nIndex)
self:EnsureChatAvgLoaded(chatData)
local avgGroupMsg = chatData.avgMsg
if nil ~= avgGroupMsg then
local tbAvgMsg = avgGroupMsg[nIndex]
if nIndex == 1 then
return ProcAvgTextContent(tbAvgMsg.param[3], GetLanguageIndex(Settings.sCurrentTxtLanguage))
else
self:EnsureChatHistoryParsed(chatData)
local tbChatList = self.tbHistoryMsg[chatData.nChatId]
local chatData = tbChatList[#tbChatList]
return ProcAvgTextContent(chatData.param[3], GetLanguageIndex(Settings.sCurrentTxtLanguage))
local historyChatData = tbChatList and tbChatList[#tbChatList]
if historyChatData ~= nil then
return ProcAvgTextContent(historyChatData.param[3], GetLanguageIndex(Settings.sCurrentTxtLanguage))
end
end
end
end
@@ -684,10 +818,6 @@ function PlayerPhoneData:SendAddressListReq(callback)
end
function PlayerPhoneData:SendChatProcess(nAddressId, nChatId, nProcess, tbSelection, bEnd, callback)
local httpCall = function(mapMsgData)
if nil == self.tbHistoryMsg[nChatId] or nil == next(self.tbHistoryMsg[nChatId]) then
local chatData = self:GetChatData(nAddressId, nChatId)
self:ParseAvgHistoryPhoneMsgData(nChatId, chatData.avgMsg, nProcess, tbSelection)
end
self:RefreshChatProcess(nAddressId, nChatId, nProcess, tbSelection)
if nil ~= callback then
callback()
+52 -18
View File
@@ -557,10 +557,13 @@ function PlayerQuestData:ReceiveTourReward(nTid, callback)
end
local mapDecodedChangeInfo = UTILS.DecodeChangeInfo(mapMsgData.Change)
HttpNetHandler.ProcChangeInfo(mapDecodedChangeInfo)
local bWasInBatch = self._bInBatchReceive
if callback ~= nil then
callback(mapMsgData)
end
EventManager.Hit(EventId.TourQuestReceived, mapMsgData.Rewards, mapMsgData.Change)
if not bWasInBatch then
EventManager.Hit(EventId.TourQuestReceived, mapMsgData.Rewards, mapMsgData.Change)
end
self:UpdateQuestRedDot("TourGuide")
end
PlayerData.State:SetMailOverflow(false)
@@ -571,10 +574,13 @@ function PlayerQuestData:ReceiveTourGroupReward(callback)
self.nCurTourGroupOrderIndex = self.nCurTourGroupOrderIndex + 1
local mapDecodedChangeInfo = UTILS.DecodeChangeInfo(mapMsgData.Change)
HttpNetHandler.ProcChangeInfo(mapDecodedChangeInfo)
local bWasInBatch = self._bInBatchReceive
if callback ~= nil then
callback(mapMsgData)
end
EventManager.Hit(EventId.TourGroupReceived, mapMsgData.Rewards, mapMsgData.Change)
if not bWasInBatch then
EventManager.Hit(EventId.TourGroupReceived, mapMsgData.Rewards, mapMsgData.Change)
end
self:UpdateQuestRedDot("TourGuide")
end
PlayerData.State:SetMailOverflow(false)
@@ -654,10 +660,12 @@ function PlayerQuestData:ReceiveTeamFormationReward(nTid, nGroupId, callback)
local cb = function()
EventManager.Hit("UpdateTeamFormationGroup")
end
UTILS.OpenReceiveByDisplayItem(tbItem, mapMsgData, cb)
if not self._bInBatchReceive then
UTILS.OpenReceiveByDisplayItem(tbItem, mapMsgData, cb)
end
self:UpdateQuestRedDot("Assist")
if callback ~= nil then
callback(mapMsgData)
callback(mapMsgData, tbItem, mapMsgData)
end
end
PlayerData.State:SetMailOverflow(false)
@@ -729,15 +737,29 @@ function PlayerQuestData:ReceiveTeamFormationGroupReward(nGroupId, nAttributeIdx
local cb = function()
EventManager.Hit("UpdateTeamFormationGroup", bAttributeComplete, nNextGroupId)
end
UTILS.OpenReceiveByDisplayItem(tbItem, mapMsgData.Change, cb)
if not self._bInBatchReceive then
UTILS.OpenReceiveByDisplayItem(tbItem, mapMsgData.Change, cb)
end
self:UpdateQuestRedDot("Assist")
if callback ~= nil then
callback(mapMsgData)
callback(mapMsgData, tbItem, mapMsgData.Change, bAttributeComplete, nNextGroupId)
end
end
PlayerData.State:SetMailOverflow(false)
HttpNetHandler.SendMsg(NetMsgId.Id.quest_assist_group_reward_receive_req, msg, nil, Callback)
end
function PlayerQuestData:SetBatchReceiveFlag(bOn)
self._nBatchReceiveCount = self._nBatchReceiveCount or 0
if bOn then
self._nBatchReceiveCount = self._nBatchReceiveCount + 1
else
self._nBatchReceiveCount = self._nBatchReceiveCount - 1
if self._nBatchReceiveCount < 0 then
self._nBatchReceiveCount = 0
end
end
self._bInBatchReceive = self._nBatchReceiveCount > 0
end
function PlayerQuestData:ReceiveDailyReward(nTid, callback)
local msg = {Value = nTid}
local tbReceivedId = {}
@@ -764,10 +786,13 @@ function PlayerQuestData:ReceiveDailyReward(nTid, callback)
end
local mapDecodedChangeInfo = UTILS.DecodeChangeInfo(mapMsgData)
HttpNetHandler.ProcChangeInfo(mapDecodedChangeInfo)
local bWasInBatch = self._bInBatchReceive
if callback ~= nil then
callback()
callback(mapDecodedChangeInfo, mapMsgData)
end
if not bWasInBatch then
EventManager.Hit(EventId.DailyQuestReceived, mapMsgData)
end
EventManager.Hit(EventId.DailyQuestReceived, mapMsgData)
self:UpdateQuestRedDot("Daily")
end
PlayerData.State:SetMailOverflow(false)
@@ -793,14 +818,17 @@ function PlayerQuestData:ReceiveDailyActiveReward(callBack)
self:UpdateDailyQuestRedDot()
local mapDecodedChangeInfo = UTILS.DecodeChangeInfo(mapMsgData.Change)
HttpNetHandler.ProcChangeInfo(mapDecodedChangeInfo)
if callBack ~= nil then
callBack()
end
local tbShowReward = {}
for id, count in pairs(tbReward) do
table.insert(tbShowReward, {id = id, count = count})
end
EventManager.Hit(EventId.DailyQuestActiveReceived, tbShowReward)
local bWasInBatch = self._bInBatchReceive
if callBack ~= nil then
callBack(tbShowReward, mapDecodedChangeInfo)
end
if not bWasInBatch then
EventManager.Hit(EventId.DailyQuestActiveReceived, tbShowReward)
end
end
HttpNetHandler.SendMsg(NetMsgId.Id.quest_daily_active_reward_receive_req, {}, nil, callback)
end
@@ -830,10 +858,13 @@ function PlayerQuestData:ReceiveWeeklyReward(nTid, callback)
end
local mapDecodedChangeInfo = UTILS.DecodeChangeInfo(mapMsgData)
HttpNetHandler.ProcChangeInfo(mapDecodedChangeInfo)
local bWasInBatch = self._bInBatchReceive
if callback ~= nil then
callback()
callback(mapDecodedChangeInfo, mapMsgData)
end
if not bWasInBatch then
EventManager.Hit(EventId.WeeklyQuestReceived, mapMsgData)
end
EventManager.Hit(EventId.WeeklyQuestReceived, mapMsgData)
self:UpdateQuestRedDot("Weekly")
end
PlayerData.State:SetMailOverflow(false)
@@ -859,14 +890,17 @@ function PlayerQuestData:ReceiveWeeklyActiveReward(callBack)
self:UpdateWeeklyQuestRedDot()
local mapDecodedChangeInfo = UTILS.DecodeChangeInfo(mapMsgData.Change)
HttpNetHandler.ProcChangeInfo(mapDecodedChangeInfo)
if callBack ~= nil then
callBack()
end
local tbShowReward = {}
for id, count in pairs(tbReward) do
table.insert(tbShowReward, {id = id, count = count})
end
EventManager.Hit(EventId.WeeklyQuestActiveReceived, tbShowReward)
local bWasInBatch = self._bInBatchReceive
if callBack ~= nil then
callBack(tbShowReward, mapDecodedChangeInfo)
end
if not bWasInBatch then
EventManager.Hit(EventId.WeeklyQuestActiveReceived, tbShowReward)
end
end
HttpNetHandler.SendMsg(NetMsgId.Id.quest_weekly_active_reward_receive_req, {}, nil, callback)
end
@@ -221,7 +221,7 @@ function PlayerSkillInstanceData:MsgSettleSkillInstance(nLevelId, nBuildId, nSta
}
end
if callback ~= nil then
callback(mapMsgData.AwardItems, mapMsgData.FirstItems, mapMsgData.ThreeStarItems, mapMsgData.SurpriseItems, mapMsgData.Exp, mapMsgData.Change)
callback(mapMsgData.AwardItems, mapMsgData.FirstItems, mapMsgData.ThreeStarItems, mapMsgData.SurpriseItems, mapMsgData.DoubleItems, mapMsgData.Exp, mapMsgData.Change)
end
self._EndTime = CS.ClientManager.Instance.serverTimeStampWithTimeZone
local tabUpLevel = {}
@@ -96,8 +96,14 @@ function PlayerTutorialData:GetNextLevelId(levelId)
end
return nNextlevelId
end
function PlayerTutorialData:GetLevelReward(levelId)
function PlayerTutorialData:GetLevelReward(levelId, callback)
local mapSendMsg = {Value = levelId}
if self:GetLevelData(levelId).LevelStatus == AllEnum.ActQuestStatus.Received then
if callback ~= nil then
callback()
end
return
end
local succ_cb = function(_, mapData)
self:UpdateLevel({
nlevelId = levelId,
@@ -105,6 +111,12 @@ function PlayerTutorialData:GetLevelReward(levelId)
})
local bIsNew = LocalData.GetPlayerLocalData("Tutorial_IsNew")
self:RefreshRedDot(bIsNew)
local closeCallback = function()
if callback ~= nil then
callback()
end
end
UTILS.OpenReceiveByChangeInfo(mapData, closeCallback)
EventManager.Hit(EventId.TutorialQuestReceived, mapData)
end
HttpNetHandler.SendMsg(NetMsgId.Id.tutorial_level_reward_receive_req, mapSendMsg, nil, succ_cb)