SK_LongZhu
zhangjiannan 2024-11-12 16:22:23 +08:00
parent 24acdc63bd
commit a5f5894185
5 changed files with 232 additions and 200 deletions

View File

@ -2195,6 +2195,11 @@ FormationTypeDef = {
FORMATION_TEMPORARY = 10000, --临时编队, 编队用 FORMATION_TEMPORARY = 10000, --临时编队, 编队用
FORMATION_TEMPORARY_PROP = 10001, -- 临时编队, 属性计算用 FORMATION_TEMPORARY_PROP = 10001, -- 临时编队, 属性计算用
LuoFuZhengFeng1 = 3208,
LuoFuZhengFeng2 = 3209,
LuoFuZhengFeng3 = 3210,
LuoFuZhengFeng4 = 3211,
} }
--编队需要拉取主线 --编队需要拉取主线

View File

@ -361,6 +361,7 @@ function this.ShowSingleData(go,data,i)
formation= FormationTypeDef.LuoFuZhengFeng4 formation= FormationTypeDef.LuoFuZhengFeng4
end end
end end
LogGreen("编队Id" .. formation)
JumpServerManager.showRankType=formation JumpServerManager.showRankType=formation
UIManager.OpenPanel(UIName.PlayerInfoPopup, data.personInfo.uid, PLAYER_INFO_VIEW_TYPE.JUPMSERVER,data.personInfo.servername,formation) UIManager.OpenPanel(UIName.PlayerInfoPopup, data.personInfo.uid, PLAYER_INFO_VIEW_TYPE.JUPMSERVER,data.personInfo.servername,formation)
end) end)

View File

