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_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
end
end
LogGreen("编队Id" .. formation)
JumpServerManager.showRankType=formation
UIManager.OpenPanel(UIName.PlayerInfoPopup, data.personInfo.uid, PLAYER_INFO_VIEW_TYPE.JUPMSERVER,data.personInfo.servername,formation)
end)

View File

@ -39,11 +39,6 @@ local _ViewConfig = {
tip = Language[11500],
isAddFriend = true,
},
[PLAYER_INFO_VIEW_TYPE.TOP_MATCH] = {
formationType = FormationTypeDef.ARENA_TOM_MATCH,
tip = "巅峰赛阵容",
isAddFriend = false,
},
[PLAYER_INFO_VIEW_TYPE.MIND_DEMON] = {
formationType = FormationTypeDef.MONSTER_CAMP_ATTACK,
tip = Language[12306],
@ -73,6 +68,11 @@ local _ViewConfig = {
{ name = "切磋", func = 7 },
}
},
[PLAYER_INFO_VIEW_TYPE.TOP_MATCH] = {
formationType = FormationTypeDef.ARENA_TOM_MATCH,
tip = "巅峰赛阵容",
isAddFriend = false,
},
[PLAYER_INFO_VIEW_TYPE.QIJIESHILIAN] = {
formationType = FormationTypeDef.FORMATION_QIJIESHILIAN,
tip = "宇宙生存挑战阵容:",
@ -174,18 +174,22 @@ function PlayerInfoPopup:InitComponent()
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")
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 = {}
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
this.Weapons = {}
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
this.newGems = {}
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
this.pokemonObj = Util.GetGameObject(self.transform, "tipImage/panel/pokemonInfo").gameObject
this.weaponInfo = Util.GetGameObject(self.transform, "tipImage/panel/weaponInfo")
@ -213,7 +217,6 @@ function PlayerInfoPopup:InitComponent()
this.InfoBtnsList = {}
this.ItemPreList = {}
this.ItemList = {}
end
--绑定事件(用于子类重写)
@ -318,7 +321,8 @@ function PlayerInfoPopup:OnShow()
-- 如果是好友更新好友数据
this.curPlayerData = msg.teamInfo
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.RefreshPlayerInfo(msg.teamInfo)
local teamInfo = msg.teamInfo.team
@ -444,7 +448,8 @@ function this.FormationAdapter(teamInfo)
local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, demonId)
this.Demons[hero.position].proIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(hero.propertyId))
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(
heroConfig.Quality, hero.star))
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 = {}
@ -457,11 +462,12 @@ function this.FormationAdapter(teamInfo)
else
Util.AddOnceClick(frameBtn, function()
if not hero.heroid or not heroConfig then
return
end
NetManager.ViewHeroInfoRequest(this._PlayerId,hero.heroid,netserverName,this._Config.formationType,function(msg)
heroData= GoodFriendManager.GetHeroDatas(msg.hero,msg.force,msg.SpecialEffects,msg.guildSkill)
NetManager.ViewHeroInfoRequest(this._PlayerId, hero.heroid, netserverName, this._Config
.formationType, function(msg)
heroData = GoodFriendManager.GetHeroDatas(msg.hero, msg.force, msg.SpecialEffects, msg
.guildSkill)
GoodFriendManager.InitEquipData(msg.equip, heroData) --HeroManager.GetSingleHeroData(heroData.dynamicId)
LogError("msg.playerGiftLv===================" .. msg.playerGiftLv)
for k, v in pairs(heroData.potential) do
@ -479,7 +485,8 @@ function this.FormationAdapter(teamInfo)
this.pokemonObj:SetActive(true)
for i, demon in ipairs(this.Pokemons) do
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, "pos"):SetActive(true)
end
@ -513,8 +520,10 @@ function this.FormationAdapter(teamInfo)
Util.AddParticleSortLayer(Util.GetGameObject(heroGo, "starGrid"), this.sortingOrder + 1)
local heroConfig = ConfigManager.GetConfigData(ConfigName.SpiritAnimal, demonId)
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(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(heroConfig.Icon))
Util.GetGameObject(this.Pokemons[i], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
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 heroData = {}
Util.AddOnceClick(frameBtn, function()
@ -532,7 +541,8 @@ function this.FormationAdapter(teamInfo)
this.weaponInfo:SetActive(true)
for i, demon in ipairs(this.Weapons) do
--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, "pos"):SetActive(true)
end
@ -550,8 +560,10 @@ function this.FormationAdapter(teamInfo)
local heroConfig = ConfigManager.GetConfigData(ConfigName.ShenBing, demonId)
Util.GetGameObject(this.Weapons[hero.position], "pos"):SetActive(false)
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(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(heroConfig.Icon))
Util.GetGameObject(this.Weapons[hero.position], "frame"):GetComponent("Image").sprite = this.spLoader
: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 heroData = {}
Util.AddOnceClick(frameBtn, function()
@ -688,7 +700,8 @@ function this.huashenInfoShow(teamInfo,Grid)
this.ItemList[i] = itemview
this.ItemList[i].transform:SetSiblingIndex(1)
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,
false, this.sortingOrder)
Util.GetGameObject(item, "Name"):GetComponent("Text").text = ItemConfig[ChangingCard[value.id].CardId].Name
Util.GetGameObject(item, "lvbg/levelText"):GetComponent("Text").text = value.level
Util.GetGameObject(item, "lvbg"):SetActive(true)
@ -753,8 +766,10 @@ function this.GemInfoShow(teamInfo,Grid)
if gems[i] then
this.newGems[i]:SetActive(true)
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], "hero/icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(data.icon)
Util.GetGameObject(this.newGems[i], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
data.frame)
Util.GetGameObject(this.newGems[i], "hero/icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
data.icon)
local frameBtn = Util.GetGameObject(this.newGems[i], "frame")
local heroData = {}
Util.AddOnceClick(frameBtn, function()
@ -814,6 +829,7 @@ function this.GiftInfoShow(teamInfo,Grid)
Grid:GetComponent("RectTransform").pivot = Vector2.New(0.5, 0.5)
end
end
--============================底部按钮显示===========================
function this.RefreshBtnShow()
this.btnBox:SetActive(true)
@ -851,6 +867,7 @@ function this.RefreshBtnShow()
--一些按钮需要特殊显示
this.SpecialBtnShow()
end
--按钮特殊显示
function this.SpecialBtnShow()
if this._ViewType == PLAYER_INFO_VIEW_TYPE.LINGMAIMIJING then
@ -880,6 +897,7 @@ end
function this.Report()
Log("举报")
end
-- 拉黑
function this.AddToBlackList()
if this.serverName and this.serverName ~= "" then
@ -899,6 +917,7 @@ function this.AddToBlackList()
this:SetViewType(PLAYER_INFO_VIEW_TYPE.GO_TO_BLACK)
end)
end
-- 移除黑名单
function this.RemoveFromBlackList()
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GOODFRIEND) then
@ -910,6 +929,7 @@ function this.RemoveFromBlackList()
this:ClosePanel()
end)
end
-- 移除黑名单
function this.GoToBlack()
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GOODFRIEND) then
@ -919,16 +939,19 @@ function this.GoToBlack()
this:ClosePanel()
UIManager.OpenPanel(UIName.GoodFriendMainPanel, true, 4)
end
-- 打他
function this.BeatHim()
this:ClosePanel()
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.PLAY, this._PlayerData)
end
-- 跨服天梯
function this.JumpServerBattle()
this:ClosePanel()
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.JUMPSERVER_HIGHTLADDER, true, this._PlayerData)
end
-- 跨服天梯
function this.JumpServerBattle_NORMAL()
this:ClosePanel()
@ -949,6 +972,7 @@ function this.LingMaiFormaion()
end)
end
end
--灵脉秘境
function this.LingMaiQieCuo()
this:ClosePanel()
@ -959,6 +983,7 @@ function this.LingMaiQieCuo()
sdata.headFrame = this.curPlayerData.headFrame
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, sdata, true)
end
--=====================================按钮事件结束======================================
--界面关闭时调用(用于子类重写)
@ -992,4 +1017,3 @@ function PlayerInfoPopup:OnDestroy()
end
return PlayerInfoPopup

View File

@ -92,6 +92,7 @@ function RankingSingleListPanel:BindEvent()
elseif proType==4 then
formation= FormationTypeDef.LuoFuZhengFeng4
end
LogGreen("编队Id" .. formation)
JumpServerManager.showRankType=formation
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 curLocalPosition = Vector3.New(curArtResourcesConfig.Position[1],curArtResourcesConfig.Position[2],0)
self.playerLiveStr = curArtResourcesConfig.Name--"live2d_npc_map"
LogError(curArtResourcesConfig.Name)
self.playerLive = poolManager:LoadLive(self.playerLiveStr, self.playerLiveGo.transform, curLocalScale, curLocalPosition)
self.playerLiveSkeletonGraphic = self.playerLive:GetComponent("SkeletonGraphic")
if self.playerLiveSkeletonGraphic then