Merge branch 'china/local' into china/test
commit
d47f7ace07
|
@ -74,16 +74,38 @@ function FormationEditPopup:BindEvent()
|
|||
--选定按钮
|
||||
Util.AddClick(this.BtnSure, function()
|
||||
local go=function()
|
||||
local dids={}
|
||||
local heros={}
|
||||
--后端提交后删除
|
||||
for i, v in ipairs(choosedList) do
|
||||
table.insert(dids,v.did)
|
||||
table.insert(heros,v.did)
|
||||
end
|
||||
--后端提交后放开
|
||||
-- for i, v in ipairs(choosedList) do
|
||||
-- local hero = {}
|
||||
-- hero.heroId = v.did
|
||||
-- hero.position = #choosedList + 1
|
||||
-- table.insert(heros,hero)
|
||||
-- end
|
||||
-- table.sort(heros,function (a,b)
|
||||
-- return HeroManager.GetSingleHeroData(a.heroId).warPower > HeroManager.GetSingleHeroData(b.heroId).warPower
|
||||
-- end)
|
||||
-- for i = 1, #heros do
|
||||
-- heros[i].position = i
|
||||
-- end
|
||||
if #choosedList <= maxNum and #choosedList > 0 then
|
||||
NetManager.TrialHeroInfoSaveRequest(dids,function(msg)
|
||||
NetManager.TrialHeroInfoSaveRequest(heros,function(msg)
|
||||
PopupTipPanel.ShowTip(Language[10670])
|
||||
--后端提交后放开
|
||||
-- local heros = msg.heroes
|
||||
-- if heros and #heros > 1 then
|
||||
-- table.sort(heros,function (a,b)
|
||||
-- return a.position < b.position
|
||||
-- end)
|
||||
-- end
|
||||
-- MapManager.trialHeroInfo = heros
|
||||
MapManager.trialHeroInfo = msg.heroes
|
||||
if func~=nil then --保存完毕后 将英雄did合集传递过去 此时我拥有这些英雄 不用担心英雄已被删除
|
||||
func(dids)
|
||||
func(heros)
|
||||
end
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."Trial",1)--设置森罗红点关
|
||||
CheckRedPointStatus(RedPointType.Trial)
|
||||
|
|
|
@ -518,9 +518,9 @@ function this.SetSelectHero(isFirstIn,isFirstData,isMainIn)
|
|||
end
|
||||
end
|
||||
end
|
||||
table.sort(d,function (a,b)
|
||||
return HeroManager.GetSingleHeroData(a.heroId).warPower > HeroManager.GetSingleHeroData(b.heroId).warPower
|
||||
end)
|
||||
-- table.sort(d,function (a,b)
|
||||
-- return HeroManager.GetSingleHeroData(a.heroId).warPower > HeroManager.GetSingleHeroData(b.heroId).warPower
|
||||
-- end)
|
||||
for i, v in ipairs(d) do
|
||||
if MapTrialManager.selectHeroDid ~= "" then
|
||||
if MapTrialManager.selectHeroDid==v.heroId and v.heroHp <= 0 then
|
||||
|
|
|
@ -366,10 +366,15 @@ function this.MapInfoRequest(mapModeId,func)
|
|||
local msg = MapInfoProto_pb.MapEnterResponse()
|
||||
msg:ParseFromString(data)
|
||||
MapManager.curMapId = msg.mapId
|
||||
MapManager.trialHeroInfo=msg.infos
|
||||
for i = 1, #msg.infos do
|
||||
Log("Id:"..msg.infos[i].tmpId.." 动态Id:"..msg.infos[i].heroId)
|
||||
end
|
||||
----后端提交后放开
|
||||
-- local heros = msg.infos
|
||||
-- if heros then
|
||||
-- table.sort(heros,function (a,b)
|
||||
-- return a.position < b.position
|
||||
-- end)
|
||||
-- end
|
||||
-- MapManager.trialHeroInfo = heros
|
||||
MapManager.trialHeroInfo = msg.infos
|
||||
MapTrialManager.curTowerLevel = msg.curTower
|
||||
MapTrialManager.bombUsed = msg.bombUsed
|
||||
MapTrialManager.killCount=msg.killCount
|
||||
|
@ -4178,10 +4183,13 @@ function NetManager.GetTreasureOfHeavenRewardRequest(uid,func)
|
|||
end
|
||||
|
||||
--森罗幻境请求保存上阵
|
||||
function NetManager.TrialHeroInfoSaveRequest(heroIds,func)
|
||||
function NetManager.TrialHeroInfoSaveRequest(heros,func)
|
||||
local data = MapInfoProto_pb.TrialHeroInfoSaveRequest()
|
||||
for i = 1, #heroIds do
|
||||
data.heroIds:append(heroIds[i])
|
||||
for i = 1, #heros do
|
||||
-- local c = data.heroes:add()--后端提交后放开
|
||||
-- c.heroId = heros[i].heroId--后端提交后放开
|
||||
-- c.position = heros[i].position--后端提交后放开
|
||||
data.heros:append(heros[i])
|
||||
end
|
||||
|
||||
local msg = data:SerializeToString()
|
||||
|
|
|
@ -56,7 +56,7 @@ function this.SendBackResolveReCallBack(drop)
|
|||
for k, v in ipairs(selectEquipTreasureDataDid) do
|
||||
EquipTreasureManager.RemoveTreasureByIdDyn(v)
|
||||
end
|
||||
ResolvePanel.SwitchView(4,true,true)
|
||||
ResolvePanel.SwitchView(2,true,true)
|
||||
parent:ClosePanel()
|
||||
end
|
||||
function this:AddListener()
|
||||
|
|
Loading…
Reference in New Issue