【灵脉秘境】竞技场pvp切磋报错修改

dev_chengFeng
ZhangBiao 2021-11-22 17:20:04 +08:00
parent 9fe1e610ca
commit f4febd8ed8
3 changed files with 13 additions and 6 deletions

View File

@ -33,7 +33,7 @@ function this:OnShow(_parent)
if #self.data > 0 then
self.empty:SetActive(false)
for i = 1, #self.data do
if self.data[i].time == 1 then
if self.data[i].type == 1 then
PlayerPrefs.SetString(PlayerManager.uid.."LingMai",self.data[1].time)
break
end
@ -61,7 +61,7 @@ function this:SetSingleData(_go,_data,_index)
if _data.type == 0 then
desc.text = string.format("经过一番激烈的战斗,最终击败%s %s占领%s开始收集灵脉资源",tostring(_data.defServerName),PracticeManager.SetNameColor(_data.defName,_data.practiceLevel),lodeConfig[_data.lingMaiId].Name)
elseif _data.type == 1 then
desc.text = string.format("大战过后,我方神将不敌%s %s丢失%s",tostring(_data.defServerName),PracticeManager.SetNameColor(_data.defName,_data.practiceLevel),lodeConfig[_data.lingMaiId].Name)
desc.text = string.format("大战过后,我方神将不敌(%s)%s丢失%s",tostring(_data.defServerName),PracticeManager.SetNameColor(_data.defName,_data.practiceLevel),lodeConfig[_data.lingMaiId].Name)
end
end

View File

@ -139,7 +139,7 @@ function this.CheckRedPoint()
PlayerPrefs.SetString(PlayerManager.uid.."LingMai", "")
end
for i = 1, #this.recordData do
if PlayerPrefs.GetString(PlayerManager.uid.."LingMai") ~= tostring(this.recordData[i].time) and this.recordData[i].time == 1 then
if PlayerPrefs.GetString(PlayerManager.uid.."LingMai") ~= tostring(this.recordData[i].time) and this.recordData[i].type == 1 then
return true
end
end
@ -149,7 +149,7 @@ end
function this.CheckRecord()
for i = 1, #this.recordData do
if this.recordData[i].time == 1 then
if this.recordData[i].type == 1 then
return PlayerPrefs.GetString(PlayerManager.uid.."LingMai") ~= tostring(this.recordData[i].time)
end
end

View File

@ -238,8 +238,10 @@ function PlayerInfoPopup:OnShow()
if this.serverName and this.serverName ~= "" then--and this.serverName ~= PlayerManager.serverInfo.name
netserverName = 1
end
this.curPlayerData = {}
NetManager.RequestPlayerInfo(this._PlayerId, this._Config.formationType,netserverName,0, function(msg)
-- 如果是好友更新好友数据
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)
this._PlayerData = msg.teamInfo
@ -494,7 +496,6 @@ function this.SpecialBtnShow()
this.btnList[2]:SetActive(false)
end
end
end
end
@ -571,7 +572,12 @@ end
--灵脉秘境
function this.LingMaiQieCuo()
this:ClosePanel()
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, this.data,true)
local sdata = {}
sdata.uid = this._PlayerId
sdata.name = this.curPlayerData.name
sdata.head = this.curPlayerData.head
sdata.headFrame = this.curPlayerData.headFrame
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, sdata,true)
end
--界面关闭时调用(用于子类重写)
@ -582,6 +588,7 @@ function PlayerInfoPopup:OnClose()
SubUIManager.Close(titleLive)
titleLive = nil
end
curPlayerData = {}
end
--界面销毁时调用(用于子类重写)