【战斗】修复战斗中受击特效及音效错误的问题,修复假战斗星级显示错误

dev_chengFeng
gaoxin 2020-11-06 20:45:21 +08:00
parent 93d9212f85
commit 05fb2f5e7f
6 changed files with 36 additions and 41 deletions

View File

@ -100,33 +100,16 @@ function this.GetSkillData(skillId,skinId)
local target = SkillLogicConfig[skillId].Target local target = SkillLogicConfig[skillId].Target
local effectList = SkillLogicConfig[skillId].Effect local effectList = SkillLogicConfig[skillId].Effect
local effectArgsList = SkillLogicConfig[skillId].EffectValue local effectArgsList = SkillLogicConfig[skillId].EffectValue
local skin=skinId
if not skinId then
skin=0
end
local effectIds=SkillLogicConfig[skillId].SkillDisplay
local eid=0
if effectIds then
for i = 1, #effectIds do
if effectIds[i][1]==skin then
eid=effectIds[i][2]
end
end
end
if eid==0 then local eid = BattleManager.GetCombatIdBySkin(skillId, skinId or 0)
eid=effectIds[1][2]
end
local EffectCombat = CombatControl[eid] local EffectCombat = CombatControl[eid]
--local EffectCombat = CombatControl[SkillLogicConfig[skillId].SkillDisplay]
local index = 1
skill[1] = skillId skill[1] = skillId
skill[2] = EffectCombat.KeyFrame/1000 skill[2] = EffectCombat.KeyFrame/1000
skill[3] = EffectCombat.SkillDuration/1000 skill[3] = EffectCombat.SkillDuration/1000
skill[4] = EffectCombat.SkillNumber skill[4] = EffectCombat.SkillNumber
local index = 1
for i = 1, #effectList do for i = 1, #effectList do
local effectGroup = { target[i][1] } -- 效果目标 local effectGroup = { target[i][1] } -- 效果目标
for j = 1, #effectList[i] do for j = 1, #effectList[i] do
@ -198,6 +181,7 @@ function this.GetMonsterData(monsterId)
type = 1, type = 1,
quality = 0, quality = 0,
skinId=monsterConfig.SkinId, skinId=monsterConfig.SkinId,
star=monsterConfig.Star,
skill = this.GetSkillData(monsterConfig.SkillList[1],monsterConfig.SkinId), skill = this.GetSkillData(monsterConfig.SkillList[1],monsterConfig.SkinId),
superSkill = this.GetSkillData(monsterConfig.SkillList[2],monsterConfig.SkinId), superSkill = this.GetSkillData(monsterConfig.SkillList[2],monsterConfig.SkinId),
element = monsterConfig.PropertyName, element = monsterConfig.PropertyName,
@ -857,4 +841,22 @@ function this.RecycleAllDelayRes()
end end
--++++++++++++++ --++++++++++++++
-- 获取技能表现id
function this.GetCombatIdBySkin(skillId, skinId)
local effectIds = SkillLogicConfig[skillId].SkillDisplay
local eid=0
local skin = skinId or 0
if effectIds then
for i = 1, #effectIds do
if effectIds[i][1] == skin then
eid=effectIds[i][2]
end
end
end
if eid==0 then
eid=effectIds[1][2]
end
return eid
end
return this return this

View File

@ -46,11 +46,13 @@ function SkillSetView:Show(camp, pos, BattleView)
self.rt.text = self.roleView.spAtkTime*1000 self.rt.text = self.roleView.spAtkTime*1000
self.rt2.text = self.roleView.atkSoundTime*1000 self.rt2.text = self.roleView.atkSoundTime*1000
local nCombat = BattleManager.GetSkillCombat(SkillLogicConfig[nSkillId].SkillDisplay) local nCId = BattleManager.GetCombatIdBySkin(nSkillId, 0)
local nCombat = BattleManager.GetSkillCombat(nCId)
self.nt1.text = nCombat.BulletTime self.nt1.text = nCombat.BulletTime
self.nt2.text = nCombat.KeyFrame self.nt2.text = nCombat.KeyFrame
local sCombat = BattleManager.GetSkillCombat(SkillLogicConfig[sSkillId].SkillDisplay) local sCId = BattleManager.GetCombatIdBySkin(sSkillId, 0)
local sCombat = BattleManager.GetSkillCombat(sCId)
self.st1.text = sCombat.BulletTime self.st1.text = sCombat.BulletTime
self.st2.text = sCombat.KeyFrame self.st2.text = sCombat.KeyFrame
@ -65,7 +67,7 @@ function SkillSetView:ApplyData()
self.roleView.spAtkTime = (tonumber(self.rt.text)or 0)/1000 self.roleView.spAtkTime = (tonumber(self.rt.text)or 0)/1000
self.roleView.atkSoundTime = (tonumber(self.rt2.text)or 0)/1000 self.roleView.atkSoundTime = (tonumber(self.rt2.text)or 0)/1000
local ncId = SkillLogicConfig[nSkillId].SkillDisplay local ncId = BattleManager.GetCombatIdBySkin(nSkillId, 0)
local nCombat = BattleManager.GetSkillCombat(ncId) local nCombat = BattleManager.GetSkillCombat(ncId)
local nBulletTime = tonumber(self.nt1.text) or 0 local nBulletTime = tonumber(self.nt1.text) or 0
local nKeyFrame = tonumber(self.nt2.text) or 0 local nKeyFrame = tonumber(self.nt2.text) or 0
@ -76,7 +78,7 @@ function SkillSetView:ApplyData()
self.role.skill[2] = nKeyFrame/1000 self.role.skill[2] = nKeyFrame/1000
end end
local scId = SkillLogicConfig[sSkillId].SkillDisplay local scId = BattleManager.GetCombatIdBySkin(sSkillId, 0)
local sCombat = BattleManager.GetSkillCombat(scId) local sCombat = BattleManager.GetSkillCombat(scId)
local sBulletTime = tonumber(self.st1.text) or 0 local sBulletTime = tonumber(self.st1.text) or 0
local sKeyFrame = tonumber(self.st2.text) or 0 local sKeyFrame = tonumber(self.st2.text) or 0

