战力修改提交
parent
330b36b55a
commit
d7276eae64
|
@ -124,6 +124,13 @@ function this.UpdatelBackData(heroId,value,isAdd)
|
|||
this.AllHeroDataLikAbility[heroId].value = this.AllHeroDataLikAbility[heroId].value + value
|
||||
end
|
||||
this.AllHeroDataLikAbility[heroId].likeLv = this.GetTotalHeroLikeLv(value)
|
||||
local herodata = HeroManager.GetAllHeroList()
|
||||
for k,v in pairs(herodata) do
|
||||
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.LikeAbility)
|
||||
if v.id == heroId then
|
||||
HeroPropManager.SetDirtyByType(v.id, Hero_Prop_Type.LikeAbility)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function this.UpdatelSingleHeroData(heroId,itemId,itemNum)
|
||||
|
@ -190,7 +197,7 @@ function this.GetProData(indexType,index,lv)
|
|||
end
|
||||
else
|
||||
for _,n in ipairs(list) do
|
||||
if n.Property and #n.Property > 0 and lv <= n.lv then
|
||||
if n.Property and #n.Property > 0 and lv >= n.lv then
|
||||
if n.Property and #n.Property > 0 then
|
||||
for i = 1,#n.Property do
|
||||
if not allPro[n.Property[i][1]] then
|
||||
|
@ -229,7 +236,7 @@ function this.GetPrivilageProData(indexType,index,lv)
|
|||
end
|
||||
else
|
||||
for _,n in ipairs(list) do
|
||||
if n.priPro and #n.priPro > 0 and lv <= n.lv then
|
||||
if n.priPro and #n.priPro > 0 and lv >= n.lv then
|
||||
if n.priPro and #n.priPro > 0 then
|
||||
for i = 1,#n.priPro do
|
||||
if not allPro[n.priPro[i][1]] then
|
||||
|
@ -249,19 +256,19 @@ function this.GetTotalForce(heroData)
|
|||
local AllHeroProVal = {}
|
||||
local lv,totalNum = 0,0
|
||||
if heroData then
|
||||
if this.AllHeroDataLikAbility[heroData.id] then
|
||||
lv,totalNum = this.GetLv(2,this.AllHeroDataLikAbility[heroData.id].value)
|
||||
if this.AllHeroDataLikAbility[heroData.tId] then
|
||||
lv,totalNum = this.GetLv(2,this.AllHeroDataLikAbility[heroData.tId].value)
|
||||
SingleProVal = this.GetProData(2,-1,lv)
|
||||
end
|
||||
end
|
||||
local totalCurNum,totalLv,totalNum = this.GetTotalHeroLikeLv(-1)
|
||||
AllHeroProVal = this.GetProData(1,-1,totalLv)
|
||||
for k,v in pairs(SingleProVal) do
|
||||
LogGreen("SingleProVal k:"..k.." v:"..v)
|
||||
end
|
||||
for k,v in pairs(AllHeroProVal) do
|
||||
LogGreen("AllHeroProVal k:"..k.." v:"..v)
|
||||
end
|
||||
-- for k,v in pairs(SingleProVal) do
|
||||
-- LogGreen("SingleProVal k:"..k.." v:"..v)
|
||||
-- end
|
||||
-- for k,v in pairs(AllHeroProVal) do
|
||||
-- LogGreen("AllHeroProVal k:"..k.." v:"..v)
|
||||
-- end
|
||||
return SingleProVal, AllHeroProVal
|
||||
end
|
||||
|
||||
|
|
|
@ -5865,6 +5865,7 @@ function NetManager.GetLikeableDataRequest(func)
|
|||
local msg = HeroInfoProto_pb.GetLikableDataResponse()
|
||||
msg:ParseFromString(data)
|
||||
LikabilityManager.UpdateAllBackData(msg)
|
||||
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
|
@ -5883,7 +5884,7 @@ function NetManager.HeroUpLikableRequest(heroId,itemId,itemNum,func)
|
|||
for k,v in pairs(herodata) do
|
||||
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.LikeAbility)
|
||||
if v.id == heroId then
|
||||
HeroPropManager.SetDirtyByType(v.id, Hero_Prop_Type.LikeAbility)
|
||||
HeroPropManager.SetDirtyByType(v.dynamicId, Hero_Prop_Type.LikeAbility)
|
||||
end
|
||||
end
|
||||
if func then
|
||||
|
|
Loading…
Reference in New Issue