Merge branch 'master_devlop_ys' of http://60.1.1.230/gaoxin/JL_Client into master_devlop_ys

# Conflicts:
#	Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoMapPanel.lua
yuanshuai 2020-10-17 14:32:31 +08:00
commit a7abe7aee5
6 changed files with 42 additions and 15 deletions

View File

@ -727,7 +727,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 9
m_Left: 33
m_Right: 0
m_Top: 0
m_Bottom: 0
@ -2436,7 +2436,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 1.61, y: -380.1}
m_AnchoredPosition: {x: -14, y: -380.1}
m_SizeDelta: {x: 919.2, y: 188}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4199615056215748742

View File

@ -1994,7 +1994,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -7.6324615, y: 79}
m_AnchoredPosition: {x: -7.6324615, y: 93.9}
m_SizeDelta: {x: 0, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &6134426996411187629

View File

@ -181,8 +181,8 @@ function XiaoYaoLuckyBossPopup:SetSelectHero(monsterData)
costId = cost[#cost][1]
costNum = cost[#cost][2]
else
costId = cost[monsterData.attackNum][1]
costNum = cost[monsterData.attackNum][2]
costId = cost[monsterData.attackNum+1][1]
costNum = cost[monsterData.attackNum+1][2]
end
LogGreen("costId:"..costId.." costNum:"..costNum)
Util.GetGameObject(this.e_fightBtn,"Text").gameObject:SetActive(false)

View File

@ -57,6 +57,11 @@ function this.StartXiaoYao()
this.InitLuckyTurnTables(msg)
elseif msg.pathType == 4 then
this.InitHeroData(msg.goodsInfo,2)
elseif msg.pathType == 0 then
LogRed("#msg.Drop:"..#msg.drop.itemlist)
LogRed("#msg.Drop1:"..#msg.drop.equipId )
LogRed("#msg.Drop2:"..#msg.drop.Hero )
LogRed("#msg.Drop3:"..#msg.drop.soulEquip )
end
Game.GlobalEvent:DispatchEvent(GameEvent.XiaoYao.StartXiaoYao, msg)
end)
@ -70,18 +75,22 @@ function this.InitLuckyTurnTables(msg)
for i = 1, #msg.randomItem do
table.insert(this.luckyTurnTableRewards,msg.randomItem[i])
end
this.luckyluckyTurnTableTimes = msg.randomNum
this.luckyluckyTurnTableRemainTime = msg.randomTime
elseif msg.random and #msg.random > 0 then
for i = 1, #msg.random do
table.insert(this.luckyTurnTableRewards,msg.random[i])
end
this.luckyluckyTurnTableTimes = this.luckyluckyTurnTableTimes + 1
this.luckyluckyTurnTableRemainTime = msg.overTime
elseif msg.nextRandom and #msg.nextRandom > 0 then
for i = 1, #msg.nextRandom do
table.insert(this.luckyTurnTableRewards,msg.nextRandom[i])
end
end
if msg.randomTime then
this.luckyluckyTurnTableTimes = msg.randomNum
this.luckyluckyTurnTableRemainTime = msg.randomTime
elseif msg.overTime then
this.luckyluckyTurnTableTimes = this.luckyluckyTurnTableTimes + 1
this.luckyluckyTurnTableRemainTime = msg.overTime
else
this.luckyluckyTurnTableTimes = this.luckyluckyTurnTableTimes - 1
end
end
@ -142,10 +151,20 @@ function this.InitHeroData(goodsInfo,type)
LogGreen("得到的招募数量:"..#this.HeroData)
return this.HeroData
end
--刷新
function this.UpdateHeroData(id)
for i,v in ipairs(this.HeroData) do
if v.goodsIndex == id then
table.remove(this.HeroData,i)
end
end
end
--获取招募时间
function this.GetHeroDataTime()
if not this.HeroData or #this.HeroData < 1 then
return nil
return 0
end
for i,v in ipairs(this.HeroData) do
if v.remainTime - PlayerManager.serverTime < 1 then
@ -159,7 +178,7 @@ function this.InitHeroData(goodsInfo,type)
table.sort(this.HeroData,function(a,b)
return a.goodsIndex > b.goodsIndex
end)
return (this.HeroData[#this.HeroData].remainTime - PlayerManager.serverTime)
return (this.HeroData[#this.HeroData].remainTime)
end
-- type 1初始化 2添加 boss
@ -249,7 +268,7 @@ end
--boss 剩余时间
function this.GetMonsterDataReMainTimesAndTime()
if not this.MonsterData or #this.MonsterData < 1 then
return nil
return 0
end
local removeData = {}
for i,v in ipairs(this.MonsterData) do
@ -258,7 +277,10 @@ function this.GetMonsterDataReMainTimesAndTime()
end
end
this.SortMonster(this.MonsterData)
return (this.MonsterData[#this.MonsterData].remainTime - PlayerManager.serverTime)
for i,v in ipairs(this.MonsterData) do
LogGreen(v.monsterId.." v.remainTime:"..v.remainTime)
end
return (this.MonsterData[1].remainTime)
end
--开始战斗

View File

@ -183,7 +183,7 @@ function this.EventTrigger(_data)
Log("触发事件类型为:".._data.pathType)
Log("触发事件时间为:".._data.overTime)
if _data.pathType==0 then --普通节点
UIManager.OpenPanel(UIName.XiaoYaoEventPanel,0,_data.drop)
LogGreen("普通奖励:"..#_data.drop)
elseif _data.pathType==1 then --宝箱
Log("获得一个宝箱!")
elseif _data.pathType==2 then --双倍节点

View File

@ -84,6 +84,11 @@ function XiaoyaoHeroGetPopup:BindEvent()
PopupTipPanel.ShowTip(itemConfig[costId].Name.."不足")
else
NetManager.XiaoyaoyouGetHeroRequest(curHeroData.goodsIndex,function(msg)
if this.testLiveGO then
poolManager:UnLoadLive(this.testLiveGO.name, this.testLiveGO)
this.testLiveGO = nil
end
XiaoYaoManager.UpdateHeroData(curHeroData.goodsIndex)
XiaoYaoManager.GetHeroIndex = 0
this:OnShow()
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop)
@ -228,7 +233,7 @@ function this.ShowHeroBuyInfo(_heroSConfigData)
if BagManager.GetItemCountById(costId) < costNum then
this.costNum.text = "<color=#FF0000>" .. costNum .. "</color>"
else
this.costNum.text = "<color=#1B262E>" .. costNum .. "</color>"
this.costNum.text = "<color=#C8AD83>" .. costNum .. "</color>"
end
end