【鸿蒙阵修改】

dev_chengFeng
guowei 2020-12-26 15:07:51 +08:00
parent 381ec41882
commit d36276eb0c
8 changed files with 118 additions and 66 deletions

View File

@ -332,4 +332,5 @@ import "CommonProto.proto";
message HongmengInfoIndication{
repeated HongmengHeroInfo hongmengGuards = 1; // 鸿鸿使
repeated HongmengAddition hongmengAdditions = 2; //
repeated HongmengHeroInfo hongmengResonacnes = 3; // 使
}

View File

@ -190,6 +190,7 @@ GETHONGMENGINFORESPONSE_HONGMENGADDITIONS_FIELD = protobuf.FieldDescriptor();
HONGMENGINFOINDICATION = protobuf.Descriptor();
HONGMENGINFOINDICATION_HONGMENGGUARDS_FIELD = protobuf.FieldDescriptor();
HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD = protobuf.FieldDescriptor();
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD = protobuf.FieldDescriptor();
GETHEROLISTINFOREQUEST_INDEX_FIELD.name = "index"
GETHEROLISTINFOREQUEST_INDEX_FIELD.full_name = ".com.ljsd.jieling.protocols.GetHeroListInfoRequest.index"
@ -1875,11 +1876,22 @@ HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD.message_type = HONGMENGADDITION
HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD.type = 11
HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD.cpp_type = 10
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.name = "hongmengResonacnes"
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.full_name = ".com.ljsd.jieling.protocols.HongmengInfoIndication.hongmengResonacnes"
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.number = 3
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.index = 2
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.label = 3
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.has_default_value = false
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.default_value = {}
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.message_type = HONGMENGHEROINFO
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.type = 11
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD.cpp_type = 10
HONGMENGINFOINDICATION.name = "HongmengInfoIndication"
HONGMENGINFOINDICATION.full_name = ".com.ljsd.jieling.protocols.HongmengInfoIndication"
HONGMENGINFOINDICATION.nested_types = {}
HONGMENGINFOINDICATION.enum_types = {}
HONGMENGINFOINDICATION.fields = {HONGMENGINFOINDICATION_HONGMENGGUARDS_FIELD, HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD}
HONGMENGINFOINDICATION.fields = {HONGMENGINFOINDICATION_HONGMENGGUARDS_FIELD, HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD, HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD}
HONGMENGINFOINDICATION.is_extendable = false
HONGMENGINFOINDICATION.extensions = {}

View File

