Skip to content

Commit

Permalink
[CN UPDATE] Client:2.2.61 Data:24-05-07-14-59-47-e84938
Browse files Browse the repository at this point in the history
  • Loading branch information
MuelsyseBot_v1 committed May 8, 2024
1 parent ff6afb2 commit ff69445
Show file tree
Hide file tree
Showing 16 changed files with 22,644 additions and 2,435 deletions.
30 changes: 30 additions & 0 deletions zh_CN/gamedata/[uc]lua/hotfixes/BattleControllerHotfixer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
local BattleControllerHotfixer = Class("BattleControllerHotfixer", HotfixBase)

local function SetTempLifePoint_Fix(self, value, side)
if not self.isPlaying then
return
end

local pSide = (side == CS.Torappu.PlayerSide.DEFAULT) and self.playerSide or side

local temp = self.m_tempLifePointDict[pSide]
local encrypted = CS.CodeStage.AntiCheat.ObscuredTypes.ObscuredInt.Encrypt(value)
temp:SetEncrypted(encrypted)
self.m_tempLifePointDict[pSide] = temp
end

function BattleControllerHotfixer:OnInit()
xlua.private_accessible(CS.Torappu.Battle.BattleController)

self:Fix_ex(CS.Torappu.Battle.BattleController, "SetTempLifePoint", function(self, value, side)
local ok, errorInfo = xpcall(SetTempLifePoint_Fix, debug.traceback, self, value, side)
if not ok then
LogError("[BattleControllerHotfixer] fix" .. errorInfo)
end
end)
end

function BattleControllerHotfixer:OnDispose()
end

return BattleControllerHotfixer
1 change: 1 addition & 0 deletions zh_CN/gamedata/[uc]lua/hotfixes/DefinedFix.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local list =
{

"HotFixes/TestStubHotfixer",
"HotFixes/BattleControllerHotfixer",
};

return list;
Loading

0 comments on commit ff69445

Please sign in to comment.