View File

@ -424,7 +424,8 @@ function EnemyView:OnceDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotTyp
self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, "hit", false) self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, "hit", false)
-- bo -- bo
if skill then if skill then
local combat = BattleManager.GetSkillCombat(SkillLogicConfig[skill.id].SkillDisplay) local combatId = BattleManager.GetCombatIdBySkin(skill.id, atkRole.roleData.skinId)
local combat = BattleManager.GetSkillCombat(combatId)
self.SkillCaster:CheckSkillHitEffect("hit", combat, skill) self.SkillCaster:CheckSkillHitEffect("hit", combat, skill)
end end
end end

View File

@ -1,4 +1,4 @@

local RoleConfig = ConfigManager.GetConfig(ConfigName.RoleConfig) local RoleConfig = ConfigManager.GetConfig(ConfigName.RoleConfig)
local HeroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig) local HeroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
local SkillLogicConfig = ConfigManager.GetConfig(ConfigName.SkillLogicConfig) local SkillLogicConfig = ConfigManager.GetConfig(ConfigName.SkillLogicConfig)
@ -483,7 +483,8 @@ function PlayerView:OnceDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotTy
-- 播放受击特效 -- 播放受击特效
if skill then if skill then
local combat = BattleManager.GetSkillCombat(SkillLogicConfig[skill.id].SkillDisplay) local combatId = BattleManager.GetCombatIdBySkin(skill.id, atkRole.roleData.skinId)
local combat = BattleManager.GetSkillCombat(combatId)
self.SkillCaster:CheckSkillHitEffect("hit", combat, skill) self.SkillCaster:CheckSkillHitEffect("hit", combat, skill)
end end
end end

View File

@ -556,7 +556,8 @@ function RoleView:OnceDamaged(atkRole, dmg, bCrit, finalDmg, damageType, dotType
-- 播放受击特效 -- 播放受击特效
if skill then if skill then
local combat = BattleManager.GetSkillCombat(SkillLogicConfig[skill.id].SkillDisplay) local combatId = BattleManager.GetCombatIdBySkin(skill.id, atkRole.roleData.skinId)
local combat = BattleManager.GetSkillCombat(combatId)
self.SkillCaster:CheckSkillHitEffect("hit", combat, skill) self.SkillCaster:CheckSkillHitEffect("hit", combat, skill)
end end
end end

View File

@ -1,4 +1,4 @@

local Bezier = require("Base.Bezier") local Bezier = require("Base.Bezier")
local SkillLogicConfig = ConfigManager.GetConfig(ConfigName.SkillLogicConfig) local SkillLogicConfig = ConfigManager.GetConfig(ConfigName.SkillLogicConfig)
local BuffEffectConfig = ConfigManager.GetConfig(ConfigName.BuffEffectConfig) local BuffEffectConfig = ConfigManager.GetConfig(ConfigName.BuffEffectConfig)
@ -26,20 +26,8 @@ end
function SkillCaster:OnSkillCast(skill) function SkillCaster:OnSkillCast(skill)
if not skill then return end if not skill then return end
local effectIds=SkillLogicConfig[skill.id].SkillDisplay
local eid=0
local skin=self.owner.skinId or 0
if effectIds then
for i = 1, #effectIds do
if effectIds[i][1]==skin then
eid=effectIds[i][2]
end
end
end
if eid==0 then
eid=effectIds[1][2]
end
local eid = BattleManager.GetCombatIdBySkin(skill.id, self.owner.skinId)
local combat = BattleManager.GetSkillCombat(eid) local combat = BattleManager.GetSkillCombat(eid)
if not combat then return end if not combat then return end
-- 追击显示追击文字 -- 追击显示追击文字