Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
ZhangBiao 2021-11-02 16:59:15 +08:00
commit 2fd25aced5
6 changed files with 48 additions and 11 deletions

View File

@ -212,6 +212,8 @@ local ManagerNames = {
"GeneralPanel/GeneralTreasureMangaer",
--御剑行管理器
"YuJianXing/YuJianXingManager",
--坐骑管理
"Setting/PlayerSetTitleRideSkinManager",
--!!!!红点管理(尽量放在最后)!!!!--
"Player/RedpotManager",
}

View File

@ -871,7 +871,10 @@ function this.ShowWarPowerChange(powernum,type)
elseif type== PowerChangeJumpType.title then
str=Language[12291]
end
MsgPanel.ShowTwo(str,nil,function()
MsgPanel.ShowTwo(str,function()
-- 所有坐骑设置为旧的
PlayerSetTitleRideSkinManager.SetAllOldRide()
end,function()
UIManager.OpenPanel(UIName.SettingPanel,type)
end)
end, 1):Start()

View File

@ -112,7 +112,7 @@ function this:OnSortingOrderChange(_sortingOrder)
Util.AddParticleSortLayer(v, _sortingOrder - sortingOrder )
end
end
function this.OnClickTabBtn(_curIndex)
function this.OnClickTabBtn(_curIndex, isNotTop,isNotAni)
curIndex = _curIndex
bagPosEquips = EquipManager.GetEquipCompoundDataByEquipPosition1(curIndex)
local equipDatas = EquipManager.GetAllSEquipsByPosition(curIndex)
@ -123,7 +123,7 @@ function this.OnClickTabBtn(_curIndex)
this.ScrollView:SetData(equipDatas, function (index, go)
this.SingleItemDataShow(go, equipDatas[index],equipStarsConfig[equipDatas[index].Star])
end)
end, isNotTop, isNotAni)
this.ShowTitleData(equipStarsConfig[curSelectEquip.Star])
end
@ -306,7 +306,7 @@ function this.Compound()
SoundManager.PlaySound(SoundConfig.UI_Duanzao)
-- SoundManager.PlaySound(SoundConfig.UI_Baoqi)
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
this.OnClickTabBtn(curIndex)
this.OnClickTabBtn(curIndex, true, true)
end)
end)
end
@ -398,7 +398,7 @@ function this.AutoCompound(_position)
NetManager.ComplexEquipRequest(curIndex,0,0,function(msg)
SoundManager.PlaySound(SoundConfig.UI_Duanzao)
SoundManager.PlaySound(SoundConfig.UI_Baoqi)
this.OnClickTabBtn(curIndex)
this.OnClickTabBtn(curIndex, true, true)
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
end)
end)

View File

@ -208,6 +208,8 @@ function RewardItemSingleShowPopup:BindEvent()
self:ClosePanel()
PopupTipPanel.ShowTip(Language[12255])
this.WarPowerChange(oldPowerNum,PowerChangeJumpType.ride)
-- 设置新坐骑
PlayerSetTitleRideSkinManager.SetNewRide(itemConfigData.Id)
end)
end)
else
@ -216,6 +218,8 @@ function RewardItemSingleShowPopup:BindEvent()
self:ClosePanel()
PopupTipPanel.ShowTip(Language[12255])
this.WarPowerChange(oldPowerNum,PowerChangeJumpType.ride)
-- 设置新坐骑
PlayerSetTitleRideSkinManager.SetNewRide(itemConfigData.Id)
end)
end
elseif itemConfigData.ItemType == ItemType.Title then

View File

@ -2,7 +2,34 @@ PlayerSetTitleRideSkinManager = {};
local this = PlayerSetTitleRideSkinManager
function this.Initialize()
this.NewRide = {}
end
-- 设置刚刚获取到的坐骑是新的,
function this.SetNewRide(rideId)
this.NewRide[rideId] = 1
end
-- 查看后设置为旧的
function this.SetOldRide(rideId)
this.NewRide[rideId] = 0
end
-- 查看后设置为旧的
function this.SetAllOldRide()
for rideId, isNew in pairs(this.NewRide) do
this.NewRide[rideId] = 0
end
end
-- 获取一个新坐骑
function this.GetNewRide()
local newRideId = nil
for rideId, isNew in pairs(this.NewRide) do
if isNew == 1 then
if not newRideId or newRideId > rideId then
newRideId = rideId
end
end
end
return newRideId
end
return this

View File

@ -102,23 +102,24 @@ end
--显示信息
function this.ShowPanelData()
local rideList = ConfigManager.GetAllConfigsDataByKey(ConfigName.PlayerHeadIcon,"Type",PlayerHeadIconType.Ride)
-- 排序
-- 排序,已解锁的放前面
table.sort(rideList, function(a, b)
Log(a.Id.."|"..b.Id)
if PlayerManager.userMountList[a.Id] and not PlayerManager.userMountList[b.Id] then
Log("true")
return true
elseif not PlayerManager.userMountList[a.Id] and PlayerManager.userMountList[b.Id] then
Log("false")
return false
else
Log("ID:"..tostring(a.Id < b.Id))
return a.Id < b.Id
end
end)
--设置选中
local newRideId = PlayerSetTitleRideSkinManager.GetNewRide()
local curUserRideId = PlayerManager.GetPlayerRide()
if curUserRideId > 0 then
if newRideId and newRideId > 0 then
curUserRideConFig = ConfigManager.GetConfigData(ConfigName.PlayerHeadIcon,newRideId)
-- 所有坐骑设置为旧的
PlayerSetTitleRideSkinManager.SetAllOldRide()
elseif curUserRideId and curUserRideId > 0 then
curUserRideConFig = ConfigManager.GetConfigData(ConfigName.PlayerHeadIcon,curUserRideId)
else
curUserRideConFig = rideList[1]