【新战力计算】 加编队界面 和 升星预览战力计算方法

dev_chengFeng
zhangqiang 2021-01-22 14:24:24 +08:00
parent f283d579c4
commit c8d8e4f167
7 changed files with 16 additions and 6 deletions

View File

@ -1617,6 +1617,8 @@ FormationTypeDef = {
MAGIC_MIRROR = 1403, --妖
TAOIST_MIRROR = 1404, --道
GUILD_TRANSCRIPT = 1501, --公会副本
FORMATION_TEMPORARY = 10000, --临时编队
}
--编队需要拉取主线

View File

@ -288,7 +288,6 @@ function this.RefreshFormation(isTop)
end
end
this.order = #this.choosedList
-- 妖灵师等级限制
limitLevel = 0
limitLevel = CarbonManager.difficulty == 4 and EndLessMapManager.limiteLevel or 0
@ -315,6 +314,9 @@ function this.SetCardsData()
or this.curFormationIndex == FormationTypeDef.TAOIST_MIRROR then
this.opView.RefreshFormation(this.choosedList)
end
LogGreen("刷新编队·············· ")
FormationManager.UpdateTemporaryFormation(this.choosedList)
this.formationPower = 0--战力
--元素共鸣
this.ElementalResonanceView:GetElementalType(this.choosedList,1)
@ -472,8 +474,9 @@ function this.SetCardSingleData(o, heroId, _pos, _heroData)
end
--战力计算
function this.CalculateAllHeroPower(curHeroData,allHeroTeamAddProVal)
local allEquipAddProVal = HeroManager.CalculateHeroAllProValList(1, curHeroData.dynamicId, false,nil,nil,true,allHeroTeamAddProVal)
this.formationPower = this.formationPower + allEquipAddProVal[HeroProType.WarPower]
-- HeroPowerManager.GetHeroPower(dId, formationId)
local allEquipAddProVal = HeroPowerManager.GetHeroPower(curHeroData.dynamicId, FormationTypeDef.FORMATION_TEMPORARY)--HeroManager.CalculateHeroAllProValList(1, curHeroData.dynamicId, false,nil,nil,true,allHeroTeamAddProVal)
this.formationPower = this.formationPower + allEquipAddProVal--[HeroProType.WarPower]
end

View File

@ -1450,7 +1450,7 @@ function this.TimeFormat()
if dynamicAct then
if isRefeshIcon then
local curindex = GlobalActConfig[dynamicAct].ShowArt
Util.GetGameObject(this.btnDynamicActivity,"Image"):GetComponent("Image").sprite = Util.LoadSprite(mainDynamicActivityIcon[curindex])
-- Util.GetGameObject(this.btnDynamicActivity,"Image"):GetComponent("Image").sprite = Util.LoadSprite(mainDynamicActivityIcon[curindex])
isRefeshIcon = false
end
local info = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.DynamicAct)

View File

@ -527,6 +527,7 @@ function this.EquipWearRequest(_heroId, _equipIds,_type, func)
local data = buffer:DataByte()
--local msg = HeroInfoProto_pb.GetAllEquipResponse()
--msg:ParseFromString(data)
HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.Equip)
if func then
func(msg)
end
@ -545,6 +546,7 @@ function this.EquipUnLoadOptRequest(_heroId, _equipIds, _type,func)
local data = buffer:DataByte()
--local msg = HeroInfoProto_pb.GetAllEquipResponse()
--msg:ParseFromString(data)
HeroPropManager.SetDirtyByType(_heroId, Hero_Prop_Type.Equip)
if func then
func(msg)
end

View File

@ -250,8 +250,8 @@ function this:UpdateHeroUpStarProUpShow()
if nextUpStarConFig then nextProUpVal = nextUpStarConFig.PropertiesDisplay end
--this.proUpVal.text = GetPropertyFormatStr(2, nextProUpVal)
--this.UpdateHeroUpStarProUpSkillShow(this.skillInfoGrid,self:NextStarUpSkillTabs())
local nextallAddProVal=HeroManager.CalculateHeroAllProValList(2,curHeroData.dynamicId,false,curHeroData.breakId,upStarRankUpConfig.Id)
local nextallAddProVal,curPower = HeroPowerManager.GetNextHeroPower(curHeroData.dynamicId, nil,upStarRankUpConfig.Id)
-- local nextallAddProVal=HeroManager.CalculateHeroAllProValList(2,curHeroData.dynamicId,false,curHeroData.breakId,upStarRankUpConfig.Id)
this:ProShow(this.atkPro_UpStar,allAddProVal,HeroProType.Attack,nextallAddProVal)
this:ProShow(this.hpPro_UpStar,allAddProVal,HeroProType.Hp,nextallAddProVal)
this:ProShow(this.phyDef_UpStar,allAddProVal,HeroProType.PhysicalDefence,nextallAddProVal)

View File

@ -107,6 +107,8 @@ function TalismanInfoPanel:BindEvent()
end
NetManager.TalismanUpStarRequest(tostring(curHeroData.dynamicId),function (msg)
HeroManager.SetTalismanLv(curHeroData.dynamicId,curHeroData.talismanList+1)--本地标记等级
LogGreen("请求法宝升星 ssssssss ")
HeroPropManager.SetDirtyByType(curHeroData.dynamicId, Hero_Prop_Type.Talisman)
UIManager.OpenPanel(UIName.TalismanUpStarSuccessPanel,curHeroData,function ()
self:OnShowPanelData()
end,function() self:ClosePanel() end)

View File

@ -492,6 +492,7 @@ function VipPanelV2:OnBtnLvUpClicked()
NetManager.RequestVipLevelUp(function(respond)
self:OnShow()
SoundManager.PlaySound(SoundConfig.Sound_VipUpLevel)
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Vip)
end)
end