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