Merge branch 'china/dev' into china/test

dev_chengFeng
zhangshanxue 2021-11-22 17:46:00 +08:00
commit 697c0e5134
13 changed files with 50 additions and 31 deletions

View File

@ -116,13 +116,13 @@ function BagResolveAnCompoundPanel:BindEvent()
this.ShowCompoundNumData(compoundNum)
end
else
if endHeroNum > 0 then
if compoundNum > 0 then
if compoundNum<compoundMaxNum then
compoundNum=compoundNum+1
this.ShowCompoundNumData(compoundNum)
end
else
PopupTipPanel.ShowTip(Language[12157])
PopupTipPanel.ShowTip("已达上限")
end
end
end)
@ -329,7 +329,7 @@ function this.OnShowLayout3Data()
compoundNum= compoundNum>=compoundMaxNum and compoundMaxNum or compoundNum
if compoundMaxNum > 0 then
this.Slider:GetComponent("Slider").value=1
this.Slider:GetComponent("Slider").minValue=0
this.Slider:GetComponent("Slider").minValue=1
else
this.Slider:GetComponent("Slider").value=0
this.Slider:GetComponent("Slider").minValue=0

View File

@ -8695,6 +8695,9 @@ local passivityList = {
if time==num then
return
end
if skill.owner.camp~=role.camp then
return
end
if skill.owner.element~=camp then
return
end

View File

@ -488,7 +488,11 @@ function BattleLogic.Update()
end
if CurRound > MaxRound then
if BattleLogic.Type == BATTLE_SERVER_TYPE.TOPFight -- 巅峰赛
or BattleLogic.Type == BATTLE_SERVER_TYPE.Firend then -- 好友切磋
or BattleLogic.Type == BATTLE_SERVER_TYPE.Firend
or BattleLogic.Type == BATTLE_SERVER_TYPE.CrossYuxuLunDaoFight
or BattleLogic.Type == BATTLE_SERVER_TYPE.LINGMAIMIJING
or BattleLogic.Type == BATTLE_SERVER_TYPE.CarPersonFight
or BattleLogic.Type == BATTLE_SERVER_TYPE.NewArenaFight then -- 好友切磋
if allHeroDamage>allEnemyDamage then
BattleLogic.BattleEnd(1)
else

View File

@ -6,7 +6,7 @@ end
BATTLE_SERVER_TYPE = {
NewArenaFight = 0, --本地测试竞技场值
NewArenaFight = 0, --本地测试竞技场值/罗浮争锋
StoryFight = 1, --故事副本
MapExploreFight = 2, -- 地图探索
ArenaFight = 3, --竞技场

View File

@ -998,7 +998,11 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
end
-- 计算克制伤害系数
local MieKangFactor = 1 + atkRole:GetRoleData(BattleMieProp[defRole.element]) - defRole:GetRoleData(BattleKangProp[atkRole.element])
local MieKangFactor = 1
if atkRole.type == BattleUnitType.Role and defRole.type == BattleUnitType.Role then
MieKangFactor=MieKangFactor + atkRole:GetRoleData(BattleMieProp[defRole.element]) - defRole:GetRoleData(BattleKangProp[atkRole.element])
end
-- 公式伤害 = 基础伤害 * 基础伤害系数 * 增伤系数 * 爆伤系数 * 克制伤害系数
local fixDamage = floor(BattleUtil.FP_Mul(baseDamage, baseFactor, addDamageFactor, critDamageFactor, MieKangFactor))

View File

@ -398,6 +398,7 @@ function this.InitBattleData()
--BattleLogic.IsOpenBattleRecord = true
BattleLogic.Init(this.fightData, {uid = PlayerManager.uid, fightId = this.fightId}, this.maxRound)
BattleLogic.Type = this.battleType
LogError("battle type=="..BattleLogic.Type)
this.InitBattleEvent()
-- this.EnemyPanel:GetComponent("RectTransform").anchoredPosition = Vector2.New(0, posY)

View File

@ -40,29 +40,25 @@ function BattleUnit:DelayFunc(time, func)
end
local timer
timer = Timer.New(function ()
if func then func() func = nil end
if self._DelayFuncList[timer] then
self._DelayFuncList[timer]()
end
self:ClearDelayFunc(timer)
end, time)
timer:Start()
table.insert(self._DelayFuncList, timer)
--
self._DelayFuncList[timer] = func
end
function BattleUnit:ClearDelayFunc(t)
if not self._DelayFuncList then return end
if t then
local rIndex
for index, timer in ipairs(self._DelayFuncList) do
if timer == t then
rIndex = index
break
end
end
if rIndex then
self._DelayFuncList[rIndex]:Stop()
table.remove(self._DelayFuncList, rIndex)
if self._DelayFuncList[t] then
t:Stop()
self._DelayFuncList[t] = nil
end
else
for _, timer in ipairs(self._DelayFuncList) do
for timer, func in pairs(self._DelayFuncList) do
timer:Stop()
end
self._DelayFuncList = {}

View File

@ -693,9 +693,9 @@ function PlayerView:OnRealDead()
end
function PlayerView:onRoleRelive()
self.GameObject:SetActive(true)
Util.SetGray(self.RoleIconGO, false)
self.deadIconGO:SetActive(false)
local color = Color.New(1, 1, 1, 1)
Util.SetColor(self.GameObject, color)
Util.SetColor(self.RoleLiveGOGraphic, color)

View File

@ -32,8 +32,8 @@ function this:OnShow(_parent)
self.data = LingMaiMiJingManager.recordData
if #self.data > 0 then
self.empty:SetActive(false)
for i = 1, #this.recordData do
if this.recordData[i].time == 1 then
for i = 1, #self.data do
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

@ -75,10 +75,10 @@ function LingMaiMiJingPanel:BindEvent()
LingMaiMiJingManager.OpenRecord()
end)
Util.AddOnceClick(self.rewardBtn, function()
NetManager.RequestRankInfo(RANK_TYPE.LINGMAIMIJING_RANK, function (msg)--请求数据
LogYellow("我的排名:"..tostring(msg.myRankInfo.rank))
UIManager.OpenPanel(UIName.GeneralRankRewardPanel,5,msg.myRankInfo.rank)--需要活动id和我的排名
end,0,1,0)
RankingManager.InitData(RANK_TYPE.LINGMAIMIJING_RANK, function(msg)
local data,myData=RankingManager.GetRankingInfo()
UIManager.OpenPanel(UIName.GeneralRankRewardPanel,5,myData.rank)--需要活动id和我的排名
end)
end)
Util.AddOnceClick(self.sortBtn, function()
UIManager.OpenPanel(UIName.RankingSingleListPanel,rankKingList[33])

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
--界面销毁时调用(用于子类重写)

View File

@ -128,6 +128,10 @@ function SoulPrintPopUp:BindEvent()
HeroManager.AddSoulPrintUpHeroDynamicId(curHeroData.dynamicId,localData.id,pos)
PopupTipPanel.ShowTip(Language[11526])
self:RefreshShow()
--
if callback then
callback()
end
self:ClosePanel()
end)
end)