return function(obj) local isKeyValuePair local function lua_iter(cs_iter, k) if cs_iter:MoveNext() then local current = cs_iter.Current if isKeyValuePair == nil then if type(current) == 'userdata' then local t = current:GetType() isKeyValuePair = t.Name == 'KeyValuePair`2' and t.Namespace == 'System.Collections.Generic' else isKeyValuePair = false end --print(current, isKeyValuePair) end if isKeyValuePair then return current.Key, current.Value else return k + 1, current end end end return lua_iter, obj:GetEnumerator(), -1 end -- date: 2020/7/23 17:50:00 -- target version: WWL5.0 -- HotFixNum 238 require 'xlua.util'.hotfix_ex(CS.GameLogin.UIVersionCodeView, 'GetHotFixVersionStr', function(self) return " 238" end) -- WWL5.0\#01 ------------------------------------------------------------------------------------------------ -- HotFix#1 WWL5.0 ps4手柄 激活职业技能的手柄按键名称显示错了 -- Hengxiachen : Fixed Incorrect Composite Gamepad Button Icon ------------------------------------------------------------------------------------------------ require 'xlua.util'.hotfix_ex(CS.BattleRoyale.BRSkillView, 'Start', function(self) self:Start() xlua.private_accessible(CS.GamepadButton) local getChild = CS.GameEngine.PlayableController local gamePadBtnObj = getChild.findChild(self.transform, "UIGamepadButton", true).gameObject; if gamePadBtnObj == nil then return end local gamePadBtn = gamePadBtnObj:GetComponent(typeof(CS.GamepadButton)); if gamePadBtn ~= nil then local container = getChild.findChild(self.transform, "Container", true).gameObject; local ButtonSpriteOne = nil local ButtonSpriteTwo = nil local BtnSpriteOne = getChild.findChild(self.transform, "ButtonSprite1", true).gameObject local BtnSpriteTwo = getChild.findChild(self.transform, "ButtonSprite2", true).gameObject if BtnSpriteOne ~= nil then ButtonSpriteOne = BtnSpriteOne:GetComponent(typeof(CS.UISprite)) end if BtnSpriteTwo ~= nil then ButtonSpriteTwo = BtnSpriteTwo:GetComponent(typeof(CS.UISprite)) end gamePadBtn.m_IsCompositeButton = true gamePadBtn.m_CompositeCfg.RootObj = container gamePadBtn.m_CompositeCfg.ButtonSprite1 = ButtonSpriteOne gamePadBtn.m_CompositeCfg.ButtonSprite2 = ButtonSpriteTwo end end) require 'xlua.util'.hotfix_ex(CS.GameBase.UltSkillHud, 'Start', function(self) self:Start() xlua.private_accessible(CS.GamepadButton) local getChildMP = CS.GameEngine.PlayableController local gamePadBtnObjMP = getChildMP.findChild(self.transform, "UIGamepadButton", true).gameObject; if gamePadBtnObjMP == nil then return end local gamePadBtnMP = gamePadBtnObjMP:GetComponent(typeof(CS.GamepadButton)); if gamePadBtnMP ~= nil then local containerMP = getChildMP.findChild(self.transform, "Container", true).gameObject; local ButtonSpriteOneMP = nil local ButtonSpriteTwoMP = nil local BtnSpriteOneMP = getChildMP.findChild(self.transform, "ButtonSprite1", true).gameObject local BtnSpriteTwoMP = getChildMP.findChild(self.transform, "ButtonSprite2", true).gameObject if BtnSpriteOneMP ~= nil then ButtonSpriteOneMP = BtnSpriteOneMP:GetComponent(typeof(CS.UISprite)) end if BtnSpriteTwoMP ~= nil then ButtonSpriteTwoMP = BtnSpriteTwoMP:GetComponent(typeof(CS.UISprite)) end gamePadBtnMP.m_IsCompositeButton = true gamePadBtnMP.m_CompositeCfg.RootObj = containerMP gamePadBtnMP.m_CompositeCfg.ButtonSprite1 = ButtonSpriteOneMP gamePadBtnMP.m_CompositeCfg.ButtonSprite2 = ButtonSpriteTwoMP end end) -- WWL5.0\#02 -------------------------------------------------------------------------------- -- smartzhu: fix PlaylistSelectorController OnVideoIntroductionBtnClick #2 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.GameUI.Room.PlaylistSelectorController,'OnVideoIntroductionBtnClick',function(self) --CS.GameEngine.Log.GeneralError("{0}",self.m_PlaylistId) local temp = self.m_PlaylistId local languageCode = CS.LanguageManager.CurrentELanguageCode local suffix = 0 if CS.GameDefine.IsIMSDKKing then if languageCode == CS.msg.ELanguageCode.ar_SA then suffix=10 elseif languageCode == CS.msg.ELanguageCode.pt_BR then suffix=11 elseif languageCode == CS.msg.ELanguageCode.de_DE then suffix=12 elseif languageCode == CS.msg.ELanguageCode.en_US then suffix=13 elseif languageCode == CS.msg.ELanguageCode.fr_FR then suffix=14 elseif languageCode == CS.msg.ELanguageCode.it_IT then suffix=15 elseif languageCode == CS.msg.ELanguageCode.ja_JP then suffix=16 elseif languageCode == CS.msg.ELanguageCode.es_ES then suffix=17 elseif languageCode == CS.msg.ELanguageCode.ru_RU then suffix=18 elseif languageCode == CS.msg.ELanguageCode.tr_TR then suffix=19 else suffix=13 end elseif CS.GameDefine.IsIMSDKGarenaSA then if languageCode == CS.msg.ELanguageCode.zh_TW then suffix=0 elseif languageCode == CS.msg.ELanguageCode.en_SG then suffix=1 elseif languageCode == CS.msg.ELanguageCode.in_ID then suffix=2 elseif languageCode == CS.msg.ELanguageCode.th_TH then suffix=3 else suffix=1 end elseif CS.GameDefine.IsIMSDKKorea then suffix=30 elseif CS.GameDefine.IsIMSDKVNG then suffix=20 end --CS.GameEngine.Log.GeneralError("{0}",suffix) self.m_PlaylistId=self.m_PlaylistId-self.m_PlaylistId%100+suffix --CS.GameEngine.Log.GeneralError("{0}",self.m_PlaylistId) self:OnVideoIntroductionBtnClick() self.m_PlaylistId=temp --CS.GameEngine.Log.GeneralError("{0}",self.m_PlaylistId) end) require 'xlua.util'.hotfix_ex(CS.GameUI.Room.PlaylistSelectorController,'SetDetailInfo',function(self, playlistType, playlistId, detailType, enableTutorialVideo) if CS.GameDefine.IsMobileIOS and CS.GameDefine.IsIMSDKVNG then enableTutorialVideo = false end self:SetDetailInfo(playlistType, playlistId, detailType, enableTutorialVideo) end) -- WWL5.0\#03 -------------------------------------------------------------------------------- -- krisstian: Fix settlement "MORE" localization. V5.0#3 -------------------------------------------------------------------------------- --local GeneralError = CS.GameEngine.Log.GeneralError require 'xlua.util'.hotfix_ex(CS.Settlement.BRSettlementDetailWindowController, 'UpdateView', function(self) --GeneralError("HotFix BRSettlementDetailWindowController UpdateView") self:UpdateView() if self.m_View ~= nil and self.m_View.BtnMoreMedal ~= nil then local label = self.m_View.BtnMoreMedal.transform:GetComponentInChildren(typeof(CS.UILabel)) if label ~= nil then CS.GameUI.UICommonTools.SafeSetLabel(label,CS.LanguageUtility.Translate('LOC_RANK_MORE')) end end end) -- WWL5.0\#04 -------------------------------------------------------------------------------- -- steekwu: Fix Final Repaly -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.PVP.DeadReplayManager, 'WaitingForFinalKillReplayTimeOut', function(self, time) time = 5 self:WaitingForFinalKillReplayTimeOut(time) end) -- WWL5.0\#05 -------------------------------------------------------------------------------- -- hehehe: fix PVPOpenSceneHUD -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.GameUI.PVPOpenSceneHUD, 'Awake', function(self) self:Awake() self.Skip.width = 60 local label = self.Skip.gameObject:GetComponent(typeof(CS.UILabel)) if label ~= nil then label.text = CS.LanguageUtility.Translate('LOC_BATTLEPASS_SEASONVIDEOVIEW_SKIPBTN') end end) -- WWL5.0\#06 -------------------------------------------------------------------------------- -- smartzhu: fix BRTutorialView localization #6 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.Tutorial.BRTutorialController,'Init',function(self) self:Init() local tp = self.m_View.NewsToggle.transform:Find('TAG(BG)') if tp ~= nil then local t = tp:Find('Label') if t ~= nil then local label = t:GetComponent(typeof(CS.UILabel)) if label ~= nil then label.modifier = CS.UILabel.Modifier.Localization label.locID = 'LOC_FTUE_TAG_NEW' end end end end) -- WWL5.0\#07 -------------------------------------------------------------------------------- -- smartzhu: fix BRTutorialView localization #6 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.PVP.Team.INFGame.InfectGameTipHUD,'RegisterDelegates',function(self) self:RegisterDelegates() local labelT = self.countDownTipsRoot.transform:Find('Label') if labelT ~= nil then local label = labelT:GetComponent(typeof(CS.UILabel)) if label ~= nil then label.modifier = CS.UILabel.Modifier.Localization label.locID = 'LOC_PREFAB_INFECTED_OR' end end end) -- WWL5.0\#08 -------------------------------------------------------------------------------- -- v_wenlliang: fix VNG 18+ tips -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.FrontEnd.LobbyMapTopBarView, 'ConfigureStyle', function(self,style,param) self:ConfigureStyle(style,param) if style == CS.FrontEnd.ELobbyMapTopBarStyle.OnlyBack then if CS.GameEngine.DataStoreManager.Instance.GlobalDataStore.Enable18ProhibitedLogo and CS.GameDefine.IsIMSDKVNG then local uiScene=CS.GameUI.GUIManager.Instance.UISceneObject if(uiScene ~=nil) then if uiScene:GetType():ToString() == 'FrontEnd.FrontEndUIScene' then local currentCtrl = uiScene.CurrentNaviUIController if nil ~= currentCtrl then if currentCtrl:GetType():ToString() == 'PersonalInfoHistorySettlementNavController' then CS.GameUI.UICommonTools.SafeSetActive(self.VNG_18, false) end end end end end end end) -- WWL5.0\#09 -------------------------------------------------------------------------------- -- allenmo fix BuffEffect_DroneInterfere crash -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.GameBase.BuffEffect_DroneInterfere, 'TriggerEffectImpl', function(self) local PlayEffectCallBack = function (effect) --CS.UnityEngine.Debug.LogError(self) --CS.UnityEngine.Debug.LogError(effect) if self.m_Buff == nil then return end if CS.GameCommon.LuaUtility.IsNullInCSharp(self.m_Buff.Target) == true then return end if self.m_Buff.Target:IsDestroyed() == true then return end if self.m_Buff.Target.ThirdPersonModelSocket == nil then return end self.m_Effect = effect --CS.UnityEngine.Debug.LogError(self.m_Effect) if CS.GameCommon.LuaUtility.IsNullInCSharp(self.m_Effect) == false then local socketTransform = self.m_Buff.Target.ThirdPersonModelSocket:FindWithName("Bip01", true) if socketTransform ~= nil then --CS.UnityEngine.Debug.LogError("PlayEffect") self.m_Effect.transform.parent = socketTransform self.m_Effect.transform.localPosition = CS.UnityEngine.Vector3.zero self.m_Effect.transform.localRotation = CS.UnityEngine.Quaternion.identity self.m_Effect.transform.localScale = CS.UnityEngine.Vector3.one self.m_Effect:PlayEffect() end end end --CS.UnityEngine.Debug.LogError("TriggerEffectImpl") if self.m_Buff ~= nil and CS.GameCommon.LuaUtility.IsNullInCSharp(self.m_Buff.Target) == false then if CS.GameCommon.LuaUtility.IsNullInCSharp(self.m_Effect) == true then --CS.UnityEngine.Debug.LogError("step 1") if self.m_Buff.Target.ViewType == CS.GameEngine.EActorViewType.ThirdPerson and self.m_Buff.Target.ThirdPersonModelSocket ~= nil then --CS.UnityEngine.Debug.LogError("step 2") local socketTransform = self.m_Buff.Target.ThirdPersonModelSocket:FindWithName("Bip01", true) if socketTransform ~= nil then --CS.UnityEngine.Debug.LogError("step 3") local spawnEffectGeneric = xlua.get_generic_method(CS.GameEngine.EffectManager, "SpawnEffect") local spawnEffect = spawnEffectGeneric(CS.GameEngine.ParticleEffect) spawnEffect(310000156, socketTransform.position, socketTransform.rotation, 0, PlayEffectCallBack) end end end if self.m_Buff.Target.IsInterferedByDrone == false then self.m_Buff.Target.IsInterferedByDrone = true self.m_Buff.Target:CheckBlind() end if self.m_Buff.Target == CS.GameEngine.GamePlay.LocalOrViewTargetPawn and CS.GameEngine.GamePlay.SafeSpectInfo.IsMatchObserver == false then self.m_IsLocalPlayerInInterferedState = true self.m_BeginInInterferedStateTime = CS.UnityEngine.Time.realtimeSinceStartup CS.GameBase.GameHudStateManager.Instance:AddState(CS.GameBase.GameHudState.GHS_InterferedByDrone) if self.m_Buff.Target.IsSpectated == false then self.m_Buff.Target:CloseAimAndResetData() end CS.GameEngine.GamePlay.SetLockPawnState(CS.GameEngine.EPawnStateLock.LockADS, true) CS.GameEngine.AudioSystem.PlaySound("Play_wpn_br_uav_noise", CS.Audio.Defs.AudioGameObjects.SFX) CS.GameEngine.EventManager.Instance:SendUIEvent(1020441, false) CS.GameEngine.EventManager.Instance:SendUIEvent(1020187, false) CS.GameEngine.EventManager.Instance:SendUIEvent(1020463, true) CS.GameEngine.EventManager.Instance:SendUIEvent(1020182, false) CS.GameEngine.EventManager.Instance:SendUIEvent(1020181, true) CS.GameEngine.EventManager.Instance:SendUIEvent(1020199, false) end end end) -- WWL5.0\#10 -------------------------------------------------------------------------------- -- seanoopdeng fix cloth crash -------------------------------------------------------------------------------- local function LuaOverride_IsLowQualitySetting(self) return true end require 'xlua.util'.hotfix_ex(CS.FrontEnd.AvatarItemBase, 'IsLowQualitySetting', LuaOverride_IsLowQualitySetting) -------------------------------------------------------------------------------- -- hehehe: fix CTFFlag cloth crash -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.PVP.Team.CTFGame.CTFFlag, 'SetCamp', function(self,camp) self:SetCamp(camp) local flag = self.ModelInst.transform:FindWithName("PVP_Ctf_Flag_3P_BR_lod0", true) if flag ~= nil then local cloth = flag:GetComponent(typeof(CS.UnityEngine.Cloth)) if cloth ~= nil then CS.UnityEngine.Debug.LogError("find cloth") cloth.enabled = false end end end) require 'xlua.util'.hotfix_ex(CS.PVP.Team.CTFGame.SwitchRoleComponent_CTFGamePlayerPawn, 'OnLoadFlagCompletes', function(self,assetID,CallBackData) self:OnLoadFlagCompletes(assetID,CallBackData) local flag = self.FlagObj.transform:FindWithName("PVP_Ctf_Flag_3P_BR_lod0", true) if flag ~= nil then local cloth = flag:GetComponent(typeof(CS.UnityEngine.Cloth)) if cloth ~= nil then CS.UnityEngine.Debug.LogError("find cloth") cloth.enabled = false end end if CS.GameBase.PoolSystemService.Instance == nil then return end if CS.GameBase.PoolSystemService.Instance.GeneralPool == nil then return end local prefabGo = CS.GameBase.PoolSystemService.Instance.GeneralPool:FindInstanceTemplate(assetID) if CS.GameCommon.LuaUtility.IsNullInCSharp( prefabGo ) == false then local flagTrans = prefabGo.transform:FindWithName("PVP_Ctf_Flag_3P_BR_lod0", true) if CS.GameCommon.LuaUtility.IsNullInCSharp( flagTrans ) == false then local cloth = flagTrans:GetComponent(typeof(CS.UnityEngine.Cloth)) if cloth ~= nil then CS.UnityEngine.Debug.LogError("find cloth in prefab") cloth.enabled = false end end end end) -- WWL5.0\#11 -- date: 20200429 -- reason: 【ID77997877】【WWL5.0v】 -- target version: WWL 5.0 --修复索引溢出 monsterfang require 'xlua.util'.hotfix_ex(CS.GameEngine.AvatarLoadOP, 'InstanceUIRoleEquip', function( inAvatar,inEquipAssetIDs) if CS.GameCommon.LuaUtility.IsNullInCSharp(inAvatar) == true then CS.GameEngine.Log.GeneralError('[InstanceUIRoleEquip] is Fialed . inAvatar is null ') return end if inEquipAssetIDs == nil then CS.GameEngine.Log.GeneralError('[InstanceUIRoleEquip] is Fialed . inEquipAssetIDs is null ') return end CS.GameEngine.AvatarLoadOP.InstanceUIRoleEquip(inAvatar,inEquipAssetIDs) end) --[[require 'xlua.util'.hotfix_ex(CS.GameEngine.AvatarComposer, 'UpdateBones', function(self, renderers,targetBones,offset,add,inResetBone) if renderers == nil then if CS.GameCommon.LuaUtility.IsNullInCSharp(self.m_Pawn) == true then CS.GameEngine.Log.GeneralError('[UpdateBones] is Fialed . m_Pawn is null ') return false end if self.m_Pawn.PlayerInfo == nil then CS.GameEngine.Log.GeneralError('[UpdateBones] is Fialed . PlayerInfo is null ') return false end end self:UpdateBones(renderers,targetBones,offset,add,inResetBone) end)]] -- WWL5.0\#12 -------------------------------------------------------------------------------- -- v_xinywen:新版本客户端屏蔽至新赛季开放3天以后 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.RankGame.RankView, 'AddSeasonOffTips', function(self) end) require 'xlua.util'.hotfix_ex(CS.GameUI.Home.HomeMainController, 'RefreshRankMatchTopRight_Logo', function(self,isLock) self:RefreshRankActvAdd() CS.GameEngine.Log.GeneralError("RefreshRankMatchTopRight_Logo") self:RefreshRankMatchTopRight_Logo(isLock) end) -- WWL5.0\#13 -------------------------------------------------------------------------------- -- maodai: close mesh combine cache -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.GameBase.BaseGame, 'CreateGameComponents', function(self) self:CreateGameComponents() local temp = self.ModelOptimizer if temp ~= nil then temp.UICacheOptimizedMesh = false end end) -- WWL5.0\#14 -------------------------------------------------------------------------------- -- corgizhou: 载具车轮破碎崩溃 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.GameBase.NZWheeledVehicleMovementComponent, 'ClearInput', function(self) if self.gameObject.activeSelf then self:ClearInput() end end) require 'xlua.util'.hotfix_ex(CS.GameBase.NZWheeledTankMovementComponent, 'ClearInput', function(self) if self.gameObject.activeSelf then self:ClearInput() end end) -- WWL5.0\#15 -------------------------------------------------------------------------------- -- marcusli: BR角色Culling距离 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.FrontEnd.FrontEndUIScene, 'InitGVoice', function(self) self:InitGVoice() CS.GameEngine.SwitchRoleComponent.LOD3Params[2] = 0.008 CS.GameEngine.SwitchRoleComponent.LOD2Params[1] = 0.008 end) -- WWL5.0\#16 -------------------------------------------------------------------------------- -- kekezhao: dom map domimation point id error. -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.PVP.Team.DominationGame.DOMObjectiveVolume, 'Awake', function(self) self:Awake() local gameInfoDS = CS.GameEngine.DataStoreManager.Instance.GameInfoDataStore local MapID = gameInfoDS.ActualMapId; if (MapID == 0x10030005) then CS.GameEngine.Log.GeneralError("map find"); if self.ObjectiveID == 0 then self.ObjectiveID = 1 elseif self.ObjectiveID == 1 then self.ObjectiveID = 2 elseif self.ObjectiveID == 2 then self.ObjectiveID = 0 end end end) require 'xlua.util'.hotfix_ex(CS.GameBase.GameEventChannel, 'OnSyncDomArea', function(self, Msg) local gameInfoDS = CS.GameEngine.DataStoreManager.Instance.GameInfoDataStore local MapID = gameInfoDS.ActualMapId; if (MapID == 0x10030005) then cast(Msg, typeof(CS.Network.SyncDomareaMsg)) local ct = Msg.Content; if ct ~= nil and self.m_Game.DomAreaManager ~= nil then if ct.AreaId == 0 then ct.AreaId = 1 elseif ct.AreaId == 1 then ct.AreaId = 2 elseif ct.AreaId == 2 then ct.AreaId = 0 end end end self:OnSyncDomArea(Msg) end) -- WWL5.0\#17 -------------------------------------------------------------------------------- -- v_wenlliang: 排位加成和排位不掉分活动局内显示 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.LobbyRankPointBuffDataStore, 'GetIsNotDropValid', function(self,serverTime,bAdd) if bAdd then if self.mRankedMatchAddInfoList~=nil then if self.mRankedMatchAddInfoList.Count >0 then local GameInfoDS=CS.GameEngine.DataStoreManager.Instance.GameInfoDataStore if(GameInfoDS~=nil) then local ServiceModule=GameInfoDS.MatchServiceModule if ServiceModule==4 or ServiceModule==2 then for i=0, self.mRankedMatchAddInfoList.Count-1, 1 do local e = self.mRankedMatchAddInfoList[i] if(e~=nil) then if(e.Data~=nil) then if (e.Data.ranked_match_type==5 and ServiceModule==2) or (e.Data.ranked_match_type==6 and ServiceModule==4) then if e:IsRankBuffValid(serverTime) and e:IsRankRestriction() then return true end end end end end end end end end return false else return self:GetIsNotDropValid(serverTime,bAdd) end end) -- WWL5.0\#18 -------------------------------------------------------------------------------- -- shifengzhou: RenderMultMaterialManager RefreshRound idiv0 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.RenderMultMaterialManager, 'RefreshRound', function(self) if self.SubMeshNum == 0 then else return self:RefreshRound() end end) -- WWL5.0\#19 -------------------------------------------------------------------------------- -- corgizhou: 坦克视角切换和子弹数展示问题 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.GameEngine.TankHUD, 'Awake', function(self) self:Awake() self.m_AmmoCount = 100 end) require 'xlua.util'.hotfix_ex(CS.BattleRoyale.BRVehicleComponent, 'GetOnVehicle', function(self, vehicle, seat) local preSeatIdx = self.CurrentSeatIndex local viewType = self.mLastViewType self:GetOnVehicle(vehicle, seat) if preSeatIdx == CS.GameEngine.EVehicleSeatIndex.SEAT_DRIVER then self.mLastViewType = viewType end end) -- WWL5.0\#20 --[[ coreygao:飞机票段位展示全部为1的问题 ]]-- xlua.private_accessible(CS.Chat.ChatQTFilterCell) require 'xlua.util'.hotfix_ex(CS.Chat.ChatQTFilterCell, "ConfigureFilterCell", function(self, mode, cutPanel) self:ConfigureFilterCell(mode, cutPanel) if self.PlayerFrame then local ladderLv, ladderType = 0, CS.GameUI.Room.ELadderType.ENone if CS.GameEngine.MapStoreHelper.IsBRGameMode(CS.GameEngine.EGameMode.__CastFrom(mode.ModeID)) then ladderLv, ladderType = mode.BRLadderLevel, CS.GameUI.Room.ELadderType.EBr else ladderLv, ladderType = mode.LadderLevel, CS.GameUI.Room.ELadderType.ESpvp end self.PlayerFrame:SetData(mode.PictureInfo, mode.Name, mode.PeakLevel, mode.Level, ladderLv, ladderType) end end) -- WWL5.0\#21 -------------------------------------------------------------------------------- -- paulqu: 回流任务累积奖励获取时,不会播放获取动画 -- http://tapd.oa.com/codm/bugtrace/bugs/view/1110125091078725232 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.GameUI.SoldierReturn.SoldierReturnReturnTrainingController, 'OnNotifyCommonReceiveItemClose', function(self, message) self:OnNotifyCommonReceiveItemClose(message) if self._taskController ~= nil then self._taskController:OnUIEvent(message) end end) -- WWL5.0\#22 --[[ coreygao:飞机票筛选,语言条件写反的问题 ]]-- xlua.private_accessible(CS.Chat.ChatQTFilterController) xlua.hotfix(CS.Chat.ChatQTFilterController, "ValidateLanguage", function(self, info) if not self.m_FilterData.IsSameLanguage then return true else return CS.msg.ELanguageCode.__CastFrom(info.LanguageCode) == CS.LanguageManager.CurrentELanguageCode end end) -- WWL5.0\#23 -- date: 2020年6月17日10:38:27 -- 修复BR偶现的可破坏物消失 -- huiyicui require 'xlua.util'.hotfix_ex(CS.BattleRoyale.BRDestructibleObj, 'Init', function(self, actorId, levelObj) self.m_IsBroken = false; self:Init(actorId, levelObj); end) -- WWL5.0\#24 -------------------------------------------------------------------------------- -- wenlliang: 低配机广告 -------------------------------------------------------------------------------- local function CheckADAvailable() --CS.UnityEngine.Debug.LogError(CS.GameEngine.SystemSetting.Instance.EnableBackupLowMemStrategy) --CS.UnityEngine.Debug.LogError(CS.GameEngine.SystemSetting.Instance:IsAndroidDangerousOS()) if CS.GameEngine.SystemSetting.Instance.EnableBackupLowMemStrategy or CS.GameEngine.SystemSetting.Instance:IsAndroidDangerousOS() then return false end return true end require 'xlua.util'.hotfix_ex(CS.AdvertisingDataStore, 'CheckLobbyADShow', function(self) self:CheckLobbyADShow() if self.m_IsADShowLobby then self.m_IsADShowLobby=CheckADAvailable() end end) -- WWL5.0\#25 -- WWL5.0\#25 -------------------------------------------------------------------------------- -- petejiang: fix MP playlist filter switch and tip overlap -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.GameUI.Room.RoomSpvpPlaylistSelectorWindowController, 'OnBtnMapClick', function(self) self:OnBtnMapClick() if self.m_View ~= nil and self.m_View.LabelCantNotSelectMapTip ~= nil then self.m_View.LabelCantNotSelectMapTip.gameObject:SetActive(false) end end) -- WWL5.0\#26 -- WWL5.0\#26 -------------------------------------------------------------------------------- -- rayqiu: 删除接收好友组队弹窗协议后,商城弹窗的特殊处理 -- 玩家接收到好友组队弹窗,关闭后会卡死在宝箱展示界面 -- http://tapd.oa.com/codm/bugtrace/bugs/view?bug_id=1110125091078791532 require 'xlua.util'.hotfix_ex(CS.GameUI.UILuckyBoxAwardsController, 'CloseWindow', function(self) --CS.GameEngine.Log.GeneralError("Hotfix [UILuckyBoxAwardsController] CloseWindow"); end) require 'xlua.util'.hotfix_ex(CS.GameShop.ShopPaymentConfirmPopupWindowController, 'CloseWindow', function(self) --CS.GameEngine.Log.GeneralError("Hotfix [ShopPaymentConfirmPopupWindowController] CloseWindow"); end) -- WWL5.0\#27 -------------------------------------------------------------------------------- -- vivinliu: Filter out the Prop Type(EInventoryItemType.Temporary) .#27 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.LiveOps.LiveOpsActivitySystemAssist, 'LiveOpsItemIdGoDetails', function(self,ItemId) local curtype = CS.GameBase.ItemConfigHelper.GetInventoryType(ItemId); if curtype == CS.GameBase.EInventoryItemType.Temporary then return; end; self:LiveOpsItemIdGoDetails(ItemId); end) -- WWL5.0\#28 -------------------------------------------------------------------------------- -- rayqiu: 由于人物背包、帽子、衣服都增加了换皮功能,改为用道具id判断是否需要重新加载 -- http://tapd.oa.com/codm/bugtrace/bugs/view/1110125091078818510 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.FrontEnd.CommonAvatarView, 'CheckToBeChanged', function(self, param) -- CS.GameEngine.Log.GeneralError("Hotfix [CheckToBeChanged] CheckToBeChanged") --先走一遍原函数 local changed = self:CheckToBeChanged(param) -- if changed then -- CS.GameEngine.Log.GeneralError("Hotfix [CheckToBeChanged]origin changed: true" ) -- else -- CS.GameEngine.Log.GeneralError("Hotfix [CheckToBeChanged]origin changed: false" ) -- end -- 对于role Type重新求一遍 if param.commonAvatarId == self.mAvatarParameter.commonAvatarId and param.commonAvatarType == self.mAvatarParameter.commonAvatarType then if param.commonAvatarType == CS.FrontEnd.CommonAvatarType.Role then if param.roleHatId == self.mAvatarParameter.roleHatId and param.roleBagId == self.mAvatarParameter.roleBagId and param.roleClothId == self.mAvatarParameter.roleClothId and param.roleAction == self.mAvatarParameter.roleAction and (not self:HasEntranceAni(param)) and (param.roleAction == nil or param.roleAction == "") then changed = false else changed = true end end end -- if changed then -- CS.GameEngine.Log.GeneralError("Hotfix [CheckToBeChanged]return changed: true" ) -- else -- CS.GameEngine.Log.GeneralError("Hotfix [CheckToBeChanged]return changed: false" ) -- end return changed end) -- WWL5.0\#29,30 -------------------------------------------------------------------------------- -- steekwu: 局外喷漆更新显示 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.FrontEnd.AvatarTextureChangeDynamic, 'ChangeMainTexture', function(self, textureName, itemType, itemId) local useNew = false local newAssetID = 0 --CS.UnityEngine.Debug.LogError(textureName) --itemType = CS.GameBase.EInventoryItemType.HeadFramePic --textureName = "Icon_Frame_122_Latched_Models" if itemType == CS.GameBase.EInventoryItemType.HeadAvatarPic then local strID = string.sub(textureName, 13, 15) --CS.UnityEngine.Debug.LogError(itemType) --CS.UnityEngine.Debug.LogError(strID) local numID = tonumber(strID) useNew = numID >= 121 and numID <= 138 newAssetID = 411000050 end if itemType == CS.GameBase.EInventoryItemType.HeadFramePic then local strID = string.sub(textureName, 12, 14) --CS.UnityEngine.Debug.LogError(itemType) --CS.UnityEngine.Debug.LogError(strID) local numID = tonumber(strID) useNew = numID >= 111 and numID <= 126 newAssetID = 411000051 end if itemType == CS.GameBase.EInventoryItemType.IndividuationLacquer then useNew = itemId >= 250200116 and itemId <= 250200135 newAssetID = 408001015 end if not useNew then self:ChangeMainTexture(textureName, itemType, itemId) return end self:Init() self.m_TextureName = textureName; --CS.UnityEngine.Debug.LogError("UseNew"); local assetGO = CS.GameEngine.AssetManager.Instance:InstantiateAsset(newAssetID); if assetGO ~= nil then --CS.UnityEngine.Debug.LogError("1"); local set = assetGO:GetComponent(typeof(CS.FrontEnd.PerkTextureSet)); if set ~= nil then --CS.UnityEngine.Debug.LogError("2"); local tex = set:GetTexture(self.m_TextureName, itemId); if tex ~= nil and self.m_Material ~= nil then --CS.UnityEngine.Debug.LogError("3"); self.m_Material.mainTexture = tex; end if tex ~= nil and self.m_Material_Low ~= nil then --CS.UnityEngine.Debug.LogError("4"); self.m_Material_Low.mainTexture = tex; end end CS.UnityEngine.GameObject.Destroy(assetGO); end end) -- WWL5.0\#31 local SimulatedJumpingSpeedFactor = 0.6 local SimulatedJumpingMinSpeed = 1.5 local SimulatedJumpingMaxSpeed = 10 local function LuaOverride_SimulatedDoJump(self, jumpMoveData) self:SimulatedDoJump(jumpMoveData) if self.CurClimbType ~= CS.GameBase.Pawn.ClimbType.None then return end local pendingMoveDataCount = self.m_MoveHelper.SimulateMoveDataList.Count + self.MoveSyncModule.SimulateMoveDataList.Count; if pendingMoveDataCount == 0 then return end self.m_SimulatedJumpingSpeedScale = pendingMoveDataCount * SimulatedJumpingSpeedFactor if self.m_SimulatedJumpingSpeedScale < SimulatedJumpingMinSpeed then self.m_SimulatedJumpingSpeedScale = SimulatedJumpingMinSpeed end if self.m_SimulatedJumpingSpeedScale > SimulatedJumpingMaxSpeed then self.m_SimulatedJumpingSpeedScale = SimulatedJumpingMaxSpeed end --CS.GameEngine.Log.GeneralError("SimulatedDoJump is jump pendingMoveDataCount:{0} m_SimulatedJumpingSpeedScale:{1}", pendingMoveDataCount, self.m_SimulatedJumpingSpeedScale) end require 'xlua.util'.hotfix_ex(CS.GameBase.PlayerPawn, 'SimulatedDoJump', LuaOverride_SimulatedDoJump) local function LuaOverride_IsWaitJumpLand(self) return false end require 'xlua.util'.hotfix_ex(CS.GameBase.PlayerPawn, 'IsWaitJumpLand', LuaOverride_IsWaitJumpLand) local function LuaOverride_CalcSimulatedFallingHorizontalVelocity(self, deltaTime) end require 'xlua.util'.hotfix_ex(CS.GameBase.PlayerPawn, 'CalcSimulatedFallingHorizontalVelocity', LuaOverride_CalcSimulatedFallingHorizontalVelocity) -- WWL5.0\#32 require 'xlua.util'.hotfix_ex(CS.GameUI.Room.SpvpPlaylistDetailWindowController, 'UpdateView', function(self, detailType) self:UpdateView(detailType) if CS.GameCommon.LuaUtility.IsNullInCSharp(self.m_View) == false then local trans = self.m_View.transform if trans ~= nil then local trans2 = trans:FindWithName('Widget(shootout)', true) if trans2 ~= nil then local shootoutGo = trans2.gameObject if shootoutGo ~= nil then if detailType == 10 then shootoutGo:SetActive(true) else shootoutGo:SetActive(false) end end end end end end) -- WWL5.0\#33 -- date: 20200429 -- reason: 【ID77997877】【WWL5.0v】 -- target version: WWL 5.0 --表格中的背包资源:局内显示错误:低画质 背包资源全部显示280200132背包资源,高画质背包资源全部显示:280200131 monsterfang require 'xlua.util'.hotfix_ex(CS.GameEngine.AvatarComposer, 'ChangeDetailTexture', function(self, inType,inTex) local index = CS.System.Convert.ToInt32(inType) if self.mAvatarMesh[index] ~= nil and self.mAvatarMesh[index].MeshObjs ~= nil then if self.mAvatarMesh[index].isGUPSink == false then for i = 1, self.mAvatarMesh[index].MeshObjs.Length do local obj = self.mAvatarMesh[index].MeshObjs[i -1] if CS.GameCommon.LuaUtility.IsNullInCSharp(obj) == false then local _r = obj:GetComponent(typeof(CS.UnityEngine.Renderer)) if CS.GameCommon.LuaUtility.IsNullInCSharp(_r) == false then CS.GameEngine.MaterialCamoHelper.EnableDetailLerp(_r.material, inTex) end end end end end end) -- WWL5.0\#34 -- date: 20200429 -- reason: 【ID77997877】【WWL5.0v】 -- target version: WWL 5.0 --710000468 背部未显示 monsterfang require 'xlua.util'.hotfix_ex(CS.GameEngine.AvatarLoadOP, 'InstanceUIRole', function( inEquipAssetIDs) if inEquipAssetIDs == nil then CS.GameEngine.Log.GeneralError('[InstanceUIRole] is Fialed . inEquipAssetIDs is null ') return nil end local rv = CS.GameEngine.AvatarLoadOP.InstanceUIRole(inEquipAssetIDs) if inEquipAssetIDs[0] == 710000468 then if CS.GameCommon.LuaUtility.IsNullInCSharp(rv) == false then local _renderers = rv:GetComponentsInChildren(typeof(CS.UnityEngine.SkinnedMeshRenderer),true) for i = 1, _renderers.Length do if CS.GameCommon.LuaUtility.IsNullInCSharp(_renderers[i -1]) == false then if _renderers[i -1].gameObject.activeSelf == false then _renderers[i -1].gameObject:SetActive(true) end end end end end return rv end) -- WWL5.0\#35 -- date: 20200706 -- reason: 【ID78882894】【WWL5.0v2】 -- target version: WWL 5.0v2 --78882894 【BR-载具】坦克皮肤(Wrecked)未覆盖炮台corgizhou require 'xlua.util'.hotfix_ex(CS.GameEngine.PhysicsVehicle, 'ChangeMaterial', function( self, mats) if mats ~= nil and mats.Length > 0 then local _array = {} for i = 0, self.weaponInfos.Length - 1 do local w = self.weaponInfos[i] if w.weaponMeshOriginal ~= nil then for j =0, w.weaponMeshOriginal.Length - 1 do local v = w.weaponMeshOriginal[j] self:ChangeMaterial(v, mats, _array) end end end end self:ChangeMaterial(mats) end) -- date: 20200706 -- reason: 【ID78884834】【WWL5.0v2】 -- target version: WWL 5.0v2 --78884834 【BR-载具】突击车皮肤(Stream)未覆盖机枪板(总单)corgizhou require 'xlua.util'.hotfix_ex(CS.GameEngine.PhysicsVehicle, 'LoadTexture', function( self, inTexID) self:LoadTexture(inTexID) local loadAssetSync_generic = xlua.get_generic_method(CS.GameEngine.AssetManager, 'LoadAssetSync') local loadAssetSync = loadAssetSync_generic(CS.UnityEngine.Texture2D) local _tex = loadAssetSync(CS.GameEngine.AssetManager.Instance, inTexID) if _tex ~= nil then for i = 0, self.weaponInfos.Length - 1 do local w = self.weaponInfos[i] if w.weaponMeshOriginal ~= nil then for j =0, w.weaponMeshOriginal.Length - 1 do local r = w.weaponMeshOriginal[j] if r ~= nil then local mats = r.materials for v = 0, mats.Length - 1 do local m = mats[v] if m ~= nil then CS.GameEngine.MaterialCamoHelper.EnableDetailLerp(m, _tex) end end end end end end end end) -- WWL5.0\#36 -------------------------------------------------------------------------------- -- 【【WWL5.0v2】【GA预发布】【andriod】【必现】【武器皮肤】【局外】【PVP/BR】【ID 10106060】AK117 - SnakeBite枪身蛇头缺少动态效果】 -- http://tapd.oa.com/codm/bugtrace/bugs/view?bug_id=1010125091080692985 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.ModelOptimizer, 'OptimizeUIWeapon', function(self, model, type1, assetIDs, excludeObjList) if model ~= nil then local excludeObj = model.transform:FindWithName("SnakeBite_UI_lod0", true) if excludeObj ~= nil then excludeObjList:Add(excludeObj.gameObject) end end return self:OptimizeUIWeapon(model, type1, assetIDs, excludeObjList) end) -- WWL5.0\#37 -------------------------------------------------------------------------------- -- author: moonlin -- 音频配置表格热更优化 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.GameEngine.WeaponSoundConfigManager, 'SearchConfig', function(Key) -- local log = 'HotFix' .. 'SearchConfig' -- GeneralError(log) if(Key ~= 0) then if (Key == 200000627) then return CS.GameEngine.WeaponSoundConfigManager.SearchConfig(200000481) elseif (Key == 200000628) then return CS.GameEngine.WeaponSoundConfigManager.SearchConfig(200000482) elseif (Key == 200000629 or Key == 200000631) then local weaponSoundConfigItem = CS.GameEngine.WeaponSoundConfigManager.SearchConfig(200000126) -- MainWeapon_080_AK117_1p weaponSoundConfigItem.RaiseSound = 'Play_weapon_core_ar_scar_raise_1p' weaponSoundConfigItem.ClipOutAsset = 'Play_weapon_core_ar_scar_clipout_1p' weaponSoundConfigItem.ClipInAsset = 'Play_weapon_core_ar_scar_clipin_1p' weaponSoundConfigItem.WeaponBank1 = '205.bnk' weaponSoundConfigItem.PlantOKSound = 'Play_weapon_core_ar_scar_down_1p' weaponSoundConfigItem.FireSound_Compressor = 'Play_weapon_core_ar_scar_silence_fire_1p' weaponSoundConfigItem.FirstBulletSound = 'Play_weapon_core_ar_scar_fire_1p' weaponSoundConfigItem.FirstBulletSoundSilencer = 'Play_weapon_core_ar_scar_silence_fire_1p' weaponSoundConfigItem.FireStopSound = 'Play_weapon_core_ar_scar_firestop_1p' return weaponSoundConfigItem elseif (Key == 200000630 or Key == 200000632) then local weaponSoundConfigItem = CS.GameEngine.WeaponSoundConfigManager.SearchConfig(200000520) -- MainWeapon_080_AK117_3p if(CS.GameEngine.GamePlay.GameInfo ~= nil and CS.GameEngine.GamePlay.GameInfo:IsBRGame()) then weaponSoundConfigItem.RaiseSound = 'Play_weapon_core_ar_scar_raise_3p_br' weaponSoundConfigItem.ClipOutAsset = 'Play_weapon_core_ar_scar_clipout_3p_br' weaponSoundConfigItem.ClipInAsset = 'Play_weapon_core_ar_scar_clipin_3p_br' weaponSoundConfigItem.WeaponBank1 = '205.bnk' weaponSoundConfigItem.PlantOKSound = 'Play_weapon_core_ar_scar_down_3p_br' weaponSoundConfigItem.FireSound_Compressor = 'Play_weapon_core_ar_scar_silence_fire_3p_br' weaponSoundConfigItem.FirstBulletSound = 'Play_weapon_core_ar_scar_fire_3p_br' weaponSoundConfigItem.FirstBulletSoundSilencer = 'Play_weapon_core_ar_scar_silence_fire_3p_br' weaponSoundConfigItem.FireStopSound = 'Play_weapon_core_ar_scar_firestop_3p_br' else weaponSoundConfigItem.RaiseSound = 'Play_weapon_core_ar_scar_raise_3p' weaponSoundConfigItem.ClipOutAsset = 'Play_weapon_core_ar_scar_clipout_3p' weaponSoundConfigItem.ClipInAsset = 'Play_weapon_core_ar_scar_clipin_3p' weaponSoundConfigItem.WeaponBank1 = '205.bnk' weaponSoundConfigItem.PlantOKSound = 'Play_weapon_core_ar_scar_down_3p' weaponSoundConfigItem.FireSound_Compressor = 'Play_weapon_core_ar_scar_silence_fire_3p' weaponSoundConfigItem.FirstBulletSound = 'Play_weapon_core_ar_scar_fire_3p' weaponSoundConfigItem.FirstBulletSoundSilencer = 'Play_weapon_core_ar_scar_silence_fire_3p' weaponSoundConfigItem.FireStopSound = 'Play_weapon_core_ar_scar_firestop_3p' end return weaponSoundConfigItem else return CS.GameEngine.WeaponSoundConfigManager.SearchConfig(Key) end end return nil end) -- WWL5.0\#39 -- date: 20200429 -- reason: 【ID77997877】【WWL5.0v】 -- target version: WWL 5.0 --710000468 背部未显示 monsterfang require 'xlua.util'.hotfix_ex(CS.GameEngine.AvatarLoadOP, 'Despawn', function( inAvatar,inObj) CS.UnityEngine.GameObject.Destroy(inObj) end) require 'xlua.util'.hotfix_ex(CS.GameEngine.AvatarComposer, 'ChangeEquip', function( self,toMeshGO,show,inMaterialIDs) if CS.GameCommon.LuaUtility.IsNullInCSharp(self.m_Pawn) == false then CS.GameEngine.Log.GeneralError('[AvatarComposer] ChangeEquip. PlayerID:{0} name {1} ',self.m_Pawn.PlayerID,toMeshGO.name) end return self:ChangeEquip(toMeshGO,show,inMaterialIDs) end) require 'xlua.util'.hotfix_ex(CS.GameEngine.AvatarComposer, '_Unequip', function( self,refOPMesh,inType) if self:GetShow(1) == false then if self.mAvatarDefMesh[6].enable then self.mAvatarDefMesh[6]:SetShow(true, self.m_Pawn) end end if CS.GameCommon.LuaUtility.IsNullInCSharp(self.m_Pawn) == false then CS.GameEngine.Log.GeneralError('[AvatarComposer] _Unequip. PlayerID:{0} type {1} ',self.m_Pawn.PlayerID,inType) end return self:_Unequip(refOPMesh,inType) end) -- WWL5.0\#40 -------------------------------------------------------------------------------- -- smartzhu: fix AvatarView_Character GetWeaponCommerialAnimator -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.FrontEnd.AvatarView_Character,'GetWeaponCommerialAnimator',function(self,type) local weaponAnimator = self:GetWeaponCommerialAnimator(type) if self.WEASPON_ID == 10305042 then local parent = self.OrangeLMGWeaponRoleAnimator.gameObject if parent ~= nil then local RPDAnimatorTrans = parent.transform:Find('RPDAnimator') if RPDAnimatorTrans ~= nil then weaponAnimator = RPDAnimatorTrans:GetComponent(typeof(CS.UnityEngine.Animator)) else local obj = CS.GameEngine.AssetManager.Instance:InstantiateAsset(200029001) if obj ~= nil then obj.name = 'RPDAnimator' obj.transform.parent = self.OrangeLMGWeaponRoleAnimator.transform weaponAnimator = obj.transform:GetComponent(typeof(CS.UnityEngine.Animator)) end end end end return weaponAnimator end) -- WWL5.0\#41 --------------------------------------------------------------------------------- -- seanoopdeng -- fix: 调用CrossFade 需要带参数 time 避免初始化失败 --------------------------------------------------------------------------------- local function LuaOverride_SetAnimatorToInit( self ) if not CS.GameCommon.LuaUtility.IsNullInCSharp(self.m_Animator) then self:ResetAllTrigger() self.m_Animator:CrossFade("Alive", 0, self.BaseLayer,0) self.m_Animator:CrossFade("Idle", 0, self.UpperBodyOverrideLayer,0) self.m_Animator:CrossFade("Idle", 0, self.UpperBodyLayer,0) end end require 'xlua.util'.hotfix_ex(CS.GameEngine.PawnAnimationComponent, 'SetAnimatorToInit', LuaOverride_SetAnimatorToInit) -- WWL5.0\#42 -- date: 2020/04/13 -- reason: -- target version: 5.0 -------------------------------------------------------------------------------- --- Fix: luckydraw奖池增加"owned”标签逻辑 require 'xlua.util'.hotfix_ex(CS.LuckyDrawRewardsMgr, 'SetRewards', function(self, prop_list) self:SetRewards(prop_list) local squadDS = CS.GameEngine.DataStoreManager.Instance.SquadInventoryDataStore; local minCount = CS.System.Math.Min(self.views.Count,prop_list.Count) for i = 0, minCount-1, 1 do local item = prop_list[i] local view = self.views[i] if item.allow_lottery_flag == 0 then view.Get.gameObject:SetActive(true) view.GetLabel.text = CS.LanguageUtility.Translate("LOC_SHOP_LUCKYDRAW_RECEIVED") else view.Get.gameObject:SetActive(false) local itemList = squadDS:GetAllSameIdItem(item.prop_id) for k,v in pairs(itemList) do if v.TimeType == CS.msg.ITEMDURATIONTYPE.ENM_IDT_TIME_FOREVER then if view.GetLabel ~= nil then view.Get.gameObject:SetActive(true) view.GetLabel.text = CS.LanguageUtility.Translate("LOC_LUCKYBOARD_EXCHANGESHOP_ALREADYOWNED") end end end end end end) -- WWL5.0\#43 -------------------------------------------------------------------------------- -- vivinliu: modify the time to UTC .#43 -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.LiveOps.MatchJumpClient, 'IsValid', function(self,serverTime) local globalDS=CS.GameEngine.DataStoreManager.Instance.GlobalDataStore if globalDS == nil then return false; end local serverTime = globalDS:GetServerTime(); local curtime1 = CS.GameEngine.DateTimeUtil.ConvertTimeStampToUTCDateTime(serverTime); if curtime1 ~= nil then local curtimeint = curtime1.Year * 10000 + curtime1.Month * 100 + curtime1.Day; if curtimeint >= self.m_BeginDate and curtimeint <= self.m_EndDate then if self.m_seqId == 1 then CS.GameEngine.Log.GeneralWarning('[MatchJumpClient] IsValid. curtime: {0}-{1}-{2} {3}:{4}:{5}, m_seqId={6}, m_BeginDate = {7}, m_EndDate = {8}',curtime1.Year,curtime1.Month,curtime1.Day,curtime1.Hour,curtime1.Minute,curtime1.Second,self.m_seqId,self.m_BeginDate,self.m_EndDate); end return true; end end return false; end) require 'xlua.util'.hotfix_ex(CS.LiveOps.LiveOpsMatchJumpItemView_CA, '_RefreshRemainTime', function(self,endTime) local globalDS=CS.GameEngine.DataStoreManager.Instance.GlobalDataStore if globalDS == nil then return; end local dateTimestr = CS.System.String.Format('{0}-{1}-{2} 23:59:59',math.floor(endTime / 10000), math.floor((endTime % 10000) / 100), endTime % 100); local tempTime = CS.System.Convert.ToDateTime(dateTimestr); local timeUtc = CS.System.DateTime.SpecifyKind(tempTime, CS.System.DateTimeKind.Utc); local endTime_stamp = CS.GameEngine.DateTimeUtil.ConvertDateTimeToTimeStamp(timeUtc); local remainTime = endTime_stamp - globalDS:GetServerTime(); CS.GameEngine.Log.GeneralWarning('[LiveOpsMatchJumpItemView_CA] _RefreshRemainTime. endtime = {0}, remainTime = {1}, endtime = {2}-{3}-{4} {5}:{6}:{7}',dateTimestr, remainTime,tempTime.Year,tempTime.Month,tempTime.Day,tempTime.Hour,tempTime.Minute,tempTime.Second); if remainTime < 0 then CS.GameUI.UICommonTools.SafeSetActive(self.LabelRemainTimeBlack, false); CS.GameUI.UICommonTools.SafeSetActive(self.LabelRemainTimeRed, false); elseif remainTime <= 3600 then CS.GameUI.UICommonTools.SafeSetActive(self.LabelRemainTimeRed, true); CS.GameUI.UICommonTools.SafeSetActive(self.LabelRemainTimeBlack, false); CS.GameUI.UICommonTools.SafeSetLabel(self.LabelRemainTimeRed, CS.GameBase.ItemConfigHelper.GetTimeString(math.floor(remainTime), CS.GameBase.ETimeUnit.ESecond)); else CS.GameUI.UICommonTools.SafeSetActive(self.LabelRemainTimeRed, false); CS.GameUI.UICommonTools.SafeSetActive(self.LabelRemainTimeBlack, true); CS.GameUI.UICommonTools.SafeSetLabel(self.LabelRemainTimeBlack, CS.GameBase.ItemConfigHelper.GetTimeString(math.floor(remainTime), CS.GameBase.ETimeUnit.ESecond)); end end) -- WWL5.0\#44 -------------------------------------------------------------------------------- -- petejiang: turn on filter by default #44 -- select all playlists when player open selector for the first time after hotfix -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.GameUI.Room.RoomSpvpPlaylistSelectorWindowController, 'InitView', function(self, matchType) self:InitView(matchType) local roomDS = CS.GameEngine.DataStoreManager.Instance.RoomDataStore local spvpDS = CS.GameEngine.DataStoreManager.Instance.SpvpDataStore if roomDS == nil or spvpDS == nil then return end local playlistInfo = spvpDS:GetPlaylistInfoByPlaylistId(roomDS.PlaylistId) if playlistInfo ~= nil and playlistInfo.bIncludedInFilter == false then CS.GameEngine.Log.GeneralWarning("current playlist is not in filter. do nothing!") return end local playerPrefs = CS.PlayerPrefsManager.Instance if playerPrefs == nil then return end if spvpDS.IsMPMultipleChooseAllowed and matchType == CS.msg.EMatchServiceModule.kMatchMaking then local filterKey = "filter_switch_open" if not playerPrefs:HasCurrentPlayerKey(filterKey) then self:SetAllPlaylistSelect(true) playerPrefs:SetCurrentPlayerInt(filterKey, 0) end spvpDS.MPModeSelectType = 1 local selectNum = 0 local isSelectAll = false isSelectAll, selectNum = self:IsSelectAll(selectNum) self:OnBtnPlaylistClick() self:RefreshSelectAllBtnState() self:RefreshTimer() end end) -- WWL5.0\#45 -------------------------------------------------------------------------------- -- moonlin: fix AK Default Pool OOM #45 -- Expand AK DefaultPoolSize before first Instantiate AKInitializer -------------------------------------------------------------------------------- require 'xlua.util'.hotfix_ex(CS.Audio.Utils.AudioResourcesLoaderProxy, 'Load', function(strPath) if strPath == nil then return nil elseif string.find(strPath,'Audio/Configs/WwiseInitializer/WWiseInitializer_') ~= nil then local wwiseInitializerGO = CS.GameEngine.AssetManager.LoadAudioGameObject(strPath) if wwiseInitializerGO ~= nil then local akInitializer = wwiseInitializerGO:GetComponent("AkInitializer"); akInitializer.defaultPoolSize = 1024 * 15 akInitializer.lowMem_defaultPoolSize = 1024 * 10 end end return CS.GameEngine.AssetManager.LoadAudioGameObject(strPath) end)