玉虚论道提交

dev_chengFeng
wangzhenxing 2021-09-07 18:27:23 +08:00
parent 5f0bfe53bd
commit c531b3776b
7 changed files with 65 additions and 14 deletions

View File

@ -18162,7 +18162,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
@ -21916,7 +21916,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8588236, g: 0.69803923, b: 0.41960788, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []

View File

@ -95,7 +95,6 @@ end
function this.RefreshFormation(index, roleList, pokemonList,isDiffmonster)
local curFormation = this.formationList[index]
if not curFormation or #this.formationList == 0 then
LogError("==============nil")
return
end
local newTeamheroInfos = {}

View File

@ -690,6 +690,7 @@ end
--设置每条英雄数据
function this.SingleHeroDataShow(_go, _heroData)
local go=_go
local yxID=0
local heroData=_heroData
local frame=Util.GetGameObject(go,"frame"):GetComponent("Image")
local icon=Util.GetGameObject(go, "icon"):GetComponent("Image")
@ -750,16 +751,18 @@ function this.SingleHeroDataShow(_go, _heroData)
choosedObj:SetActive(true)
end
end
if yxAllHeros and yxAllHeros[heroData.dynamicId] and yxAllHeros[heroData.dynamicId].index+2000~=this.curFormationIndex then
local index
if yxAllHeros and yxAllHeros[heroData.dynamicId] and yxAllHeros[heroData.dynamicId].index~=this.curFormationIndex then
yxInfo:SetActive(true)
local index=yxAllHeros[heroData.dynamicId].index
if index==1 then
index=yxAllHeros[heroData.dynamicId].index
if index==2001 then
yxTeamName.text="第一队"
elseif index==2 then
elseif index==2002 then
yxTeamName.text="第二队"
elseif index==3 then
elseif index==2003 then
yxTeamName.text="第三队"
end
yxID=index
else
yxInfo:SetActive(false)
end
@ -774,6 +777,7 @@ function this.SingleHeroDataShow(_go, _heroData)
PopupTipPanel.ShowTip("激活神将图鉴后才可使用!")
return
end
for k, v in ipairs(this.choosedList) do
if v.heroId == heroData.dynamicId then
choosedObj:SetActive(false)
@ -785,7 +789,7 @@ function this.SingleHeroDataShow(_go, _heroData)
return
end
end
-- 当前可选的最大上阵人数
local maxNum = ActTimeCtrlManager.MaxArmyNum()
if this.curFormationIndex == FormationTypeDef.FIGHT_ASSISTANTLEVEL then--山河社稷图判断上阵数量
@ -804,6 +808,8 @@ function this.SingleHeroDataShow(_go, _heroData)
return
end
end
-- 判断是否有血量
-- if heroHp and heroHp <= 0 then PopupTipPanel.ShowTip("猎妖师重伤,不可上阵!") return end
choosedObj:SetActive(true)
@ -813,6 +819,15 @@ function this.SingleHeroDataShow(_go, _heroData)
if this.GetPos()==0 then
PopupTipPanel.ShowTip(Language[10689])
return
end
--如果在玉虚三个队里面的另外一个队
if yxID~=0 and yxID~=this.curFormationIndex then
MsgPanel.ShowTwo("该神将正处于其他队伍,是否要编入当前队伍内",nil, function()
--改变英雄队伍id改变
this.opView.ChangeHeroTeam(heroData.dynamicId,this.curFormationIndex,this.GetPos())
yxID=this.curFormationIndex
yxInfo:SetActive(false)
end)
end
table.insert(this.choosedList, {heroId = heroData.dynamicId, position=this.GetPos()})
this.SetCardsData(this.choosedList)

View File

@ -103,7 +103,7 @@ function this.Init(root,...)
for j = 1, #team.teamHeroInfos do
local teamInfo = team.teamHeroInfos[j]
--table.insert(allHeros,{Id=teamInfo.heroId,pos=teamInfo.position,index=i-2000})
allHeros[teamInfo.heroId]={Id=teamInfo.heroId,pos=teamInfo.position,index=i-2000}
allHeros[teamInfo.heroId]={Id=teamInfo.heroId,pos=teamInfo.position,index=i}
end
--缓存本地所有玉虚论道队伍的数据
-- table.insert(currAllTeams,team)
@ -114,6 +114,27 @@ end
function this.GetFormationIndex()
return 2000 + this.curIndex
end
function this.ChangeHeroTeam(id,_index,_pos)
local hero=nil
--旧队伍里移除
for key, value in pairs(currAllTeams) do
for i = 1, #value.teamHeroInfos do
if value.teamHeroInfos[i].heroId==id then
hero=value.teamHeroInfos[i]
table.remove(value.teamHeroInfos[i])
break
end
end
end
hero.position=_pos
table.insert(currAllTeams,hero)
allHeros[id].pos=_pos
allHeros[id].index=_index
end
function this.GetTeamInfoByIndex(index)
if currAllTeams[index] then
return currAllTeams[index]

View File

@ -451,6 +451,14 @@ function this.GetActLeftTime(typeId)
return leftTime
end
-- 获取某模块剩余开放时间 -1 表示未开放/已关闭
function this.GetActEndTime(typeId)
-- 检测数据正确性
local serData = this.GetSerDataByTypeId(typeId)
if not typeId or not serData then return -1 end
return serData.endTime
end
function this.GetActOpenTime(id)
local serData = this.GetSerDataByTypeId(id)

View File

@ -315,8 +315,8 @@ function this:RefreshEnemyData(team)
local btnItem = Util.GetGameObject(node, "challenge/item"):GetComponent("Image")
local btnItemNum = Util.GetGameObject(node, "challenge/item/num"):GetComponent("Text")
local rankImg= Util.GetGameObject(node, "rankImg"):GetComponent("Image")
local rankId=1
rankImg.sprite=this.spLoader:LoadSprite("y_yuxulundao_xiaobiao_0"..MServerRankConfig[rankId].RankGrade+1)
local rankId=WorldArenaManager.GetRankImgByScore(EnemyList[i].score)
rankImg.sprite=this.spLoader:LoadSprite("y_yuxulundao_xiaobiao_0"..rankId)
local name=EnemyList[i].servername.." "..EnemyList[i].name
lv_name.text = PracticeManager.SetNameColor(JingJiShouWeiToEn(name),EnemyList[i].practiceLevel)
integral:GetComponent("Text").text = Language[11693].. EnemyList[i].score

View File

@ -1,7 +1,7 @@
WorldArenaManager = {};
local this = WorldArenaManager
local ArenaSetting = ConfigManager.GetConfig(ConfigName.MServerArenaSetting)
local rankConfig = ConfigManager.GetConfig(ConfigName.MServerRankConfig)
function this.Initialize()
this.rank=0
@ -25,6 +25,14 @@ function this.GetArenaChallengeCost()
return itemId, itemNum
end
--根据积分获取段位图标id
function this.GetRankImgByScore(num)
for k, v in ConfigPairs(rankConfig) do
if v.ScoreLow<num and v.ScoreUp>=num then
return v.RankGrade+1
end
end
return 1
end
return this