@ -6,7 +6,7 @@ local XiuXianSkillConfig = ConfigManager.GetConfig(ConfigName.XiuXianSkillConfig
local GemConfig = ConfigManager.GetConfig(ConfigName.GemConfig) local GemConfig = ConfigManager.GetConfig(ConfigName.GemConfig)
local ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) local ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local ChangingCard = ConfigManager.GetConfig(ConfigName.ChangingCard) local ChangingCard = ConfigManager.GetConfig(ConfigName.ChangingCard)
local isNpc = false--是否是机器人 local isNpc = false --是否是机器人
local _ViewConfig = { local _ViewConfig = {
[PLAYER_INFO_VIEW_TYPE.NORMAL] = { [PLAYER_INFO_VIEW_TYPE.NORMAL] = {
formationType = FormationTypeDef.FORMATION_NORMAL, formationType = FormationTypeDef.FORMATION_NORMAL,
@ -14,8 +14,8 @@ local _ViewConfig = {
isAddFriend = true, isAddFriend = true,
btnType = { btnType = {
--{name = "举 报", func = 1}, --{name = "举 报", func = 1},
{name = Language[11496], func = 2}, { name = Language[11496], func = 2 },
{name = Language[11497], func = 3}, { name = Language[11497], func = 3 },
} }
}, },
[PLAYER_INFO_VIEW_TYPE.BLACK_REMOVE] = { [PLAYER_INFO_VIEW_TYPE.BLACK_REMOVE] = {
@ -23,7 +23,7 @@ local _ViewConfig = {
tip = Language[10933], tip = Language[10933],
isAddFriend = true, isAddFriend = true,
btnType = { btnType = {
{name = Language[11498], func = 4}, { name = Language[11498], func = 4 },
} }
}, },
[PLAYER_INFO_VIEW_TYPE.GO_TO_BLACK] = { [PLAYER_INFO_VIEW_TYPE.GO_TO_BLACK] = {
@ -31,7 +31,7 @@ local _ViewConfig = {
tip = Language[10933], tip = Language[10933],
isAddFriend = true, isAddFriend = true,
btnType = { btnType = {
{name = Language[11499], func = 5}, { name = Language[11499], func = 5 },
} }
}, },
[PLAYER_INFO_VIEW_TYPE.ARENA] = { [PLAYER_INFO_VIEW_TYPE.ARENA] = {
@ -39,11 +39,6 @@ local _ViewConfig = {
tip = Language[11500], tip = Language[11500],
isAddFriend = true, isAddFriend = true,
}, },
[PLAYER_INFO_VIEW_TYPE.TOP_MATCH] = {
formationType = FormationTypeDef.ARENA_TOM_MATCH,
tip = "巅峰赛阵容",
isAddFriend = false,
},
[PLAYER_INFO_VIEW_TYPE.MIND_DEMON] = { [PLAYER_INFO_VIEW_TYPE.MIND_DEMON] = {
formationType = FormationTypeDef.MONSTER_CAMP_ATTACK, formationType = FormationTypeDef.MONSTER_CAMP_ATTACK,
tip = Language[12306], tip = Language[12306],
@ -62,7 +57,7 @@ local _ViewConfig = {
isAddFriend = false, isAddFriend = false,
btnType = { btnType = {
-- {name = "挑战", func = 6}, -- {name = "挑战", func = 6},
{name = "切磋", func = 6}, { name = "切磋", func = 6 },
} }
}, },
[PLAYER_INFO_VIEW_TYPE.JUPMSERVER_NORMAL] = { [PLAYER_INFO_VIEW_TYPE.JUPMSERVER_NORMAL] = {
@ -70,9 +65,14 @@ local _ViewConfig = {
tip = Language[10933], tip = Language[10933],
isAddFriend = false, isAddFriend = false,
btnType = { btnType = {
{name = "切磋", func = 7}, { name = "切磋", func = 7 },
} }
}, },
[PLAYER_INFO_VIEW_TYPE.TOP_MATCH] = {
formationType = FormationTypeDef.ARENA_TOM_MATCH,
tip = "巅峰赛阵容",
isAddFriend = false,
},
[PLAYER_INFO_VIEW_TYPE.QIJIESHILIAN] = { [PLAYER_INFO_VIEW_TYPE.QIJIESHILIAN] = {
formationType = FormationTypeDef.FORMATION_QIJIESHILIAN, formationType = FormationTypeDef.FORMATION_QIJIESHILIAN,
tip = "宇宙生存挑战阵容:", tip = "宇宙生存挑战阵容:",
@ -86,9 +86,9 @@ local _ViewConfig = {
tip = "空岛阵容:", tip = "空岛阵容:",
isAddFriend = false, isAddFriend = false,
btnType = { btnType = {
{name = "切磋", func = 9}, { name = "切磋", func = 9 },
{name = "挑战", func = 8}, { name = "挑战", func = 8 },
{name = "调整编队", func = 8}, { name = "调整编队", func = 8 },
} }
}, },
} }
@ -97,46 +97,46 @@ local InfoBtns = {
[1] = { [1] = {
name = "紫府神印", name = "紫府神印",
gridName = "imprintInfo", gridName = "imprintInfo",
func = function (data,obj) func = function(data, obj)
this.imprintInfoShow(data,obj) this.imprintInfoShow(data, obj)
end end
}, },
[2] = { [2] = {
name = "奥义卡", name = "奥义卡",
gridName = "huashenInfo", gridName = "huashenInfo",
func = function (data,obj) func = function(data, obj)
this.huashenInfoShow(data,obj) this.huashenInfoShow(data, obj)
end end
}, },
[3] = { [3] = {
name = "四象心法", name = "四象心法",
gridName = "fourElementInfo", gridName = "fourElementInfo",
func = function (data,obj) func = function(data, obj)
this.fourElementInfoShow(data,obj) this.fourElementInfoShow(data, obj)
end end
}, },
[4] = { [4] = {
name = "命 格", name = "命 格",
gridName = "GemInfo", gridName = "GemInfo",
func = function (data,obj) func = function(data, obj)
this.GemInfoShow(data,obj) this.GemInfoShow(data, obj)
end end
}, },
[5] = { [5] = {
name = "坐 骑", name = "坐 骑",
gridName = "RideInfo", gridName = "RideInfo",
func = function (data,obj) func = function(data, obj)
this.RideInfoShow(data,obj) this.RideInfoShow(data, obj)
end end
}, },
[6] = { [6] = {
name = "礼 物", name = "礼 物",
gridName = "giftInfo", gridName = "giftInfo",
func = function (data,obj) func = function(data, obj)
this.GiftInfoShow(data,obj) this.GiftInfoShow(data, obj)
end end
}, },
} }
local curPlayerName = "" local curPlayerName = ""
@ -160,36 +160,40 @@ function PlayerInfoPopup:InitComponent()
this.memPower = Util.GetGameObject(self.transform, "tipImage/panel/defendbox/power"):GetComponent("Text") this.memPower = Util.GetGameObject(self.transform, "tipImage/panel/defendbox/power"):GetComponent("Text")
this.formationTip = Util.GetGameObject(self.transform, "tipImage/panel/defendbox/Image/tip"):GetComponent("Text") this.formationTip = Util.GetGameObject(self.transform, "tipImage/panel/defendbox/Image/tip"):GetComponent("Text")
this.demonsHeroList=Util.GetGameObject(self.gameObject, "tipImage/panel/defendbox/demons") this.demonsHeroList = Util.GetGameObject(self.gameObject, "tipImage/panel/defendbox/demons")
this.diffDemonsHeroList=Util.GetGameObject(self.gameObject, "tipImage/panel/defendbox/diffdemons") this.diffDemonsHeroList = Util.GetGameObject(self.gameObject, "tipImage/panel/defendbox/diffdemons")
this.Demons = {} this.Demons = {}
for i = 1, 6 do for i = 1, 6 do
this.Demons[i] = {} this.Demons[i] = {}
this.Demons[i].go = Util.GetGameObject(self.gameObject, "tipImage/panel/defendbox/Demons/heroPro (" .. i .. ")") this.Demons[i].go = Util.GetGameObject(self.gameObject, "tipImage/panel/defendbox/Demons/heroPro (" .. i .. ")")
this.Demons[i].frameBtn =Util.GetGameObject(this.Demons[i].go, "frame") this.Demons[i].frameBtn = Util.GetGameObject(this.Demons[i].go, "frame")
this.Demons[i].frame =this.Demons[i].frameBtn:GetComponent("Image") this.Demons[i].frame = this.Demons[i].frameBtn:GetComponent("Image")
this.Demons[i].hero = Util.GetGameObject(this.Demons[i].go, "hero") this.Demons[i].hero = Util.GetGameObject(this.Demons[i].go, "hero")
this.Demons[i].starGrid = Util.GetGameObject(this.Demons[i].hero, "starGrid") this.Demons[i].starGrid = Util.GetGameObject(this.Demons[i].hero, "starGrid")
this.Demons[i].proIcon = Util.GetGameObject(this.Demons[i].hero, "proIcon"):GetComponent("Image") this.Demons[i].proIcon = Util.GetGameObject(this.Demons[i].hero, "proIcon"):GetComponent("Image")
this.Demons[i].levelText = Util.GetGameObject(this.Demons[i].hero, "lvbg/levelText"):GetComponent("Text") this.Demons[i].levelText = Util.GetGameObject(this.Demons[i].hero, "lvbg/levelText"):GetComponent("Text")
this.Demons[i].icon = Util.GetGameObject(this.Demons[i].hero, "icon"):GetComponent("Image") this.Demons[i].icon = Util.GetGameObject(this.Demons[i].hero, "icon"):GetComponent("Image")
end end
Util.GetGameObject(self.transform, "tipImage/panel/pokemonInfo/Image/tip"):GetComponent("Text").text=Language[11501] Util.GetGameObject(self.transform, "tipImage/panel/pokemonInfo/Image/tip"):GetComponent("Text").text = Language
[11501]
this.Pokemons = {} this.Pokemons = {}
for i = 1, 6 do for i = 1, 6 do
table.insert(this.Pokemons, Util.GetGameObject(self.gameObject, "tipImage/panel/pokemonInfo/Demons/heroPro (" .. i .. ")")) table.insert(this.Pokemons,
Util.GetGameObject(self.gameObject, "tipImage/panel/pokemonInfo/Demons/heroPro (" .. i .. ")"))
end end
this.Weapons={} this.Weapons = {}
for i = 1, 6 do for i = 1, 6 do
table.insert(this.Weapons, Util.GetGameObject(self.gameObject, "tipImage/panel/weaponInfo/Demons/heroPro (" .. i .. ")")) table.insert(this.Weapons,
Util.GetGameObject(self.gameObject, "tipImage/panel/weaponInfo/Demons/heroPro (" .. i .. ")"))
end end
this.newGems={} this.newGems = {}
for i=1,16 do for i = 1, 16 do
table.insert(this.newGems, Util.GetGameObject(self.gameObject, "tipImage/panel/InfoGrids/Bg/GemInfo/Grid/heroPro (" .. i .. ")")) table.insert(this.newGems,
Util.GetGameObject(self.gameObject, "tipImage/panel/InfoGrids/Bg/GemInfo/Grid/heroPro (" .. i .. ")"))
end end
this.pokemonObj=Util.GetGameObject(self.transform, "tipImage/panel/pokemonInfo").gameObject this.pokemonObj = Util.GetGameObject(self.transform, "tipImage/panel/pokemonInfo").gameObject
this.weaponInfo=Util.GetGameObject(self.transform, "tipImage/panel/weaponInfo") this.weaponInfo = Util.GetGameObject(self.transform, "tipImage/panel/weaponInfo")
this.newGemInfo=Util.GetGameObject(self.transform, "tipImage/panel/newGemInfo") this.newGemInfo = Util.GetGameObject(self.transform, "tipImage/panel/newGemInfo")
this.newGemInfo:SetActive(false) this.newGemInfo:SetActive(false)
--this.boxLine = Util.GetGameObject(self.transform, "tipImage/panel/defendbox/line") --this.boxLine = Util.GetGameObject(self.transform, "tipImage/panel/defendbox/line")
this.btnBox = Util.GetGameObject(self.transform, "tipImage/box") this.btnBox = Util.GetGameObject(self.transform, "tipImage/box")
@ -207,13 +211,12 @@ function PlayerInfoPopup:InitComponent()
this.InfoBtnsGrid = Util.GetGameObject(this.InfoBtns, "Grid") this.InfoBtnsGrid = Util.GetGameObject(this.InfoBtns, "Grid")
this.InfoContentGrid = Util.GetGameObject(self.transform, "tipImage/panel/InfoGrids") this.InfoContentGrid = Util.GetGameObject(self.transform, "tipImage/panel/InfoGrids")
this.InfoContent = Util.GetGameObject(this.InfoContentGrid, "Bg") this.InfoContent = Util.GetGameObject(this.InfoContentGrid, "Bg")
this.infoBtnPre = Util.GetGameObject(self.transform, "btnPre")--按钮的Pre this.infoBtnPre = Util.GetGameObject(self.transform, "btnPre") --按钮的Pre
this.imprintPre = Util.GetGameObject(self.transform, "imprintPre")--神印的Pre this.imprintPre = Util.GetGameObject(self.transform, "imprintPre") --神印的Pre
this.emptyPre = Util.GetGameObject(self.transform, "emptyPre")--空的Pre this.emptyPre = Util.GetGameObject(self.transform, "emptyPre") --空的Pre
this.InfoBtnsList = {} this.InfoBtnsList = {}
this.ItemPreList = {} this.ItemPreList = {}
this.ItemList = {} this.ItemList = {}
end end
--绑定事件(用于子类重写) --绑定事件(用于子类重写)
@ -229,7 +232,7 @@ function PlayerInfoPopup:BindEvent()
Util.AddClick(this.addFriendBtn, function() Util.AddClick(this.addFriendBtn, function()
if this.serverName and this.serverName ~= "" then if this.serverName and this.serverName ~= "" then
PopupTipPanel.ShowTip("无法跨服添加好友") PopupTipPanel.ShowTip("无法跨服添加好友")
return return
end end
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GOODFRIEND) then if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GOODFRIEND) then
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.GOODFRIEND)) PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.GOODFRIEND))
@ -268,10 +271,10 @@ function PlayerInfoPopup:RemoveListener()
end end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function PlayerInfoPopup:OnOpen(playerId, viewType,serverName,_otherdata) function PlayerInfoPopup:OnOpen(playerId, viewType, serverName, _otherdata)
this._PlayerId = playerId this._PlayerId = playerId
this._ViewType = viewType or PLAYER_INFO_VIEW_TYPE.NORMAL this._ViewType = viewType or PLAYER_INFO_VIEW_TYPE.NORMAL
this.serverName = serverName--跨服加的服务器数据 this.serverName = serverName --跨服加的服务器数据
this.data = _otherdata this.data = _otherdata
isNpc = this._PlayerId <= 1000000 isNpc = this._PlayerId <= 1000000
-- 界面类型修正 -- 界面类型修正
@ -304,21 +307,22 @@ end
function PlayerInfoPopup:OnShow() function PlayerInfoPopup:OnShow()
-- this.RefreshBtnShow() -- this.RefreshBtnShow()
-- 请求数据 -- 请求数据
if this._ViewType==PLAYER_INFO_VIEW_TYPE.JUPMSERVER then if this._ViewType == PLAYER_INFO_VIEW_TYPE.JUPMSERVER then
this._Config.formationType=JumpServerManager.showRankType this._Config.formationType = JumpServerManager.showRankType
end end
LogGreen("角色Id:"..tostring(this._PlayerId).." 编队Id"..tostring(this._Config.formationType)) LogGreen("角色Id:" .. tostring(this._PlayerId) .. " 编队Id" .. tostring(this._Config.formationType))
if this._PlayerId > 0 then--如果PlayerId > 0 说明是真人或者机器人为0暂时为灵脉使用直接是怪物组数据需要自己拼接 if this._PlayerId > 0 then --如果PlayerId > 0 说明是真人或者机器人为0暂时为灵脉使用直接是怪物组数据需要自己拼接
netserverName = nil netserverName = nil
if this.serverName and this.serverName ~= "" then--and this.serverName ~= PlayerManager.serverInfo.name if this.serverName and this.serverName ~= "" then --and this.serverName ~= PlayerManager.serverInfo.name
netserverName = 1 netserverName = 1
end end
this.curPlayerData = {} this.curPlayerData = {}
NetManager.RequestPlayerInfo(this._PlayerId, this._Config.formationType,netserverName,0, function(msg) NetManager.RequestPlayerInfo(this._PlayerId, this._Config.formationType, netserverName, 0, function(msg)
-- 如果是好友更新好友数据 -- 如果是好友更新好友数据
this.curPlayerData = msg.teamInfo this.curPlayerData = msg.teamInfo
curPlayerName = msg.teamInfo.name curPlayerName = msg.teamInfo.name
GoodFriendManager.UpdateFriendData(this._PlayerId, msg.teamInfo.level, JingJiShouWeiToEn(msg.teamInfo.name) , msg.teamInfo.head, msg.teamInfo.headFrame) GoodFriendManager.UpdateFriendData(this._PlayerId, msg.teamInfo.level, JingJiShouWeiToEn(msg.teamInfo.name),
msg.teamInfo.head, msg.teamInfo.headFrame)
this._PlayerData = msg.teamInfo this._PlayerData = msg.teamInfo
this.RefreshPlayerInfo(msg.teamInfo) this.RefreshPlayerInfo(msg.teamInfo)
local teamInfo = msg.teamInfo.team local teamInfo = msg.teamInfo.team
@ -333,7 +337,7 @@ function PlayerInfoPopup:OnShow()
this.InfoContentGrid:SetActive(false) this.InfoContentGrid:SetActive(false)
this.pokemonObj:SetActive(false) this.pokemonObj:SetActive(false)
this.weaponInfo:SetActive(false) this.weaponInfo:SetActive(false)
this.extraInfo.Init(this,this.data,_ViewConfig[this._ViewType]) this.extraInfo.Init(this, this.data, _ViewConfig[this._ViewType])
end end
end end
@ -343,26 +347,26 @@ local titleLive
function this.RefreshPlayerInfo(data) function this.RefreshPlayerInfo(data)
local curname = "" local curname = ""
if data.serverName and data.serverName ~= "" then if data.serverName and data.serverName ~= "" then
curname = data.serverName .. " " ..data.name curname = data.serverName .. " " .. data.name
elseif this.serverName and this.serverName ~= "" then elseif this.serverName and this.serverName ~= "" then
curname = this.serverName .. " " ..data.name curname = this.serverName .. " " .. data.name
else else
curname = data.name curname = data.name
end end
this.memName.text = PracticeManager.SetNameColor(curname,data.practiceLevel)--data.name this.memName.text = PracticeManager.SetNameColor(curname, data.practiceLevel) --data.name
if(data.guildName~="") then if (data.guildName ~= "") then
this.memProfess.text =Language[10633]..data.guildName--GUILD_GRANT_STR[data.position] this.memProfess.text = Language[10633] .. data.guildName --GUILD_GRANT_STR[data.position]
else else
this.memProfess.text =Language[10633]..Language[10086] this.memProfess.text = Language[10633] .. Language[10086]
end end
if data.arenaLvId>0 then if data.arenaLvId > 0 then
this.rankName.gameObject:SetActive(true) this.rankName.gameObject:SetActive(true)
this.rankName.text=ConfigManager.GetConfigData(ConfigName.ArenaLevel,data.arenaLvId).ArenaLevelName this.rankName.text = ConfigManager.GetConfigData(ConfigName.ArenaLevel, data.arenaLvId).ArenaLevelName
else else
this.rankName.gameObject:SetActive(true) this.rankName.gameObject:SetActive(true)
this.rankName.text=ArenaManager.GetArenaMyRankName() this.rankName.text = ArenaManager.GetArenaMyRankName()
end end
-- 头像 -- 头像
if not _PlayerHead then if not _PlayerHead then
_PlayerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.memHead.transform) _PlayerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.memHead.transform)
@ -374,8 +378,8 @@ function this.RefreshPlayerInfo(data)
_PlayerHead:SetLevel(data.level) _PlayerHead:SetLevel(data.level)
_PlayerHead:SetLayer(this.sortingOrder) _PlayerHead:SetLayer(this.sortingOrder)
_PlayerHead:SetEffectScale(0.9) _PlayerHead:SetEffectScale(0.9)
local title=data.userTitle local title = data.userTitle
if title and title>0 then if title and title > 0 then
this.titlePar:SetActive(true) this.titlePar:SetActive(true)
if titleLive then if titleLive then
SubUIManager.Close(titleLive) SubUIManager.Close(titleLive)
@ -383,7 +387,7 @@ function this.RefreshPlayerInfo(data)
end end
if not titleLive then if not titleLive then
titleLive = SubUIManager.Open(SubUIConfig.PlayerTitle, this.titlePar.transform) titleLive = SubUIManager.Open(SubUIConfig.PlayerTitle, this.titlePar.transform)
titleLive:SetShow(title, Vector3.New(0,0,0), 0.5, 0.03*20, this.sortingOrder) titleLive:SetShow(title, Vector3.New(0, 0, 0), 0.5, 0.03 * 20, this.sortingOrder)
end end
else else
this.titlePar:SetActive(false) this.titlePar:SetActive(false)
@ -395,7 +399,7 @@ function this:OnSortingOrderChange()
_PlayerHead:SetLayer(self.sortingOrder) _PlayerHead:SetLayer(self.sortingOrder)
end end
for i, demon in ipairs(this.Demons) do for i, demon in ipairs(this.Demons) do
Util.SetParticleSortLayer(demon.starGrid,self.sortingOrder + 1) Util.SetParticleSortLayer(demon.starGrid, self.sortingOrder + 1)
end end
end end
@ -423,63 +427,66 @@ function this.FormationAdapter(teamInfo)
for i, demon in ipairs(this.Demons) do for i, demon in ipairs(this.Demons) do
demon.frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1)) demon.frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1))
demon.hero:SetActive(false) demon.hero:SetActive(false)
demon.frame.transform:GetComponent("Button").enabled=false demon.frame.transform:GetComponent("Button").enabled = false
end end
--队伍阵容 --队伍阵容
for i, hero in ipairs(teamInfo.team) do for i, hero in ipairs(teamInfo.team) do
local demonId = teamInfo.team[i].heroTid local demonId = teamInfo.team[i].heroTid
if demonId then if demonId then
this.Demons[hero.position].hero:SetActive(true) this.Demons[hero.position].hero:SetActive(true)
local star,starType = GetStarOrGodSoulLv(1,hero) local star, starType = GetStarOrGodSoulLv(1, hero)
local starSize = Vector2.New(35,35) local starSize = Vector2.New(35, 35)
local starScale = -8 local starScale = -8
if starType == 3 then if starType == 3 then
starSize = Vector2.New(1,-15.65) starSize = Vector2.New(1, -15.65)
starScale = -13 starScale = -13
elseif starType == 2 then elseif starType == 2 then
starSize = Vector2.New(60,57) starSize = Vector2.New(60, 57)
end end
SetHeroStars(this.spLoader, this.Demons[hero.position].starGrid, star,starType,starSize,starScale) SetHeroStars(this.spLoader, this.Demons[hero.position].starGrid, star, starType, starSize, starScale)
Util.SetParticleSortLayer(this.Demons[hero.position].starGrid,this.sortingOrder + 1) Util.SetParticleSortLayer(this.Demons[hero.position].starGrid, this.sortingOrder + 1)
local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, demonId) local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, demonId)
this.Demons[hero.position].proIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(hero.propertyId)) this.Demons[hero.position].proIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(hero.propertyId))
this.Demons[hero.position].levelText.text = hero.level this.Demons[hero.position].levelText.text = hero.level
this.Demons[hero.position].frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality, hero.star)) this.Demons[hero.position].frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(
SetHeroIcon(this.spLoader, hero,this.Demons[hero.position].icon,heroConfig) heroConfig.Quality, hero.star))
SetHeroFlyEffect(this.Demons[hero.position].hero,this.spLoader,hero.star,this.sortingOrder+1,0.9,2) SetHeroIcon(this.spLoader, hero, this.Demons[hero.position].icon, heroConfig)
SetHeroFlyEffect(this.Demons[hero.position].hero, this.spLoader, hero.star, this.sortingOrder + 1, 0.9, 2)
local heroData = {} local heroData = {}
local frameBtn=this.Demons[hero.position].frameBtn local frameBtn = this.Demons[hero.position].frameBtn
frameBtn.transform:GetComponent("Button").enabled=true frameBtn.transform:GetComponent("Button").enabled = true
if this._Config.formationType == FormationTypeDef.FORMATION_TSLX then if this._Config.formationType == FormationTypeDef.FORMATION_TSLX then
Util.AddOnceClick(frameBtn, function() Util.AddOnceClick(frameBtn, function()
UIManager.OpenPanel(UIName.RoleGetInfoPopup,false,demonId,hero.star) UIManager.OpenPanel(UIName.RoleGetInfoPopup, false, demonId, hero.star)
end) end)
else else
Util.AddOnceClick(frameBtn, function() Util.AddOnceClick(frameBtn, function()
if not hero.heroid or not heroConfig then if not hero.heroid or not heroConfig then
return return
end end
NetManager.ViewHeroInfoRequest(this._PlayerId,hero.heroid,netserverName,this._Config.formationType,function(msg) NetManager.ViewHeroInfoRequest(this._PlayerId, hero.heroid, netserverName, this._Config
heroData= GoodFriendManager.GetHeroDatas(msg.hero,msg.force,msg.SpecialEffects,msg.guildSkill) .formationType, function(msg)
GoodFriendManager.InitEquipData(msg.equip,heroData)--HeroManager.GetSingleHeroData(heroData.dynamicId) heroData = GoodFriendManager.GetHeroDatas(msg.hero, msg.force, msg.SpecialEffects, msg
LogError("msg.playerGiftLv==================="..msg.playerGiftLv) .guildSkill)
for k, v in pairs(heroData.potential) do GoodFriendManager.InitEquipData(msg.equip, heroData) --HeroManager.GetSingleHeroData(heroData.dynamicId)
v.giftLv= msg.playerGiftLv LogError("msg.playerGiftLv===================" .. msg.playerGiftLv)
end for k, v in pairs(heroData.potential) do
UIManager.OpenPanel(UIName.RoleInfoPopup, heroData,true) v.giftLv = msg.playerGiftLv
end) end
UIManager.OpenPanel(UIName.RoleInfoPopup, heroData, true)
end)
end) end)
end end
end end
end end
local len=#teamInfo.PokemonInfos local len = #teamInfo.PokemonInfos
-- LogError("长度:"..len) -- LogError("长度:"..len)
if len>0 then if len > 0 then
this.pokemonObj:SetActive(true) this.pokemonObj:SetActive(true)
for i, demon in ipairs(this.Pokemons) do for i, demon in ipairs(this.Pokemons) do
demon.gameObject:SetActive(false) demon.gameObject:SetActive(false)
Util.GetGameObject(demon, "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1)) Util.GetGameObject(demon, "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
GetQuantityImageByquality(1))
Util.GetGameObject(demon, "hero"):SetActive(false) Util.GetGameObject(demon, "hero"):SetActive(false)
Util.GetGameObject(demon, "pos"):SetActive(true) Util.GetGameObject(demon, "pos"):SetActive(true)
end end
@ -494,45 +501,48 @@ function this.FormationAdapter(teamInfo)
if demonId then if demonId then
local heroGo = Util.GetGameObject(this.Pokemons[i], "hero") local heroGo = Util.GetGameObject(this.Pokemons[i], "hero")
heroGo:SetActive(true) heroGo:SetActive(true)
local starSize = Vector2.New(35,35) local starSize = Vector2.New(35, 35)
local star=hero.star local star = hero.star
local type=1 local type = 1
local starScale = -10 local starScale = -10
if star>5 then if star > 5 then
star=star+5 star = star + 5
starSize = Vector2.New(0.8,-25) starSize = Vector2.New(0.8, -25)
starScale=-20 starScale = -20
type=3 type = 3
else else
starScale=-15 starScale = -15
end end
Util.GetGameObject(this.Pokemons[i], "pos"):SetActive(false) Util.GetGameObject(this.Pokemons[i], "pos"):SetActive(false)
local grid=Util.GetGameObject(heroGo, "starGrid") local grid = Util.GetGameObject(heroGo, "starGrid")
SetHeroStars(this.spLoader, grid, star,type,starSize,starScale) SetHeroStars(this.spLoader, grid, star, type, starSize, starScale)
--SetHeroStars(this.spLoader,grid ,star,type,starSize, starScale,Vector2.New(0.5,1)) --SetHeroStars(this.spLoader,grid ,star,type,starSize, starScale,Vector2.New(0.5,1))
Util.AddParticleSortLayer(Util.GetGameObject(heroGo, "starGrid"),this.sortingOrder + 1) Util.AddParticleSortLayer(Util.GetGameObject(heroGo, "starGrid"), this.sortingOrder + 1)
local heroConfig = ConfigManager.GetConfigData(ConfigName.SpiritAnimal, demonId) local heroConfig = ConfigManager.GetConfigData(ConfigName.SpiritAnimal, demonId)
Util.GetGameObject(heroGo, "lvbg/levelText"):GetComponent("Text").text = hero.level Util.GetGameObject(heroGo, "lvbg/levelText"):GetComponent("Text").text = hero.level
Util.GetGameObject(this.Pokemons[i], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality)) Util.GetGameObject(this.Pokemons[i], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
Util.GetGameObject(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(heroConfig.Icon)) GetQuantityImageByquality(heroConfig.Quality))
Util.GetGameObject(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(
heroConfig.Icon))
local frameBtn = Util.GetGameObject(this.Pokemons[i], "frame") local frameBtn = Util.GetGameObject(this.Pokemons[i], "frame")
local heroData = {} local heroData = {}
Util.AddOnceClick(frameBtn, function() Util.AddOnceClick(frameBtn, function()
local pokemonData={tempId=demonId,id=demonId,star=hero.star,level=hero.level} local pokemonData = { tempId = demonId, id = demonId, star = hero.star, level = hero.level }
UIManager.OpenPanel(UIName.PokemonGetInfoPopup,true,pokemonData) UIManager.OpenPanel(UIName.PokemonGetInfoPopup, true, pokemonData)
end) end)
end end
end end
--====================队伍神兵信息====================== --====================队伍神兵信息======================
local len2=#teamInfo.MagicSoldier local len2 = #teamInfo.MagicSoldier
LogError("长度:"..len) LogError("长度:" .. len)
if len2>0 and type(teamInfo.MagicSoldier[1].heroTid)~="userdata" then if len2 > 0 and type(teamInfo.MagicSoldier[1].heroTid) ~= "userdata" then
LogError("teamInfo.MagicSoldier[1].heroTid=="..teamInfo.MagicSoldier[1].heroTid) LogError("teamInfo.MagicSoldier[1].heroTid==" .. teamInfo.MagicSoldier[1].heroTid)
this.weaponInfo:SetActive(true) this.weaponInfo:SetActive(true)
for i, demon in ipairs(this.Weapons) do for i, demon in ipairs(this.Weapons) do
--demon.gameObject:SetActive(false) --demon.gameObject:SetActive(false)
Util.GetGameObject(demon, "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1)) Util.GetGameObject(demon, "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
GetQuantityImageByquality(1))
Util.GetGameObject(demon, "hero"):SetActive(false) Util.GetGameObject(demon, "hero"):SetActive(false)
Util.GetGameObject(demon, "pos"):SetActive(true) Util.GetGameObject(demon, "pos"):SetActive(true)
end end
@ -543,48 +553,50 @@ function this.FormationAdapter(teamInfo)
local demonId = teamInfo.MagicSoldier[i].heroTid local demonId = teamInfo.MagicSoldier[i].heroTid
--this.Weapons[].gameObject:SetActive(true) --this.Weapons[].gameObject:SetActive(true)
if demonId then if demonId then
LogError("hero.position=="..teamInfo.MagicSoldier[i].position) LogError("hero.position==" .. teamInfo.MagicSoldier[i].position)
local heroGo = Util.GetGameObject(this.Weapons[hero.position], "hero") local heroGo = Util.GetGameObject(this.Weapons[hero.position], "hero")
heroGo:SetActive(true) heroGo:SetActive(true)
SetHeroStars(this.spLoader, Util.GetGameObject(heroGo, "starGrid"), hero.star,1) SetHeroStars(this.spLoader, Util.GetGameObject(heroGo, "starGrid"), hero.star, 1)
local heroConfig = ConfigManager.GetConfigData(ConfigName.ShenBing, demonId) local heroConfig = ConfigManager.GetConfigData(ConfigName.ShenBing, demonId)
Util.GetGameObject(this.Weapons[hero.position], "pos"):SetActive(false) Util.GetGameObject(this.Weapons[hero.position], "pos"):SetActive(false)
Util.GetGameObject(heroGo, "lvbg/levelText"):GetComponent("Text").text = hero.level Util.GetGameObject(heroGo, "lvbg/levelText"):GetComponent("Text").text = hero.level
Util.GetGameObject(this.Weapons[hero.position], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality)) Util.GetGameObject(this.Weapons[hero.position], "frame"):GetComponent("Image").sprite = this.spLoader
Util.GetGameObject(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(heroConfig.Icon)) :LoadSprite(GetQuantityImageByquality(heroConfig.Quality))
Util.GetGameObject(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(
heroConfig.Icon))
local frameBtn = Util.GetGameObject(this.Weapons[hero.position], "frame") local frameBtn = Util.GetGameObject(this.Weapons[hero.position], "frame")
local heroData = {} local heroData = {}
Util.AddOnceClick(frameBtn, function() Util.AddOnceClick(frameBtn, function()
local pokemonData={tempId=demonId,id=demonId,star=hero.star,level=hero.level} local pokemonData = { tempId = demonId, id = demonId, star = hero.star, level = hero.level }
UIManager.OpenPanel(UIName.GodWeaponGetInfoPopup,true,pokemonData) UIManager.OpenPanel(UIName.GodWeaponGetInfoPopup, true, pokemonData)
end) end)
end end
end end
--====================其他信息按钮显示====================== --====================其他信息按钮显示======================
this.infoIndex = 0 this.infoIndex = 0
for index, value in ipairs(InfoBtns) do for index, value in ipairs(InfoBtns) do
LogError("teamInfo.giftEquipIds len============="..#teamInfo.giftEquipIds) LogError("teamInfo.giftEquipIds len=============" .. #teamInfo.giftEquipIds)
--添加按钮 --添加按钮
local item = this.InfoBtnsList[index] local item = this.InfoBtnsList[index]
if not item then if not item then
item = newObjToParent(this.infoBtnPre,this.InfoBtnsGrid.transform) item = newObjToParent(this.infoBtnPre, this.InfoBtnsGrid.transform)
this.InfoBtnsList[index] = item this.InfoBtnsList[index] = item
item.gameObject:SetActive(true) item.gameObject:SetActive(true)
end end
local name = Util.GetGameObject(item,"btnName"):GetComponent("Text") local name = Util.GetGameObject(item, "btnName"):GetComponent("Text")
name.text = value.name name.text = value.name
--判断按钮是否显示 --判断按钮是否显示
if (index == 1 and teamInfo.sealShow and #teamInfo.sealShow > 0) or--神印 if (index == 1 and teamInfo.sealShow and #teamInfo.sealShow > 0) or --神印
(index == 2 and teamInfo.transformationCardInfo and #teamInfo.transformationCardInfo > 0) or--身外化身 (index == 2 and teamInfo.transformationCardInfo and #teamInfo.transformationCardInfo > 0) or --身外化身
(index == 3 and teamInfo.sixiangxinfaInfo and #teamInfo.sixiangxinfaInfo > 0) or--四象心法 (index == 3 and teamInfo.sixiangxinfaInfo and #teamInfo.sixiangxinfaInfo > 0) or --四象心法
(index == 5 and teamInfo.userMountInfo and #teamInfo.userMountInfo > 0) then--坐骑 (index == 5 and teamInfo.userMountInfo and #teamInfo.userMountInfo > 0) then --坐骑
item.gameObject:SetActive(true) item.gameObject:SetActive(true)
if this.infoIndex == 0 then if this.infoIndex == 0 then
this.infoIndex = index this.infoIndex = index
end end
elseif (index == 4 and teamInfo.gemNews and #teamInfo.gemNews > 0) then--命石 elseif (index == 4 and teamInfo.gemNews and #teamInfo.gemNews > 0) then --命石
-- local num = 0 -- local num = 0
-- for i = 1, #teamInfo.gemNews do -- for i = 1, #teamInfo.gemNews do
-- local data = teamInfo.gemNews[i] -- local data = teamInfo.gemNews[i]
@ -592,12 +604,12 @@ function this.FormationAdapter(teamInfo)
-- num = num + 1 -- num = num + 1
-- end -- end
-- end -- end
item.gameObject:SetActive(#teamInfo.gemNews> 0) item.gameObject:SetActive(#teamInfo.gemNews > 0)
if this.infoIndex == 0 then if this.infoIndex == 0 then
this.infoIndex = index this.infoIndex = index
end end
elseif (index == 6 and teamInfo.giftEquipIds and #teamInfo.giftEquipIds > 0) then elseif (index == 6 and teamInfo.giftEquipIds and #teamInfo.giftEquipIds > 0) then
item.gameObject:SetActive(#teamInfo.giftEquipIds> 0) item.gameObject:SetActive(#teamInfo.giftEquipIds > 0)
if this.infoIndex == 0 then if this.infoIndex == 0 then
this.infoIndex = index this.infoIndex = index
end end
@ -606,7 +618,7 @@ function this.FormationAdapter(teamInfo)
end end
--添加点击事件 --添加点击事件
Util.AddOnceClick(item,function () Util.AddOnceClick(item, function()
this.infoIndex = index this.infoIndex = index
this.ShowInfos(teamInfo) this.ShowInfos(teamInfo)
end) end)
@ -626,7 +638,7 @@ end
function this.ShowInfos(teamInfo) function this.ShowInfos(teamInfo)
for index, value in ipairs(this.InfoBtnsList) do for index, value in ipairs(this.InfoBtnsList) do
local img = value:GetComponent("Image") local img = value:GetComponent("Image")
local text = Util.GetGameObject(value,"btnName"):GetComponent("Text") local text = Util.GetGameObject(value, "btnName"):GetComponent("Text")
if this.infoIndex == index then if this.infoIndex == index then
img.sprite = this.spLoader:LoadSprite("Btn_hz_tongyong_001") img.sprite = this.spLoader:LoadSprite("Btn_hz_tongyong_001")
--text.color = Color.New(253 / 255, 244 / 255, 214 / 255, 1) --text.color = Color.New(253 / 255, 244 / 255, 214 / 255, 1)
@ -634,11 +646,11 @@ function this.ShowInfos(teamInfo)
img.sprite = this.spLoader:LoadSprite("UI_hz_gonghui_28") img.sprite = this.spLoader:LoadSprite("UI_hz_gonghui_28")
--text.color = Color.New(181 / 255, 164 / 255, 129 / 255, 1) --text.color = Color.New(181 / 255, 164 / 255, 129 / 255, 1)
end end
Util.GetGameObject(this.InfoContent,InfoBtns[index].gridName):SetActive(false) Util.GetGameObject(this.InfoContent, InfoBtns[index].gridName):SetActive(false)
end end
local MainContent = Util.GetGameObject(this.InfoContent,InfoBtns[this.infoIndex].gridName) local MainContent = Util.GetGameObject(this.InfoContent, InfoBtns[this.infoIndex].gridName)
local Grid = Util.GetGameObject(MainContent,"Grid") local Grid = Util.GetGameObject(MainContent, "Grid")
MainContent:SetActive(true) MainContent:SetActive(true)
if not this.ItemPreList[this.infoIndex] then if not this.ItemPreList[this.infoIndex] then
this.ItemPreList[this.infoIndex] = {} this.ItemPreList[this.infoIndex] = {}
@ -647,31 +659,31 @@ function this.ShowInfos(teamInfo)
this.ItemPreList[this.infoIndex][i].gameObject:SetActive(false) this.ItemPreList[this.infoIndex][i].gameObject:SetActive(false)
end end
InfoBtns[this.infoIndex].func(teamInfo,Grid) InfoBtns[this.infoIndex].func(teamInfo, Grid)
end end
--===========================滑动条中的信息展示==================== --===========================滑动条中的信息展示====================
--神印的 --神印的
function this.imprintInfoShow(teamInfo,Grid) function this.imprintInfoShow(teamInfo, Grid)
for i = 1, #teamInfo.sealShow do for i = 1, #teamInfo.sealShow do
local item = this.ItemPreList[this.infoIndex][i] local item = this.ItemPreList[this.infoIndex][i]
local value = teamInfo.sealShow[i] local value = teamInfo.sealShow[i]
if not item then if not item then
item = newObjToParent(this.imprintPre,Grid.transform) item = newObjToParent(this.imprintPre, Grid.transform)
item:SetActive(true) item:SetActive(true)
this.ItemPreList[this.infoIndex][i] = item this.ItemPreList[this.infoIndex][i] = item
end end
item.gameObject:SetActive(true) item.gameObject:SetActive(true)
local icon = Util.GetGameObject(item,"icon"):GetComponent("Image") local icon = Util.GetGameObject(item, "icon"):GetComponent("Image")
icon.sprite = this.spLoader:LoadSprite(GetResourcePath(XiuXianSkillConfig[value.id].Icon)) icon.sprite = this.spLoader:LoadSprite(GetResourcePath(XiuXianSkillConfig[value.id].Icon))
Util.AddOnceClick(item.gameObject,function () Util.AddOnceClick(item.gameObject, function()
UIManager.OpenPanel(UIName.GeneralInfoPopup,GENERALINFO_TYPE.Imprint,value.id,value.heroTId) UIManager.OpenPanel(UIName.GeneralInfoPopup, GENERALINFO_TYPE.Imprint, value.id, value.heroTId)
end) end)
end end
end end
--身外化身 --身外化身
function this.huashenInfoShow(teamInfo,Grid) function this.huashenInfoShow(teamInfo, Grid)
-- for i = 1, #teamInfo.transformationCardInfo do -- for i = 1, #teamInfo.transformationCardInfo do
-- local data = teamInfo.transformationCardInfo[i] -- local data = teamInfo.transformationCardInfo[i]
-- LogGreen("身外化身卡 id"..tostring(data.id).." 位置:"..tostring(data.index).." 状态:"..tostring(data.status)) -- LogGreen("身外化身卡 id"..tostring(data.id).." 位置:"..tostring(data.index).." 状态:"..tostring(data.status))
@ -680,7 +692,7 @@ function this.huashenInfoShow(teamInfo,Grid)
local item = this.ItemPreList[this.infoIndex][i] local item = this.ItemPreList[this.infoIndex][i]
local value = teamInfo.transformationCardInfo[i] local value = teamInfo.transformationCardInfo[i]
if not item then if not item then
item = newObjToParent(this.emptyPre,Grid.transform) item = newObjToParent(this.emptyPre, Grid.transform)
item:SetActive(true) item:SetActive(true)
this.ItemPreList[this.infoIndex][i] = item this.ItemPreList[this.infoIndex][i] = item
@ -688,30 +700,31 @@ function this.huashenInfoShow(teamInfo,Grid)
this.ItemList[i] = itemview this.ItemList[i] = itemview
this.ItemList[i].transform:SetSiblingIndex(1) this.ItemList[i].transform:SetSiblingIndex(1)
end end
this.ItemList[i]:OnOpen(false, {ChangingCard[value.id].CardId,0,0,value.level,value.star}, 1,false,false,false,this.sortingOrder) this.ItemList[i]:OnOpen(false, { ChangingCard[value.id].CardId, 0, 0, value.level, value.star }, 1, false, false,
Util.GetGameObject(item,"Name"):GetComponent("Text").text = ItemConfig[ChangingCard[value.id].CardId].Name false, this.sortingOrder)
Util.GetGameObject(item,"lvbg/levelText"):GetComponent("Text").text = value.level Util.GetGameObject(item, "Name"):GetComponent("Text").text = ItemConfig[ChangingCard[value.id].CardId].Name
Util.GetGameObject(item,"lvbg"):SetActive(true) Util.GetGameObject(item, "lvbg/levelText"):GetComponent("Text").text = value.level
local starGrid= Util.GetGameObject(item,"starGrid") Util.GetGameObject(item, "lvbg"):SetActive(true)
local starGrid = Util.GetGameObject(item, "starGrid")
starGrid.gameObject:SetActive(true) starGrid.gameObject:SetActive(true)
for i = 0, 5 do for i = 0, 5 do
if i<value.star then if i < value.star then
starGrid.transform:GetChild(i).gameObject:SetActive(true) starGrid.transform:GetChild(i).gameObject:SetActive(true)
else else
starGrid.transform:GetChild(i).gameObject:SetActive(false) starGrid.transform:GetChild(i).gameObject:SetActive(false)
end end
end end
this.ItemList[i].gameObject:SetActive(true) this.ItemList[i].gameObject:SetActive(true)
item:SetActive(true) item:SetActive(true)
end end
end end
--四象心法 --四象心法
function this.fourElementInfoShow(teamInfo,Grid) function this.fourElementInfoShow(teamInfo, Grid)
local textList = {} local textList = {}
local TRANS = {[1] = 2,[2] = 1,[3] = 3,[4] = 4,} local TRANS = { [1] = 2, [2] = 1, [3] = 3, [4] = 4, }
for i = 1, 4 do for i = 1, 4 do
textList[i] = Util.GetGameObject(Grid,"fourPre ("..i..")/lv/Text") textList[i] = Util.GetGameObject(Grid, "fourPre (" .. i .. ")/lv/Text")
textList[i]:GetComponent("Text").text = "0" textList[i]:GetComponent("Text").text = "0"
end end
for i = 1, #teamInfo.sixiangxinfaInfo do for i = 1, #teamInfo.sixiangxinfaInfo do
@ -722,7 +735,7 @@ function this.fourElementInfoShow(teamInfo,Grid)
end end
--命格 --命格
function this.GemInfoShow(teamInfo,Grid) function this.GemInfoShow(teamInfo, Grid)
-- local iconList = {} -- local iconList = {}
-- local levelList = {} -- local levelList = {}
-- for i = 1, 8 do -- for i = 1, 8 do
@ -746,31 +759,33 @@ function this.GemInfoShow(teamInfo,Grid)
-- end -- end
--队伍命石信息 --队伍命石信息
local gems=teamInfo.gemNews local gems = teamInfo.gemNews
if gems and #gems>0 then if gems and #gems > 0 then
this.newGemInfo:SetActive(false) this.newGemInfo:SetActive(false)
for i=1,16 do for i = 1, 16 do
if gems[i] then if gems[i] then
this.newGems[i]:SetActive(true) this.newGems[i]:SetActive(true)
local data=GemNewManager.ChangeOneGemData(gems[i]) local data = GemNewManager.ChangeOneGemData(gems[i])
Util.GetGameObject(this.newGems[i], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(data.frame) Util.GetGameObject(this.newGems[i], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
Util.GetGameObject(this.newGems[i], "hero/icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(data.icon) data.frame)
local frameBtn = Util.GetGameObject(this.newGems[i], "frame") Util.GetGameObject(this.newGems[i], "hero/icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
local heroData = {} data.icon)
Util.AddOnceClick(frameBtn, function() local frameBtn = Util.GetGameObject(this.newGems[i], "frame")
UIManager.OpenPanel(UIName.RewardGemSingleShowPopup,data,3) local heroData = {}
end) Util.AddOnceClick(frameBtn, function()
else UIManager.OpenPanel(UIName.RewardGemSingleShowPopup, data, 3)
this.newGems[i]:SetActive(false) end)
end else
end this.newGems[i]:SetActive(false)
end
end
else else
this.newGemInfo:SetActive(false) this.newGemInfo:SetActive(false)
end end
end end
--坐骑 --坐骑
function this.RideInfoShow(teamInfo,Grid) function this.RideInfoShow(teamInfo, Grid)
-- for i = 1, #teamInfo.userMountInfo do -- for i = 1, #teamInfo.userMountInfo do
-- local data = teamInfo.userMountInfo[i] -- local data = teamInfo.userMountInfo[i]
-- LogPink("坐骑 id"..tostring(data.mountId).." 过期时间:"..tostring(data.overTime)) -- LogPink("坐骑 id"..tostring(data.mountId).." 过期时间:"..tostring(data.overTime))
@ -782,7 +797,7 @@ function this.RideInfoShow(teamInfo,Grid)
item = SubUIManager.Open(SubUIConfig.ItemView, Grid.transform) item = SubUIManager.Open(SubUIConfig.ItemView, Grid.transform)
this.ItemPreList[this.infoIndex][i] = item this.ItemPreList[this.infoIndex][i] = item
end end
item:OnOpen(false, {value.mountId,0}, 1,true,false,false,this.sortingOrder) item:OnOpen(false, { value.mountId, 0 }, 1, true, false, false, this.sortingOrder)
item.gameObject:SetActive(true) item.gameObject:SetActive(true)
end end
if #teamInfo.userMountInfo > 4 then if #teamInfo.userMountInfo > 4 then
@ -795,7 +810,7 @@ function this.RideInfoShow(teamInfo,Grid)
end end
--礼物 --礼物
function this.GiftInfoShow(teamInfo,Grid) function this.GiftInfoShow(teamInfo, Grid)
for i = 1, #teamInfo.giftEquipIds do for i = 1, #teamInfo.giftEquipIds do
local item = this.ItemPreList[this.infoIndex][i] local item = this.ItemPreList[this.infoIndex][i]
local value = teamInfo.giftEquipIds[i] local value = teamInfo.giftEquipIds[i]
@ -803,7 +818,7 @@ function this.GiftInfoShow(teamInfo,Grid)
item = SubUIManager.Open(SubUIConfig.ItemView, Grid.transform) item = SubUIManager.Open(SubUIConfig.ItemView, Grid.transform)
this.ItemPreList[this.infoIndex][i] = item this.ItemPreList[this.infoIndex][i] = item
end end
item:OnOpen(false, {value,0}, 1,true,false,false,this.sortingOrder) item:OnOpen(false, { value, 0 }, 1, true, false, false, this.sortingOrder)
item.gameObject:SetActive(true) item.gameObject:SetActive(true)
end end
if #teamInfo.giftEquipIds > 4 then if #teamInfo.giftEquipIds > 4 then
@ -814,12 +829,13 @@ function this.GiftInfoShow(teamInfo,Grid)
Grid:GetComponent("RectTransform").pivot = Vector2.New(0.5, 0.5) Grid:GetComponent("RectTransform").pivot = Vector2.New(0.5, 0.5)
end end
end end
--============================底部按钮显示=========================== --============================底部按钮显示===========================
function this.RefreshBtnShow() function this.RefreshBtnShow()
this.btnBox:SetActive(true) this.btnBox:SetActive(true)
-- 按钮功能 -- 按钮功能
local btnType = this._Config.btnType or {} local btnType = this._Config.btnType or {}
for index, btn in ipairs(this.btnList) do for index, btn in ipairs(this.btnList) do
btn:SetActive(btnType[index] ~= nil) btn:SetActive(btnType[index] ~= nil)
if btnType[index] then if btnType[index] then
@ -842,7 +858,7 @@ function this.RefreshBtnShow()
this.addFriendBtn:SetActive(false) this.addFriendBtn:SetActive(false)
end end
-- 判断该界面类型是否有按钮显示 -- 判断该界面类型是否有按钮显示
if not this._Config or not this._Config.btnType or isNpc then if not this._Config or not this._Config.btnType or isNpc then
--this.boxLine:SetActive(false) --this.boxLine:SetActive(false)
this.btnBox:SetActive(false) this.btnBox:SetActive(false)
this.addFriendBtn:SetActive(false) this.addFriendBtn:SetActive(false)
@ -851,6 +867,7 @@ function this.RefreshBtnShow()
--一些按钮需要特殊显示 --一些按钮需要特殊显示
this.SpecialBtnShow() this.SpecialBtnShow()
end end
--按钮特殊显示 --按钮特殊显示
function this.SpecialBtnShow() function this.SpecialBtnShow()
if this._ViewType == PLAYER_INFO_VIEW_TYPE.LINGMAIMIJING then if this._ViewType == PLAYER_INFO_VIEW_TYPE.LINGMAIMIJING then
@ -869,7 +886,7 @@ function this.SpecialBtnShow()
end end
end end
--临时修改如果灵脉已占领无法抢夺挑战 --临时修改如果灵脉已占领无法抢夺挑战
if this._PlayerId>0 then if this._PlayerId > 0 then
this.btnBox:SetActive(false) this.btnBox:SetActive(false)
end end
end end
@ -880,11 +897,12 @@ end
function this.Report() function this.Report()
Log("举报") Log("举报")
end end
-- 拉黑 -- 拉黑
function this.AddToBlackList() function this.AddToBlackList()
if this.serverName and this.serverName ~= "" then if this.serverName and this.serverName ~= "" then
PopupTipPanel.ShowTip("无法跨服添加黑名单") PopupTipPanel.ShowTip("无法跨服添加黑名单")
return return
end end
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GOODFRIEND) then if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GOODFRIEND) then
PopupTipPanel.ShowTip(Language[10828]) PopupTipPanel.ShowTip(Language[10828])
@ -899,6 +917,7 @@ function this.AddToBlackList()
this:SetViewType(PLAYER_INFO_VIEW_TYPE.GO_TO_BLACK) this:SetViewType(PLAYER_INFO_VIEW_TYPE.GO_TO_BLACK)
end) end)
end end
-- 移除黑名单 -- 移除黑名单
function this.RemoveFromBlackList() function this.RemoveFromBlackList()
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GOODFRIEND) then if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GOODFRIEND) then
@ -910,6 +929,7 @@ function this.RemoveFromBlackList()
this:ClosePanel() this:ClosePanel()
end) end)
end end
-- 移除黑名单 -- 移除黑名单
function this.GoToBlack() function this.GoToBlack()
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GOODFRIEND) then if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GOODFRIEND) then
@ -919,20 +939,23 @@ function this.GoToBlack()
this:ClosePanel() this:ClosePanel()
UIManager.OpenPanel(UIName.GoodFriendMainPanel, true, 4) UIManager.OpenPanel(UIName.GoodFriendMainPanel, true, 4)
end end
-- 打他 -- 打他
function this.BeatHim() function this.BeatHim()
this:ClosePanel() this:ClosePanel()
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.PLAY, this._PlayerData) UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.PLAY, this._PlayerData)
end end
-- 跨服天梯 -- 跨服天梯
function this.JumpServerBattle() function this.JumpServerBattle()
this:ClosePanel() this:ClosePanel()
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.JUMPSERVER_HIGHTLADDER,true, this._PlayerData) UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.JUMPSERVER_HIGHTLADDER, true, this._PlayerData)
end end
-- 跨服天梯 -- 跨服天梯
function this.JumpServerBattle_NORMAL() function this.JumpServerBattle_NORMAL()
this:ClosePanel() this:ClosePanel()
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.PLAY, this._PlayerData,true) UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.PLAY, this._PlayerData, true)
end end
--灵脉秘境 --灵脉秘境
@ -942,13 +965,14 @@ function this.LingMaiFormaion()
Log("调整编队") Log("调整编队")
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, this.data) UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, this.data)
else else
LingMaiMiJingManager.CheckPrivilage(function () LingMaiMiJingManager.CheckPrivilage(function()
this:ClosePanel() this:ClosePanel()
Log("正常战斗") Log("正常战斗")
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, this.data) UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, this.data)
end) end)
end end
end end
--灵脉秘境 --灵脉秘境
function this.LingMaiQieCuo() function this.LingMaiQieCuo()
this:ClosePanel() this:ClosePanel()
@ -957,8 +981,9 @@ function this.LingMaiQieCuo()
sdata.name = this.curPlayerData.name sdata.name = this.curPlayerData.name
sdata.head = this.curPlayerData.head sdata.head = this.curPlayerData.head
sdata.headFrame = this.curPlayerData.headFrame sdata.headFrame = this.curPlayerData.headFrame
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, sdata,true) UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, sdata, true)
end end
--=====================================按钮事件结束====================================== --=====================================按钮事件结束======================================
--界面关闭时调用(用于子类重写) --界面关闭时调用(用于子类重写)
@ -992,4 +1017,3 @@ function PlayerInfoPopup:OnDestroy()
end end
return PlayerInfoPopup return PlayerInfoPopup

