-
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.61 Data:24-08-30-10-37-03-474f83
- Loading branch information
MuelsyseBot_v1
committed
Sep 2, 2024
1 parent
855b4b9
commit 9a47cf1
Showing
99 changed files
with
170,036 additions
and
50,236 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
GlobalConfig = | ||
{ | ||
CUR_FUNC_VER = "V053", | ||
CUR_FUNC_VER = "V054", | ||
} | ||
|
||
|
||
|
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
36 changes: 36 additions & 0 deletions
36
zh_CN/gamedata/[uc]lua/feature/activity/collection/CollectionTaskListAdapter.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,36 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
local CollectionTaskListAdapter = Class("CollectionTaskListAdapter", UIRecycleAdapterBase); | ||
local CollectionTimedTaskItem = require("Feature/Activity/Collection/CollectionTimedTaskItem"); | ||
|
||
function CollectionTaskListAdapter:ViewConstructor(objPool) | ||
local missionItem = self:CreateWidgetByPrefab(CollectionTimedTaskItem, self._itemPrefab, self._container); | ||
self:AddObj(missionItem, missionItem:RootGameObject()); | ||
return missionItem:RootGameObject(); | ||
end | ||
|
||
function CollectionTaskListAdapter:OnRender(transform, index) | ||
if #self.missionList <= 0 then | ||
return; | ||
end | ||
|
||
local luaIndex = index + 1; | ||
local missionData = self.missionList[luaIndex]; | ||
local item = self:GetWidget(transform.gameObject); | ||
item:Refresh(missionData, self.actCfg); | ||
end | ||
|
||
|
||
function CollectionTaskListAdapter:GetTotalCount() | ||
if self.missionList == nil then | ||
return 0; | ||
end | ||
return #self.missionList; | ||
end | ||
|
||
return CollectionTaskListAdapter; |
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
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
120 changes: 28 additions & 92 deletions
120
zh_CN/gamedata/[uc]lua/hotfixes/SandboxCatchedAnimalManagerHotfixer.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 |
---|---|---|
@@ -1,114 +1,50 @@ | ||
|
||
|
||
|
||
|
||
local SandboxCatchedAnimalManagerHotfixer = Class("SandboxCatchedAnimalManagerHotfixer", HotfixBase) | ||
local lua_hashSet = CS.System.Collections.Generic.HashSet(CS.System.Int32) | ||
local lua_dict_StrInt = CS.System.Collections.Generic.Dictionary(CS.System.String, CS.System.Int32) | ||
|
||
local function _Fix_OnFenceFinishInNormal(self, character) | ||
self.m_roomTilesCache:Clear() | ||
self.m_roomDiff:Clear() | ||
for row = 0, self.m_mapHeight - 1 do | ||
for col = 0, self.m_mapWidth - 1 do | ||
if self:_IsFenceTile(row, col) then | ||
self.m_roomTilesCache[self:_CatchedAnimalRoomId(row, col)] = self.m_catchedAnimalFlagMap:GetValue(row, col) | ||
end | ||
end | ||
end | ||
|
||
local tile = character.rootTile; | ||
self.m_catchedAnimalFlagMap:SetValue(CS.XLua.Cast.Int32(0), tile.row, tile.col) | ||
self:_RefreshCatchAnimalMap() | ||
self:_RefreshCatchAnimalMapStatus() | ||
self:_RefreshTrapFenceAnimatorSurround(tile.row, tile.col) | ||
|
||
if self.output.catchedAnimals == nil or self.output.catchedAnimals.Count == 0 then | ||
return | ||
end | ||
local FENCE_AREA_FLAG = -1; | ||
|
||
local function DoResetFromCacheFix(self) | ||
for row = 0, self.m_mapHeight - 1 do | ||
for col = 0, self.m_mapWidth - 1 do | ||
local tileId = self:_CatchedAnimalRoomId(row, col) | ||
if self.m_roomTilesCache:ContainsKey(tileId) and self:_IsFenceTile(row, col) then | ||
local oldRoomId = self.m_roomTilesCache[tileId] | ||
local newRoomId = self.m_catchedAnimalFlagMap:GetValue(row, col) | ||
if self.m_roomDiff:ContainsKey(oldRoomId) then | ||
self.m_roomDiff[oldRoomId]:Add(newRoomId); | ||
else | ||
local roomDiff = lua_hashSet() | ||
roomDiff:Add(newRoomId) | ||
self.m_roomDiff:Add(oldRoomId, roomDiff) | ||
local tile = CS.Torappu.Battle.Map.instance:GetTile(row, col) | ||
if tile ~= nil then | ||
local character = tile:GetCharacter() | ||
if character ~= nil and character.rootTile ~= nil and character.rootTile == tile then | ||
local flagValue | ||
if self:_IsFenceTileId(character.id) then | ||
flagValue = FENCE_AREA_FLAG; | ||
else | ||
flagValue = 0; | ||
end | ||
self.m_catchedAnimalFlagMap:SetValue(CS.XLua.Cast.Int32(flagValue), row, col); | ||
end | ||
end | ||
end | ||
end | ||
|
||
self.m_catchedAnimalCache:Clear(); | ||
for k, v in pairs(self.output.catchedAnimals) do | ||
self.m_catchedAnimalCache:Add(k, v) | ||
for i = self.m_catchedAnimals.Count - 1, 0, -1 do | ||
local enemy = self.m_catchedAnimals:Get(i).Key | ||
enemy:FinishWithNoReason() | ||
end | ||
self.output.catchedAnimals:Clear(); | ||
self.m_animalCountInRoom:Clear() | ||
|
||
for animalCacheKey, _animalCacheValue in pairs(self.m_catchedAnimalCache) do | ||
local animalCacheValue = {} | ||
for k, v in pairs(_animalCacheValue) do | ||
animalCacheValue[k] = v | ||
end | ||
|
||
if self.m_roomDiff:ContainsKey(animalCacheKey) then | ||
local newRoomIds = self.m_roomDiff[animalCacheKey] | ||
for k, v in pairs(newRoomIds) do | ||
local newRoomId = v | ||
local roomAnimalCountTmp = {} | ||
for animalCacheValue_k, animalCacheValue_v in pairs(animalCacheValue) do | ||
roomAnimalCountTmp[animalCacheValue_k] = animalCacheValue_v | ||
end | ||
|
||
for roomAnimalCountTmp_k, roomAnimalCountTmp_v in pairs(roomAnimalCountTmp) do | ||
if roomAnimalCountTmp_v > 0 then | ||
local addCount = self:_RegisterAnimalInRoom(newRoomId, roomAnimalCountTmp_v) | ||
if addCount <= 0 then | ||
break | ||
end | ||
|
||
if self.output.catchedAnimals:ContainsKey(newRoomId) then | ||
if self.output.catchedAnimals[newRoomId]:ContainsKey(roomAnimalCountTmp_k) then | ||
local newCount = self.output.catchedAnimals[newRoomId][roomAnimalCountTmp_k] + addCount | ||
self.output.catchedAnimals[newRoomId][roomAnimalCountTmp_k] = newCount | ||
else | ||
self.output.catchedAnimals[newRoomId]:Add(roomAnimalCountTmp_k, addCount) | ||
end | ||
else | ||
local catchAnimalNew = lua_dict_StrInt() | ||
catchAnimalNew:Add(roomAnimalCountTmp_k, addCount) | ||
self.output.catchedAnimals:Add(newRoomId, catchAnimalNew) | ||
end | ||
|
||
local restCount = roomAnimalCountTmp_v - addCount; | ||
animalCacheValue[roomAnimalCountTmp_k] = restCount | ||
if restCount > 0 then | ||
break | ||
end | ||
end | ||
end | ||
end | ||
end | ||
self.m_catchedAnimals:Clear() | ||
self.m_catchedAnimalFenceId:Clear() | ||
self:_ParseCatchedAnimals(self.m_catchedAnimalCache) | ||
for key, value in pairs(self.m_catchedAnimalCardCount) do | ||
self:_ForceChargeCatchedAnimalCard(key, value); | ||
end | ||
end | ||
|
||
function SandboxCatchedAnimalManagerHotfixer:OnInit() | ||
xlua.private_accessible(CS.Torappu.Battle.Sandbox.SandboxCatchedAnimalManager) | ||
self:Fix_ex(CS.Torappu.Battle.Sandbox.SandboxCatchedAnimalManager, "_OnFenceFinishInNormal", function(self, character) | ||
local ok, ret = xpcall(_Fix_OnFenceFinishInNormal, debug.traceback, self, character) | ||
xlua.private_accessible(CS.Torappu.Battle.Character) | ||
self:Fix_ex(CS.Torappu.Battle.Sandbox.SandboxCatchedAnimalManager, "DoResetFromCache", function(self) | ||
local ok, errorInfo = xpcall(DoResetFromCacheFix, debug.traceback, self) | ||
if not ok then | ||
LogError("[Hotfix] failed to _Fix_OnFenceFinishInNormal : " .. ret) | ||
return self:_OnFenceFinishInNormal(character) | ||
else | ||
return ret | ||
LogError("[SandboxCatchedAnimalManagerHotfixer] fix" .. errorInfo) | ||
end | ||
end) | ||
end | ||
|
||
function SandboxCatchedAnimalManagerHotfixer:OnDispose() | ||
end | ||
|
||
return SandboxCatchedAnimalManagerHotfixer |
Oops, something went wrong.