xiyou_sanguo
zhangjiannan 2025-11-20 18:22:43 +08:00
parent cbb3ceddde
commit 093048b416
3 changed files with 28 additions and 3 deletions

View File

@ -142,7 +142,7 @@ function this:SetUpHero()
if RecruitManager.WishJulingData[i].status == 1 then
PopupTipPanel.ShowTip(Language[11082])
elseif RecruitManager.WishJulingData[i].status == 0 then
RecruitManager.ChangeEquip(2, heroId, function()
RecruitManager.ChangeJuling(2, heroId, function()
this:Refresh(false, false)
end) --英雄变更1增加、2卸下
end

View File

@ -17,7 +17,7 @@ function HelpFightPanel:InitComponent()
self.ScrollBar = Util.GetGameObject(self.gameObject, "Scrollbar"):GetComponent("Scrollbar")
local v2 = self.scrollRect:GetComponent("RectTransform").rect
self.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.scrollRect.transform, self.prefab,
self.ScrollBar, Vector2.New(v2.width, v2.height), 1, 2, Vector2.New(300, 20))
self.ScrollBar, Vector2.New(v2.width, v2.height), 1, 4, Vector2.New(70, 20))
self.ScrollView.moveTween.MomentumAmount = 1
self.ScrollView.moveTween.Strength = 1
end

View File

@ -792,7 +792,32 @@ function this.ChangeEquip(type, _heroTid, func)
end
end)
end
--添加和卸下法宝巨灵
function this.ChangeJuling(type, _heroTid, func)
if type == 1 then --增加神将
for i = 1, #this.WishEquipData do
if this.WishJulingData[i].heroTid == 0 then
this.WishJulingData[i].heroTid = _heroTid
break
end
end
elseif type == 2 then --卸下神将
for i = 1, #this.WishJulingData do
if this.WishJulingData[i].heroTid == _heroTid then
this.WishJulingData[i].heroTid = 0
_heroTid = 0
break
end
end
end
--LogError("RecruitManager.curWishType=="..RecruitManager.curWishType.." _heroid==".._heroTid)
NetManager.DesireDrawCardRequest(RecruitManager.curWishType, _heroTid, function()
Game.GlobalEvent:DispatchEvent(GameEvent.Recruit.OnRecruitRefreshData)
if func then
func()
end
end)
end
--检查该跳转的页签
function this.CheckIndex()
local num = 0