法相增加属性计算修改
parent
cd719257fd
commit
76c81f44d4
|
@ -1958,7 +1958,7 @@ function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upSt
|
|||
local fourQuaderAllProAdd = PracticeManager.HeroCalculateFourQuaWarForce(curHeroData.heroConfig.Profession)
|
||||
LogRed_Prop("四象心法加成")
|
||||
LogRedTable_Prop(fourQuaderAllProAdd)
|
||||
|
||||
--FaXiangManager.CalculateWarForceBase
|
||||
--英雄被动技能属性加成
|
||||
local heroSkillSingleHeroProVal, heroSkillLvProVal, heroSkillAllHeroProVal, heroSkillSpecialProVal = {}, {}, {}, {}
|
||||
if _type == 1 then
|
||||
|
@ -2061,8 +2061,11 @@ function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upSt
|
|||
local practiceAddPro = PracticeManager.GetCurAllGetAdd()
|
||||
LogRed_Prop("修行加成")
|
||||
LogRedTable_Prop(practiceAddPro)
|
||||
--法相属性加成
|
||||
local faXiangAddPro=FaXiangManager.CalculateAllFaXiangAddPro(curHeroData)
|
||||
--单体所有属性合并
|
||||
this.DoubleTableCompound(allAddProVal, allPokemonPeiJianAddPro)
|
||||
this.DoubleTableCompound(allAddProVal, faXiangAddPro)
|
||||
this.DoubleTableCompound(allAddProVal, guildSkillAllProAdd)
|
||||
this.DoubleTableCompound(allAddProVal, fourQuaderAllProAdd)
|
||||
this.DoubleTableCompound(allAddProVal, falismanSingleHeroProVal)
|
||||
|
|
|
@ -169,6 +169,7 @@ function this.CreateHeroCountData(dId)
|
|||
talismanLv = 1,
|
||||
formationId = FormationTypeDef.FORMATION_NORMAL,
|
||||
zhenYingId=0,
|
||||
faxiang={},
|
||||
}
|
||||
if not dId then
|
||||
return heroData
|
||||
|
@ -192,6 +193,7 @@ function this.CreateHeroCountData(dId)
|
|||
heroData.talismanLv = curHeroData.talismanList -- 法宝等级
|
||||
heroData.formationId = FormationTypeDef.FORMATION_NORMAL
|
||||
heroData.zhenYingId = curHeroData.changeProId
|
||||
heroData.faxiang=curHeroData.faxiang
|
||||
return heroData
|
||||
|
||||
end
|
||||
|
@ -228,6 +230,7 @@ function this.FinalShowDeal(heroData, propList)
|
|||
if not propList[tpId] then
|
||||
propList[tpId] = 0
|
||||
end
|
||||
--LogError("tpid=="..tpId .." propList[k]=="..propList[k])
|
||||
propList[tpId] = math.floor( propList[tpId] + propList[tpId] * propList[k] / 100)
|
||||
end
|
||||
end
|
||||
|
@ -270,8 +273,8 @@ function this.GetHeroProp(dId, formationId, NoFuncProp)
|
|||
end
|
||||
|
||||
-- 计算减益属性
|
||||
-- Log_Prop("减益属性")
|
||||
-- this.CountDeProp(dId, allPropList)
|
||||
--Log_Prop("减益属性")
|
||||
--this.CountDeProp(dId, allPropList)
|
||||
|
||||
local isTempHero = HeroTempPropManager.IsTempHeroID(dId)
|
||||
-- 判断是否需要加入团队属性加成
|
||||
|
@ -633,7 +636,8 @@ function this.CountDeProp(dId, allPropList)
|
|||
local id = prop.propId
|
||||
local v = prop.value
|
||||
Log_Prop(string.format("%s|%s", id, v))
|
||||
allPropList[id] = allPropList[id] * (1 - v / 10000)
|
||||
-- allPropList[id] = allPropList[id] * (1 - v / 10000)
|
||||
allPropList[id] = allPropList[id] * (1 - v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -596,4 +596,27 @@ Hero_Prop_Func = {
|
|||
end
|
||||
return propList, conPropList, teamPropList, conTeamPropList, dePropList
|
||||
end,
|
||||
[Hero_Prop_Type.FaXiang] = function(_heroData)
|
||||
local allAddPro={}
|
||||
local propList, conPropList, teamPropList, conTeamPropList, dePropList
|
||||
LogError("计算英雄法相 属性 被动属性")
|
||||
allAddPro=FaXiangManager.CalculateAllFaXiangAddPro(_heroData)
|
||||
local skills=FaXiangManager.GetHeroAllFaXiangSkill(_heroData)
|
||||
--被动技能计算
|
||||
if skills and #skills > 0 then --talismanConFig.OpenSkillRules and #talismanConFig.OpenSkillRules > 0 then
|
||||
--单体加成 --单体等级限制加成 --团体加成 --减乘
|
||||
propList, conPropList, teamPropList, conTeamPropList, dePropList = PassiveListToPropList(skills)
|
||||
end
|
||||
|
||||
if propList and LengthOfTable(propList) > 0 then
|
||||
for i,v in pairs(propList) do
|
||||
if allAddPro[i] then
|
||||
allAddPro[i] = allAddPro[i] + v
|
||||
else
|
||||
allAddPro[i] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
return allAddPro, conPropList, teamPropList, conTeamPropList, dePropList
|
||||
end,
|
||||
}
|
|
@ -624,11 +624,7 @@ function this.WearFaxiangEquipRequest(_heroId,_ups,_type,func)
|
|||
--local msg = HeroInfoProto_pb.GetAllEquipResponse()
|
||||
--msg:ParseFromString(data)
|
||||
--设置战斗力脏数据
|
||||
-- if _type == 1 then
|
||||
-- HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.Equip)
|
||||
-- else
|
||||
-- HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.EquipTreasure)
|
||||
-- end
|
||||
HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.FaXiang)
|
||||
if func then
|
||||
func(msg)
|
||||
end
|
||||
|
@ -676,10 +672,6 @@ function this.StrongthenFaxiangEquipRequest(_faxiangId,_lv,_type, _equipData,fun
|
|||
end
|
||||
|
||||
costItems={}
|
||||
--设置战斗力脏数据
|
||||
if _equipData and _equipData.upHeroDid~=nil and _equipData.upHeroDid~="" then
|
||||
HeroPropManager.SetDirtyByType(_equipData.upHeroDid, Hero_Prop_Type.FaXiang)
|
||||
end
|
||||
if func then
|
||||
func(msg)
|
||||
end
|
||||
|
|
|
@ -373,7 +373,9 @@ function this.CalculateAllFaXiangAddPro(_heroData)
|
|||
-- LogGreen("sId:"..sId.." lv:"..lv.." rlv:"..rlv.." tlv:"..tlv)
|
||||
--LogError("===============================获取英雄法相添加的属性")
|
||||
local allProVal = {}
|
||||
|
||||
if _heroData==nil then
|
||||
LogError("没有英雄数据======")
|
||||
return allProVal
|
||||
end
|
||||
for i, v in ConfigPairs(propertyConfig) do
|
||||
|
@ -411,6 +413,32 @@ function this.CalculateAllFaXiangAddPro(_heroData)
|
|||
return allProVal
|
||||
end
|
||||
|
||||
--获取英雄所有法相技能
|
||||
function this.GetHeroAllFaXiangSkill(_heroData)
|
||||
local skillList={}
|
||||
if _heroData==nil then
|
||||
return skillList
|
||||
end
|
||||
local faxiang=_heroData.faxiang
|
||||
if faxiang then
|
||||
for i = 1, #faxiang do
|
||||
local data=allTreasures[faxiang[i]]
|
||||
--LogError(" data.id=="..data.faXiangConfig.Id)
|
||||
if data and data.faXiangConfig and #data.faXiangConfig.PassiveSkill>0 then
|
||||
local ids=data.faXiangConfig.PassiveSkill[data.refineLv+1]
|
||||
if ids then
|
||||
for key, value in pairs(ids) do
|
||||
--LogError("skill value===="..value)
|
||||
table.insert(skillList,value)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return skillList
|
||||
end
|
||||
|
||||
|
||||
|
||||
function this.CalculateFaXiangAddPro(faxiang)
|
||||
-- LogGreen("sId:"..sId.." lv:"..lv.." rlv:"..rlv.." tlv:"..tlv)
|
||||
|
|
|
@ -118,6 +118,7 @@ function FaXiangStrongPopup:BindEvent()
|
|||
FaXiangManager.ChangeTreasureLv(curEquipData.idDyn,1)
|
||||
this.treasureDatas[curIndex]:OnOpen(false, {curEquipData.id,0}, 1, false, false, false, 0,curEquipData.idDyn)
|
||||
this:SetWindShow(type,0)
|
||||
HeroPropManager.SetDirtyByType(curEquipData.upHeroDid, Hero_Prop_Type.FaXiang)
|
||||
--this:RefreshRedPoint(0,true)
|
||||
if isMax then
|
||||
PopupTipPanel.ShowTip(Language[11772])
|
||||
|
@ -154,6 +155,7 @@ function FaXiangStrongPopup:BindEvent()
|
|||
|
||||
FaXiangManager.ChangeTreasureLv(curEquipData.idDyn,2)
|
||||
this:SetWindShow(2,0)
|
||||
HeroPropManager.SetDirtyByType(curEquipData.upHeroDid, Hero_Prop_Type.FaXiang)
|
||||
--this:RefreshRedPoint(0,true)
|
||||
this.treasureDatas[curIndex]:OnOpen(false, {curEquipData.id,0}, 1, false, false, false, 0,curEquipData.idDyn)
|
||||
if isMax then
|
||||
|
|
|
@ -443,6 +443,7 @@ function this:AllEquipUpBtnOnClick()
|
|||
|
||||
NetManager.WearFaxiangEquipRequest(curHeroData.dynamicId,list,1,function()
|
||||
this.UpdateEquipPosHeroData(3, 4, list)
|
||||
HeroPropManager.SetDirtyByType(curHeroData.dynamicId, Hero_Prop_Type.FaXiang)
|
||||
end)
|
||||
end
|
||||
else
|
||||
|
@ -479,6 +480,7 @@ function this:AllEquipDownBtnOnClick()
|
|||
-- 一键卸下音效
|
||||
NetManager.WearFaxiangEquipRequest(curHeroData.dynamicId,curHeroData.faxiang,2,function()
|
||||
this.UpdateEquipPosHeroData(3, 5, curHeroData.faxiang)
|
||||
HeroPropManager.SetDirtyByType(curHeroData.dynamicId, Hero_Prop_Type.FaXiang)
|
||||
end)
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue