Skip to content

Commit eedf5e8

Browse files
author
Vulpisfoglia_BOT_rev20250407
committed
[CN UPDATE] Client:2.5.60 Data:25-04-30-05-10-18_7ba4b2
1 parent 3f45fa1 commit eedf5e8

1,989 files changed

Lines changed: 611807 additions & 416054 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 = "V060",
3+
CUR_FUNC_VER = "V061",
44
}
55

66

zh_CN/gamedata/[uc]lua/feature/activity/LuaActivityUtil.lua

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ function LuaActivityUtil:_CheckIfCheckinVsUncomplete(actId)
577577
return false
578578
end
579579

580-
return playerActData.availSignCnt > 0
580+
return playerActData.availSignCnt > 0 or playerActData.voteRewardState == 1
581581
end
582582

583583
function LuaActivityUtil:_CheckIfCheckinAllUncomplete(actId)
@@ -693,6 +693,31 @@ function LuaActivityUtil:_CheckIfActAccessFinished(actId)
693693
return actData.constData.dayCount <= playerAccess.rewardsCount;
694694
end
695695

696+
697+
698+
function LuaActivityUtil:_CheckIfCheckinVsFinished(actId)
699+
local checkinVsPlayers = CS.Torappu.PlayerData.instance.data.activity.checkinVsActivityList
700+
if checkinVsPlayers == nil then
701+
return false
702+
end
703+
local suc, playerActData = checkinVsPlayers:TryGetValue(actId)
704+
if not suc then
705+
return false
706+
end
707+
708+
local checkinVsActs = CS.Torappu.ActivityDB.data.activity.versusCheckInData
709+
if checkinVsActs == nil then
710+
return false
711+
end
712+
local suc1, actData = checkinVsActs:TryGetValue(actId)
713+
if not suc1 then
714+
return false
715+
end
716+
local signTotalCnt = actData.checkInDict.Count
717+
718+
return playerActData.signedCnt >= signTotalCnt
719+
end
720+
696721
function LuaActivityUtil:_CheckIfActAccessUncomplete(actId)
697722
local playerData = CS.Torappu.PlayerData.instance.data.activity;
698723
if string.isNullOrEmpty(actId) or playerData.checkinAccessList == nil then
@@ -751,7 +776,7 @@ function LuaActivityUtil:_CheckIfActivityFinished(type, validAct)
751776
elseif type == CS.Torappu.ActivityType.CHECKIN_ALL_PLAYER then
752777

