Hotfix - 1.6.0.85
EN: 1.6.0.85 CN: 1.6.0.88 JP: 1.6.0.89 KR: 1.6.0.92
This commit is contained in:
@@ -13,8 +13,9 @@ local mapToggle = {
|
||||
}
|
||||
local colorSelect = Color(1.0, 0.9882352941176471, 0.9568627450980393, 1)
|
||||
local colorUnSelect = Color(0.4, 0.13333333333333333, 0.15294117647058825, 1)
|
||||
local colorSelectLock = Color(0.7137254901960784, 0.6431372549019608, 0.5411764705882353, 1)
|
||||
local colorSelectLock = Color(0.9529411764705882, 0.8588235294117647, 0.7294117647058823, 1)
|
||||
local colorUnSelectLock = Color(0.4, 0.13333333333333333, 0.15294117647058825, 1)
|
||||
local colorSelectLockMask = Color(0.7137254901960784, 0.6431372549019608, 0.5411764705882353, 1)
|
||||
local colorUnSelectLockMask = Color(0.2980392156862745, 0.09803921568627451, 0.11372549019607843, 1)
|
||||
local timeUnLockColor = "fff7ca"
|
||||
local colorConditionsUnLock = Color(1, 1, 1, 1)
|
||||
@@ -337,6 +338,8 @@ function ActivityLevelsSelectCtrl:RefreshTogType(nType)
|
||||
end
|
||||
function ActivityLevelsSelectCtrl:RefreshTogList(nType, nDifficulty)
|
||||
local tabLevelInfo, tabLevelInfoDifficulty
|
||||
local isOpenAdventure = self.activityLevelsData:GetLevelDayOpen(GameEnum.ActivityLevelType.Adventure, self.firstAdventureLevel)
|
||||
local isOpenHard = self.activityLevelsData:GetLevelDayOpen(GameEnum.ActivityLevelType.HARD, self.firstHardLevel)
|
||||
if nType == GameEnum.ActivityLevelType.Explore then
|
||||
tabLevelInfo = self.activityLevelsData.levelTabExplore
|
||||
tabLevelInfoDifficulty = self.activityLevelsData.levelTabExploreDifficulty
|
||||
@@ -344,20 +347,50 @@ function ActivityLevelsSelectCtrl:RefreshTogList(nType, nDifficulty)
|
||||
NovaAPI.SetImageColor(tmpImageAdventure, colorUnSelectLockMask)
|
||||
local tmpImageHard = self._mapNode.lockHard.gameObject.transform:Find("Image"):GetComponent("Image")
|
||||
NovaAPI.SetImageColor(tmpImageHard, colorUnSelectLockMask)
|
||||
if not isOpenAdventure then
|
||||
local tmpLockAdventure = self._mapNode.lockAdventure.gameObject:GetComponent("Image")
|
||||
self:SetActivityAtlasSprite_New(tmpLockAdventure, "10104/SpriteAtlas_1010401", "tab_spring_1")
|
||||
tmpLockAdventure:SetNativeSize()
|
||||
end
|
||||
if not isOpenHard then
|
||||
local tmpLockHard = self._mapNode.lockHard.gameObject:GetComponent("Image")
|
||||
self:SetActivityAtlasSprite_New(tmpLockHard, "10104/SpriteAtlas_1010401", "tab_spring_1")
|
||||
tmpLockHard:SetNativeSize()
|
||||
end
|
||||
elseif nType == GameEnum.ActivityLevelType.Adventure then
|
||||
tabLevelInfo = self.activityLevelsData.levelTabAdventure
|
||||
tabLevelInfoDifficulty = self.activityLevelsData.levelTabAdventureDifficulty
|
||||
local tmpImageAdventure = self._mapNode.lockAdventure.gameObject.transform:Find("Image"):GetComponent("Image")
|
||||
NovaAPI.SetImageColor(tmpImageAdventure, colorSelectLock)
|
||||
NovaAPI.SetImageColor(tmpImageAdventure, colorSelectLockMask)
|
||||
local tmpImageHard = self._mapNode.lockHard.gameObject.transform:Find("Image"):GetComponent("Image")
|
||||
NovaAPI.SetImageColor(tmpImageHard, colorUnSelectLockMask)
|
||||
if not isOpenAdventure then
|
||||
local tmpLockAdventure = self._mapNode.lockAdventure.gameObject:GetComponent("Image")
|
||||
self:SetActivityAtlasSprite_New(tmpLockAdventure, "10104/SpriteAtlas_1010401", "tab_spring_1_slc")
|
||||
tmpLockAdventure:SetNativeSize()
|
||||
end
|
||||
if not isOpenHard then
|
||||
local tmpLockHard = self._mapNode.lockHard.gameObject:GetComponent("Image")
|
||||
self:SetActivityAtlasSprite_New(tmpLockHard, "10104/SpriteAtlas_1010401", "tab_spring_1")
|
||||
tmpLockHard:SetNativeSize()
|
||||
end
|
||||
else
|
||||
tabLevelInfo = self.activityLevelsData.levelTabHard
|
||||
tabLevelInfoDifficulty = self.activityLevelsData.levelTabHardDifficulty
|
||||
local tmpImageAdventure = self._mapNode.lockAdventure.gameObject.transform:Find("Image"):GetComponent("Image")
|
||||
NovaAPI.SetImageColor(tmpImageAdventure, colorUnSelectLockMask)
|
||||
local tmpImageHard = self._mapNode.lockHard.gameObject.transform:Find("Image"):GetComponent("Image")
|
||||
NovaAPI.SetImageColor(tmpImageHard, colorSelectLock)
|
||||
NovaAPI.SetImageColor(tmpImageHard, colorSelectLockMask)
|
||||
if not isOpenAdventure then
|
||||
local tmpLockAdventure = self._mapNode.lockAdventure.gameObject:GetComponent("Image")
|
||||
self:SetActivityAtlasSprite_New(tmpLockAdventure, "10104/SpriteAtlas_1010401", "tab_spring_1")
|
||||
tmpLockAdventure:SetNativeSize()
|
||||
end
|
||||
if not isOpenHard then
|
||||
local tmpLockHard = self._mapNode.lockHard.gameObject:GetComponent("Image")
|
||||
self:SetActivityAtlasSprite_New(tmpLockHard, "10104/SpriteAtlas_1010401", "tab_spring_1_slc")
|
||||
tmpLockHard:SetNativeSize()
|
||||
end
|
||||
end
|
||||
for i = 1, 10 do
|
||||
self._mapNode.tog[i].gameObject:SetActive(i <= #tabLevelInfoDifficulty)
|
||||
@@ -475,10 +508,16 @@ function ActivityLevelsSelectCtrl:OnBtnClick_Tog(btn)
|
||||
for idx, value in pairs(mapToggle) do
|
||||
if value == self.curSelectHard then
|
||||
self._mapNode.togCtrl[idx]:SetDefaultActivity(false, colorSelect, colorUnSelect)
|
||||
local tmpImage = self._mapNode.togCtrl[idx].gameObject.transform:Find("AnimRoot/AnimSwitch/rtLockInfo/imgLockMask"):GetComponent("Image")
|
||||
self:SetActivityAtlasSprite_New(tmpImage, "10104/SpriteAtlas_1010401", "btn_spring_3")
|
||||
tmpImage:SetNativeSize()
|
||||
break
|
||||
end
|
||||
end
|
||||
self._mapNode.togCtrl[togIdx]:SetDefaultActivity(true, colorSelect, colorUnSelect)
|
||||
local tmpImageSelect = self._mapNode.togCtrl[togIdx].gameObject.transform:Find("AnimRoot/AnimSwitch/rtLockInfo/imgLockMask"):GetComponent("Image")
|
||||
self:SetActivityAtlasSprite_New(tmpImageSelect, "10104/SpriteAtlas_1010401", "btn_spring_4")
|
||||
tmpImageSelect:SetNativeSize()
|
||||
self.SelectTogPreLvLock = self._mapNode.togCtrl[togIdx].gameObject.transform:Find("AnimRoot/AnimSwitch/rtLockPreLv/rtLockPreLvSelect"):GetComponent("Image")
|
||||
NovaAPI.SetImageColor(self.SelectTogPreLvLock, colorSelectLock)
|
||||
self:RefreshInstanceInfo(self.nLevelType, nHard, nil, false)
|
||||
@@ -505,6 +544,13 @@ function ActivityLevelsSelectCtrl:RefreshInstanceInfo(nType, nHard, bLocation, b
|
||||
if bSetTog then
|
||||
for i = 1, 10 do
|
||||
self._mapNode.togCtrl[i]:SetDefaultActivity(i == nHard, colorSelect, colorUnSelect)
|
||||
local tmpImageSelect = self._mapNode.togCtrl[i].gameObject.transform:Find("AnimRoot/AnimSwitch/rtLockInfo/imgLockMask"):GetComponent("Image")
|
||||
if i == nHard then
|
||||
self:SetActivityAtlasSprite_New(tmpImageSelect, "10104/SpriteAtlas_1010401", "btn_spring_4")
|
||||
else
|
||||
self:SetActivityAtlasSprite_New(tmpImageSelect, "10104/SpriteAtlas_1010401", "btn_spring_3")
|
||||
end
|
||||
tmpImageSelect:SetNativeSize()
|
||||
end
|
||||
end
|
||||
self.curSelectHard = nHard
|
||||
@@ -646,7 +692,7 @@ function ActivityLevelsSelectCtrl:RefreshInstanceInfo(nType, nHard, bLocation, b
|
||||
local objTog = self._mapNode.tog[nHard].gameObject
|
||||
local rtLockInfo = objTog.transform:Find("AnimRoot/AnimSwitch/rtLockInfo").gameObject
|
||||
self.tmpLockInfoDay = rtLockInfo.gameObject.transform:Find("rtLockInfoDay"):GetComponent("Image")
|
||||
NovaAPI.SetImageColor(self.tmpLockInfoDay, colorSelectLock)
|
||||
NovaAPI.SetImageColor(self.tmpLockInfoDay, colorSelectLockMask)
|
||||
end
|
||||
end
|
||||
for i = 1, #self.tabRewardList do
|
||||
|
||||
@@ -5573,7 +5573,7 @@ return {
|
||||
"none",
|
||||
"OutQuad",
|
||||
1.0,
|
||||
false,
|
||||
true,
|
||||
0
|
||||
}
|
||||
},
|
||||
@@ -5836,8 +5836,8 @@ return {
|
||||
nil,
|
||||
nil,
|
||||
"none",
|
||||
"OutQuad",
|
||||
12.0,
|
||||
"Linear",
|
||||
8.0,
|
||||
false,
|
||||
0
|
||||
}
|
||||
@@ -5858,12 +5858,12 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{cmd = "SetGoOn"},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5881,7 +5881,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5899,7 +5899,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5917,7 +5917,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetChoiceBegin",
|
||||
|
||||
@@ -6534,7 +6534,7 @@ return {
|
||||
0,
|
||||
"none",
|
||||
"avg1_159",
|
||||
"b",
|
||||
"a",
|
||||
"004",
|
||||
"none",
|
||||
nil,
|
||||
@@ -7365,7 +7365,7 @@ return {
|
||||
0,
|
||||
"none",
|
||||
"avg1_159",
|
||||
"b",
|
||||
"a",
|
||||
"005",
|
||||
"none",
|
||||
nil,
|
||||
|
||||
@@ -5573,7 +5573,7 @@ return {
|
||||
"none",
|
||||
"OutQuad",
|
||||
1.0,
|
||||
false,
|
||||
true,
|
||||
0
|
||||
}
|
||||
},
|
||||
@@ -5836,8 +5836,8 @@ return {
|
||||
nil,
|
||||
nil,
|
||||
"none",
|
||||
"OutQuad",
|
||||
12.0,
|
||||
"Linear",
|
||||
8.0,
|
||||
false,
|
||||
0
|
||||
}
|
||||
@@ -5858,12 +5858,12 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{cmd = "SetGoOn"},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5881,7 +5881,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5899,7 +5899,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5917,7 +5917,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetChoiceBegin",
|
||||
|
||||
@@ -2025,7 +2025,7 @@ return {
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
"If you feel bad for me, how about a little scoop?==RT==Maybe spill some tea about the Boss? You're buddies with him, aren't ya? If you feel bad for me, how about a little scoop?==RT==Maybe spill some tea about the Boss? You're buddies with her, aren't ya?",
|
||||
"If you feel bad for me, how about a little scoop? Maybe spill some tea about the Boss? You're buddies with ==SEX4==, aren't ya?",
|
||||
""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2808,7 +2808,7 @@ return {
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
"Don't tell anyone about this, or my mage will be completely ruined!",
|
||||
"Don't tell anyone about this, or my image will be completely ruined!",
|
||||
""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1323,7 +1323,7 @@ return {
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
"Not everyone can just work whenever they feel like it!",
|
||||
"Not everyone can just slack off whenever they feel like it!",
|
||||
""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6534,7 +6534,7 @@ return {
|
||||
0,
|
||||
"none",
|
||||
"avg1_159",
|
||||
"b",
|
||||
"a",
|
||||
"004",
|
||||
"none",
|
||||
nil,
|
||||
@@ -7365,7 +7365,7 @@ return {
|
||||
0,
|
||||
"none",
|
||||
"avg1_159",
|
||||
"b",
|
||||
"a",
|
||||
"005",
|
||||
"none",
|
||||
nil,
|
||||
|
||||
@@ -5949,7 +5949,7 @@ return {
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
"I-I see...==W====RT==Personally, if I can eat well and be full, any approach is fine...",
|
||||
"I-I see...==W==Honestly, my biggest wish is just for everyone to have enough to eat. But if the ingredients could be fresher too, I guess that really would make people even happier...",
|
||||
""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5573,7 +5573,7 @@ return {
|
||||
"none",
|
||||
"OutQuad",
|
||||
1.0,
|
||||
false,
|
||||
true,
|
||||
0
|
||||
}
|
||||
},
|
||||
@@ -5836,8 +5836,8 @@ return {
|
||||
nil,
|
||||
nil,
|
||||
"none",
|
||||
"OutQuad",
|
||||
12.0,
|
||||
"Linear",
|
||||
8.0,
|
||||
false,
|
||||
0
|
||||
}
|
||||
@@ -5858,12 +5858,12 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{cmd = "SetGoOn"},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5881,7 +5881,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5899,7 +5899,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5917,7 +5917,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetChoiceBegin",
|
||||
|
||||
@@ -1751,7 +1751,7 @@ return {
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
"いつもはデリバリーサービス利用してるので、==RT==お店に来るのは久しぶりなのですよ。",
|
||||
"いつもはデリバリーサービスを利用しているので==RT==お店に来るのは久しぶりなのですよ。",
|
||||
""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4192,7 +4192,7 @@ return {
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
"これ見たら返信してくれ",
|
||||
"これを見たら返信してくれ",
|
||||
""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -81,7 +81,7 @@ return {
|
||||
id = 118,
|
||||
icon = "Icon/Head/head_11801_S",
|
||||
name = "クルニス",
|
||||
landmark = "住所不定",
|
||||
landmark = "フィーリエ-アッシュエリア診療所",
|
||||
signature = "珍しい病気にピンときたら連絡を"
|
||||
},
|
||||
{
|
||||
@@ -186,8 +186,8 @@ return {
|
||||
id = 143,
|
||||
icon = "Icon/Head/head_14301_S",
|
||||
name = "レイス",
|
||||
landmark = "ゲームセンター",
|
||||
signature = "チャットは基本見ません"
|
||||
landmark = "秘密",
|
||||
signature = "暑いのは嫌い"
|
||||
},
|
||||
{
|
||||
id = 144,
|
||||
@@ -242,8 +242,8 @@ return {
|
||||
id = 159,
|
||||
icon = "Icon/Head/head_15901_S",
|
||||
name = "クルニス(華服)",
|
||||
landmark = "フィーリエ 例のクリニック",
|
||||
signature = "休暇外出中。"
|
||||
landmark = "フィーリエ-アッシュエリア診療所",
|
||||
signature = "休暇中につき休診"
|
||||
},
|
||||
{
|
||||
id = 999,
|
||||
@@ -257,7 +257,7 @@ return {
|
||||
icon = "Icon/Head/head_9100_S",
|
||||
name = "==PLAYER_NAME==",
|
||||
landmark = "オアシス号",
|
||||
signature = "魔王プロトコル人材派遣カンパニー代表執行官"
|
||||
signature = "魔王プロトコル人材派遣カンパニー/代表執行官"
|
||||
},
|
||||
{
|
||||
id = 997,
|
||||
|
||||
@@ -5573,7 +5573,7 @@ return {
|
||||
"none",
|
||||
"OutQuad",
|
||||
1.0,
|
||||
false,
|
||||
true,
|
||||
0
|
||||
}
|
||||
},
|
||||
@@ -5836,8 +5836,8 @@ return {
|
||||
nil,
|
||||
nil,
|
||||
"none",
|
||||
"OutQuad",
|
||||
12.0,
|
||||
"Linear",
|
||||
8.0,
|
||||
false,
|
||||
0
|
||||
}
|
||||
@@ -5858,12 +5858,12 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{cmd = "SetGoOn"},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5881,7 +5881,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5899,7 +5899,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetTalk",
|
||||
@@ -5917,7 +5917,7 @@ return {
|
||||
},
|
||||
{
|
||||
cmd = "Wait",
|
||||
param = {0.5}
|
||||
param = {1.5}
|
||||
},
|
||||
{
|
||||
cmd = "SetChoiceBegin",
|
||||
|
||||
@@ -3982,7 +3982,7 @@ return {
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
"방금도 근처를 한참 돌아다녔는데, 조금밖에 못 캤지 뭐예요.",
|
||||
"방금도 근처를 한참 돌아다녔는데, 조금밖에 못 캤지 뭐야.",
|
||||
""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -144,7 +144,6 @@ function CharacterInfoCtrl:RefreshShow()
|
||||
self:CalculateCharacterInfo()
|
||||
self:RefreshCharacterInfo()
|
||||
self:RefreshProperty()
|
||||
self:RefreshActor2D()
|
||||
end
|
||||
function CharacterInfoCtrl:CalculateCharacterInfo()
|
||||
self:CalculateProperty()
|
||||
@@ -308,6 +307,7 @@ function CharacterInfoCtrl:OnBtnClick_Left()
|
||||
self.characterId = self.characterIdList[self.curCharacterIndex]
|
||||
self.configData = ConfigTable.GetData_Character(self.characterId)
|
||||
self:RefreshShow()
|
||||
self:RefreshActor2D()
|
||||
end
|
||||
function CharacterInfoCtrl:OnBtnClick_Right()
|
||||
if #self.characterIdList <= 1 then
|
||||
@@ -320,6 +320,7 @@ function CharacterInfoCtrl:OnBtnClick_Right()
|
||||
self.characterId = self.characterIdList[self.curCharacterIndex]
|
||||
self.configData = ConfigTable.GetData_Character(self.characterId)
|
||||
self:RefreshShow()
|
||||
self:RefreshActor2D()
|
||||
end
|
||||
function CharacterInfoCtrl:OnBtnClick_Property()
|
||||
local attrList = self.attrData:GetAttrList()
|
||||
|
||||
@@ -125,6 +125,8 @@ function CharBgCtrl:SetCharacterPng(nSkinId, nType)
|
||||
if bSetSuccess and self.lasttrPanelOffsetL2DPos ~= nil then
|
||||
self._mapNode.trPanelOffsetL2D:DOLocalMoveX(self.lasttrPanelOffsetL2DPos, 0):SetUpdate(true)
|
||||
end
|
||||
local skinCfgData = ConfigTable.GetData_CharacterSkin(nSkinId)
|
||||
NovaAPI.SetSpriteRendererSprite(self._mapNode.bgRight, self:LoadAsset(skinCfgData.Bg .. ".png", typeof(Sprite)))
|
||||
end
|
||||
function CharBgCtrl:SetCharacterL2D(nSkinId, nType)
|
||||
if nil ~= self.tbRenderer then
|
||||
|
||||
@@ -128,11 +128,12 @@ function CharEquipmentCtrl:OnEnable()
|
||||
local ani = function()
|
||||
if not PlayerData.Guide:CheckInGuideGroup(50) then
|
||||
local mapSelect = PlayerData.Equipment:GetEquipmentSelect()
|
||||
if mapSelect then
|
||||
if mapSelect and mapSelect.nCharId == self.nCharId then
|
||||
local nEquipIndex = 0
|
||||
for _, v in ipairs(self.tbSlot) do
|
||||
for k, v in ipairs(self.tbSlot) do
|
||||
if v.nSlotId == mapSelect.nSlotId then
|
||||
nEquipIndex = v.nGemIndex
|
||||
self.nLastIndex = k
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -151,6 +152,7 @@ function CharEquipmentCtrl:OnEnable()
|
||||
end
|
||||
end
|
||||
function CharEquipmentCtrl:OnDestroy()
|
||||
PlayerData.Equipment:GetEquipmentSelect()
|
||||
self.nLastIndex = 0
|
||||
end
|
||||
function CharEquipmentCtrl:OnBtnClick_EquipmentSlot(_, nIndex)
|
||||
|
||||
@@ -886,8 +886,7 @@ function DispatchCtrl:OnBtnClick_OneClickSelection()
|
||||
end
|
||||
end
|
||||
end
|
||||
self.findcombinationCount = 0
|
||||
local result = self:find_min_roles(tbCharTagList, data.Tags, data.ExtraTags)
|
||||
local result = self:find_min_roles_greedy(tbCharTagList, data.Tags, data.ExtraTags)
|
||||
if result then
|
||||
if self.bOpenBuild then
|
||||
else
|
||||
@@ -921,61 +920,40 @@ function DispatchCtrl:can_meet_requirements(role_tags, requirements)
|
||||
end
|
||||
return true
|
||||
end
|
||||
function DispatchCtrl:find_min_roles(roles, normal_req, extra_req)
|
||||
local selected_roles = {}
|
||||
local cachedIds = {}
|
||||
for _, role in ipairs(roles) do
|
||||
if self:can_meet_requirements(role.tags, normal_req) then
|
||||
cachedIds[role.id] = true
|
||||
table.insert(selected_roles, role)
|
||||
function DispatchCtrl:calculate_role_score(role_tags, normal_req, extra_req)
|
||||
local score = 0
|
||||
local tag_count = {}
|
||||
for _, tag in ipairs(role_tags) do
|
||||
tag_count[tag] = (tag_count[tag] or 0) + 1
|
||||
end
|
||||
for _, req in ipairs(normal_req) do
|
||||
if tag_count[req] and 0 < tag_count[req] then
|
||||
score = score + 10
|
||||
tag_count[req] = tag_count[req] - 1
|
||||
end
|
||||
end
|
||||
local bHasNormalReqRole = 0 < #selected_roles
|
||||
if #selected_roles == 0 then
|
||||
selected_roles = roles
|
||||
else
|
||||
for _, role in ipairs(roles) do
|
||||
if self:can_meet_requirements(role.tags, extra_req) and cachedIds[role.id] == nil then
|
||||
table.insert(selected_roles, role)
|
||||
cachedIds[role.id] = true
|
||||
end
|
||||
for _, req in ipairs(extra_req) do
|
||||
if tag_count[req] and 0 < tag_count[req] then
|
||||
score = score + 3
|
||||
tag_count[req] = tag_count[req] - 1
|
||||
end
|
||||
end
|
||||
for i = 1, #selected_roles do
|
||||
local found_combination, combination = self:find_combination(selected_roles, {}, normal_req, extra_req, 1, i)
|
||||
if found_combination and #combination <= 3 then
|
||||
return combination
|
||||
end
|
||||
end
|
||||
for i = 1, #selected_roles do
|
||||
local found_combination, combination = self:find_combination(selected_roles, {}, normal_req, {}, 1, i)
|
||||
if found_combination then
|
||||
return combination
|
||||
end
|
||||
end
|
||||
return nil
|
||||
return score
|
||||
end
|
||||
function DispatchCtrl:find_combination(roles, selected, normal_req, extra_req, start_index, max_depth)
|
||||
self.findcombinationCount = self.findcombinationCount + 1
|
||||
if self.findcombinationCount >= 999999 then
|
||||
return false
|
||||
function DispatchCtrl:count_remaining_requirements(selected_tags, requirements)
|
||||
local tag_count = {}
|
||||
for _, tag in ipairs(selected_tags) do
|
||||
tag_count[tag] = (tag_count[tag] or 0) + 1
|
||||
end
|
||||
if max_depth == 0 then
|
||||
if self:can_meet_requirements(self:concat_tags(selected), normal_req) and self:can_meet_requirements(self:concat_tags(selected), extra_req) then
|
||||
return true, selected
|
||||
local remaining = {}
|
||||
for _, req in ipairs(requirements) do
|
||||
if not tag_count[req] or tag_count[req] <= 0 then
|
||||
table.insert(remaining, req)
|
||||
else
|
||||
return false
|
||||
tag_count[req] = tag_count[req] - 1
|
||||
end
|
||||
end
|
||||
for i = start_index, #roles do
|
||||
table.insert(selected, roles[i])
|
||||
local found, combination = self:find_combination(roles, selected, normal_req, extra_req, i + 1, max_depth - 1)
|
||||
if found then
|
||||
return true, combination
|
||||
end
|
||||
table.remove(selected)
|
||||
end
|
||||
return false
|
||||
return remaining
|
||||
end
|
||||
function DispatchCtrl:concat_tags(selected_roles)
|
||||
local combined_tags = {}
|
||||
@@ -986,6 +964,136 @@ function DispatchCtrl:concat_tags(selected_roles)
|
||||
end
|
||||
return combined_tags
|
||||
end
|
||||
function DispatchCtrl:find_min_roles_greedy(roles, normal_req, extra_req)
|
||||
if #roles == 0 then
|
||||
return nil
|
||||
end
|
||||
for target_count = 1, 3 do
|
||||
local result = self:greedy_select_roles_with_limit(roles, normal_req, extra_req, true, target_count)
|
||||
if result then
|
||||
return result
|
||||
end
|
||||
end
|
||||
for target_count = 1, 3 do
|
||||
local result = self:greedy_select_roles_with_limit(roles, normal_req, {}, false, target_count)
|
||||
if result then
|
||||
return result
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
function DispatchCtrl:greedy_select_roles_with_limit(roles, normal_req, extra_req, check_both, max_count)
|
||||
if #normal_req == 0 and #extra_req == 0 then
|
||||
return {}
|
||||
end
|
||||
local scored_roles = {}
|
||||
for _, role in ipairs(roles) do
|
||||
local score = self:calculate_role_score(role.tags, normal_req, extra_req)
|
||||
if 0 < score then
|
||||
table.insert(scored_roles, {role = role, score = score})
|
||||
end
|
||||
end
|
||||
if #scored_roles == 0 then
|
||||
return nil
|
||||
end
|
||||
table.sort(scored_roles, function(a, b)
|
||||
return a.score > b.score
|
||||
end)
|
||||
return self:try_combinations_greedy(scored_roles, normal_req, extra_req, check_both, max_count)
|
||||
end
|
||||
function DispatchCtrl:try_combinations_greedy(scored_roles, normal_req, extra_req, check_both, target_count)
|
||||
local max_attempts = math.min(100, #scored_roles * target_count)
|
||||
local attempt_count = 0
|
||||
local selected = {}
|
||||
local selected_tags = {}
|
||||
for _, scored_role in ipairs(scored_roles) do
|
||||
if target_count <= #selected then
|
||||
break
|
||||
end
|
||||
attempt_count = attempt_count + 1
|
||||
if max_attempts < attempt_count then
|
||||
break
|
||||
end
|
||||
local remaining_normal = self:count_remaining_requirements(selected_tags, normal_req)
|
||||
local remaining_extra = self:count_remaining_requirements(selected_tags, extra_req)
|
||||
if #remaining_normal == 0 and #remaining_extra == 0 then
|
||||
break
|
||||
end
|
||||
local can_help = DispatchCtrl.role_can_help(scored_role.role.tags, remaining_normal, remaining_extra)
|
||||
if can_help then
|
||||
table.insert(selected, scored_role.role)
|
||||
for _, tag in ipairs(scored_role.role.tags) do
|
||||
table.insert(selected_tags, tag)
|
||||
end
|
||||
end
|
||||
end
|
||||
if #selected == target_count then
|
||||
if check_both then
|
||||
if self:can_meet_requirements(selected_tags, normal_req) and self:can_meet_requirements(selected_tags, extra_req) then
|
||||
return selected
|
||||
end
|
||||
elseif self:can_meet_requirements(selected_tags, normal_req) then
|
||||
return selected
|
||||
end
|
||||
end
|
||||
if target_count <= 2 and target_count <= #scored_roles then
|
||||
for start_idx = 1, math.min(5, #scored_roles - target_count + 1) do
|
||||
attempt_count = attempt_count + 1
|
||||
if max_attempts < attempt_count then
|
||||
break
|
||||
end
|
||||
local test_selected = {}
|
||||
local test_tags = {}
|
||||
table.insert(test_selected, scored_roles[start_idx].role)
|
||||
for _, tag in ipairs(scored_roles[start_idx].role.tags) do
|
||||
table.insert(test_tags, tag)
|
||||
end
|
||||
for i = 1, #scored_roles do
|
||||
if target_count <= #test_selected then
|
||||
break
|
||||
end
|
||||
if i ~= start_idx then
|
||||
local remaining_normal = self:count_remaining_requirements(test_tags, normal_req)
|
||||
local remaining_extra = self:count_remaining_requirements(test_tags, extra_req)
|
||||
if #remaining_normal == 0 and #remaining_extra == 0 then
|
||||
break
|
||||
end
|
||||
if DispatchCtrl.role_can_help(scored_roles[i].role.tags, remaining_normal, remaining_extra) then
|
||||
table.insert(test_selected, scored_roles[i].role)
|
||||
for _, tag in ipairs(scored_roles[i].role.tags) do
|
||||
table.insert(test_tags, tag)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if #test_selected == target_count then
|
||||
if check_both then
|
||||
if self:can_meet_requirements(test_tags, normal_req) and self:can_meet_requirements(test_tags, extra_req) then
|
||||
return test_selected
|
||||
end
|
||||
elseif self:can_meet_requirements(test_tags, normal_req) then
|
||||
return test_selected
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
function DispatchCtrl.role_can_help(role_tags, remaining_normal, remaining_extra)
|
||||
for _, tag in ipairs(role_tags) do
|
||||
for _, req in ipairs(remaining_normal) do
|
||||
if tag == req then
|
||||
return true
|
||||
end
|
||||
end
|
||||
for _, req in ipairs(remaining_extra) do
|
||||
if tag == req then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
function DispatchCtrl:OnEvent_OpenBuildList(dispatchId)
|
||||
self.bOpenBuild = true
|
||||
self:RefreshSelectList(true, dispatchId)
|
||||
|
||||
@@ -255,6 +255,7 @@ function EquipmentInfoCtrl:Awake()
|
||||
if self.nSelectGemIndex == nil then
|
||||
self.nSelectGemIndex = self.nEquipedGemIndex == 0 and 1 or self.nEquipedGemIndex
|
||||
end
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self.nSlotId, self.nSelectGemIndex, self.nCharId)
|
||||
end
|
||||
end
|
||||
function EquipmentInfoCtrl:OnEnable()
|
||||
@@ -280,6 +281,7 @@ function EquipmentInfoCtrl:OnBtnClick_Next()
|
||||
else
|
||||
self.nSelectGemIndex = self.nSelectGemIndex + 1
|
||||
end
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self.nSlotId, self.nSelectGemIndex, self.nCharId)
|
||||
self.nSubSelectIndex = 2
|
||||
self._mapNode.aniIconMask:Play("IconMaskSwitch_R")
|
||||
self:RefreshSelectPoint(nBefore, self.nSelectGemIndex)
|
||||
@@ -303,6 +305,7 @@ function EquipmentInfoCtrl:OnBtnClick_Pre()
|
||||
else
|
||||
self.nSelectGemIndex = self.nSelectGemIndex - 1
|
||||
end
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self.nSlotId, self.nSelectGemIndex, self.nCharId)
|
||||
self.nSubSelectIndex = 2
|
||||
self._mapNode.aniIconMask:Play("IconMaskSwitch_L")
|
||||
self:RefreshSelectPoint(nBefore, self.nSelectGemIndex)
|
||||
@@ -365,6 +368,7 @@ function EquipmentInfoCtrl:OnBtnClick_Active()
|
||||
local callback = function(nNewIndex)
|
||||
self:RefreshPoint()
|
||||
self.nSelectGemIndex = nNewIndex
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self.nSlotId, self.nSelectGemIndex, self.nCharId)
|
||||
self:Refresh(true)
|
||||
end
|
||||
PlayerData.Equipment:SendCharGemGenerateReq(self.nCharId, self.nSlotId, callback)
|
||||
|
||||
@@ -142,7 +142,10 @@ EquipmentRollCtrl._mapNodeConfig = {
|
||||
},
|
||||
FX = {sNodeName = "--FX--"}
|
||||
}
|
||||
EquipmentRollCtrl._mapEventConfig = {}
|
||||
EquipmentRollCtrl._mapEventConfig = {
|
||||
[EventId.UIBackConfirm] = "OnEvent_Back",
|
||||
[EventId.UIHomeConfirm] = "OnEvent_BackHome"
|
||||
}
|
||||
function EquipmentRollCtrl:Refresh()
|
||||
self:RefreshPresetData()
|
||||
self:RefreshPresetSlot()
|
||||
@@ -522,7 +525,7 @@ function EquipmentRollCtrl:OnBtnClick_EquipmentSlot(_, nIndex)
|
||||
self._panel.nSlotId = self.tbSlot[nIndex].nSlotId
|
||||
self._panel.nEquipedGemIndex = self.tbSlot[nIndex].nGemIndex
|
||||
self._panel.nSelectGemIndex = self.tbSlot[nIndex].nGemIndex == 0 and 1 or self.tbSlot[nIndex].nGemIndex
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self._panel.nSlotId, self._panel.nSelectGemIndex)
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self._panel.nSlotId, self._panel.nSelectGemIndex, self._panel.nCharId)
|
||||
for i = 1, 3 do
|
||||
self._mapNode.imgChoose[i].gameObject:SetActive(self._panel.nSlotId == self.tbSlot[i].nSlotId)
|
||||
end
|
||||
@@ -554,7 +557,7 @@ function EquipmentRollCtrl:OnBtnClick_Tab(btn, nIndex)
|
||||
self.nSubSelectIndex = 2
|
||||
self._mapNode.aniIconMask:Play(sAnimName)
|
||||
self._panel.nSelectGemIndex = nIndex
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self._panel.nSlotId, self._panel.nSelectGemIndex)
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self._panel.nSlotId, self._panel.nSelectGemIndex, self._panel.nCharId)
|
||||
self:RefreshIndexGem()
|
||||
self.animator:Play("EquipmentSelectPanel_in", 0, 0)
|
||||
local callback = function()
|
||||
@@ -573,7 +576,7 @@ function EquipmentRollCtrl:OnBtnClick_Active()
|
||||
end
|
||||
local callback = function(nNewIndex)
|
||||
self._panel.nSelectGemIndex = nNewIndex
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self._panel.nSlotId, self._panel.nSelectGemIndex)
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self._panel.nSlotId, self._panel.nSelectGemIndex, self._panel.nCharId)
|
||||
self:RefreshTab()
|
||||
self:RefreshIndexGem(true)
|
||||
end
|
||||
@@ -599,4 +602,17 @@ function EquipmentRollCtrl:OnBtnClick_Equip()
|
||||
end
|
||||
PlayerData.Equipment:SendCharGemEquipGemReq(self._panel.nCharId, self._panel.nSlotId, self._panel.nSelectGemIndex, nSelectPreset, callback)
|
||||
end
|
||||
function EquipmentRollCtrl:OnEvent_Back(nPanelId)
|
||||
if self._panel._nPanelId ~= nPanelId then
|
||||
return
|
||||
end
|
||||
EventManager.Hit(EventId.CloesCurPanel)
|
||||
end
|
||||
function EquipmentRollCtrl:OnEvent_BackHome(nPanelId)
|
||||
if self._panel._nPanelId ~= nPanelId then
|
||||
return
|
||||
end
|
||||
PlayerData.Equipment:GetEquipmentSelect()
|
||||
PanelManager.Home()
|
||||
end
|
||||
return EquipmentRollCtrl
|
||||
|
||||
@@ -12,7 +12,7 @@ function EquipmentRollPanel:Awake()
|
||||
self.nSlotId = tbParam[2]
|
||||
self.nSelectGemIndex = tbParam[3]
|
||||
self.nEquipedGemIndex = tbParam[4]
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self.nSlotId, self.nSelectGemIndex)
|
||||
PlayerData.Equipment:CacheEquipmentSelect(self.nSlotId, self.nSelectGemIndex, self.nCharId)
|
||||
end
|
||||
end
|
||||
function EquipmentRollPanel:OnEnable()
|
||||
|
||||
@@ -49,7 +49,7 @@ function BreakOutLevelCellCtrl:SetData(nActId, nLevelId, bIsActEnd)
|
||||
end
|
||||
self.LevelId = nLevelId
|
||||
self.BreakOutData = PlayerData.Activity:GetActivityDataById(nActId)
|
||||
if self.BreakOutData == nil then
|
||||
if self.BreakOutData == nil or self.BreakOutData ~= nil and self.BreakOutData:GetLevelData() == nil then
|
||||
printError("活动 id:" .. self.ActId .. " 数据为空 用本地临时数据初始化")
|
||||
self:InitErrorSate()
|
||||
self.levelData = ConfigTable.GetData("BreakOutLevel", self.LevelId)
|
||||
@@ -154,7 +154,7 @@ function BreakOutLevelCellCtrl:RefreshLevelFinishState()
|
||||
self._mapNode.img_FinishIcon.gameObject:SetActive(self.BreakOutData:IsLevelComplete(self.LevelId))
|
||||
end
|
||||
function BreakOutLevelCellCtrl:OnBtnClick_SelectLevel()
|
||||
if self.BreakOutData == nil then
|
||||
if self.BreakOutData == nil or self.BreakOutData ~= nil and self.BreakOutData:GetLevelData() == nil then
|
||||
return
|
||||
end
|
||||
local bTimeUnlock, bPreComplete = self.BreakOutData:IsLevelUnlocked(self.LevelId)
|
||||
|
||||
@@ -250,6 +250,7 @@ function BreakOutPlayCtrl:OnEvent_Exit()
|
||||
local confirmCallback = function()
|
||||
EventManager.Hit("Close_BattlePause")
|
||||
EventManager.Hit("BreakOut_Complete", true)
|
||||
EventManager.Hit("SetBreakOutPlaySkill_Visible", false)
|
||||
NovaAPI.SetCanvasGroupAlpha(self.Canvas, 0)
|
||||
local requestCb = function(mapChangeInfo)
|
||||
local cb = function()
|
||||
@@ -277,7 +278,7 @@ function BreakOutPlayCtrl:OnEvent_Exit()
|
||||
local msg = {
|
||||
nType = AllEnum.MessageBox.Confirm,
|
||||
sContent = sTip,
|
||||
callbackConfirm = confirmCallback
|
||||
callbackConfirmAfterClose = confirmCallback
|
||||
}
|
||||
EventManager.Hit(EventId.OpenMessageBox, msg)
|
||||
end
|
||||
|
||||
@@ -58,7 +58,7 @@ function LevelSelectCtrl:Awake()
|
||||
local actData = self.BreakOut_30101Data:GetActivityDataByIndex(nIndex)
|
||||
self.nActId = actData.ActivityId
|
||||
self.BreakOutData = PlayerData.Activity:GetActivityDataById(self.nActId)
|
||||
if self.BreakOutData == nil then
|
||||
if self.BreakOutData == nil or self.BreakOutData ~= nil and self.BreakOutData:GetLevelData() == nil then
|
||||
self.BreakOutData_00 = BreakOutData_00.new()
|
||||
printError("活动 id:" .. self.nActId .. " 数据为空,开始初始化本地备用数据")
|
||||
local tableData = {}
|
||||
@@ -82,7 +82,7 @@ function LevelSelectCtrl:OnDisable()
|
||||
}
|
||||
end
|
||||
function LevelSelectCtrl:OnEnable()
|
||||
if self.BreakOutData == nil then
|
||||
if self.BreakOutData == nil or self.BreakOutData ~= nil and self.BreakOutData:GetLevelData() == nil then
|
||||
printError("活动 id:" .. self.nActId .. " 数据为空,无法记录当前的难度状态默认定位初始难度")
|
||||
else
|
||||
local param = self:GetPanelParam()
|
||||
@@ -163,7 +163,7 @@ function LevelSelectCtrl:RefreshTabIcon()
|
||||
self:RefreshTabRedIcon()
|
||||
end
|
||||
function LevelSelectCtrl:RefreshTabRedIcon()
|
||||
if self.BreakOutData == nil then
|
||||
if self.BreakOutData == nil or self.BreakOutData ~= nil and self.BreakOutData:GetLevelData() == nil then
|
||||
self._mapNode.img_RightIcon:SetActive(false)
|
||||
self._mapNode.img_LeftIcon:SetActive(false)
|
||||
return
|
||||
@@ -188,7 +188,7 @@ function LevelSelectCtrl:RefreshTabRedIcon()
|
||||
end
|
||||
function LevelSelectCtrl:RefreshDotsIcon()
|
||||
local nMaxNum = 4
|
||||
if self.BreakOutData == nil then
|
||||
if self.BreakOutData == nil or self.BreakOutData ~= nil and self.BreakOutData:GetLevelData() == nil then
|
||||
nMaxNum = self.BreakOutData_00:GetBreakoutLevelTypeNum()
|
||||
else
|
||||
nMaxNum = self.BreakOutData:GetBreakoutLevelTypeNum()
|
||||
@@ -218,7 +218,7 @@ function LevelSelectCtrl:SetBanner()
|
||||
end
|
||||
end
|
||||
function LevelSelectCtrl:AddGrids()
|
||||
if self.BreakOutData == nil then
|
||||
if self.BreakOutData == nil or self.BreakOutData ~= nil and self.BreakOutData:GetLevelData() == nil then
|
||||
local nAllLevelType = self.BreakOutData_00:GetBreakoutLevelTypeNum()
|
||||
for i = 1, nAllLevelType do
|
||||
table.insert(self.tbGridsList, self.BreakOutData_00:GetLevelsByTab(i))
|
||||
|
||||
@@ -1205,7 +1205,7 @@ function CookieBoardCtrl:LevelEnd()
|
||||
self._mapNode.btnConfirmScore.gameObject:SetActive(true)
|
||||
self._mapNode.btnShortcutConfirmScore.gameObject:SetActive(true)
|
||||
end
|
||||
EventManager.Hit("Cookie_Game_Complete", self.nLevelId, self.nScore, self.nCompBoxCount, self.nCompCookieCount, self.nGoodCount, self.nPerfectCount, self.nCriticalPerfectCount, self.nMissCount, callback)
|
||||
EventManager.Hit("Cookie_Game_Complete", self.nLevelId, self.nScore, self.nCompBoxCount, self.nCompCookieCount, self.nGoodCount, self.nPerfectCount, self.nCriticalPerfectCount, self.nMissCount, self.nActId, callback)
|
||||
EventManager.Hit(EventId.TemporaryBlockInput, 2)
|
||||
cs_coroutine.start(wait)
|
||||
end
|
||||
|
||||
@@ -267,6 +267,9 @@ function StorySetCtrl:OnRefreshTabGrid(goGrid, gridIndex)
|
||||
txtOff.gameObject:SetActive(nIndex ~= self.nCurrentTabIndex)
|
||||
local tabLine = root.transform:Find("tabLine").gameObject
|
||||
tabLine:SetActive(nIndex < #self.tbTabData)
|
||||
if self.nCurrentTabIndex == nIndex then
|
||||
self.goCurrentTabGrid = goGrid
|
||||
end
|
||||
local redDot = root:Find("RedDot").gameObject
|
||||
RedDotManager.RegisterNode(RedDotDefine.Story_Set_Tab, cfg.Id, redDot, nil, nil, true)
|
||||
end
|
||||
@@ -276,27 +279,42 @@ function StorySetCtrl:OnTabGridClick(goGrid, gridIndex)
|
||||
return
|
||||
end
|
||||
self.nCurrentTabIndex = nIndex
|
||||
local root = goGrid.transform:Find("btnGrid/AnimRoot")
|
||||
local imgOn = root:Find("imgOn"):GetComponent("Image")
|
||||
imgOn.gameObject:SetActive(true)
|
||||
local txtOn = root:Find("txtOn"):GetComponent("TMP_Text")
|
||||
local txtOff = root:Find("txtOff"):GetComponent("TMP_Text")
|
||||
txtOn.gameObject:SetActive(true)
|
||||
txtOff.gameObject:SetActive(false)
|
||||
if self.goCurrentTabGrid ~= nil then
|
||||
local lastRoot = self.goCurrentTabGrid.transform:Find("btnGrid/AnimRoot")
|
||||
local lastImgOn = lastRoot:Find("imgOn"):GetComponent("Image")
|
||||
lastImgOn.gameObject:SetActive(false)
|
||||
local lastTxtOn = lastRoot:Find("txtOn"):GetComponent("TMP_Text")
|
||||
local lastTxtOff = lastRoot:Find("txtOff"):GetComponent("TMP_Text")
|
||||
lastTxtOn.gameObject:SetActive(false)
|
||||
lastTxtOff.gameObject:SetActive(true)
|
||||
end
|
||||
self.goCurrentTabGrid = goGrid
|
||||
local nAnimLen = 0
|
||||
for _, v in pairs(self.tbChapterGrid) do
|
||||
nAnimLen = v:PlayOutAnim()
|
||||
end
|
||||
if 0 < nAnimLen then
|
||||
self:AddTimer(1, nAnimLen, function()
|
||||
self:RefreshTab()
|
||||
self.tbChapter = PlayerData.StorySet:GetAllChapterList(self.nCurrentTabIndex, self.bOnlyShowUnRead)
|
||||
self:UpdateChapterList()
|
||||
self:RefreshChapter()
|
||||
end, true, true, true)
|
||||
EventManager.Hit(EventId.TemporaryBlockInput, nAnimLen)
|
||||
else
|
||||
self:RefreshTab()
|
||||
self.tbChapter = PlayerData.StorySet:GetAllChapterList(self.nCurrentTabIndex, self.bOnlyShowUnRead)
|
||||
self:UpdateChapterList()
|
||||
self:RefreshChapter()
|
||||
end
|
||||
end
|
||||
function StorySetCtrl:ShowGetReward()
|
||||
if self.bGetReward and self.tbReward ~= nil and self.bTransitionEnd then
|
||||
UTILS.OpenReceiveByChangeInfo(self.tbReward, function()
|
||||
self.tbChapter = PlayerData.StorySet:GetAllChapterList(self.nCurrentTabIndex, self.bOnlyShowUnRead)
|
||||
self:UpdateChapterList()
|
||||
if self.nPanelType == panelType_Section then
|
||||
self:RefreshSection()
|
||||
end
|
||||
@@ -308,6 +326,14 @@ function StorySetCtrl:ShowGetReward()
|
||||
end
|
||||
function StorySetCtrl:FilterSectionList()
|
||||
end
|
||||
function StorySetCtrl:UpdateChapterList()
|
||||
if self.tbTabData == nil then
|
||||
self.tbChapter = PlayerData.StorySet:GetAllChapterList(self.nCurrentTabIndex, self.bOnlyShowUnRead)
|
||||
else
|
||||
local cfg = self.tbTabData[self.nCurrentTabIndex]
|
||||
self.tbChapter = PlayerData.StorySet:GetAllChapterList(cfg.Id, self.bOnlyShowUnRead)
|
||||
end
|
||||
end
|
||||
function StorySetCtrl:Awake()
|
||||
self.nSelectIndex = 0
|
||||
self.nCurrentTabIndex = 1
|
||||
@@ -324,7 +350,7 @@ end
|
||||
function StorySetCtrl:OnEnable()
|
||||
self.tbChapterGrid = {}
|
||||
self.tbSectionGrid = {}
|
||||
self.tbChapter = PlayerData.StorySet:GetAllChapterList(self.nCurrentTabIndex, self.bOnlyShowUnRead)
|
||||
self:UpdateChapterList()
|
||||
self.animRoot = self.gameObject:GetComponent("Animator")
|
||||
if self.nChapterId > 0 then
|
||||
for k, v in ipairs(self.tbChapter) do
|
||||
@@ -389,7 +415,7 @@ function StorySetCtrl:OnEvent_StorySetChapterRefresh()
|
||||
end
|
||||
self.bSendMsg = true
|
||||
local serverCallback = function()
|
||||
self.tbChapter = PlayerData.StorySet:GetAllChapterList(self.nCurrentTabIndex, self.bOnlyShowUnRead)
|
||||
self:UpdateChapterList()
|
||||
self.bSendMsg = false
|
||||
if self.nPanelType == panelType_chapter then
|
||||
self:RefreshChapter()
|
||||
@@ -400,7 +426,7 @@ end
|
||||
function StorySetCtrl:OnClick_ShowUnRead()
|
||||
self._mapNode.imgShowUnReadOn.gameObject:SetActive(not self.bOnlyShowUnRead)
|
||||
self.bOnlyShowUnRead = not self.bOnlyShowUnRead
|
||||
self.tbChapter = PlayerData.StorySet:GetAllChapterList(self.nCurrentTabIndex, self.bOnlyShowUnRead)
|
||||
self:UpdateChapterList()
|
||||
self:RefreshChapter()
|
||||
end
|
||||
return StorySetCtrl
|
||||
|
||||
@@ -118,7 +118,8 @@ local mapConfig = {
|
||||
[PanelId.StorySet] = {bEvent = true},
|
||||
[PanelId.BdConvertPanel] = {bEvent = true},
|
||||
[PanelId.GachaSpin] = {bEvent = true},
|
||||
[PanelId.JointDrillLevelSelect_2] = {bEvent = true}
|
||||
[PanelId.JointDrillLevelSelect_2] = {bEvent = true},
|
||||
[PanelId.EquipmentRoll] = {bEvent = true}
|
||||
}
|
||||
function TopBarCtrl:CreateCoin(tbCoin, bHideCoinAdd)
|
||||
self.mapCoinIndex, self.mapItemIndex = nil, nil
|
||||
|
||||
@@ -220,7 +220,7 @@ function CookieActData:SetNMHighScoreDay()
|
||||
local nDayCount = nYear * 366 + nMonth * 31 + nDay
|
||||
LocalData.SetPlayerLocalData("Cookie_Nightmare_HighScoreDay", nDayCount)
|
||||
end
|
||||
function CookieActData:RequestLevelResult(nLevelId, nScore, nBoxCount, nCookieCount, nGoodCount, nPerfectCount, nExcellentCount, nMissCount, callback)
|
||||
function CookieActData:RequestLevelResult(nLevelId, nScore, nBoxCount, nCookieCount, nGoodCount, nPerfectCount, nExcellentCount, nMissCount, nActId, callback)
|
||||
local callbackFunc = function(_, msgData)
|
||||
self:SetLevelData(nLevelId, nScore)
|
||||
self:SetLevelReward(msgData)
|
||||
@@ -229,6 +229,7 @@ function CookieActData:RequestLevelResult(nLevelId, nScore, nBoxCount, nCookieCo
|
||||
end
|
||||
end
|
||||
if self.nActId == 0 then
|
||||
self.nActId = nActId
|
||||
printError("RequestCookieLevelResult: ActivityId is 0!!! - ActivityId = " .. self.nActId .. ", nLevelId = " .. nLevelId .. ", nScore = " .. nScore)
|
||||
end
|
||||
HttpNetHandler.SendMsg(NetMsgId.Id.activity_cookie_settle_req, {
|
||||
@@ -243,8 +244,8 @@ function CookieActData:RequestLevelResult(nLevelId, nScore, nBoxCount, nCookieCo
|
||||
Good = nGoodCount
|
||||
}, nil, callbackFunc)
|
||||
end
|
||||
function CookieActData:OnEvent_GameComplete(nLevelId, nScore, nBoxCount, nCookieCount, nGoodCount, nPerfectCount, nExcellentCount, nMissCount, callback)
|
||||
self:RequestLevelResult(nLevelId, nScore, nBoxCount, nCookieCount, nGoodCount, nPerfectCount, nExcellentCount, nMissCount, callback)
|
||||
function CookieActData:OnEvent_GameComplete(nLevelId, nScore, nBoxCount, nCookieCount, nGoodCount, nPerfectCount, nExcellentCount, nMissCount, nActId, callback)
|
||||
self:RequestLevelResult(nLevelId, nScore, nBoxCount, nCookieCount, nGoodCount, nPerfectCount, nExcellentCount, nMissCount, nActId, callback)
|
||||
end
|
||||
function CookieActData:OnEvent_QuestClaim(nQuestId)
|
||||
self:SendQuestReceive(nQuestId)
|
||||
|
||||
@@ -234,8 +234,12 @@ end
|
||||
function PlayerEquipmentData:SetRollWarning(bAble)
|
||||
self.bRollWarning = bAble
|
||||
end
|
||||
function PlayerEquipmentData:CacheEquipmentSelect(nSlotId, nGemIndex)
|
||||
self.mapSelect = {nSlotId = nSlotId, nGemIndex = nGemIndex}
|
||||
function PlayerEquipmentData:CacheEquipmentSelect(nSlotId, nGemIndex, nCharId)
|
||||
self.mapSelect = {
|
||||
nSlotId = nSlotId,
|
||||
nGemIndex = nGemIndex,
|
||||
nCharId = nCharId
|
||||
}
|
||||
end
|
||||
function PlayerEquipmentData:GetEquipmentSelect()
|
||||
if self.mapSelect == nil then
|
||||
|
||||
@@ -2,6 +2,7 @@ local PlayerMallData = class("PlayerMallData")
|
||||
local TimerManager = require("GameCore.Timer.TimerManager")
|
||||
local MessageBoxManager = require("GameCore.Module.MessageBoxManager")
|
||||
local LocalData = require("GameCore.Data.LocalData")
|
||||
local ModuleManager = require("GameCore.Module.ModuleManager")
|
||||
local ClientManager = CS.ClientManager.Instance
|
||||
local WwiseAudioMgr = CS.WwiseAudioManager.Instance
|
||||
local SDKManager = CS.SDKManager.Instance
|
||||
@@ -671,7 +672,8 @@ function PlayerMallData:CollectEnd(bError)
|
||||
if not bError then
|
||||
self:CloseOrderWait()
|
||||
end
|
||||
if PanelManager.CheckPanelOpen(PanelId.ReceiveAutoTrans) == true or PanelManager.CheckPanelOpen(PanelId.ReceivePropsTips) == true or PanelManager.CheckPanelOpen(PanelId.ReceivePropsNPC) == true or PanelManager.CheckPanelOpen(PanelId.ReceiveSpecialReward) == true or PanelManager.CheckNextPanelOpening() then
|
||||
local bInAdventure = ModuleManager.GetIsAdventure()
|
||||
if PanelManager.CheckPanelOpen(PanelId.ReceiveAutoTrans) == true or PanelManager.CheckPanelOpen(PanelId.ReceivePropsTips) == true or PanelManager.CheckPanelOpen(PanelId.ReceivePropsNPC) == true or PanelManager.CheckPanelOpen(PanelId.ReceiveSpecialReward) == true or PanelManager.CheckNextPanelOpening() or bInAdventure == true then
|
||||
funcClear()
|
||||
else
|
||||
local sTip
|
||||
|
||||
@@ -1318,6 +1318,7 @@ function PlayerStarTowerData:ChangeNpcAffinity(mapInfo)
|
||||
self:UpdateNpcAffinityRedDot()
|
||||
end
|
||||
function PlayerStarTowerData:UpdateNpcAffinityRedDot()
|
||||
RedDotManager.SetValid(RedDotDefine.StarTowerBook_Affinity_Reward, "server", false)
|
||||
local forEachNpc = function(mapData)
|
||||
RedDotManager.SetValid(RedDotDefine.StarTowerBook_Affinity_Reward, mapData.Id, false)
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ function PlayerStateData:CacheStateData(mapMsgData)
|
||||
RedDotManager.SetValid(RedDotDefine.Mall_Free, nil, mapMsgData.MallPackage.New)
|
||||
RedDotManager.SetValid(RedDotDefine.Friend_Apply, nil, mapMsgData.Friend)
|
||||
RedDotManager.SetValid(RedDotDefine.Friend_Energy, nil, mapMsgData.FriendEnergy.State)
|
||||
RedDotManager.SetValid(RedDotDefine.StarTowerBook_Affinity, nil, mapMsgData.NpcAffinityReward)
|
||||
RedDotManager.SetValid(RedDotDefine.StarTowerBook_Affinity_Reward, "server", mapMsgData.NpcAffinityReward)
|
||||
PlayerData.Quest:UpdateServerQuestRedDot(mapMsgData.TravelerDuelQuest)
|
||||
PlayerData.Quest:UpdateServerQuestRedDot(mapMsgData.TravelerDuelChallengeQuest)
|
||||
PlayerData.InfinityTower:UpdateBountyRewardState(mapMsgData.InfinityTower)
|
||||
|
||||
Reference in New Issue
Block a user