-
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.2.61 Data:24-05-07-14-59-47-e84938
- Loading branch information
MuelsyseBot_v1
committed
May 8, 2024
1 parent
ff6afb2
commit ff69445
Showing
16 changed files
with
22,644 additions
and
2,435 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
zh_CN/gamedata/[uc]lua/hotfixes/BattleControllerHotfixer.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,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 |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ local list = | |
{ | ||
|
||
"HotFixes/TestStubHotfixer", | ||
"HotFixes/BattleControllerHotfixer", | ||
}; | ||
|
||
return list; |
Oops, something went wrong.