753778
elseif type == CS.Torappu.ActivityType.CHECKIN_VS then
754-
779+
return self:_CheckIfCheckinVsFinished(actId)
755780
elseif type == CS.Torappu.ActivityType.SWITCH_ONLY then
756781
return self:_CheckIfSwitchOnlyFinished(actId)
757782
elseif type == CS.Torappu.ActivityType.UNIQUE_ONLY then
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
local AbilityStandardHotfixer = Class("AbilityStandardHotfixer", HotfixBase)
3+
4+
local function _Fix_OnAttackFinished(self, arg)
5+
if arg == nil then
6+
self:OnAttackFinished(self)
7+
else
8+
self:OnAttackFinished(arg)
9+
end
10+
end
11+
12+
function AbilityStandardHotfixer:OnInit()
13+
xlua.private_accessible(CS.Torappu.Battle.AbilityStandard)
14+
15+
self:Fix_ex(CS.Torappu.Battle.AbilityStandard, "OnAttackFinished",
16+
function(self, arg)
17+
local ok, errorInfo = xpcall(_Fix_OnAttackFinished, debug.traceback, self, arg)
18+
if not ok then
19+
LogError("fix AbilityStandard OnAttackFinished error" .. errorInfo)
20+
end
21+
end)
22+
end
23+
24+
return AbilityStandardHotfixer
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
local luaUtils = CS.Torappu.Lua.Util;
2+
3+
local ActVecBreakV2SquadBuffSelectStateHotfixer = Class("ActVecBreakV2SquadBuffSelectStateHotfixer", HotfixBase)
4+
5+
local function _BuffItemClickFix(self, stageId)
6+
local model = self.m_stateBean.property.Value;
7+
local page = self:GetPage();
8+
if not model or not model.buffListModel or not model.selectedBuffIdList or
9+
string.isNullOrEmpty(stageId) or not page then
10+
return;
11+
end
12+
local buffItemModel = model.buffListModel:GetBuffItemByStageId(stageId);
13+
if not buffItemModel then
14+
return;
15+
end
16+
if not buffItemModel.isStageStarted then
17+
local timeStr = CS.Torappu.FormatUtil.FormatTimeDeltaStrFromNow(buffItemModel.stageStartTs);
18+
CS.Torappu.Activity.VecBreakV2.ActVecBreakV2Util.TextToast(page, luaUtils.Format(StringRes.VEC_BREAK_V2_UNLOCK_TIME_HINT_STR, timeStr));
19+
return;
20+
end
21+
if not buffItemModel.isBuffUnlocked then
22+
CS.Torappu.Activity.VecBreakV2.ActVecBreakV2Util.TextToast(page, model.buffLockToast);
23+
return;
24+
end
25+
self:_BuffItemClick(stageId);
26+
end
27+
28+
function ActVecBreakV2SquadBuffSelectStateHotfixer:OnInit()
29+
xlua.private_accessible(typeof(CS.Torappu.Activity.VecBreakV2.ActVecBreakV2SquadBuffSelectState))
30+
self:Fix_ex(CS.Torappu.Activity.VecBreakV2.ActVecBreakV2SquadBuffSelectState, "_BuffItemClick", function (self, stageId)
31+
local ok, errorInfo = xpcall(_BuffItemClickFix, debug.traceback, self, stageId)
32+
if not ok then
33+
LogError("[Act Vec Break] stage squad buff fix error: ".. errorInfo);
34+
self:_BuffItemClick(stageId);
35+
end
36+
end)
37+
end
38+
39+
return ActVecBreakV2SquadBuffSelectStateHotfixer;
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
3+
local CommonCharSelectCardDefaultViewModelHotfixer = Class("CommonCharSelectCardDefaultViewModelHotfixer", HotfixBase)
4+
5+
local function OnEquipChangedFix(self, newEquipId)
6+
7+
local charQuery = CS.Torappu.CharQuery.TemplateChar(self.m_basicInfo.charId, self.m_basicInfo.tmplId);
8+
9+
local evolvePhase = self.m_basicInfo.evolvePhase;
10+
local potentialRank = self.m_basicInfo.potentialRank;
11+
local level = self.m_basicInfo.level;
12+
local favorPoint = self.m_basicInfo.favorPoint;
13+
14+
local equipQueries = nil;
15+
if not string.isNullOrEmpty(newEquipId) then
16+
local suc, playerEquip = self.equips:TryGetValue(newEquipId)
17+
if suc then
18+
equipQueries = {
19+
CS.Torappu.CharacterData.UniqueEquipPair(newEquipId, playerEquip.level),
20+
};
21+
end
22+
end
23+
24+
local attrData = CS.Torappu.DataConvertUtil.AchieveCharAttributes(
25+
charQuery, evolvePhase, potentialRank, level, favorPoint, equipQueries);
26+
if attrData ~= nil then
27+
local patchBuilder = CS.Torappu.UI.BasicCharInfoModel.PatchBuilder();
28+
patchBuilder.attrData = attrData;
29+
patchBuilder:BuildTo(self.m_basicInfo);
30+
31+
local advancedCharInst = CS.Torappu.AdvancedCharacterInst(
32+
charQuery, level, evolvePhase, potentialRank, equipQueries);
33+
self.m_attackRange = CS.Torappu.DataConvertUtil.AchieveCharacterAttackRange(advancedCharInst);
34+
end
35+
end
36+
function CommonCharSelectCardDefaultViewModelHotfixer:OnInit()
37+
xlua.private_accessible(typeof(CS.Torappu.UI.TemplateCharSelect.Common.CommonCharSelectCardDefaultViewModel))
38+
self:Fix_ex(typeof(CS.Torappu.UI.TemplateCharSelect.Common.CommonCharSelectCardDefaultViewModel), "OnEquipChanged", function(self, newEquipId)
39+
local ok, errorInfo = xpcall(OnEquipChangedFix, debug.traceback, self, newEquipId)
40+
if not ok then
41+
LogError("[hotfix] CommonCharSelectCardDefaultViewModel:OnEquipChanged fix error: ".. errorInfo);
42+
self:OnEquipChanged(newEquipId);
43+
end
44+
end);
45+
end
46+
47+
return CommonCharSelectCardDefaultViewModelHotfixer;

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ local list =
33
{
44

55
"HotFixes/TestStubHotfixer",
6-
"HotFixes/BattleControllerHotfixer",
7-
"HotFixes/StageZoneSelectStateHotfixer",
8-
"HotFixes/UICommentedTextHotfixer",
9-
"HotFixes/EnemyDuelBattleFinishRankItemViewHotfixer"
6+
"HotFixes/SwitchableMultiEffectByBuffStackCntHotfixer",
7+
"HotFixes/LoginHotfixer",
8+
"HotFixes/ActVecBreakV2SquadBuffSelectStateHotfixer",
9+
"HotFixes/CommonCharSelectCardDefaultViewModelHotfixer",
10+
"HotFixes/AbilityStandardHotfixer",
1011
};
1112

