From e3740011b7a392543a3ace7977a60e8c49a6cf0a Mon Sep 17 00:00:00 2001 From: vurtne14 Date: Wed, 15 Oct 2025 18:54:52 +0800 Subject: [PATCH] 1 --- .../Modules/GoodFriend/GoodFriendManager.lua | 180 +++++++++++------- .../~Lua/Modules/Hero/HeroManager.lua | 3 +- .../~Lua/Modules/Map/EndLessMapManager.lua | 1 + .../~Lua/Modules/Popup/RoleInfoPopup.lua | 76 +++++++- .../Popup/View/GeneralPopup_ResolveRecall.lua | 3 +- .../~Lua/Modules/RoleInfo/RoleGiftPanel.lua | 2 +- 6 files changed, 189 insertions(+), 76 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendManager.lua b/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendManager.lua index 95fb9cfa9..3255f996a 100644 --- a/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/GoodFriend/GoodFriendManager.lua @@ -47,6 +47,7 @@ function this.CreateFriendData() chenghao = nil, } end + function this.Initialize() --能够收取好友友情点的次数 this.MaxEnergyGet = 0 @@ -92,7 +93,6 @@ function this.OnFriendDataRefresh(type, msg) friendData.soulVal = msg.Friends.soulVal --friendData.isHaveApplication=1 this.friendAllData[friendData.id] = friendData - end if (type == 3) then local friendData = this.CreateFriendData() @@ -111,9 +111,6 @@ function this.OnFriendDataRefresh(type, msg) end end - - - --获取好友信息 function this.GetFriendInfoRequest(type, msg) this.goodFriendLimit = tonumber(specialConfig[11].Value) @@ -137,7 +134,6 @@ function this.GetFriendInfoRequest(type, msg) friendData.chenghao = msg.Friends[i].titleId --friendData.isHaveApplication=1 this.friendAllData[friendData.id] = friendData - end Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendList, this.friendAllData) elseif (type == 3) then @@ -234,6 +230,7 @@ function this.InviteFriendRequest(inviteUids, func) end end) end + --申请为好友操作 function this.FriendInviteOperationRequest(type, friendId) --type 1:同意 2:拒绝 3:全部同意 4: 全部拒绝 @@ -256,6 +253,7 @@ function this.FriendInviteOperationRequest(type, friendId) end end) end + --赠送好友精力 function this.FriendGivePresentRequest(type, friendId) --type 1:赠送一个人 2 赠送全部好友 @@ -273,6 +271,7 @@ function this.FriendGivePresentRequest(type, friendId) end end) end + --删除好友 function this.DelFriendRequest(friendId) NetManager.RequestDelFriend(friendId, function() @@ -283,6 +282,7 @@ function this.DelFriendRequest(friendId) Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendDelete, friendId) end) end + --领取一个人和所有人的精力值 function this.FriendTakeHeartRequest(type, friendId) NetManager.RequestFriendTakeHeart(type, friendId, function(msg) @@ -314,6 +314,7 @@ function this.FriendTakeHeartRequest(type, friendId) Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendList, this.friendAllData) end) end + --根据名字查找好友 function this.FriendSearchRequest(name) NetManager.RequestFriendSearch(name, function(msg) @@ -322,6 +323,7 @@ function this.FriendSearchRequest(name) Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, this.friendSearchData) end) end + --刷新好友在线状态 function this.RefreshFriendStateRequest() NetManager.RequestRefreshFriendState(function(msg) @@ -363,12 +365,12 @@ function this.FriendRewardRedPointShow() end return isShow end + --检测好友申请红点 function this.FriendApplicationRedPointShow() local isShow = false if (table.nums(this.friendApplicationData) > 0) then isShow = true - end return isShow end @@ -405,18 +407,17 @@ function this.RequestAddToBlackList(uid, func) Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendDelete, uid) end - NetManager.RequestGetFriendInfo(1)-- 刷新好友列表 - NetManager.RequestGetFriendInfo(2)-- 刷新推荐列表 - NetManager.RequestGetFriendInfo(3)-- 刷新申请列表 + NetManager.RequestGetFriendInfo(1) -- 刷新好友列表 + NetManager.RequestGetFriendInfo(2) -- 刷新推荐列表 + NetManager.RequestGetFriendInfo(3) -- 刷新申请列表 NetManager.RequestGetFriendInfo(4, function() if func then func() end - - end)-- 刷新黑名单 - + end) -- 刷新黑名单 end) end + -- 申请移除黑名单 function this.RequestDeleteFromBlackList(uid, func) if (table.nums(GoodFriendManager.blackFriendList) <= 0) then @@ -429,7 +430,7 @@ function this.RequestDeleteFromBlackList(uid, func) type = 2 end NetManager.RequestOptBlackList(type, uid, function() - NetManager.RequestGetFriendInfo(4)-- 刷新黑名单 + NetManager.RequestGetFriendInfo(4) -- 刷新黑名单 if func then func() end @@ -438,8 +439,8 @@ function this.RequestDeleteFromBlackList(uid, func) end --刷新本地数据 -function this.GetHeroDatas(_msgHeroData, force, specialEffects,guildSkill) - local heroData = {} +function this.GetHeroDatas(_msgHeroData, force, specialEffects, guildSkill) + local heroData = {} heroData.soulPrintList = {} heroData.heroBackData = _msgHeroData heroData.dynamicId = _msgHeroData.id @@ -452,18 +453,19 @@ function this.GetHeroDatas(_msgHeroData, force, specialEffects,guildSkill) --heroData.createTime=_msgHeroData.createTimelocal heroData.lockState = _msgHeroData.lockState heroData.createtype = _msgHeroData.createtype - heroData.changeId = _msgHeroData.changeId--置换id + heroData.changeId = _msgHeroData.changeId --置换id --> 战法 - + heroData.warWaySlot1Id = _msgHeroData.warWaySlot1 or 0 heroData.warWaySlot2Id = _msgHeroData.warWaySlot2 or 0 heroData.warWaySlot3Id = _msgHeroData.warWaySlot3 or 0 - heroData.planList = {} --< 作战方案 + heroData.planList = {} --< 作战方案 for i = 1, #_msgHeroData.combatPlans do - heroData.planList[i] = {planId = _msgHeroData.combatPlans[i].planId, position = _msgHeroData.combatPlans[i].position} --< 后端的第三个参数confPlanId不用 + heroData.planList[i] = { planId = _msgHeroData.combatPlans[i].planId, position = _msgHeroData.combatPlans[i] + .position } --< 后端的第三个参数confPlanId不用 end - heroData.medal=_msgHeroData.medal -- 勋章 - heroData.suitActive=_msgHeroData.suit -- 勋章套装激活 + heroData.medal = _msgHeroData.medal -- 勋章 + heroData.suitActive = _msgHeroData.suit -- 勋章套装激活 this.SetHeroTalentData(heroData, _msgHeroData) @@ -472,6 +474,7 @@ function this.GetHeroDatas(_msgHeroData, force, specialEffects,guildSkill) local actionPowerRormula = gameSetting[1].ActionPowerRormula heroData.actionPower = force heroData.equipIdList = _msgHeroData.equipIdList + heroData.giftIds = _msgHeroData.giftEquipIds heroData.talismanList = _msgHeroData.especialEquipLevel heroData.jewels = _msgHeroData.jewels if (#_msgHeroData.soulPos >= 1) then @@ -484,11 +487,11 @@ function this.GetHeroDatas(_msgHeroData, force, specialEffects,guildSkill) end heroData.skillIdList = {} - HeroManager.UpdateSkillIdList( heroData) - heroData.passiveSkillList = {}--被动技 + HeroManager.UpdateSkillIdList(heroData) + heroData.passiveSkillList = {} --被动技 HeroManager.UpdatePassiveHeroSkill(heroData) --if guildSkill then - + --end heroData.guildSkill = guildSkill heroData.hp = _configData.Hp @@ -502,12 +505,11 @@ function this.GetHeroDatas(_msgHeroData, force, specialEffects,guildSkill) end for i, v in pairs(specialEffects) do if v.propertyId and v.propertyValue then - if propertyConfig[v.propertyId] then if propertyConfig[v.propertyId].Style == 1 then heroData.allAddProVal[v.propertyId] = v.propertyValue elseif propertyConfig[v.propertyId].Style == 2 then - heroData.allAddProVal[v.propertyId] = v.propertyValue/100 + heroData.allAddProVal[v.propertyId] = v.propertyValue / 100 end else heroData.allAddProVal[v.propertyId] = v.propertyValue @@ -529,18 +531,19 @@ function this.GetHeroDatas(_msgHeroData, force, specialEffects,guildSkill) heroData.position = _configData.Position heroData.property = _configData.PropertyName - heroData.AdjustUnLock = _msgHeroData.AdjustUnLock --铸神等级字段 + heroData.AdjustUnLock = _msgHeroData.AdjustUnLock --铸神等级字段 heroData.partsData = {} - this.FreshGodEquipLevel(heroData.AdjustUnLock,heroData) + this.FreshGodEquipLevel(heroData.AdjustUnLock, heroData) return heroData end --初始化铸神数据 -function this.FreshGodEquipLevel(unlockData,heroData) +function this.FreshGodEquipLevel(unlockData, heroData) if unlockData and #unlockData > 0 then for i = 1, #unlockData do --> isUnLock -1未解锁,0已解锁,>0已升级 actualLv 实际应用等级 - heroData.partsData[unlockData[i].position] = {position = unlockData[i].position, isUnLock = unlockData[i].isUnLock, actualLv = 0} + heroData.partsData[unlockData[i].position] = { position = unlockData[i].position, isUnLock = unlockData[i] + .isUnLock, actualLv = 0 } end local partsData = heroData.partsData for i = 1, #partsData do @@ -552,7 +555,8 @@ function this.FreshGodEquipLevel(unlockData,heroData) if partsData[equipConfig.Position] then if partsData[equipConfig.Position].isUnLock > 0 then if equipConfig.IfAdjust == 1 then - partsData[equipConfig.Position].actualLv = math.min(partsData[equipConfig.Position].isUnLock, equipConfig.Adjustlimit) + partsData[equipConfig.Position].actualLv = math.min(partsData[equipConfig.Position].isUnLock, + equipConfig.Adjustlimit) end end end @@ -565,11 +569,45 @@ function this.InitEquipData(_msgEquipList, heroData) for i = 1, #_msgEquipList do this.InitUpdateEquipData(_msgEquipList[i], heroData) end + --this.InitGift(heroData) +end + +function this.InitGift(heroData) + if (heroData.giftIds) then + for i, v in pairs(heroData.giftIds) do + local equipdata = {} + equipdata.equipConfig = GiftManager.GetSingleHeroSingleEquipData(v) + if equipdata.equipConfig ~= nil then + equipdata.itemConfig = itemConfig[v] + equipdata.id = equipdata.equipConfig.Id + if itemConfig[equipdata.id] then + equipdata.icon = GetResourcePath(itemConfig[equipdata.id].ResourceID) + else + return + end + equipdata.frame = GetQuantityImageByquality(equipdata.equipConfig.Quality) --ItemQuality[equipdata.equipConfig.Quality].icon + equipdata.num = 1 + equipdata.position = equipdata.equipConfig.Position + local propList = {} + for index, prop in ipairs(equipdata.equipConfig.Property) do + propList[index] = {} + propList[index].propertyId = prop[1] + propList[index].propertyValue = prop[2] + propList[index].PropertyConfig = propertyConfig[prop[1]] + end + equipdata.mainAttribute = propList + equipdata.star = equipStarsConfig[equipdata.equipConfig.Star].Stars + --equipdata.backData = _equipData + this.equipDatas[v] = equipdata + end + --this.equipDatas[v] = GiftManager.GetSingleHeroSingleEquipData(v) + end + end end function this.InitUpdateEquipData(_equipData, heroData) local equipdata = {} - if(heroData.soulPrintList) then + if (heroData.soulPrintList) then for i, v in pairs(heroData.soulPrintList) do if (v.did == _equipData.id) then equipdata.icon = GetResourcePath(itemConfig[_equipData.equipId].ResourceID) @@ -579,7 +617,8 @@ function this.InitUpdateEquipData(_equipData, heroData) end end end - if(heroData.equipIdList) then + + if (heroData.equipIdList) then for i, v in pairs(heroData.equipIdList) do if (tonumber(v) == _equipData.equipId) then equipdata.equipConfig = equipConfig[_equipData.equipId] @@ -590,10 +629,9 @@ function this.InitUpdateEquipData(_equipData, heroData) if itemConfig[equipdata.id] then equipdata.icon = GetResourcePath(itemConfig[equipdata.id].ResourceID) else - return end - equipdata.frame = GetQuantityImageByquality(equipdata.equipConfig.Quality)--ItemQuality[equipdata.equipConfig.Quality].icon + equipdata.frame = GetQuantityImageByquality(equipdata.equipConfig.Quality) --ItemQuality[equipdata.equipConfig.Quality].icon equipdata.num = 1 equipdata.position = equipdata.equipConfig.Position local propList = {} @@ -611,7 +649,7 @@ function this.InitUpdateEquipData(_equipData, heroData) end end end - if(heroData.talismanList) then + if (heroData.talismanList) then --for i, v in pairs(heroData.talismanList) do -- if (v == _equipData.id) then -- equipdata.icon = GetResourcePath(itemConfig[_equipData.equipId].ResourceID) @@ -622,7 +660,7 @@ function this.InitUpdateEquipData(_equipData, heroData) --end end --宝器 - if(heroData.jewels) then + if (heroData.jewels) then for i = 1, #heroData.jewels do if heroData.jewels[i] and heroData.jewels[i] == _equipData.id then this.InitSingleTreasureData(_equipData) @@ -636,56 +674,56 @@ local jewelConfig = ConfigManager.GetConfig(ConfigName.JewelConfig) local allTreasures = {} --初始化单个宝物的数据 function this.InitSingleTreasureData(_singleData) - if _singleData==nil then + if _singleData == nil then return end - local single={} - local staticId=_singleData.equipId - local currJewel=jewelConfig[staticId] - single.id=staticId - single.idDyn=_singleData.id - single.lv=_singleData.exp - single.refineLv=_singleData.rebuildLevel - single.maxLv=currJewel.Max[1] - single.maxRefineLv=currJewel.Max[2] - single.upHeroDid="" - local quantity=currJewel.Level - single.quantity=quantity - single.frame=GetQuantityImageByquality(quantity) - single.name=itemConfig[staticId].Name - single.itemConfig=itemConfig[staticId] - single.levelPool=currJewel.LevelupPool - single.proIcon=GetProStrImageByProNum(currJewel.Race) - single.refinePool=currJewel.RankupPool - single.equipType=currJewel.Location - if currJewel.Location==1 then - single.type=GetLanguageStrById(10505) + local single = {} + local staticId = _singleData.equipId + local currJewel = jewelConfig[staticId] + single.id = staticId + single.idDyn = _singleData.id + single.lv = _singleData.exp + single.refineLv = _singleData.rebuildLevel + single.maxLv = currJewel.Max[1] + single.maxRefineLv = currJewel.Max[2] + single.upHeroDid = "" + local quantity = currJewel.Level + single.quantity = quantity + single.frame = GetQuantityImageByquality(quantity) + single.name = itemConfig[staticId].Name + single.itemConfig = itemConfig[staticId] + single.levelPool = currJewel.LevelupPool + single.proIcon = GetProStrImageByProNum(currJewel.Race) + single.refinePool = currJewel.RankupPool + single.equipType = currJewel.Location + if currJewel.Location == 1 then + single.type = GetLanguageStrById(10505) else - single.type=GetLanguageStrById(10506) + single.type = GetLanguageStrById(10506) end - single.icon=GetResourcePath(itemConfig[staticId].ResourceID) - single.strongConfig=this.GetCurrTreasureLvConfig(1,currJewel.LevelupPool,_singleData.exp) - single.refineConfig=this.GetCurrTreasureLvConfig(2,currJewel.RankupPool,_singleData.rebuildLevel) - - allTreasures[_singleData.id]=single + single.icon = GetResourcePath(itemConfig[staticId].ResourceID) + single.strongConfig = this.GetCurrTreasureLvConfig(1, currJewel.LevelupPool, _singleData.exp) + single.refineConfig = this.GetCurrTreasureLvConfig(2, currJewel.RankupPool, _singleData.rebuildLevel) + + allTreasures[_singleData.id] = single end local jewerLevelUpConfig = ConfigManager.GetConfig(ConfigName.JewelRankupConfig) --获取当前宝物升级数据 -function this.GetCurrTreasureLvConfig(_type,_id,_lv) +function this.GetCurrTreasureLvConfig(_type, _id, _lv) for _, configInfo in ConfigPairs(jewerLevelUpConfig) do - if configInfo.Type==_type and configInfo.PoolID==_id and configInfo.Level==_lv then + if configInfo.Type == _type and configInfo.PoolID == _id and configInfo.Level == _lv then return configInfo end end end + --根据动态id获取宝物 function this.GetSingleTreasureByIdDyn(_idDyn) - if allTreasures==nil then + if allTreasures == nil then return end return allTreasures[_idDyn] - end --获取单个装备数据 @@ -702,10 +740,8 @@ function this.GetSoulPrintQuality(equipId, exp) for m, n in ConfigPairs(equipSign) do if (n.Id == SoulPrintManager.GetSoulPrintId(equipId, SoulPrintManager.soulPrintLevel[equipId])) then return n.Quality - end end - end this.modelData = {} --< 其他玩家模块数据 1方案 @@ -754,4 +790,4 @@ function this.SetHeroTalentData(heroData, msg) end end -return this \ No newline at end of file +return this diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index d67549f9b..bcfaff82d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -277,7 +277,8 @@ function this.TrainUpdateHeroDatas(_msgHeroData, _isFindHandBook, _isExtern) heroData.suitActive = _msgHeroData.suit -- 勋章套装激活 heroData.totemId = _msgHeroData.totemId -- 图腾 heroData.CombatPlanList =_msgHeroData.plan --戒指 - + GiftManager.InitHeroGift(_msgHeroData.id, _msgHeroData.giftEquipIds) + heroData.giftIds = _msgHeroData.giftEquipIds if #_msgHeroData.soulPos >= 1 then local soulPrintList = {} for i, v in ipairs(_msgHeroData.soulPos) do diff --git a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua index 1656c5749..791dd6b40 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua @@ -296,6 +296,7 @@ function this.InitSingleEndlessHero(_msgHeroData) heroData.heroConfig = heroConfig[_msgHeroData.heroId] heroData.maxStar = heroData.heroConfig.MaxRank heroData.equipIdList = _msgHeroData.equipIdList + heroData.giftIds = _msgHeroData.giftEquipIds for i = 1 , #heroData.equipIdList do EquipManager.SetEquipUpHeroDid(heroData.equipIdList[i],heroData.dynamicId) end diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua index 73ebed06e..ef65e9faf 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua @@ -89,6 +89,12 @@ function RoleInfoPopup:InitComponent() this.babyTitle=Util.GetGameObject(this.equipInfo,"BG/BabyTitle") this.equipContent=Util.GetGameObject(this.equipInfo, "Content") + --礼物 + this.giftInfo = Util.GetGameObject(self.transform, "Panel/Scroll View/Viewport/Content/GiftInfo") + this.giftTitle=Util.GetGameObject(this.giftInfo,"BG/EquipTitle") + --this.babyTitle=Util.GetGameObject(this.giftInfo,"BG/BabyTitle") + this.giftContent=Util.GetGameObject(this.giftInfo, "Content") + --> 方案 this.CombatPlanInfoGo = Util.GetGameObject(self.transform, "Panel/Scroll View/Viewport/Content/CombatPlanInfo") @@ -244,6 +250,7 @@ function RoleInfoPopup:OnShow() this.SkillInfo() this.WarWayInfo() this.EquipInfo() + --this.GiftInfo() -- this.SoulPrintInfo() this.CombatPlanInfo() this.MedalInfo() @@ -552,7 +559,74 @@ function this.EquipInfo() end) end end - +--礼物 +function this.GiftInfo() + local curHeroEquipDatas = {} + for i = 1, #curHeroData.giftIds do + local equipData = {} + if (this.isOther) then + equipData = GoodFriendManager.GetSingleEquipData(curHeroData.giftIds[i]) + --LogError("ddddddddddddddddd") + else + equipData = GiftManager.GetSingleHeroSingleEquipData(curHeroData.giftIds[i]) + --LogError("vvvvvvvvvvvvvv") + end + if equipData ~= nil then + curHeroEquipDatas[equipData.equipConfig.Position] = equipData + end + end + for i = 1, this.giftContent.transform.childCount do + local go = this.giftContent.transform:GetChild(i - 1).gameObject + local curEquipData + Util.GetGameObject(go.transform,"frame"):GetComponent("Image").sprite=Util.LoadSprite(GetQuantityImageByquality(1)) + -----------------装备铸神 + Util.GetGameObject(go, "AddLv"):SetActive(false) + Util.GetGameObject(go, "AddLv"):GetComponent("Image").sprite = nil + -----------------装备铸神 end + if curHeroEquipDatas[i] then + Util.GetGameObject(go.transform, "mask"):SetActive(false) + Util.GetGameObject(go.transform, "icon"):SetActive(true) + Util.GetGameObject(go.transform, "frame"):GetComponent("Image").sprite = Util.LoadSprite(curHeroEquipDatas[i].frame) + Util.GetGameObject(go.transform, "icon"):GetComponent("Image").sprite = Util.LoadSprite(curHeroEquipDatas[i].icon) + -----------------装备铸神 + local nowAddLevel=this.ShowAddLevel(i) + if nowAddLevel > 0 then + Util.GetGameObject(go, "AddLv"):SetActive(true) + Util.GetGameObject(go, "AddLv"):GetComponent("Image").sprite = Util.LoadSprite(SpriteName..nowAddLevel) + else + Util.GetGameObject(go, "AddLv"):SetActive(false) + Util.GetGameObject(go, "AddLv"):GetComponent("Image").sprite = nil + end + -----------------装备铸神 end + if curHeroEquipDatas[i].itemConfig.ItemBaseType == ItemBaseType.Equip then + Util.GetGameObject(go.transform, "star"):SetActive(true) + SetHeroStars(Util.GetGameObject(go.transform, "star"),curHeroEquipDatas[i].star) + else + Util.GetGameObject(go.transform, "star"):SetActive(false) + end + curEquipData = curHeroEquipDatas[i] + else + Util.GetGameObject(go.transform, "mask"):SetActive(true) + Util.GetGameObject(go.transform, "star"):SetActive(false) + Util.GetGameObject(go.transform, "icon"):SetActive(false) + end + local frameBtn = Util.GetGameObject(go.transform, "frame") + Util.AddOnceClick(frameBtn, function() + if curEquipData then + if Game.GlobalEvent:HasEvent(GameEvent.UI.OnClose, triggerCallBack) then + Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, triggerCallBack) + end + local panel = UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup, curEquipData,function() end,false,false) + triggerCallBack = function(panelType, p) + if panelType == UIName.RewardEquipSingleShowPopup and panel == p then + Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, triggerCallBack) + end + end + Game.GlobalEvent:AddEvent(GameEvent.UI.OnClose, triggerCallBack) + end + end) + end +end function this.TalentInfo() for i = 1, 5 do local frame = Util.GetGameObject(this.TalentInfoGo, "Content/item" .. tostring(i) .. "/frame") diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_ResolveRecall.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_ResolveRecall.lua index b24c3b934..eaded6b48 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_ResolveRecall.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_ResolveRecall.lua @@ -64,7 +64,8 @@ function this:BindEvent() hero.equipIdList = {} HeroManager.SetHeroEquipIdList(hero.dynamicId, {}) hero.equipIdList = {} - + GiftManager.InitHeroGift(hero.dynamicId, {}) + hero.giftIds = {} --卸载戒指 for i = 1, 2 do local planList=hero.planList[1] diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGiftPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGiftPanel.lua index 4e4671057..601df2a09 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGiftPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGiftPanel.lua @@ -101,7 +101,7 @@ this.ScrollBar = Util.GetGameObject(self.gameObject, "listObj/bg/Scrollbar"):Get this.btn_help = Util.GetGameObject(self.gameObject, "btn_help") this.listObj = Util.GetGameObject(self.transform, "listObj") this.listCloseBtn = Util.GetGameObject(self.transform, "listObj/bg/btn_close") - Util.GetGameObject(self.transform, "listObj/bg/title (1)"):GetComponent("Text").text = "神将礼物" + Util.GetGameObject(self.transform, "listObj/bg/title (1)"):GetComponent("Text").text = "英雄礼物" this.proTitle = Util.GetGameObject(self.transform, "proTitle/name/text"):GetComponent("Text") this.proTitle.text = "当前礼物加成" this.proGrid = Util.GetGameObject(self.transform, "pro")