Merge branch 'china/dev' into china/test
commit
697c0e5134
|
|
@ -116,13 +116,13 @@ function BagResolveAnCompoundPanel:BindEvent()
|
||||||
this.ShowCompoundNumData(compoundNum)
|
this.ShowCompoundNumData(compoundNum)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if endHeroNum > 0 then
|
if compoundNum > 0 then
|
||||||
if compoundNum<compoundMaxNum then
|
if compoundNum<compoundMaxNum then
|
||||||
compoundNum=compoundNum+1
|
compoundNum=compoundNum+1
|
||||||
this.ShowCompoundNumData(compoundNum)
|
this.ShowCompoundNumData(compoundNum)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
PopupTipPanel.ShowTip(Language[12157])
|
PopupTipPanel.ShowTip("已达上限")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
@ -329,7 +329,7 @@ function this.OnShowLayout3Data()
|
||||||
compoundNum= compoundNum>=compoundMaxNum and compoundMaxNum or compoundNum
|
compoundNum= compoundNum>=compoundMaxNum and compoundMaxNum or compoundNum
|
||||||
if compoundMaxNum > 0 then
|
if compoundMaxNum > 0 then
|
||||||
this.Slider:GetComponent("Slider").value=1
|
this.Slider:GetComponent("Slider").value=1
|
||||||
this.Slider:GetComponent("Slider").minValue=0
|
this.Slider:GetComponent("Slider").minValue=1
|
||||||
else
|
else
|
||||||
this.Slider:GetComponent("Slider").value=0
|
this.Slider:GetComponent("Slider").value=0
|
||||||
this.Slider:GetComponent("Slider").minValue=0
|
this.Slider:GetComponent("Slider").minValue=0
|
||||||
|
|
|
||||||
|
|
@ -8695,6 +8695,9 @@ local passivityList = {
|
||||||
if time==num then
|
if time==num then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if skill.owner.camp~=role.camp then
|
||||||
|
return
|
||||||
|
end
|
||||||
if skill.owner.element~=camp then
|
if skill.owner.element~=camp then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -488,7 +488,11 @@ function BattleLogic.Update()
|
||||||
end
|
end
|
||||||
if CurRound > MaxRound then
|
if CurRound > MaxRound then
|
||||||
if BattleLogic.Type == BATTLE_SERVER_TYPE.TOPFight -- 巅峰赛
|
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
|
if allHeroDamage>allEnemyDamage then
|
||||||
BattleLogic.BattleEnd(1)
|
BattleLogic.BattleEnd(1)
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
BATTLE_SERVER_TYPE = {
|
BATTLE_SERVER_TYPE = {
|
||||||
NewArenaFight = 0, --本地测试竞技场值
|
NewArenaFight = 0, --本地测试竞技场值/罗浮争锋
|
||||||
StoryFight = 1, --故事副本
|
StoryFight = 1, --故事副本
|
||||||
MapExploreFight = 2, -- 地图探索
|
MapExploreFight = 2, -- 地图探索
|
||||||
ArenaFight = 3, --竞技场
|
ArenaFight = 3, --竞技场
|
||||||
|
|
|
||||||
|
|
@ -998,7 +998,11 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
|
||||||
end
|
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))
|
local fixDamage = floor(BattleUtil.FP_Mul(baseDamage, baseFactor, addDamageFactor, critDamageFactor, MieKangFactor))
|
||||||
|
|
|
||||||
|
|
@ -398,6 +398,7 @@ function this.InitBattleData()
|
||||||
--BattleLogic.IsOpenBattleRecord = true
|
--BattleLogic.IsOpenBattleRecord = true
|
||||||
BattleLogic.Init(this.fightData, {uid = PlayerManager.uid, fightId = this.fightId}, this.maxRound)
|
BattleLogic.Init(this.fightData, {uid = PlayerManager.uid, fightId = this.fightId}, this.maxRound)
|
||||||
BattleLogic.Type = this.battleType
|
BattleLogic.Type = this.battleType
|
||||||
|
LogError("battle type=="..BattleLogic.Type)
|
||||||
this.InitBattleEvent()
|
this.InitBattleEvent()
|
||||||
|
|
||||||
-- this.EnemyPanel:GetComponent("RectTransform").anchoredPosition = Vector2.New(0, posY)
|
-- this.EnemyPanel:GetComponent("RectTransform").anchoredPosition = Vector2.New(0, posY)
|
||||||
|
|
|
||||||
|
|
@ -40,29 +40,25 @@ function BattleUnit:DelayFunc(time, func)
|
||||||
end
|
end
|
||||||
local timer
|
local timer
|
||||||
timer = Timer.New(function ()
|
timer = Timer.New(function ()
|
||||||
if func then func() func = nil end
|
if self._DelayFuncList[timer] then
|
||||||
|
self._DelayFuncList[timer]()
|
||||||
|
end
|
||||||
self:ClearDelayFunc(timer)
|
self:ClearDelayFunc(timer)
|
||||||
end, time)
|
end, time)
|
||||||
timer:Start()
|
timer:Start()
|
||||||
table.insert(self._DelayFuncList, timer)
|
--
|
||||||
|
self._DelayFuncList[timer] = func
|
||||||
end
|
end
|
||||||
function BattleUnit:ClearDelayFunc(t)
|
function BattleUnit:ClearDelayFunc(t)
|
||||||
if not self._DelayFuncList then return end
|
if not self._DelayFuncList then return end
|
||||||
if t then
|
if t then
|
||||||
local rIndex
|
if self._DelayFuncList[t] then
|
||||||
for index, timer in ipairs(self._DelayFuncList) do
|
t:Stop()
|
||||||
if timer == t then
|
self._DelayFuncList[t] = nil
|
||||||
rIndex = index
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if rIndex then
|
|
||||||
self._DelayFuncList[rIndex]:Stop()
|
|
||||||
table.remove(self._DelayFuncList, rIndex)
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
||||||
for _, timer in ipairs(self._DelayFuncList) do
|
for timer, func in pairs(self._DelayFuncList) do
|
||||||
timer:Stop()
|
timer:Stop()
|
||||||
end
|
end
|
||||||
self._DelayFuncList = {}
|
self._DelayFuncList = {}
|
||||||
|
|
|
||||||
|
|
@ -693,9 +693,9 @@ function PlayerView:OnRealDead()
|
||||||
end
|
end
|
||||||
|
|
||||||
function PlayerView:onRoleRelive()
|
function PlayerView:onRoleRelive()
|
||||||
|
self.GameObject:SetActive(true)
|
||||||
Util.SetGray(self.RoleIconGO, false)
|
Util.SetGray(self.RoleIconGO, false)
|
||||||
self.deadIconGO:SetActive(false)
|
self.deadIconGO:SetActive(false)
|
||||||
|
|
||||||
local color = Color.New(1, 1, 1, 1)
|
local color = Color.New(1, 1, 1, 1)
|
||||||
Util.SetColor(self.GameObject, color)
|
Util.SetColor(self.GameObject, color)
|
||||||
Util.SetColor(self.RoleLiveGOGraphic, color)
|
Util.SetColor(self.RoleLiveGOGraphic, color)
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ function this:OnShow(_parent)
|
||||||
self.data = LingMaiMiJingManager.recordData
|
self.data = LingMaiMiJingManager.recordData
|
||||||
if #self.data > 0 then
|
if #self.data > 0 then
|
||||||
self.empty:SetActive(false)
|
self.empty:SetActive(false)
|
||||||
for i = 1, #this.recordData do
|
for i = 1, #self.data do
|
||||||
if this.recordData[i].time == 1 then
|
if self.data[i].type == 1 then
|
||||||
PlayerPrefs.SetString(PlayerManager.uid.."LingMai",self.data[1].time)
|
PlayerPrefs.SetString(PlayerManager.uid.."LingMai",self.data[1].time)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
@ -61,7 +61,7 @@ function this:SetSingleData(_go,_data,_index)
|
||||||
if _data.type == 0 then
|
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)
|
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
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ function this.CheckRedPoint()
|
||||||
PlayerPrefs.SetString(PlayerManager.uid.."LingMai", "")
|
PlayerPrefs.SetString(PlayerManager.uid.."LingMai", "")
|
||||||
end
|
end
|
||||||
for i = 1, #this.recordData do
|
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
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -149,7 +149,7 @@ end
|
||||||
|
|
||||||
function this.CheckRecord()
|
function this.CheckRecord()
|
||||||
for i = 1, #this.recordData do
|
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)
|
return PlayerPrefs.GetString(PlayerManager.uid.."LingMai") ~= tostring(this.recordData[i].time)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -75,10 +75,10 @@ function LingMaiMiJingPanel:BindEvent()
|
||||||
LingMaiMiJingManager.OpenRecord()
|
LingMaiMiJingManager.OpenRecord()
|
||||||
end)
|
end)
|
||||||
Util.AddOnceClick(self.rewardBtn, function()
|
Util.AddOnceClick(self.rewardBtn, function()
|
||||||
NetManager.RequestRankInfo(RANK_TYPE.LINGMAIMIJING_RANK, function (msg)--请求数据
|
RankingManager.InitData(RANK_TYPE.LINGMAIMIJING_RANK, function(msg)
|
||||||
LogYellow("我的排名:"..tostring(msg.myRankInfo.rank))
|
local data,myData=RankingManager.GetRankingInfo()
|
||||||
UIManager.OpenPanel(UIName.GeneralRankRewardPanel,5,msg.myRankInfo.rank)--需要活动id,和我的排名
|
UIManager.OpenPanel(UIName.GeneralRankRewardPanel,5,myData.rank)--需要活动id,和我的排名
|
||||||
end,0,1,0)
|
end)
|
||||||
end)
|
end)
|
||||||
Util.AddOnceClick(self.sortBtn, function()
|
Util.AddOnceClick(self.sortBtn, function()
|
||||||
UIManager.OpenPanel(UIName.RankingSingleListPanel,rankKingList[33])
|
UIManager.OpenPanel(UIName.RankingSingleListPanel,rankKingList[33])
|
||||||
|
|
|
||||||
|
|
@ -238,8 +238,10 @@ function PlayerInfoPopup:OnShow()
|
||||||
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 = {}
|
||||||
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
|
||||||
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
|
||||||
|
|
@ -494,7 +496,6 @@ function this.SpecialBtnShow()
|
||||||
this.btnList[2]:SetActive(false)
|
this.btnList[2]:SetActive(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -571,7 +572,12 @@ end
|
||||||
--灵脉秘境
|
--灵脉秘境
|
||||||
function this.LingMaiQieCuo()
|
function this.LingMaiQieCuo()
|
||||||
this:ClosePanel()
|
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
|
end
|
||||||
|
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
|
|
@ -582,6 +588,7 @@ function PlayerInfoPopup:OnClose()
|
||||||
SubUIManager.Close(titleLive)
|
SubUIManager.Close(titleLive)
|
||||||
titleLive = nil
|
titleLive = nil
|
||||||
end
|
end
|
||||||
|
curPlayerData = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面销毁时调用(用于子类重写)
|
--界面销毁时调用(用于子类重写)
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,10 @@ function SoulPrintPopUp:BindEvent()
|
||||||
HeroManager.AddSoulPrintUpHeroDynamicId(curHeroData.dynamicId,localData.id,pos)
|
HeroManager.AddSoulPrintUpHeroDynamicId(curHeroData.dynamicId,localData.id,pos)
|
||||||
PopupTipPanel.ShowTip(Language[11526])
|
PopupTipPanel.ShowTip(Language[11526])
|
||||||
self:RefreshShow()
|
self:RefreshShow()
|
||||||
|
--
|
||||||
|
if callback then
|
||||||
|
callback()
|
||||||
|
end
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue