解决冲突提交

dev_chengFeng
wangzhenxing 2020-11-06 11:12:24 +09:00 committed by jiaoyangna
parent b7b4fb9d5d
commit 3e917799bb
4 changed files with 82 additions and 31 deletions

View File

@ -89,8 +89,7 @@ function this.Initialize()
end
--获取技能数据(战斗用)
function this.GetSkillData(skillId, pos)
pos = pos or 0
function this.GetSkillData(skillId,skinId)
if not skillId or not SkillLogicConfig[skillId] then
return
end
@ -108,12 +107,12 @@ function this.GetSkillData(skillId, pos)
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]
for i = 1, #effectIds do
if effectIds[i][1]==skin then
eid=effectIds[i][2]
end
end
end
end
LogError("技能效果id===="..eid)
local EffectCombat = CombatControl[eid]
@ -195,8 +194,9 @@ function this.GetMonsterData(monsterId)
camp = 1,
type = 1,
quality = 0,
skill = this.GetSkillData(monsterConfig.SkillList[1]),
superSkill = this.GetSkillData(monsterConfig.SkillList[2]),
skinId=monsterConfig.SkinId,
skill = this.GetSkillData(monsterConfig.SkillList[1],monsterConfig.SkinId),
superSkill = this.GetSkillData(monsterConfig.SkillList[2],monsterConfig.SkinId),
element = monsterConfig.PropertyName,
passivity = this.GetPassivityData(monsterConfig.PassiveSkillList),
property = {
@ -290,12 +290,14 @@ function this.GetBattleServerData(msg, isFightPlayer)
local rid = tonumber(data.fightUnitList[i].unitId)
local position = tonumber(data.fightUnitList[i].position)
local star = tonumber(data.fightUnitList[i].star)
local skin=tonumber(data.fightUnitList[i].skinId)
local skills = string.split(data.fightUnitList[i].unitSkillIds, "#")
local propertys = string.split(data.fightUnitList[i].property, "#")
local role = {
roleId = rid,
position = position,
star = star,
skinId=skin,
camp = 0,
type = 1,
quality = 0,
@ -305,10 +307,10 @@ function this.GetBattleServerData(msg, isFightPlayer)
property = { },
}
if skills[1] then
role.skill = this.GetSkillData(tonumber(skills[1]))
role.skill = this.GetSkillData(tonumber(skills[1]),skin)
end
if skills[2] and skills[2] ~= "0" then
role.superSkill = this.GetSkillData(tonumber(skills[2]))
role.superSkill = this.GetSkillData(tonumber(skills[2]),skin)
end
if #skills > 2 then
local passivityList = {}
@ -369,6 +371,7 @@ function this.GetBattleServerData(msg, isFightPlayer)
local monsterConfig = ConfigManager.GetConfigData(ConfigName.MonsterConfig, tonumber(data2.fightUnitList[j].unitId))
local position = tonumber(data2.fightUnitList[j].position)
local star = tonumber(data2.fightUnitList[j].star)
local skin=tonumber(data2.fightUnitList[j].skinId)
skills = string.split(data2.fightUnitList[j].unitSkillIds, "#")
propertys = string.split(data2.fightUnitList[j].property, "#")
role = {
@ -376,6 +379,7 @@ function this.GetBattleServerData(msg, isFightPlayer)
monsterId = tonumber(data2.fightUnitList[j].unitId), --非战斗数据,仅用于显示怪物名称
position = position,
star = star,
skinId=skin,
camp = 1,
type = monsterConfig.Type,
quality = monsterConfig.Quality,
@ -389,12 +393,14 @@ function this.GetBattleServerData(msg, isFightPlayer)
local rid = tonumber(data2.fightUnitList[j].unitId)
local position = tonumber(data2.fightUnitList[j].position)
local star = tonumber(data2.fightUnitList[j].star)
local skin=tonumber(data2.fightUnitList[j].skinId)
skills = string.split(data2.fightUnitList[j].unitSkillIds, "#")
propertys = string.split(data2.fightUnitList[j].property, "#")
role = {
roleId = rid,
position = position,
star = star,
skinId=skin,
camp = 1,
type = 1,
quality = 0,
@ -406,10 +412,10 @@ function this.GetBattleServerData(msg, isFightPlayer)
end
if skills[1] then
role.skill = this.GetSkillData(tonumber(skills[1]))
role.skill = this.GetSkillData(tonumber(skills[1]),role.skinId)
end
if skills[2] and skills[2] ~= "0" then
role.superSkill = this.GetSkillData(tonumber(skills[2]))
role.superSkill = this.GetSkillData(tonumber(skills[2]),role.skinId)
end
if #skills > 2 then
local passivityList = {}

View File

@ -31,17 +31,33 @@ function EnemyView:onCreate(go, role, position, root)
self.elementImg = Util.GetGameObject(go, "Pro/Image"):GetComponent("Image")
--
local roleId=role.roleData.roleId
local live=HeroConfig[role.roleData.roleId].Live
--如果英雄装备皮肤
if role.roleData.skinId and role.roleData.skinId>0 then
roleId=role.roleData.skinId
local skin=ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",roleId)
if skin then
live=skin.Live
end
end
if not role.roleData.skinId then
self.skinId=0
else
self.skinId=roleId
end
self.hpCache = self.role:GetRoleData(RoleDataName.Hp) / self.role:GetRoleData(RoleDataName.MaxHp)
self.hpSlider.fillAmount = self.hpCache
self.hpPassSlider.fillAmount = self.hpCache
self.livePath = GetResourcePath(HeroConfig[role.roleData.roleId].Live)
self.play_liveScale = RoleConfig[role.roleData.roleId].play_liveScale
self.enemy_liveScale = RoleConfig[role.roleData.roleId].enemy_liveScale
self.offset = RoleConfig[role.roleData.roleId].offset
self.outOffset = RoleConfig[role.roleData.roleId].enemy_offset
self.spAtkTime = RoleConfig[role.roleData.roleId].CastingSkills/1000
self.atkSoundTime = RoleConfig[role.roleData.roleId].CastingAudio/1000
self.attackSound = RoleConfig[role.roleData.roleId].sond
self.livePath = GetResourcePath(live)
self.play_liveScale = RoleConfig[roleId].play_liveScale
self.enemy_liveScale = RoleConfig[roleId].enemy_liveScale
self.offset = RoleConfig[roleId].offset
self.outOffset = RoleConfig[roleId].enemy_offset
self.spAtkTime = RoleConfig[roleId].CastingSkills/1000
self.atkSoundTime = RoleConfig[roleId].CastingAudio/1000
self.attackSound = RoleConfig[roleId].sond
self.readingName = HeroConfig[role.roleData.roleId].ReadingName
--

View File

@ -37,14 +37,30 @@ function PlayerView:onCreate(go, role, position, root)
self.hpCache = self.role:GetRoleData(RoleDataName.Hp) / self.role:GetRoleData(RoleDataName.MaxHp)
self.hpSlider.fillAmount = self.hpCache
self.hpPassSlider.fillAmount = self.hpCache
self.livePath = GetResourcePath(HeroConfig[role.roleData.roleId].Live)
self.play_liveScale = RoleConfig[role.roleData.roleId].play_liveScale
self.enemy_liveScale = RoleConfig[role.roleData.roleId].enemy_liveScale
self.offset = RoleConfig[role.roleData.roleId].offset
self.outOffset = RoleConfig[role.roleData.roleId].enemy_offset
self.spAtkTime = RoleConfig[role.roleData.roleId].CastingSkills/1000
self.atkSoundTime = RoleConfig[role.roleData.roleId].CastingAudio/1000
self.attackSound = RoleConfig[role.roleData.roleId].sond
local roleId=role.roleData.roleId
local live=HeroConfig[role.roleData.roleId].Live
--如果英雄装备皮肤
if role.roleData.skinId and role.roleData.skinId>0 then
roleId=role.roleData.skinId
local skin=ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",roleId)
if skin then
live=skin.Live
end
end
if not role.roleData.skinId then
self.skinId=0
else
self.skinId=roleId
end
self.livePath = GetResourcePath(live)
self.play_liveScale = RoleConfig[roleId].play_liveScale
self.enemy_liveScale = RoleConfig[roleId].enemy_liveScale
self.offset = RoleConfig[roleId].offset
self.outOffset = RoleConfig[roleId].enemy_offset
self.spAtkTime = RoleConfig[roleId].CastingSkills/1000
self.atkSoundTime = RoleConfig[roleId].CastingAudio/1000
self.attackSound = RoleConfig[roleId].sond
self.readingName = HeroConfig[role.roleData.roleId].ReadingName
self.nameText.text = self.readingName

View File

@ -26,10 +26,23 @@ end
function SkillCaster:OnSkillCast(skill)
if not skill then return end
local combat = BattleManager.GetSkillCombat(SkillLogicConfig[skill.id].SkillDisplay)
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
LogError("eid======"..eid.."skin: "..skin)
local combat = BattleManager.GetSkillCombat(eid)
if not combat then return end
LogError("qqqqqqqqqqqqqqqqq")
-- 追击显示追击文字
if skill.isAdd then
self.owner.Floater:ImageBuffFloating("z_zhandou_zhuiji")