【新战力计算】 魂印 公会技能
parent
3275e46515
commit
f1a296ec06
|
@ -28,6 +28,8 @@ function this.InitData(msg)
|
|||
this.InitSingleData(msg.skill[i].type,j,curLv)
|
||||
end
|
||||
end
|
||||
--设置战斗力脏数据
|
||||
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.GuildSkill)
|
||||
end
|
||||
--连续升级后端回复 更新前端等级
|
||||
function this.LongLvUpClickBackFun(msg)
|
||||
|
|
|
@ -118,7 +118,6 @@ function GuildSkillUpLvPopup:BindEvent()
|
|||
GuildSkillManager.ResetGuildSkillData(curIndexChangeFun[curIndex])
|
||||
this.OnClickTabBtn(curIndex,true)
|
||||
this.RefreshTabRedPoint()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
|
||||
oldWarPowerValue = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||
end)
|
||||
end)
|
||||
|
@ -303,10 +302,8 @@ function this.LongLvUpClick(oldLv)
|
|||
newWarPowerValue = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||
if oldWarPowerValue ~= newWarPowerValue then
|
||||
UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldWarPowerValue,newValue = newWarPowerValue})
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
|
||||
oldWarPowerValue = newWarPowerValue
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
|
||||
end)
|
||||
end
|
||||
--升级按钮点击事件处理
|
||||
|
@ -344,10 +341,9 @@ function this.LvUpClick(isSingleLvUp)
|
|||
newWarPowerValue = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||
if oldWarPowerValue ~= newWarPowerValue then
|
||||
UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldWarPowerValue,newValue = newWarPowerValue})
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
|
||||
oldWarPowerValue = newWarPowerValue
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
|
||||
Game.GlobalEvent:DispatchEvent()
|
||||
-- CheckRedPointStatus(RedPointType.Guild_Skill)
|
||||
end)
|
||||
else
|
||||
|
|
|
@ -514,7 +514,7 @@ function this.UpdateSingleHeroDatas(heroDId, heroLv, heroStar, breakId, upStarId
|
|||
)
|
||||
PlayerManager.SetHeroHandBookListData(heroDatas[heroDId].id, heroDatas[heroDId].star)
|
||||
end
|
||||
|
||||
--设置战斗力脏数据
|
||||
-- 英雄基础数据变化
|
||||
HeroPropManager.SetDirtyByType(heroDId, Hero_Prop_Type.Base)
|
||||
HeroPropManager.SetDirtyByType(heroDId, Hero_Prop_Type.PassiveSkill)
|
||||
|
@ -2573,6 +2573,8 @@ function this.AddSoulPrintUpHeroDynamicId(heroDid, soulPrintSid, soulPrintPos)
|
|||
local singleSoulPrint = {equipId = soulPrintSid, position = soulPrintPos}
|
||||
table.insert(heroDatas[heroDid].soulPrintList, singleSoulPrint)
|
||||
SoulPrintManager.AddSoulPrintUpHeroDynamicId(soulPrintSid, heroDid)
|
||||
--设置战斗力脏数据
|
||||
HeroPropManager.SetDirtyByType(heroDid, Hero_Prop_Type.SoulPrint)
|
||||
end
|
||||
end
|
||||
--删除魂印装备的英雄did
|
||||
|
@ -2582,6 +2584,8 @@ function this.DelSoulPrintUpHeroDynamicId(heroDid, soulPrintSid)
|
|||
if heroDatas[heroDid].soulPrintList[i] and heroDatas[heroDid].soulPrintList[i].equipId == soulPrintSid then
|
||||
table.remove(heroDatas[heroDid].soulPrintList, i)
|
||||
SoulPrintManager.DelSoulPrintUpHeroDynamicId(soulPrintSid, heroDid)
|
||||
--设置战斗力脏数据
|
||||
HeroPropManager.SetDirtyByType(heroDid, Hero_Prop_Type.SoulPrint)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ local propToSS = {}
|
|||
local function CalculateWarForce(powerVal)
|
||||
local powerEndVal = 0
|
||||
for i, v in pairs(powerVal) do
|
||||
if v > 0 then
|
||||
if v > 0 and i < HeroProType.WarPower then
|
||||
if not propToSS[i] then
|
||||
propToSS[i] = {Style = propertyConfig[i].Style, Score = propertyConfig[i].Score, TargetPropertyId = propertyConfig[i].TargetPropertyId}
|
||||
end
|
||||
|
@ -21,6 +21,8 @@ local function CalculateWarForce(powerVal)
|
|||
power = power / 100
|
||||
end
|
||||
powerEndVal = powerEndVal + power
|
||||
elseif v > 0 and i >= HeroProType.WarPower then
|
||||
powerEndVal = powerEndVal + v
|
||||
end
|
||||
end
|
||||
return math.floor(powerEndVal)
|
||||
|
@ -85,13 +87,17 @@ function this.CalPower(heroData, propList)
|
|||
|
||||
-- 将百分比加成计算到人物身上
|
||||
for k, v in pairs(propList) do
|
||||
if not propToSS[k] then
|
||||
local config = propertyConfig[k]
|
||||
propToSS[k] = {Style = config.Style, Score = config.Score, TargetPropertyId = config.TargetPropertyId}
|
||||
end
|
||||
local tpId = propToSS[k].TargetPropertyId
|
||||
if propList[k] > 0 and tpId > 0 then
|
||||
propList[tpId] = math.floor( propList[tpId] + propList[tpId] * propList[k] / 10000)
|
||||
if k < HeroProType.WarPower then
|
||||
if not propToSS[k] then
|
||||
local config = propertyConfig[k]
|
||||
propToSS[k] = {Style = config.Style, Score = config.Score, TargetPropertyId = config.TargetPropertyId}
|
||||
end
|
||||
local tpId = propToSS[k].TargetPropertyId
|
||||
if propList[k] > 0 and tpId > 0 then
|
||||
propList[tpId] = math.floor( propList[tpId] + propList[tpId] * propList[k] / 10000)
|
||||
end
|
||||
else
|
||||
propList[k] = v
|
||||
end
|
||||
end
|
||||
LogPinkTable(propList)
|
||||
|
|
|
@ -410,9 +410,58 @@ Hero_Prop_Func = {
|
|||
end
|
||||
end
|
||||
end
|
||||
local allAddProVal = {}
|
||||
allAddProVal[HeroProType.WarPower] = allSoulPrintAddWarPowerVal
|
||||
return allAddProVal
|
||||
-- local allAddProVal = {}
|
||||
-- allAddProVal[HeroProType.WarPower] = allSoulPrintAddWarPowerVal
|
||||
-- return allAddProVal
|
||||
|
||||
|
||||
local addAllProVal = {}
|
||||
local propList, conPropList, teamPropList, conTeamPropList, dePropList
|
||||
local allPassiveSkill = {}
|
||||
local curHeroData =_heroData
|
||||
if curHeroData then
|
||||
if(table.nums(curHeroData.soulPrintList) >= 1) then
|
||||
for i = 1, #curHeroData.soulPrintList do
|
||||
local cursoulPrintConfig = equipConfig[curHeroData.soulPrintList[i].equipId]
|
||||
if cursoulPrintConfig then
|
||||
--基础属性计算
|
||||
local soulPrintPropertyList = cursoulPrintConfig.Property
|
||||
if soulPrintPropertyList and #soulPrintPropertyList > 0 then
|
||||
for i,v in pairs(soulPrintPropertyList) do
|
||||
if(addAllProVal[v[1]]) then
|
||||
addAllProVal[v[1]]=v[2]+addAllProVal[v[1]]
|
||||
else
|
||||
addAllProVal[v[1]]=v[2]
|
||||
end
|
||||
end
|
||||
end
|
||||
--被动技能计算
|
||||
if cursoulPrintConfig.PassiveSkill and #cursoulPrintConfig.PassiveSkill > 0 then
|
||||
for j = 1, #cursoulPrintConfig.PassiveSkill do
|
||||
table.insert(allPassiveSkill,cursoulPrintConfig.PassiveSkill[j])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
--被动技能计算
|
||||
if allPassiveSkill and #allPassiveSkill > 0 then --talismanConFig.OpenSkillRules and #talismanConFig.OpenSkillRules > 0 then
|
||||
--单体加成 --单体等级限制加成 --团体加成 --减乘
|
||||
propList, conPropList, teamPropList, conTeamPropList, dePropList = PassiveListToPropList(allPassiveSkill)
|
||||
end
|
||||
|
||||
if propList and LengthOfTable(propList) > 0 then
|
||||
for i,v in pairs(propList) do
|
||||
if addAllProVal[i] then
|
||||
addAllProVal[i] = addAllProVal[i] + v
|
||||
else
|
||||
addAllProVal[i] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
addAllProVal[HeroProType.WarPower] = allSoulPrintAddWarPowerVal
|
||||
return addAllProVal, conPropList, teamPropList, conTeamPropList, dePropList
|
||||
end,
|
||||
|
||||
|
||||
|
|
|
@ -528,7 +528,11 @@ function this.EquipWearRequest(_heroId, _equipIds,_type, func)
|
|||
--local msg = HeroInfoProto_pb.GetAllEquipResponse()
|
||||
--msg:ParseFromString(data)
|
||||
--设置战斗力脏数据
|
||||
HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.Equip)
|
||||
if _type == 1 then
|
||||
HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.Equip)
|
||||
else
|
||||
HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.EquipTreasure)
|
||||
end
|
||||
if func then
|
||||
func(msg)
|
||||
end
|
||||
|
@ -548,7 +552,11 @@ function this.EquipUnLoadOptRequest(_heroId, _equipIds, _type,func)
|
|||
--local msg = HeroInfoProto_pb.GetAllEquipResponse()
|
||||
--msg:ParseFromString(data)
|
||||
--设置战斗力脏数据
|
||||
HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.Equip)
|
||||
if _type == 1 then
|
||||
HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.Equip)
|
||||
else
|
||||
HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.EquipTreasure)
|
||||
end
|
||||
if func then
|
||||
func(msg)
|
||||
end
|
||||
|
@ -3871,6 +3879,9 @@ function NetManager.SinGleGuildSkillUpLv(profession,beforeLevel,afterLevel,func)
|
|||
if func then
|
||||
func(msg)
|
||||
end
|
||||
--设置战斗力脏数据
|
||||
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.GuildSkill)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
|
||||
end)
|
||||
end
|
||||
--公会技能重置
|
||||
|
@ -3885,6 +3896,9 @@ function NetManager.ResetGuildSkillRequest(type,func)
|
|||
if func then
|
||||
func(msg)
|
||||
end
|
||||
--设置战斗力脏数据
|
||||
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.GuildSkill)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue