Skip to content

Commit b219dde

Browse files
author
Vulpisfoglia_BOT_rev20250407
committed
[CN UPDATE] Client:2.7.01 Data:26-02-06-13-37-25_e45854
1 parent 10e772d commit b219dde

137 files changed

Lines changed: 716966 additions & 462732 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

zh_CN/gamedata/[uc]lua/GlobalConfig.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GlobalConfig =
22
{
3-
CUR_FUNC_VER = "V069",
3+
CUR_FUNC_VER = "V070",
44
}
55

66

zh_CN/gamedata/[uc]lua/feature/activity/blessonly/BlessOnlyBlessListView.lua

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -111,32 +111,36 @@ function BlessOnlyBlessListView:OnViewModelUpdate(data)
111111
return;
112112
end
113113

114-
if isEnter or self.m_cachedIndex == packetModel.curIndex then
114+
local indexChanged = self.m_cachedIndex ~= packetModel.curIndex;
115+
self.m_cachedIndex = packetModel.curIndex;
116+
if isEnter or not indexChanged then
115117
self:_Render(data);
116118
else
117-
if self.m_switchBlessSequence ~= nil and self.m_switchBlessSequence:IsPlaying() then
118-
self.m_switchBlessSequence:Kill();
119+
if indexChanged then
120+
if self.m_switchBlessSequence ~= nil and self.m_switchBlessSequence:IsPlaying() then
121+
self.m_switchBlessSequence:Kill();
122+
end
123+
local outAnimName = "";
124+
local inAnimName = "";
125+
if self:_CheckIsMoveLeft(packetModel.curIndex, #packetModel.blessItemList) then
126+
127+
outAnimName = CS.Torappu.Lua.Util.Format(MOVE_LEFT_OUT, self.m_actId);
128+
inAnimName = CS.Torappu.Lua.Util.Format(MOVE_LEFT_IN, self.m_actId);
129+
else
130+
131+
outAnimName = CS.Torappu.Lua.Util.Format(MOVE_RIGHT_OUT, self.m_actId);
132+
inAnimName = CS.Torappu.Lua.Util.Format(MOVE_RIGHT_IN, self.m_actId);
133+
end
134+
self._animWrapper:InitIfNot();
135+
self._animWrapper:SampleClipAtBegin(outAnimName);
136+
self.m_switchBlessSequence = CS.DG.Tweening.DOTween.Sequence();
137+
self.m_switchBlessSequence:Append(self._animWrapper:PlayWithTween(outAnimName));
138+
self.m_switchBlessSequence:AppendCallback(function()
139+
self:_Render(data);
140+
self._animWrapper:SampleClipAtBegin(inAnimName);
141+
end);
142+
self.m_switchBlessSequence:Append(self._animWrapper:PlayWithTween(inAnimName));
119143
end
120-
local outAnimName = "";
121-
local inAnimName = "";
122-
if self:_CheckIsMoveLeft(packetModel.curIndex, #packetModel.blessItemList) then
123-
124-
outAnimName = CS.Torappu.Lua.Util.Format(MOVE_LEFT_OUT, self.m_actId);
125-
inAnimName = CS.Torappu.Lua.Util.Format(MOVE_LEFT_IN, self.m_actId);
126-
else
127-
128-
outAnimName = CS.Torappu.Lua.Util.Format(MOVE_RIGHT_OUT, self.m_actId);
129-
inAnimName = CS.Torappu.Lua.Util.Format(MOVE_RIGHT_IN, self.m_actId);
130-
end
131-
self._animWrapper:InitIfNot();
132-
self._animWrapper:SampleClipAtBegin(outAnimName);
133-
self.m_switchBlessSequence = CS.DG.Tweening.DOTween.Sequence();
134-
self.m_switchBlessSequence:Append(self._animWrapper:PlayWithTween(outAnimName));
135-
self.m_switchBlessSequence:AppendCallback(function()
136-
self:_Render(data);
137-
self._animWrapper:SampleClipAtBegin(inAnimName);
138-
end);
139-
self.m_switchBlessSequence:Append(self._animWrapper:PlayWithTween(inAnimName));
140144
end
141145

142146
return;
@@ -148,10 +152,9 @@ function BlessOnlyBlessListView:_Render(data)
148152
if packetModel == nil then
149153
return;
150154
end
151-
local indexChanged = self.m_cachedIndex ~= packetModel.curIndex;
155+
152156

153157
self.m_cachedPacketModel = packetModel;
154-
self.m_cachedIndex = packetModel.curIndex;
155158
self.m_sliderAdapter:NotifyDataSetChanged();
156159

157160
self.m_horFadeTween.isShow = data.blessListState == BlessOnlyBlessListState.HORIZONTAL;
@@ -162,7 +165,7 @@ function BlessOnlyBlessListView:_Render(data)
162165
self.m_blessOnlyBlessListVerticalItem:Render(data, self.illustLoader);
163166
end
164167

165-
if self._charAvatarLeft ~= nil and self._charAvatarRight ~= nil and indexChanged then
168+
if self._charAvatarLeft ~= nil and self._charAvatarRight ~= nil then
166169
self:_RenderCharAvatars(self._charAvatarLeft, self._charAvatarRight);
167170
end
168171

zh_CN/gamedata/[uc]lua/feature/activity/blessonly/BlessOnlyHomePacketView.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ end
7373
function BlessOnlyHomePacketView:_RenderReceivedPanel(viewModel)
7474
local hubPath = CS.Torappu.ResourceUrls.GetCharAvatarHubPath();
7575
self._blessCharIcon.sprite = self:LoadSpriteFromAutoPackHub(hubPath, viewModel.defaultFesCharAvatarId);
76-
self._blessRewardCnt.text = CS.Torappu.Lua.Util.Format(StringRes.BLESSONLY_REWARD_CNT_DISPLAY, viewModel.diamondRewardCnt);
76+
if self._blessRewardCnt ~= nil then
77+
self._blessRewardCnt.text = CS.Torappu.Lua.Util.Format(StringRes.BLESSONLY_REWARD_CNT_DISPLAY, viewModel.diamondRewardCnt);
78+
end
7779
end
7880

7981
function BlessOnlyHomePacketView:_OnClickReceivePacket()

zh_CN/gamedata/[uc]lua/feature/activity/blessonly/BlessOnlyMainDlg.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ end
5555

5656

5757
function BlessOnlyMainDlg:_OnClickBlessListLeftArrow()
58+
CS.Torappu.TorappuAudio.PlayUI(CS.Torappu.Audio.Consts.InternalSounds[CS.Torappu.Audio.UiInternalSoundType.TabSwitchBtn]);
5859
self.m_blessOnlyViewModel:MoveBlessListLeft();
5960
self.m_blessOnlyViewModel:NotifyUpdate();
6061
end
6162

6263
function BlessOnlyMainDlg:_OnClickBlessListRightArrow()
64+
CS.Torappu.TorappuAudio.PlayUI(CS.Torappu.Audio.Consts.InternalSounds[CS.Torappu.Audio.UiInternalSoundType.TabSwitchBtn]);
6365
self.m_blessOnlyViewModel:MoveBlessListRight();
6466
self.m_blessOnlyViewModel:NotifyUpdate();
6567
end
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
local CGGalleryHotfixer = Class("CGGalleryHotfixer", HotfixBase)
2+
3+
local function ApplyFavouriteCollectionFix(self)
4+
local m_favouriteGroups = self.m_favouriteGroups
5+
local m_favouriteSet = self.m_favouriteSet
6+
local m_storylineSet = self.m_storylineSet
7+
local m_displayMap = self.m_displayMap
8+
local m_groupMap = self.m_groupMap
9+
for i = m_favouriteGroups.Count - 1, 0, -1 do
10+
local group = m_favouriteGroups[i]
11+
group:ApplyFavouriteCollection()
12+
if (not group.favourite) then
13+
m_favouriteGroups:RemoveAt(i)
14+
m_favouriteSet:Remove(group.storySetId)
15+
if (not m_storylineSet:Contains(group.storySetId)) then
16+
for j, display in ipairs(group.displays) do
17+
m_displayMap:Remove(display.displayId)
18+
end
19+
m_groupMap:Remove(group.storySetId)
20+
end
21+
end
22+
end
23+
end
24+
25+
local function GetStorylineIdOfStorySet(storySetId)
26+
local groups = CS.Torappu.StageDB.data.cgGalleryGroups
27+
if (groups == nil) then
28+
return nil
29+
end
30+
local found, group = groups:TryGetValue(storySetId)
31+
if (not found or group == nil) then
32+
return nil
33+
end
34+
return group.storylineId
35+
end
36+
37+
local function PlayStoryHotfix(self, targetStory)
38+
local model = self.property.Value
39+
if (model == nil) then
40+
return
41+
end
42+
local inspectorStatus = model.inspectorStatus
43+
local filterMode = model.filterMode
44+
if (inspectorStatus == nil) then
45+
return
46+
end
47+
local inspectedGroup = inspectorStatus.inspectedGroup
48+
local inspectedDisplay = inspectorStatus.inspectedDisplay
49+
if (inspectedGroup == nil or inspectedDisplay == nil) then
50+
return
51+
end
52+
local storySetId = inspectedGroup.storySetId
53+
local displayId = inspectedDisplay.displayId
54+
if (CS.System.String.IsNullOrEmpty(storySetId) or CS.System.String.IsNullOrEmpty(displayId)) then
55+
return
56+
end
57+
local storylineId = GetStorylineIdOfStorySet(storySetId)
58+
if (CS.System.String.IsNullOrEmpty(storylineId)) then
59+
return
60+
end
61+
if (not inspectedDisplay.favourite) then
62+
filterMode = CS.Torappu.UI.CGGallery.CGGalleryFilterMode.STORYLINE
63+
end
64+
local options = CS.Torappu.GameFlowController.Options()
65+
options.mode = CS.Torappu.GameFlowController.Options.Mode.LOADING_MODE
66+
options.unloadAllAssets = true
67+
options.param = CS.Torappu.UI.CGGallery.CGGalleryPage._SceneParamToState(storylineId, storySetId, displayId, filterMode)
68+
CS.Torappu.AVG.AVGUtils.TrigStoryInStandaloneScene(targetStory, options)
69+
end
70+
71+
local function OnInspectDisplayFix(self, displayId)
72+
local tween = self._view.m_fadeTween
73+
if (tween ~= nil and tween:IsPlaying()) then
74+
return
75+
end
76+
self:_OnInspectDisplay(displayId)
77+
end
78+
79+
function CGGalleryHotfixer:OnInit()
80+
xlua.private_accessible(CS.Torappu.UI.CGGallery.CGGalleryViewModel)
81+
xlua.private_accessible(CS.Torappu.UI.CGGallery.CGGalleryPage)
82+
xlua.private_accessible(CS.Torappu.UI.CGGallery.CGGalleryCollectionState)
83+
xlua.private_accessible(CS.Torappu.UI.CGGallery.CGGalleryCollectionView)
84+
85+
self:Fix_ex(CS.Torappu.UI.CGGallery.CGGalleryViewModel, "ApplyFavouriteCollection", function(self)
86+
local ok, errorInfo = xpcall(ApplyFavouriteCollectionFix, debug.traceback, self)
87+
if not ok then
88+
LogError("[CGGalleryHotfixer] fix" .. errorInfo)
89+
end
90+
end)
91+
92+
self:Fix_ex(CS.Torappu.UI.CGGallery.CGGalleryPage, "PlayStory", function(self, targetStory)
93+
local ok, errorInfo = xpcall(PlayStoryHotfix, debug.traceback, self, targetStory)
94+
if not ok then
95+
LogError("[CGGalleryHotfixer] fix" .. errorInfo)
96+
end
97+
end)
98+
99+
self:Fix_ex(CS.Torappu.UI.CGGallery.CGGalleryCollectionState, "_OnInspectDisplay", function(self, displayId)
100+
local ok, errorInfo = xpcall(OnInspectDisplayFix, debug.traceback, self, displayId)
101+
if not ok then
102+
LogError("[CGGalleryHotfixer] fix" .. errorInfo)
103+
end
104+
end)
105+
end
106+
107+
function CGGalleryHotfixer:OnDispose()
108+
end
109+
110+
return CGGalleryHotfixer

zh_CN/gamedata/[uc]lua/hotfixes/DefinedFix.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ local list =
33
{
44

55
"HotFixes/TestStubHotfixer",
6-
"HotFixes/GradingControllerHotfixer",
7-
"HotFixes/PCHotfixer",
86
"HotFixes/BackgroundMultiFormHotfixer",
7+
"HotFixes/CGGalleryHotfixer",
8+
"HotFixes/PCHotfixer"
99
};
1010

1111
return list;

0 commit comments

Comments
 (0)