@ -35,8 +35,13 @@ function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet
this.TowerStartLimit = tonumber(string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig,101).Value,"#")[2])
-- LogGreen("TowerStartLimit"..HarmonyManager.TowerStartLimit)
this.hongmengHeroInfos = hongmengHeroInfos
LogGreen("hongmengHeroInfos",#this.hongmengHeroInfos)
for i = 1, #this.hongmengGuards do
-- if this.hongmengGuards[i].heroId ~= "" then
-- -- body
-- LogGreen(this.hongmengGuards[i].heroId)
-- end
this.hongmengGuards[i].time = this.hongmengGuards[i].time + GetTimeStamp()
end
@ -63,10 +68,17 @@ function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet
end
function this.UpdateHongMengData(hongmengGuards,hongmengAdditions)
function this.UpdateHongMengDataGuards(hongmengGuards)
this.hongmengGuards = hongmengGuards
end
function this.UpdateHongMengDataHeroInfos(hongmengHeroInfos)
this.hongmengHeroInfos = hongmengHeroInfos
end
function this.UpdateHongMengDataAdditions(hongmengAdditions)
this.hongmengAdditions = hongmengAdditions
if this.hongmengAdditions then
-- body
for i = 1, #this.hongmengAdditions do
@ -74,7 +86,7 @@ function this.UpdateHongMengData(hongmengGuards,hongmengAdditions)
LogPink("this.hongmengAdditions"..i.." "..this.hongmengAdditions[i].value)
end
end
print("刷新hongmengGuards")
end
--初始化共鸣列表数据
@ -396,6 +408,7 @@ function this.InitUpdateEquipData(id, upHeroDid)
equipdata.mainAttribute = this.GetMainProList(equipdata.equipConfig)
equipdata.backData = equipdata
equipdata.star = equipStarsConfig[equipdata.equipConfig.Star].Stars
this.equipDatas[id] = equipdata
if not this.equipDatas[id].upHeroDidList then

View File

@ -237,64 +237,64 @@ function HongMengEnvoyPanel:UpdateFun(data)
end
end
end
local equip_count = 1
local equip_list = {}
-- local equip_count = 1
-- local equip_list = {}
local hun_count = 1
local hun_list = {}
-- local hun_count = 1
-- local hun_list = {}
local ling_count = 1
local ling_list = {}
-- local ling_count = 1
-- local ling_list = {}
local weapon_Lv = 999
for i = 1, #HarmonyManager.hongmengGuards do
-- body
if HarmonyManager.hongmengGuards[i].heroId~= "" then
-- body
local herodata = HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId)
for i = 1, #herodata.equipIdList do
-- body
equip_list[equip_count] = herodata.equipIdList[i]
equip_count = equip_count + 1
end
if herodata.jewels then
-- body
if herodata.jewels[1] then
-- body
hun_list[hun_count] = herodata.jewels[1]
hun_count = hun_count + 1
end
if herodata.jewels[2] then
-- body
ling_list[ling_count] = herodata.jewels[2]
ling_count = ling_count + 1
end
end
if weapon_Lv > herodata.talismanList then
-- body
weapon_Lv = herodata.talismanList
end
end
end
-- local weapon_Lv = 999
-- for i = 1, #HarmonyManager.hongmengGuards do
-- -- body
-- if HarmonyManager.hongmengGuards[i].heroId~= "" then
-- -- body
-- local herodata = HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId)
-- for i = 1, #herodata.equipIdList do
-- -- body
-- equip_list[equip_count] = herodata.equipIdList[i]
-- equip_count = equip_count + 1
-- end
-- if herodata.jewels then
-- -- body
-- if herodata.jewels[1] then
-- -- body
-- hun_list[hun_count] = herodata.jewels[1]
-- hun_count = hun_count + 1
-- end
-- if herodata.jewels[2] then
-- -- body
-- ling_list[ling_count] = herodata.jewels[2]
-- ling_count = ling_count + 1
-- end
-- end
-- if weapon_Lv > herodata.talismanList then
-- -- body
-- weapon_Lv = herodata.talismanList
-- end
-- end
-- end
if equip_count == 24 then
-- body
HarmonyManager:EquipMin(equip_list)
end
-- if equip_count == 24 then
-- -- body
-- HarmonyManager:EquipMin(equip_list)
-- end
if hun_count == 6 then
-- body
HarmonyManager:HunMin(hun_list)
end
-- if hun_count == 6 then
-- -- body
-- HarmonyManager:HunMin(hun_list)
-- end
if ling_count == 6 then
-- body
HarmonyManager:SoulMin(ling_list)
end
if weapon_Lv ~= 999 then
-- body
HarmonyManager:WeaponMin(weapon_Lv)
end
-- if ling_count == 6 then
-- -- body
-- HarmonyManager:SoulMin(ling_list)
-- end
-- if weapon_Lv ~= 999 then
-- -- body
-- HarmonyManager:WeaponMin(weapon_Lv)
-- end
--LogGreen( " HarmonyManager.EnvoyList "..#HarmonyManager.EnvoyList)
self:UpdateShow(HarmonyManager.hongmengGuards)
-- HeroManager.UpdateSingleHeroDatas(data.dynamicId,1,data.star,data.breakId,data.upStarId)

View File

@ -300,6 +300,7 @@ function this:OnOpen()
end
function this.SingleItemDataShow(clone,Itemdata)
LogGreen(clone.name.."||"..Itemdata.heroConfig.Id)
--Util.GetGameObject(clone.transform, "Box/Empty"):SetActive(false)
Util.GetGameObject(clone.transform, "GameObject/frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(Itemdata.heroConfig.Quality,Itemdata.star))
Util.GetGameObject(clone.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",Itemdata.lv)
Util.GetGameObject(clone.transform, "GameObject/icon"):GetComponent("Image").sprite = Util.LoadSprite(Itemdata.icon)

View File

@ -125,13 +125,23 @@ function this.HongMengIndication(buffer)
msg:ParseFromString(data)
LogGreen("更新数据")
if msg.hongmengGuards or msg.hongmengAdditions then
if msg.hongmengGuards then
-- body
for i = 1, #msg.hongmengGuards do
-- body
print(HeroManager.GetSingleHeroData(msg.hongmengGuards[i].heroId).name)
end
HarmonyManager.UpdateHongMengData(msg.hongmengGuards,msg.hongmengAdditions)
-- for i = 1, #msg.hongmengGuards do
-- -- body
-- print(HeroManager.GetSingleHeroData(msg.hongmengGuards[i].heroId).name)
-- end
HarmonyManager.UpdateHongMengDataGuards(msg.hongmengGuards)
end
if msg.hongmengAdditions then
-- body
HarmonyManager.UpdateHongMengDataAdditions(msg.hongmengAdditions)
end
if msg.hongmengResonacnes then
-- body UpdateHongMengDataHeroInfos
HarmonyManager.UpdateHongMengDataHeroInfos(msg.hongmengResonacnes)
end
end

View File

@ -558,10 +558,13 @@ function this.ShowHeroEquip()
Util.GetGameObject(go.transform, "proIcon"):GetComponent("Image").sprite =
Util.LoadSprite(GetProStrImageByProNum(curEquipTreasureDatas[i].itemConfig.PropertyName))
--鸿蒙阵 共享数据判断
if HarmonyManager.IsInfo(curEquipTreasureDatas[i].upHeroDid) then
if HarmonyManager.IsInfo(curEquipTreasureDatas[i].upHeroDid) and HarmonyManager.GetSingleAdditions(HarmonyAddType.HunSoulPrint) ~= -1 then
-- body
Util.GetGameObject(go.transform, "HongMenging"):SetActive(true)
elseif HarmonyManager.IsInfo(curEquipTreasureDatas[i].upHeroDid) and HarmonyManager.GetSingleAdditions(HarmonyAddType.LingSoulPrint) ~= -1 then
Util.GetGameObject(go.transform, "HongMenging"):SetActive(true)
else
-- body
Util.GetGameObject(go.transform, "HongMenging"):SetActive(false)
end

View File

@ -58,13 +58,24 @@ function HarmonyView:OnOpen()
for i = 1, #HarmonyManager.hongmengGuards do
if HarmonyManager.hongmengGuards[i].heroId ~= "" then
-- body
table.insert(heroDataList,HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId))
LogGreen("刷新"..i)
LogBlue("刷新IsHaveHero:"..HarmonyManager.hongmengGuards[i].heroId.." ::: "..tostring(HeroManager.IsHaveHero(HarmonyManager.hongmengGuards[i].heroId)))
if not HeroManager.IsHaveHero(HarmonyManager.hongmengGuards[i].heroId) then
for k = 1, #HarmonyManager.hongmengHeroInfos do
-- body
if HarmonyManager.hongmengGuards[i].heroId == HarmonyManager.hongmengHeroInfos[k].heroId then
-- body
LogPink(HeroManager.GetSingleHeroData(HarmonyManager.hongmengHeroInfos[k].heroId))
end
end
-- body
end
end
end
end
LogGreen("heroDataList长度"..#heroDataList)
-- if #heroDataList > 0 then
-- table.sort(heroDataList, function(a,b)
-- if a.lv==b.lv then
@ -87,6 +98,7 @@ function HarmonyView:OnOpen()
self.HongMengData[i] = singleHeroData
if heroDataList[i].lv== heroDataList[#heroDataList].lv then
-- body
self:SetItem(self.HongMengData[i],self.GongMingTable[i],1)
else
self:SetItem(self.HongMengData[i],self.GongMingTable[i],0)