1213
return list;
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
2+
3+
4+
5+
local LoginHotfixer = Class("LoginHotfixer", HotfixBase)
6+
7+
local UIAssetLoader = CS.Torappu.UI.UIAssetLoader
8+
local function _InjectLoginBkg(self)
9+
if self.isResumedFromStack then
10+
return
11+
end
12+
local bkg = CS.Torappu.Lua.LuaUIUtil.GetImage(self.gameObject, "image_bkg_back")
13+
if bkg == nil then
14+
return
15+
end
16+
local loadAsset_generic = xlua.get_generic_method(UIAssetLoader, "LoadAsset")
17+
local loadAssetFunc = loadAsset_generic(CS.UnityEngine.Sprite)
18+
local sprite = loadAssetFunc(UIAssetLoader.instance, "Arts/UI/Login/image_white")
19+
if sprite == nil then
20+
return
21+
end
22+
bkg.sprite = sprite
23+
bkg.color = CS.UnityEngine.Color.white
24+
end
25+
26+
local function SetMoviePath(self, path)
27+
local status = self:GetCurrentStatus()
28+
if CS.Torappu.GameFlowController.currentScene == "hot_update" then
29+
local isTargetMovie = string.find(path, "MT01")
30+
if isTargetMovie then
31+
local size = self._rect.sizeDelta;
32+
size.x = 1560
33+
size.y = 720
34+
self._rect.sizeDelta = size
35+
end
36+
if status == CS.Torappu.Video.AbstractMediaPlayerHolder.Status.PLAYEND and isTargetMovie then
37+
self:Play()
38+
return
39+
end
40+
self:SetPath(path)
41+
self:Play()
42+
return
43+
end
44+
self:SetPath(path)
45+
end
46+
47+
local function OnApplicationPause(self ,status)
48+
return
49+
end
50+
51+
function LoginHotfixer:OnInit()
52+
self:Fix_ex(CS.Torappu.UI.Login.LoginInitState, "OnResume", function(self)
53+
local ok, err = xpcall(_InjectLoginBkg, debug.traceback, self)
54+
if not ok then
55+
LogError("Failed to InjectLoginBkg : " .. err)
56+
end
57+
self:OnResume()
58+
end)
59+
xlua.private_accessible(typeof(CS.Torappu.Video.SofdecMediaPlayer))
60+
self:Fix_ex(CS.Torappu.Video.SofdecMediaPlayer, "SetPath", function(self,path)
61+
local ok, err = xpcall(SetMoviePath, debug.traceback, self,path)
62+
if not ok then
63+
self:SetPath(path)
64+
LogError("Failed to SetMoviePath : " .. err)
65+
end
66+
end)
67+
xlua.private_accessible(typeof(CS.Torappu.UI.HotUpdate.HotUpdaterPreMainMediaView))
68+
self:Fix_ex(CS.Torappu.UI.HotUpdate.HotUpdaterPreMainMediaView, "OnApplicationPause", function(self,status)
69+
local ok, err = xpcall(OnApplicationPause, debug.traceback, self,status)
70+
if not ok then
71+
LogError("Failed to OnApplicationPause : " .. err)
72+
end
73+
end)
74+
end
75+
76+
return LoginHotfixer
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
local MathUtil = CS.Torappu.MathUtil
2+
local FP = CS.Torappu.FP
3+
local BattleController = CS.Torappu.Battle.BattleController
4+
local Vector3 = CS.UnityEngine.Vector3
5+
local ObjectPtrWrap = nil
6+
7+
8+
local SwitchableMultiEffectByBuffStackCntHotfixer = Class("SwitchableMultiEffectByBuffStackCntHotfixer", HotfixBase)
9+
10+
local function EnsureObjectPtrWrap()
11+
if ObjectPtrWrap == nil then
12+
local genericMethod = xlua.get_generic_method(CS.Torappu.ObjectPtr, "Wrap")
13+
ObjectPtrWrap = genericMethod(CS.Torappu.Battle.Effects.Effect)
14+
end
15+
end
16+
function SwitchableMultiEffectByBuffStackCntHotfixer:OnInit()
17+
xlua.private_accessible(typeof(CS.Torappu.Battle.Effects.SwitchableMultiEffectByBuffStackCnt))
18+
self:Fix(typeof(CS.Torappu.Battle.Effects.SwitchableMultiEffectByBuffStackCnt), "_UpdateEffectWithBuffCnt", function(inst)
19+
local owner = inst.owner:Lock()
20+
if owner == nil then
21+
return
22+
end
23+
24+
local stackCnt = owner:GetBuffStackCount(inst._buffKey)
25+
local validIdx = -1
26+
for i = 1, inst._effects.Count do
27+
local effectData = inst._effects[i-1]
28+
local lhs = FP(stackCnt)
29+
local rhs = FP(effectData.stackCnt)
30+
if MathUtil.CompareFP(lhs, rhs, effectData.compareType) then
31+
validIdx = i-1
32+
break
33+
end
34+
end
35+
36+
EnsureObjectPtrWrap()
37+
38+
if validIdx >= 0 then
39+
local newEffect = nil
40+
local effectData = inst._effects[validIdx]
41+
if inst.m_stackEffects == nil then
42+
inst.m_stackEffects = {}
43+
newEffect = BattleController.instance:CreateEffect(effectData.effect, owner, owner, Vector3(owner.faceVector.x, owner.faceVector.y, 0))
44+
local effectPtr = ObjectPtrWrap(newEffect)
45+
inst.m_stackEffects[validIdx] = effectPtr
46+
else
47+
local flag, _ = inst.m_stackEffects:TryGetValue(validIdx)
48+
if not flag then
49+
newEffect = BattleController.instance:CreateEffect(effectData.effect, owner, owner, Vector3(owner.faceVector.x, owner.faceVector.y, 0))
50+
local effectPtr = ObjectPtrWrap(newEffect)
51+
inst.m_stackEffects[validIdx] = effectPtr
52+
end
53+
end
54+
55+
for idx, ptr in pairs(inst.m_stackEffects) do
56+
if ptr.isValid then
57+
ptr:Lock():SetPausedByOthers(idx ~= validIdx)
58+
end
59+
end
60+
61+
inst.effect:SetPausedByOthers(true)
62+
else
63+
if inst.m_stackEffects ~= nil then
64+
for idx, ptr in pairs(inst.m_stackEffects) do
65+
if ptr.isValid then
66+
ptr:Lock():SetPausedByOthers(true)
67+
end
68+
end
69+
end
70+
inst.effect:SetPausedByOthers(false)
71+
end
72+
end)
73+
end
74+
75+
return SwitchableMultiEffectByBuffStackCntHotfixer

0 commit comments

Comments
 (0)