[战斗]======神兵服务器发过来的数据处理
parent
ac104c73ca
commit
be9f720590
|
@ -140,33 +140,37 @@ function this.GetPassivityData(passivityList)
|
||||||
local coverList = {}
|
local coverList = {}
|
||||||
for i = 1, #passivityList do
|
for i = 1, #passivityList do
|
||||||
local passiveId = tonumber(passivityList[i])
|
local passiveId = tonumber(passivityList[i])
|
||||||
|
if passiveId then
|
||||||
|
LogError("passiveId======================"..passiveId)
|
||||||
local cfg = PassiveSkillLogicConfig[passiveId]
|
local cfg = PassiveSkillLogicConfig[passiveId]
|
||||||
-- 判断技能是否在战斗中生效
|
-- 判断技能是否在战斗中生效
|
||||||
if cfg and cfg.EffectiveRange == 1 then
|
if cfg and cfg.EffectiveRange == 1 then
|
||||||
-- 判断是否有需要覆盖的被动技能
|
-- 判断是否有需要覆盖的被动技能
|
||||||
local coverId = cfg.CoverID
|
local coverId = cfg.CoverID
|
||||||
if coverId and coverId ~= 0 then
|
if coverId and coverId ~= 0 then
|
||||||
if orderList[coverId] then
|
if orderList[coverId] then
|
||||||
orderList[coverId] = nil
|
orderList[coverId] = nil
|
||||||
end
|
end
|
||||||
coverList[coverId] = 1
|
coverList[coverId] = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 判断该被动技能是否已经被覆盖
|
-- 判断该被动技能是否已经被覆盖
|
||||||
if not coverList[passiveId] then
|
if not coverList[passiveId] then
|
||||||
-- 没有被覆盖,数据加入
|
-- 没有被覆盖,数据加入
|
||||||
local pass = {}
|
local pass = {}
|
||||||
if cfg and cfg.Type ~= 0 then
|
if cfg and cfg.Type ~= 0 then
|
||||||
pass[1]=passiveId
|
pass[1]=passiveId
|
||||||
pass[2]=cfg.Judge
|
pass[2]=cfg.Judge
|
||||||
pass[3] = cfg.Type
|
pass[3] = cfg.Type
|
||||||
for j = 1, #cfg.Value do
|
for j = 1, #cfg.Value do
|
||||||
pass[j + 3] = cfg.Value[j]
|
pass[j + 3] = cfg.Value[j]
|
||||||
|
end
|
||||||
|
orderList[passiveId] = pass
|
||||||
end
|
end
|
||||||
orderList[passiveId] = pass
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 构建数据
|
-- 构建数据
|
||||||
|
@ -354,6 +358,7 @@ function this.GodWeaponUnitAdapter(pokemonUnit,camp,_teamDamage)
|
||||||
camp = camp,
|
camp = camp,
|
||||||
skill = {},
|
skill = {},
|
||||||
property = {},
|
property = {},
|
||||||
|
passivity = {},
|
||||||
}
|
}
|
||||||
-- 技能
|
-- 技能
|
||||||
LogError("pokemonUnit.unitSkillIds=="..pokemonUnit.unitSkillIds)
|
LogError("pokemonUnit.unitSkillIds=="..pokemonUnit.unitSkillIds)
|
||||||
|
@ -362,19 +367,25 @@ function this.GodWeaponUnitAdapter(pokemonUnit,camp,_teamDamage)
|
||||||
if skills then
|
if skills then
|
||||||
if skills[1] then
|
if skills[1] then
|
||||||
local actives=string.split(skills[1], "#")
|
local actives=string.split(skills[1], "#")
|
||||||
|
local passivityList1 = {}
|
||||||
for i = 1, #actives do
|
for i = 1, #actives do
|
||||||
role.skill[i]= this.WeaponSkillAdapter(tonumber(actives[i]))
|
local skillId=tonumber(actives[i])
|
||||||
local shenbing=ShenBingSkill[tonumber(actives[i])]
|
role.skill[i]= this.WeaponSkillAdapter(skillId)
|
||||||
if shenbing and shenbing.PassiveSkill then
|
LogError("tonumber(actives[i])=="..skillId)
|
||||||
local passs=string.split(shenbing.PassiveSkill, "#")
|
local shenbing=ShenBingSkill[skillId]
|
||||||
local passivityList = {}
|
if shenbing and shenbing.PassiveSkill~=nil and #shenbing.PassiveSkill~=0 then
|
||||||
|
--local passs=string.split(shenbing.PassiveSkill, "#")
|
||||||
|
local passs=shenbing.PassiveSkill
|
||||||
|
|
||||||
for j = 1, #passs do
|
for j = 1, #passs do
|
||||||
table.insert(passivityList, tonumber(passs[j]))
|
if passs[j]~=0 and passs[j]~=nil and tostring(passs[j])~=nil then
|
||||||
|
--LogError("passs[j]==="..passs[j])
|
||||||
|
table.insert(passivityList1, passs[j])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
role.passivity = this.GetPassivityData(passivityList)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
role.passivity = this.GetPassivityData(passivityList1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -204,7 +204,7 @@ function BattleLogic.InitOrder()
|
||||||
local enemyMonsterList = orderList.monsterList
|
local enemyMonsterList = orderList.monsterList
|
||||||
if enemyMonsterList then
|
if enemyMonsterList then
|
||||||
for i=1, #enemyMonsterList do
|
for i=1, #enemyMonsterList do
|
||||||
MonsterManager.AddMonster(enemyMonsterList[i])
|
MonsterManager.AddMonster(enemyMonsterList[i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ end
|
||||||
|
|
||||||
-- 创建一个技能
|
-- 创建一个技能
|
||||||
function this.CreateMSkill(monster, group, index, skilldata,groupIndex)
|
function this.CreateMSkill(monster, group, index, skilldata,groupIndex)
|
||||||
LogError("创建神兵技能====================")
|
--LogError("创建神兵技能====================")
|
||||||
local owner = group:GetOwner()
|
local owner = group:GetOwner()
|
||||||
local groupIndex = group.groupIndex
|
local groupIndex = group.groupIndex
|
||||||
local position = owner:GetCamp() * 6 + owner:GetPosition()
|
local position = owner:GetCamp() * 6 + owner:GetPosition()
|
||||||
|
|
|
@ -353,6 +353,9 @@ function EnemyView:DoScale(scale, dur, func)
|
||||||
if self.dsTween then
|
if self.dsTween then
|
||||||
self.dsTween:Kill()
|
self.dsTween:Kill()
|
||||||
end
|
end
|
||||||
|
if self.GameObject==nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
self.dsTween = self.GameObject.transform.parent:DOScale(Vector3.one * scale, dur)
|
self.dsTween = self.GameObject.transform.parent:DOScale(Vector3.one * scale, dur)
|
||||||
:OnComplete(function ()
|
:OnComplete(function ()
|
||||||
-- Log("DoScale = "..scale)
|
-- Log("DoScale = "..scale)
|
||||||
|
|
|
@ -378,6 +378,9 @@ function PlayerView:DoScale(scale, dur, func)
|
||||||
if self.dsTween then
|
if self.dsTween then
|
||||||
self.dsTween:Kill()
|
self.dsTween:Kill()
|
||||||
end
|
end
|
||||||
|
if self.GameObject==nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
self.dsTween = self.GameObject.transform.parent:DOScale(Vector3.one * scale, dur)
|
self.dsTween = self.GameObject.transform.parent:DOScale(Vector3.one * scale, dur)
|
||||||
:OnComplete(function ()
|
:OnComplete(function ()
|
||||||
-- Log("DoScale = "..scale)
|
-- Log("DoScale = "..scale)
|
||||||
|
|
|
@ -103,7 +103,7 @@ function this.OnClickTabBtn(_curIndex)
|
||||||
this.ScrollParentView2:SetActive(true)
|
this.ScrollParentView2:SetActive(true)
|
||||||
pokemonChipList = BagManager.GetDataByItemType(ItemType.GodWeaponChip)
|
pokemonChipList = BagManager.GetDataByItemType(ItemType.GodWeaponChip)
|
||||||
this.PokemonChipDataSort(pokemonChipList)
|
this.PokemonChipDataSort(pokemonChipList)
|
||||||
if redPointList[1] then
|
if redPointList~=nil and redPointList[1]~=nil then
|
||||||
redPointList[1]:SetActive(GodWeaponManager.WeaponChipCompoundRedPoint())
|
redPointList[1]:SetActive(GodWeaponManager.WeaponChipCompoundRedPoint())
|
||||||
end
|
end
|
||||||
for key, value in pairs(this.ChipItemList) do
|
for key, value in pairs(this.ChipItemList) do
|
||||||
|
@ -229,6 +229,7 @@ end
|
||||||
|
|
||||||
function this:OnDestroy()
|
function this:OnDestroy()
|
||||||
this.spLoader:Destroy()
|
this.spLoader:Destroy()
|
||||||
|
redPointList={}
|
||||||
end
|
end
|
||||||
|
|
||||||
return this
|
return this
|
||||||
|
|
|
@ -80,6 +80,7 @@ function GodsWayListPanel:OnShow(...)
|
||||||
--PopupTipPanel.ShowTip(Language[11330])
|
--PopupTipPanel.ShowTip(Language[11330])
|
||||||
else
|
else
|
||||||
PopupTipPanel.ShowTip("需二队塔通关100层后开启")
|
PopupTipPanel.ShowTip("需二队塔通关100层后开启")
|
||||||
|
PopupTipPanel.ShowTip("暂未开启")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue