-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CN UPDATE] Client:2.3.01 Data:24-07-15-10-57-16-e6a8d4
- Loading branch information
MuelsyseBot_v1
committed
Jul 16, 2024
1 parent
22457f2
commit dae865d
Showing
103 changed files
with
441,363 additions
and
20,044 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
zh_CN/gamedata/[uc]lua/hotfixes/RoguelikeTopicHotfixer.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
local RoguelikeTopicHotfixer = Class("RoguelikeTopicHotfixer", HotfixBase) | ||
|
||
|
||
local function _RenderInitSquadWithDifficultyFix(self, viewModel) | ||
repeat | ||
if viewModel == nil or viewModel.initialRelic == nil or viewModel.initialRelic.topicId == nil then | ||
break; | ||
end | ||
local topicId = viewModel.initialRelic.topicId; | ||
if topicId ~= "rogue_4" then | ||
break; | ||
end | ||
|
||
local finder = CS.Torappu.UI.UIPageFinder(); | ||
if finder == nil then | ||
LogError("[RoguelikeTopicHotfixer] fix _RenderInitSquadWithDifficulty error: cannot get page finder."); | ||
break; | ||
end | ||
local pageInterface = finder:Current(self); | ||
if pageInterface == nil then | ||
LogError("[RoguelikeTopicHotfixer] fix _RenderInitSquadWithDifficulty error: cannot find interface."); | ||
break; | ||
end | ||
|
||
local page = pageInterface:GetAssetLoader(); | ||
if page == nil then | ||
LogError("[RoguelikeTopicHotfixer] fix _RenderInitSquadWithDifficulty error: cannot get assetloader."); | ||
break; | ||
end | ||
local atlasObject = page:LoadAsset(CS.Torappu.ResourceUrls.GetRL04DifficultyIconAtlasPath(topicId)); | ||
if atlasObject == nil then | ||
LogError("[RoguelikeTopicHotfixer] fix _RenderInitSquadWithDifficulty error: cannot find atlas object."); | ||
break; | ||
end | ||
if atlasObject:GetType() ~= typeof(CS.Torappu.UI.UIAtlasObject) then | ||
LogError("[RoguelikeTopicHotfixer] fix _RenderInitSquadWithDifficulty error: atlas object type error."); | ||
break; | ||
end | ||
|
||
self._bandRankAtlasObject = atlasObject; | ||
until(true); | ||
|
||
self:_RenderInitSquadWithDifficulty(viewModel); | ||
end | ||
|
||
function RoguelikeTopicHotfixer:OnInit() | ||
xlua.private_accessible(CS.Torappu.UI.Roguelike.RoguelikeMenuInitSquadWithDifficultyObject); | ||
self:Fix_ex(CS.Torappu.UI.Roguelike.RoguelikeMenuInitSquadWithDifficultyObject, "_RenderInitSquadWithDifficulty", function(self, viewModel) | ||
local ok, errorInfo = xpcall(_RenderInitSquadWithDifficultyFix, debug.traceback, self, viewModel) | ||
if not ok then | ||
LogError("[RoguelikeTopicHotfixer] fix _RenderInitSquadWithDifficulty error: " .. errorInfo) | ||
end | ||
end) | ||
end | ||
|
||
function RoguelikeTopicHotfixer:OnDispose() | ||
end | ||
|
||
return RoguelikeTopicHotfixer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.