Skip to content

Commit

Permalink
[CN UPDATE] Client:2.3.21 Data:24-08-13-15-06-47-45c4b4
Browse files Browse the repository at this point in the history
  • Loading branch information
MuelsyseBot_v1 committed Aug 15, 2024
1 parent bd4f4ce commit 0e85a16
Show file tree
Hide file tree
Showing 52 changed files with 253,931 additions and 49,413 deletions.
3 changes: 2 additions & 1 deletion zh_CN/gamedata/[uc]lua/hotfixes/DefinedFix.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ local list =
"HotFixes/TestStubHotfixer",
"HotFixes/RemovableSharedRandomTileGlobalBuffHotfixer",
"HotFixes/NameCardEditHotfixer",
"HotFixes/CameraControllerHotfixer"
"HotFixes/CameraControllerHotfixer",
"HotFixes/SandboxBattleDataControllerHotfixer"
};

return list;
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
local SandboxBattleDataControllerHotfixer = Class("SandboxBattleDataControllerHotfixer", HotfixBase)

local function RecordUsingConstructItemFix(self, character)
local gameMode = self.m_gameMode
if character ~= nil and character.data ~= nil and gameMode ~= nil and gameMode.configData ~= nil and not gameMode.isInBuildType then
local itemId = CS.Torappu.Battle.Sandbox.SandboxBattleUtil.GetTrapItemId(character, gameMode.configData)
local output = self.m_output
if itemId ~= nil and output ~= nil then
local constructItems = output.constructItems
if constructItems ~= nil then
local itemCnt = constructItems:get_Item(itemId)
if itemCnt ~= nil then
local sourceCard = CS.Torappu.Battle.BattleController.instance:GetDeck(CS.Torappu.PlayerSide.DEFAULT):FindCard(character.data.uniqueId)
if sourceCard ~= nil and sourceCard.remainingCnt == itemCnt then
return
end
end
end
end
end

self:RecordUsingConstructItem(character)
end

function SandboxBattleDataControllerHotfixer:OnInit()
xlua.private_accessible(CS.Torappu.Battle.Sandbox.SandboxBattleDataController)
xlua.private_accessible(CS.Torappu.Battle.GameMode.GameModeFactory.SandboxGameMode)
xlua.private_accessible(CS.Torappu.SandboxV2Data)
xlua.private_accessible(CS.Torappu.Battle.Character)

self:Fix_ex(CS.Torappu.Battle.Sandbox.SandboxBattleDataController, "RecordUsingConstructItem", function(self, character)
local ok, errorInfo = xpcall(RecordUsingConstructItemFix, debug.traceback, self, character)
if not ok then
LogError("[SandboxBattleDataControllerHotfixer] fix" .. errorInfo)
end
end)
end

function SandboxBattleDataControllerHotfixer:OnDispose()
end

return SandboxBattleDataControllerHotfixer
60 changes: 60 additions & 0 deletions zh_CN/gamedata/battle/battle_misc_table.json
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,66 @@
"sceneId": "Obt/Legion/LT14/level_lt14_06",
"hookedMapPreviewId": "lt_14_06"
},
"Obt/Legion/LT15/level_lt15_01_ex": {
"levelId": "Obt/Legion/LT15/level_lt15_01_ex",
"sceneId": "Obt/Legion/LT15/level_lt15_01",
"hookedMapPreviewId": "lt_15_01"
},
"Obt/Legion/LT15/level_lt15_02_ex": {
"levelId": "Obt/Legion/LT15/level_lt15_02_ex",
"sceneId": "Obt/Legion/LT15/level_lt15_02",
"hookedMapPreviewId": "lt_15_02"
},
"Obt/Legion/LT15/level_lt15_03_ex": {
"levelId": "Obt/Legion/LT15/level_lt15_03_ex",
"sceneId": "Obt/Legion/LT15/level_lt15_03",
"hookedMapPreviewId": "lt_15_03"
},
"Obt/Legion/LT15/level_lt15_04_ex": {
"levelId": "Obt/Legion/LT15/level_lt15_04_ex",
"sceneId": "Obt/Legion/LT15/level_lt15_04",
"hookedMapPreviewId": "lt_15_04"
},
"Obt/Legion/LT15/level_lt15_05_ex": {
"levelId": "Obt/Legion/LT15/level_lt15_05_ex",
"sceneId": "Obt/Legion/LT15/level_lt15_05",
"hookedMapPreviewId": "lt_15_05"
},
"Obt/Legion/LT15/level_lt15_06_ex": {
"levelId": "Obt/Legion/LT15/level_lt15_06_ex",
"sceneId": "Obt/Legion/LT15/level_lt15_06",
"hookedMapPreviewId": "lt_15_06"
},
"Obt/Legion/LT16/level_lt16_01_ex": {
"levelId": "Obt/Legion/LT16/level_lt16_01_ex",
"sceneId": "Obt/Legion/LT16/level_lt16_01",
"hookedMapPreviewId": "lt_16_01"
},
"Obt/Legion/LT16/level_lt16_02_ex": {
"levelId": "Obt/Legion/LT16/level_lt16_02_ex",
"sceneId": "Obt/Legion/LT16/level_lt16_02",
"hookedMapPreviewId": "lt_16_02"
},
"Obt/Legion/LT16/level_lt16_03_ex": {
"levelId": "Obt/Legion/LT16/level_lt16_03_ex",
"sceneId": "Obt/Legion/LT16/level_lt16_03",
"hookedMapPreviewId": "lt_16_03"
},
"Obt/Legion/LT16/level_lt16_04_ex": {
"levelId": "Obt/Legion/LT16/level_lt16_04_ex",
"sceneId": "Obt/Legion/LT16/level_lt16_04",
"hookedMapPreviewId": "lt_16_04"
},
"Obt/Legion/LT16/level_lt16_05_ex": {
"levelId": "Obt/Legion/LT16/level_lt16_05_ex",
"sceneId": "Obt/Legion/LT16/level_lt16_05",
"hookedMapPreviewId": "lt_16_05"
},
"Obt/Legion/LT16/level_lt16_06_ex": {
"levelId": "Obt/Legion/LT16/level_lt16_06_ex",
"sceneId": "Obt/Legion/LT16/level_lt16_06",
"hookedMapPreviewId": "lt_16_06"
},
"Obt/Main/level_easy_09-01": {
"levelId": "Obt/Main/level_main_09-01",
"sceneId": "Obt/Main/level_main_09-01",
Expand Down
Loading

0 comments on commit 0e85a16

Please sign in to comment.