【灵脉秘境】提交

dev_chengFeng
ZhangBiao 2021-11-16 17:34:37 +08:00
parent ec1d668524
commit 6012b533ca
10 changed files with 216 additions and 128 deletions

View File

@ -1253,6 +1253,7 @@ FORMATION_TYPE = {
FOUR_ELEMENT = 24,
WORLDARENA=25,--玉虚论道3队
QIJIESHILIAN=26,--七界试炼编队
LINGMAIMIJING=27,--灵脉秘境编队
}
--活动Type定义
@ -1908,6 +1909,7 @@ FormationTypeDef = {
FORMATION_YUXUNLUNDAO1 = 2001, --玉虚论道1队
FORMATION_YUXUNLUNDAO2 = 2002, --玉虚论道2队
FORMATION_YUXUNLUNDAO3 = 2003, --玉虚论道3队
FORMATION_LINGMAIMIJING = 2004, --灵脉秘境编队
FORMATION_QIJIESHILIAN = 2101, --七界试炼编队
FourElement_PEOPLE = 3001,
FourElement_BUDDHIST = 3002,
@ -1944,6 +1946,7 @@ PLAYER_INFO_VIEW_TYPE = {
JUPMSERVER_NORMAL = 8,--跨服主线编队
TOP_MATCH = 9,--巅峰赛编队
QIJIESHILIAN = 10,--七界试炼编队
LINGMAIMIJING = 11,--灵脉秘境编队
}
--限时达人 周卡 限时活动 拍脸 异妖直购
@ -2582,6 +2585,7 @@ BATTLE_TYPE = {
EndlessMpaFight = 22, -- 无尽副本
QIJIE_FIGHT = 24, --七界试炼
FOURELEMENT = 23,
LINGMAIMIJING = 25, --灵脉秘境
}
--isRankingMainPanelShow_1 本服 _2 跨服 3_跨服不显示在排行主界面 4 用于十绝阵特殊判断 --0非跨服界面内排行榜(达人)
--本服排行

View File

@ -154,7 +154,7 @@ CROSSLINGMAISECRETAREAREQUEST = protobuf.Descriptor();
CROSSLINGMAISECRETAREAREQUEST_ID_FIELD = protobuf.FieldDescriptor();
CROSSLINGMAISECRETAREARESPONSE = protobuf.Descriptor();
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD = protobuf.FieldDescriptor();
CROSSLINGMAISECRETAREARESPONSE_FIGHTRESULT_FIELD = protobuf.FieldDescriptor();
CROSSLINGMAISECRETAREARESPONSE_RESULT_FIELD = protobuf.FieldDescriptor();
CROSSLINGMAISECRETAREARECORDREQUEST = protobuf.Descriptor();
CROSSLINGMAISECRETAREARECORDRESPONSE = protobuf.Descriptor();
CROSSLINGMAISECRETAREARECORDRESPONSE_RECORDDATA_FIELD = protobuf.FieldDescriptor();
@ -1550,28 +1550,28 @@ CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.name = "fightData"
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.full_name = ".rpc.protocols.CrossLingmaiSecretAreaResponse.fightData"
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.number = 1
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.index = 0
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.label = 3
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.label = 1
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.has_default_value = false
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.default_value = {}
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.default_value = nil
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.message_type = CommonProto_pb.FIGHTDATA
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.type = 11
CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD.cpp_type = 10
CROSSLINGMAISECRETAREARESPONSE_FIGHTRESULT_FIELD.name = "fightResult"
CROSSLINGMAISECRETAREARESPONSE_FIGHTRESULT_FIELD.full_name = ".rpc.protocols.CrossLingmaiSecretAreaResponse.fightResult"
CROSSLINGMAISECRETAREARESPONSE_FIGHTRESULT_FIELD.number = 2
CROSSLINGMAISECRETAREARESPONSE_FIGHTRESULT_FIELD.index = 1
CROSSLINGMAISECRETAREARESPONSE_FIGHTRESULT_FIELD.label = 3
CROSSLINGMAISECRETAREARESPONSE_FIGHTRESULT_FIELD.has_default_value = false
CROSSLINGMAISECRETAREARESPONSE_FIGHTRESULT_FIELD.default_value = {}
CROSSLINGMAISECRETAREARESPONSE_FIGHTRESULT_FIELD.type = 5
CROSSLINGMAISECRETAREARESPONSE_FIGHTRESULT_FIELD.cpp_type = 1
CROSSLINGMAISECRETAREARESPONSE_RESULT_FIELD.name = "result"
CROSSLINGMAISECRETAREARESPONSE_RESULT_FIELD.full_name = ".rpc.protocols.CrossLingmaiSecretAreaResponse.result"
CROSSLINGMAISECRETAREARESPONSE_RESULT_FIELD.number = 2
CROSSLINGMAISECRETAREARESPONSE_RESULT_FIELD.index = 1
CROSSLINGMAISECRETAREARESPONSE_RESULT_FIELD.label = 1
CROSSLINGMAISECRETAREARESPONSE_RESULT_FIELD.has_default_value = false
CROSSLINGMAISECRETAREARESPONSE_RESULT_FIELD.default_value = 0
CROSSLINGMAISECRETAREARESPONSE_RESULT_FIELD.type = 5
CROSSLINGMAISECRETAREARESPONSE_RESULT_FIELD.cpp_type = 1
CROSSLINGMAISECRETAREARESPONSE.name = "CrossLingmaiSecretAreaResponse"
CROSSLINGMAISECRETAREARESPONSE.full_name = ".rpc.protocols.CrossLingmaiSecretAreaResponse"
CROSSLINGMAISECRETAREARESPONSE.nested_types = {}
CROSSLINGMAISECRETAREARESPONSE.enum_types = {}
CROSSLINGMAISECRETAREARESPONSE.fields = {CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD, CROSSLINGMAISECRETAREARESPONSE_FIGHTRESULT_FIELD}
CROSSLINGMAISECRETAREARESPONSE.fields = {CROSSLINGMAISECRETAREARESPONSE_FIGHTDATA_FIELD, CROSSLINGMAISECRETAREARESPONSE_RESULT_FIELD}
CROSSLINGMAISECRETAREARESPONSE.is_extendable = false
CROSSLINGMAISECRETAREARESPONSE.extensions = {}
CROSSLINGMAISECRETAREARECORDREQUEST.name = "CrossLingmaiSecretAreaRecordRequest"

View File

@ -482,7 +482,7 @@ function this.ShowBattleResult(result, msg)
UIManager.ClosePanel(UIName.ElementPopup)
end
-- 回放直接关闭界面
if fightType == BATTLE_TYPE.BACK or fightType == BATTLE_TYPE.ARENA then
if fightType == BATTLE_TYPE.BACK or fightType == BATTLE_TYPE.ARENA or fightType == BATTLE_TYPE.LINGMAIMIJING then
this:ClosePanel()
return
end

View File

@ -69,6 +69,7 @@ this.PanelOptionView = {
[FORMATION_TYPE.JUMPSERVER_HIGHTLADDER]="Modules/Formation/View/JumpServerHightLadderFormation",
[FORMATION_TYPE.WORLDARENA]="Modules/Formation/View/WorldArenaFormation",
[FORMATION_TYPE.QIJIESHILIAN]="Modules/Formation/View/QiJieFormation",
[FORMATION_TYPE.LINGMAIMIJING]="Modules/Formation/View/LingMaiFormation",
}
function this:InitComponent()
this.spLoader = SpriteLoader.New()

View File

@ -0,0 +1,84 @@
----- 灵脉秘境 -----
local LingMaiFormation = {}
local this = LingMaiFormation
--- 是否需要切换编队的功能
this.IsNeedChangeFormation = false
local hadClick = false
--local GetCurNodeInfo
this.nodeData = {}
local curFormationTypeDef
--- 逻辑初始化
function this.Init(root, _nodeData)
this.spLoader = SpriteLoader.New()
this.root = root
this.nodeData = _nodeData
this.InitView()
end
--- 获取需要显示的编队id
function this.GetFormationIndex()
return FormationTypeDef.FORMATION_LINGMAIMIJING
end
--- btn1点击回调事件
function this.On_Btn1_Click()
this.root.SetOneKeyGo()
end
function this.On_Btn2_Click()
if not hadClick then
hadClick = true
if #this.root.choosedList>=1 then
--保存编队
FormationManager.SaveFormation(this.root.curFormationIndex, this.root.choosedList,
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
else
PopupTipPanel.ShowTip(string.format(Language[10699], 1))
hadClick = false
return
end
-- 编队为空
if #FormationManager.formationList[FormationTypeDef.FORMATION_LINGMAIMIJING].teamHeroInfos == 0 then
PopupTipPanel.ShowTip(Language[10671])
hadClick = false
return
end
this.StartFight()
end
end
-- 初始化界面显示
function this.InitView()
this.root.btn_1:SetActive(true)
this.root.btn_2:SetActive(true)
this.root.btn_1_lab.text = Language[10710]
this.root.btn_2_lab.text = this.nodeData.uid == PlayerManager.uid and Language[10715] or Language[10706]
hadClick = false
this.root.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
end
-- 开始战斗
function this.StartFight()
this.spLoader:Destroy()
if #this.root.choosedList>=1 then
--保存编队
FormationManager.SaveFormation(this.root.curFormationIndex, this.root.choosedList,
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
else
hadClick = false
PopupTipPanel.ShowTip(string.format(Language[10699], 1))
return
end
if this.nodeData.uid == PlayerManager.uid then
this.root:ClosePanel()
else
NetManager.LingMaiBattleRequest(this.nodeData.Id,function (msg)
this.root:ClosePanel()
local fightData = BattleManager.GetBattleServerData(msg)
LingMaiMiJingManager.battleResult = msg
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.LINGMAIMIJING):SetResult(msg.result)
end)
end
end
return this

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b497fbf7f8e29d34692ca7962faa45f6
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -4,11 +4,12 @@ local lodeConfig = ConfigManager.GetConfig(ConfigName.LodeConfig)
function this.Initialize()
this.state = 1--当前状态
this.startTime = 1637026855--我开始占领此矿脉的时间
this.startTime = 0--我开始占领此矿脉的时间
this.endTime = 1638460800--结束时间
this.myPlaceId = 3--当前我占领的矿脉的id
this.fightTime = 0--我的剩余挑战次数
this.recordData = {}
this.battleResult = {}
end
--获取manager中的信息
@ -21,14 +22,14 @@ function this.GetData()
data.recordData = {}
for i = 1, 5 do
data.recordData[i] = {}
LogGreen("placeId:"..tostring(this.recordData[i].placeId).." playerId:"..tostring(this.recordData[i].playerId).." Name:"..tostring(this.recordData[i].playerName))
data.recordData[i].Id = this.recordData[i].placeId
if this.recordData[i].playerId then
data.recordData[i].playerId = this.recordData[i].playerId
data.recordData[i].playerName = this.recordData[i].playerName
-- LogGreen("placeId:"..tostring(this.recordData[i].id).." playerId:"..tostring(this.recordData[i].uid).." Name:"..tostring(this.recordData[i].userName))
data.recordData[i].Id = this.recordData[i].id
if this.recordData[i].uid ~= 0 then
data.recordData[i].uid = this.recordData[i].uid
data.recordData[i].userName = this.recordData[i].userName
else
data.recordData[i].playerId = nil
data.recordData[i].playerName = "灵脉守护者"
data.recordData[i].uid = 0
data.recordData[i].userName = "灵脉守护者"
end
data.recordData[i].No = lodeConfig[data.recordData[i].Id].No
data.recordData[i].PageNo = lodeConfig[data.recordData[i].Id].PageNo
@ -48,11 +49,12 @@ function this.GetLingMaiServerData(msg,func)
this.fightTime = msg.remainChangeTimes
-- this.endTime = msg.state.endTime
this.recordData = msg.recordData
LogGreen("state:"..tostring(msg.state).." myPlaceId:"..tostring(msg.myOccupyId).." startTime:"..tostring(msg.myOccupyTime).." fightTime:"..tostring(msg.remainChangeTimes).." recordData:"..tostring(#msg.recordData))
for i = 1, #msg.recordData do
LogYellow("id:"..tostring(msg.recordData.id).." uid:"..tostring(msg.recordData.uid).." userName:"..tostring(msg.recordData.userName))
end
this.curPage = lodeConfig[this.myPlaceId].PageNo
LogGreen("state:"..tostring(msg.state).." myPlaceId:"..tostring(msg.myOccupyId).." startTime:"..tostring(msg.myOccupyTime).." fightTime:"..tostring(msg.remainChangeTimes).." recordData:"..tostring(#msg.recordData).." curPage:"..tostring(this.curPage))
for i = 1, #msg.recordData do
LogYellow("id:"..tostring(msg.recordData[i].id).." uid:"..tostring(msg.recordData[i].uid).." userName:"..tostring(msg.recordData[i].userName).." practiceLevel:"..tostring(msg.recordData[i].practiceLevel))
-- msg.recordData[i].userName = PracticeManager.SetNameColor(msg.recordData[i].userName,msg.recordData[i].practiceLevel)
end
-- Game.GlobalEvent:DispatchEvent(GameEvent.LingMaiMiJing.RefreshPanel)
if func then
func()

View File

@ -76,11 +76,10 @@ end
--界面打开时调用(用于子类重写)
function LingMaiMiJingPanel:OnShow()
NetManager.GetLingMaiInfoRequest(0,function ()
LogYellow("刷新了一次")
-- self.data = LingMaiMiJingManager.GetData()
-- self:SetTime()
-- self:SetMydata()
-- self:SetVeins()
self.data = LingMaiMiJingManager.GetData()
self:SetTime()
self:SetMydata()
self:SetVeins()
end)
end
@ -113,9 +112,9 @@ function LingMaiMiJingPanel:SetVeins()
local rewardPre = Util.GetGameObject(grid,"rewardPre")
rewardPre:SetActive(false)
title.text = data.playerName
title.text = data.userName
num.text = data.No
name.text = data.playerName
name.text = data.userName
if not self.itemList[i] then
self.itemList[i] = {}
end
@ -132,6 +131,14 @@ function LingMaiMiJingPanel:SetVeins()
Util.GetGameObject(item,"icon"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetSpriteNameByItemId(data.RewardList[j][1]))
Util.GetGameObject(item,"Text"):GetComponent("Text").text = string.format( "%s/分",data.RewardList[j][2])
end
Util.AddOnceClick(go,function ()
-- UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING,data)
if data.uid == 0 then
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING,data)
else
UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid,PLAYER_INFO_VIEW_TYPE.LINGMAIMIJING,data.serverName and data.serverName or nil,data)
end
end)
end
end

View File

@ -642,13 +642,14 @@ function this:BindEvent()
end)
Util.AddClick(this.btnHongMeng,function()
NetManager.HongMengInfoResponse(function ()
if HarmonyManager:HongMengTowerUpLimit() > 0 then
UIManager.OpenPanel(UIName.HongMengEnvoyPanel)
else
UIManager.OpenPanel(UIName.HongMengPanel)
end
end)
-- NetManager.HongMengInfoResponse(function ()
-- if HarmonyManager:HongMengTowerUpLimit() > 0 then
-- UIManager.OpenPanel(UIName.HongMengEnvoyPanel)
-- else
-- UIManager.OpenPanel(UIName.HongMengPanel)
-- end
-- end)
UIManager.OpenPanel(UIName.LingMaiMiJingPanel)
end)
Util.AddClick(this.btnTianShuMiJuan,function()

View File

@ -82,6 +82,16 @@ local _ViewConfig = {
-- {name = "切磋", func = 7},
}
},
[PLAYER_INFO_VIEW_TYPE.LINGMAIMIJING] = {
formationType = FormationTypeDef.FORMATION_LINGMAIMIJING,
tip = "灵脉秘境阵容:",
isAddFriend = false,
btnType = {
{name = "切磋", func = 3},
{name = "挑战", func = 8},
{name = "调整编队", func = 8},
}
},
}
local curPlayerName = ""
@ -187,10 +197,11 @@ function PlayerInfoPopup:RemoveListener()
end
--界面打开时调用(用于子类重写)
function PlayerInfoPopup:OnOpen(playerId, viewType,serverName)
function PlayerInfoPopup:OnOpen(playerId, viewType,serverName,_otherdata)
this._PlayerId = playerId
this._ViewType = viewType or PLAYER_INFO_VIEW_TYPE.NORMAL
this.serverName = serverName--跨服加的服务器数据
this.data = _otherdata
isNpc = this._PlayerId <= 1000000
-- 界面类型修正
if this._ViewType == PLAYER_INFO_VIEW_TYPE.NORMAL and GoodFriendManager.IsInBlackList(this._PlayerId) then
@ -206,6 +217,7 @@ function PlayerInfoPopup:OnOpen(playerId, viewType,serverName)
[5] = this.GoToBlack,
[6] = this.JumpServerBattle,
[7] = this.JumpServerBattle_NORMAL,
[8] = this.LingMaiFormaion,
}
end
@ -218,25 +230,27 @@ end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function PlayerInfoPopup:OnShow()
this.RefreshBtnShow()
-- this.RefreshBtnShow()
-- 请求数据
LogGreen(this._PlayerId.." "..this._Config.formationType)
netserverName = nil
if this.serverName and this.serverName ~= "" then--and this.serverName ~= PlayerManager.serverInfo.name
netserverName = 1
LogGreen("角色Id:"..tostring(this._PlayerId).." 编队Id"..tostring(this._Config.formationType))
if this._PlayerId > 0 then--如果PlayerId > 0 说明是真人或者机器人为0则直接是怪物组数据需要自己拼接
netserverName = nil
if this.serverName and this.serverName ~= "" then--and this.serverName ~= PlayerManager.serverInfo.name
netserverName = 1
end
NetManager.RequestPlayerInfo(this._PlayerId, this._Config.formationType,netserverName,0, function(msg)
-- 如果是好友更新好友数据
curPlayerName = msg.teamInfo.name
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
this.FormationAdapter(teamInfo)
--
this.RefreshFunction()
this.RefreshBtnShow()
end)
end
NetManager.RequestPlayerInfo(this._PlayerId, this._Config.formationType,netserverName,0, function(msg)
-- 如果是好友更新好友数据
curPlayerName = msg.teamInfo.name
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
this.FormationAdapter(teamInfo)
--
this.RefreshFunction()
this.RefreshBtnShow()
end)
end
-- 刷新基础信息显示
@ -259,11 +273,6 @@ function this.RefreshPlayerInfo(data)
if not _PlayerHead then
_PlayerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.memHead.transform)
end
-- if titleLive then
-- poolManager:UnLoadAsset(titleLiveStr, titleLive, PoolManager.AssetType.GameObject)
-- titleLive = nil
-- titleLiveStr = nil
-- end
_PlayerHead:Reset()
_PlayerHead:SetScale(Vector3.one * 0.85)
_PlayerHead:SetHead(data.head)
@ -274,18 +283,6 @@ function this.RefreshPlayerInfo(data)
local title=data.userTitle
if title and title>0 then
this.titlePar:SetActive(true)
-- local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,title)
-- local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
-- titleLiveStr = curArtResourcesConfig.Name
-- titleLive = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject)
-- titleLive.transform:SetParent(this.titlePar.transform)
-- titleLive.transform.localPosition = Vector3.New(0,0,0)
-- titleLive.transform.localScale = Vector3.New(0.5,0.5,0.5)
-- local sortingorder=0
-- if this.sortingOrder then
-- Util.AddParticleSortLayer(titleLive,this.sortingOrder - sortingorder)
-- sortingorder = this.sortingOrder
-- end
LogError("title=="..title)
if titleLive then
SubUIManager.Close(titleLive)
@ -295,8 +292,6 @@ function this.RefreshPlayerInfo(data)
titleLive = SubUIManager.Open(SubUIConfig.PlayerTitle, this.titlePar.transform)
titleLive:SetShow(title, Vector3.New(0,0,0), 0.5, 0.03*20, this.sortingOrder)
end
else
this.titlePar:SetActive(false)
end
@ -355,13 +350,7 @@ function this.FormationAdapter(teamInfo)
this.Demons[hero.position].proIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
this.Demons[hero.position].levelText.text = hero.level
this.Demons[hero.position].frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality, hero.star))
-- if hero.skinId == 0 then
-- Util.GetGameObject(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(heroConfig.Icon))
-- else
-- local config = ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",hero.skinId)
-- Util.GetGameObject(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(config.Icon))
-- end
SetHeroIcon(this.spLoader, hero,this.Demons[hero.position].icon,heroConfig)
SetHeroIcon(this.spLoader, hero,this.Demons[hero.position].icon,heroConfig)
local heroData = {}
if this._Config.formationType == FormationTypeDef.FORMATION_TSLX then
Util.AddOnceClick(this.Demons[hero.position].frameBtn, function()
@ -384,7 +373,6 @@ function this.FormationAdapter(teamInfo)
local len=#teamInfo.PokemonInfos
-- LogError("长度:"..len)
if len>0 then
-- this.bgImg.sizeDelta=Vector2.New(900,1024)
this.pokemonObj:SetActive(true)
for i, demon in ipairs(this.Pokemons) do
demon.gameObject:SetActive(false)
@ -392,7 +380,6 @@ function this.FormationAdapter(teamInfo)
Util.GetGameObject(demon, "hero"):SetActive(false)
end
else
-- this.bgImg.sizeDelta=Vector2.New(900,850)
this.pokemonObj:SetActive(false)
end
@ -452,29 +439,10 @@ end
-- 刷新按钮显示
function this.RefreshBtnShow()
-- 自己
if this._PlayerId == PlayerManager.uid or curPlayerName == Language[12230] then
this.boxLine:SetActive(false)
this.btnBox:SetActive(false)
this.addFriendBtn:SetActive(false)
return
end
-- 判断该界面类型是否有按钮显示
LogYellow("this._ViewType "..this._ViewType.." "..tostring(not JumpServerManager.GetCurPersonInfo()))
if not this._Config or not this._Config.btnType or isNpc then--or (this._ViewType == PLAYER_INFO_VIEW_TYPE.JUPMSERVER and not JumpServerManager.GetCurPersonInfo())
this.boxLine:SetActive(false)
this.btnBox:SetActive(false)
this.addFriendBtn:SetActive(false)
return
end
this.addFriendBtn:SetActive(this._Config.isAddFriend)
-- if this._ViewType == PLAYER_INFO_VIEW_TYPE.JUPMSERVER then
-- else
-- this.addFriendBtn:SetActive(true)
-- end
-- 有按钮显示
local btnType = this._Config.btnType
this.btnBox:SetActive(true)
-- 按钮功能
local btnType = this._Config.btnType
for index, btn in ipairs(this.btnList) do
btn:SetActive(btnType[index] ~= nil)
if btnType[index] then
@ -489,6 +457,32 @@ function this.RefreshBtnShow()
end)
end
end
-- 自己
if this._PlayerId == PlayerManager.uid or curPlayerName == Language[12230] then
this.boxLine:SetActive(false)
this.btnBox:SetActive(false)
this.addFriendBtn:SetActive(false)
end
-- 判断该界面类型是否有按钮显示
if not this._Config or not this._Config.btnType or isNpc then
this.boxLine:SetActive(false)
this.btnBox:SetActive(false)
this.addFriendBtn:SetActive(false)
end
this.addFriendBtn:SetActive(this._Config.isAddFriend)
--一些按钮需要特殊显示
this.SpecialBtnShow()
end
function this.SpecialBtnShow()
if this._ViewType == PLAYER_INFO_VIEW_TYPE.LINGMAIMIJING then
this.btnBox:SetActive(true)
local bool = this._PlayerId == PlayerManager.uid
this.btnList[1]:SetActive(not bool)
this.btnList[2]:SetActive(not bool)
this.btnList[3]:SetActive(bool)
end
end
----=============================== 按钮事件==================================
@ -540,32 +534,20 @@ end
function this.JumpServerBattle()
this:ClosePanel()
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.JUMPSERVER_HIGHTLADDER,true, this._PlayerData)
-- local JoinRank = ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).JoinRank
-- if not JumpServerManager.GetHightLadderDataEnterable() then
-- PopupTipPanel.ShowTip("本服千战逐胜台前"..JoinRank.."名可以参加")
-- return
-- end
-- local JumpPanel = UIManager.GetOpenPanel(UIName.JumpServerHightLadderPanel)
-- if not JumpPanel then return end
-- local curData = JumpServerManager.GetCurPersonInfo()
-- if not curData then return end
-- this:ClosePanel()
-- JumpPanel.BuyVipFun(1,1,function()
-- --直接战斗
-- JumpServerManager.StarFightHightLadder(curData,0,function(msg)
-- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.JUMPSERVER_GIGHTLADDER_MIANFEINUM, 1)--更新特权
-- JumpPanel = UIManager.GetOpenPanel(UIName.JumpServerHightLadderPanel)
-- JumpPanel.RefreshBuyNum()
-- JumpPanel.OnShowPanel()
-- JumpServerManager.SetCurPersonInfo(nil)
-- end)
-- end)
end
-- 跨服天梯
function this.JumpServerBattle_NORMAL()
this:ClosePanel()
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.PLAY, this._PlayerData,true)
end
--灵脉秘境
function this.LingMaiFormaion()
this:ClosePanel()
LogRed("data,Id:"..tostring(this.data))
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, this.data)
end
--界面关闭时调用(用于子类重写)
function PlayerInfoPopup:OnClose()
this.imprintObj:SetActive(false)