View File

@ -92,6 +92,7 @@ function RankingSingleListPanel:BindEvent()
elseif proType==4 then elseif proType==4 then
formation= FormationTypeDef.LuoFuZhengFeng4 formation= FormationTypeDef.LuoFuZhengFeng4
end end
LogGreen("编队Id" .. formation)
JumpServerManager.showRankType=formation JumpServerManager.showRankType=formation
this.GetRankInfo(sData.rankType,1,0) this.GetRankInfo(sData.rankType,1,0)

View File

@ -152,6 +152,7 @@ function PlayerLiveView:OnShowLive(isMap)
local curLocalScale = Vector3.New(curArtResourcesConfig.Scale,curArtResourcesConfig.Scale,curArtResourcesConfig.Scale) local curLocalScale = Vector3.New(curArtResourcesConfig.Scale,curArtResourcesConfig.Scale,curArtResourcesConfig.Scale)
local curLocalPosition = Vector3.New(curArtResourcesConfig.Position[1],curArtResourcesConfig.Position[2],0) local curLocalPosition = Vector3.New(curArtResourcesConfig.Position[1],curArtResourcesConfig.Position[2],0)
self.playerLiveStr = curArtResourcesConfig.Name--"live2d_npc_map" self.playerLiveStr = curArtResourcesConfig.Name--"live2d_npc_map"
LogError(curArtResourcesConfig.Name)
self.playerLive = poolManager:LoadLive(self.playerLiveStr, self.playerLiveGo.transform, curLocalScale, curLocalPosition) self.playerLive = poolManager:LoadLive(self.playerLiveStr, self.playerLiveGo.transform, curLocalScale, curLocalPosition)
self.playerLiveSkeletonGraphic = self.playerLive:GetComponent("SkeletonGraphic") self.playerLiveSkeletonGraphic = self.playerLive:GetComponent("SkeletonGraphic")
if self.playerLiveSkeletonGraphic then if self.playerLiveSkeletonGraphic then