【鸿蒙阵】

dev_chengFeng
guowei 2021-01-04 09:57:42 +08:00
parent 544be95060
commit 30b0c26a6e
13 changed files with 102 additions and 47 deletions

View File

@ -437,7 +437,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 99.8, y: 89.9}
m_AnchoredPosition: {x: 99.8, y: 85}
m_SizeDelta: {x: 197.07, y: 47.75}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6184980146669918349

View File

@ -431,6 +431,7 @@ GameEvent = {
UpHongMengEnvoy = "HongMeng.UpHongMengEnvoy",
UnLoadHongMengEnvoy = "HongMeng.UnLoadHongMengEnvoy",
UpdateGongMingLv= "HongMeng.UpdateGongMingLv",
--鸿蒙碑新手引导
HongMengGuide = "HongMeng.HongMengGuide",
}
}

View File

@ -317,7 +317,7 @@ import "CommonProto.proto";
message HongmengAddition{
optional int32 additionType = 1; // 1 2 3 4 5
optional int32 value = 2; //
optional int32 heroTid = 3; // 0鸿-1id
optional int32 heroTid = 3; // 0鸿-1id
}
// 鸿
@ -331,3 +331,8 @@ import "CommonProto.proto";
repeated HongmengHeroInfo hongmengResonacnes = 3; // 使
optional int32 hongmengTabletMax = 4; // 鸿,0鸿
}
// 鸿
message HongmengSteleNewHandIndication{
optional int32 state = 1;// 鸿
}

View File

@ -188,6 +188,8 @@ HONGMENGINFOINDICATION_HONGMENGGUARDS_FIELD = protobuf.FieldDescriptor();
HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD = protobuf.FieldDescriptor();
HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD = protobuf.FieldDescriptor();
HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD = protobuf.FieldDescriptor();
HONGMENGSTELENEWHANDINDICATION = protobuf.Descriptor();
HONGMENGSTELENEWHANDINDICATION_STATE_FIELD = protobuf.FieldDescriptor();
GETHEROLISTINFOREQUEST_INDEX_FIELD.name = "index"
GETHEROLISTINFOREQUEST_INDEX_FIELD.full_name = ".com.ljsd.jieling.protocols.GetHeroListInfoRequest.index"
@ -1858,6 +1860,23 @@ HONGMENGINFOINDICATION.enum_types = {}
HONGMENGINFOINDICATION.fields = {HONGMENGINFOINDICATION_HONGMENGGUARDS_FIELD, HONGMENGINFOINDICATION_HONGMENGADDITIONS_FIELD, HONGMENGINFOINDICATION_HONGMENGRESONACNES_FIELD, HONGMENGINFOINDICATION_HONGMENGTABLETMAX_FIELD}
HONGMENGINFOINDICATION.is_extendable = false
HONGMENGINFOINDICATION.extensions = {}
HONGMENGSTELENEWHANDINDICATION_STATE_FIELD.name = "state"
HONGMENGSTELENEWHANDINDICATION_STATE_FIELD.full_name = ".com.ljsd.jieling.protocols.HongmengSteleNewHandIndication.state"
HONGMENGSTELENEWHANDINDICATION_STATE_FIELD.number = 1
HONGMENGSTELENEWHANDINDICATION_STATE_FIELD.index = 0
HONGMENGSTELENEWHANDINDICATION_STATE_FIELD.label = 1
HONGMENGSTELENEWHANDINDICATION_STATE_FIELD.has_default_value = false
HONGMENGSTELENEWHANDINDICATION_STATE_FIELD.default_value = 0
HONGMENGSTELENEWHANDINDICATION_STATE_FIELD.type = 5
HONGMENGSTELENEWHANDINDICATION_STATE_FIELD.cpp_type = 1
HONGMENGSTELENEWHANDINDICATION.name = "HongmengSteleNewHandIndication"
HONGMENGSTELENEWHANDINDICATION.full_name = ".com.ljsd.jieling.protocols.HongmengSteleNewHandIndication"
HONGMENGSTELENEWHANDINDICATION.nested_types = {}
HONGMENGSTELENEWHANDINDICATION.enum_types = {}
HONGMENGSTELENEWHANDINDICATION.fields = {HONGMENGSTELENEWHANDINDICATION_STATE_FIELD}
HONGMENGSTELENEWHANDINDICATION.is_extendable = false
HONGMENGSTELENEWHANDINDICATION.extensions = {}
CancelHeroChangeRequest = protobuf.Message(CANCELHEROCHANGEREQUEST)
CancelHeroChangeResponse = protobuf.Message(CANCELHEROCHANGERESPONSE)
@ -1897,6 +1916,7 @@ HeroReturnResponse = protobuf.Message(HERORETURNRESPONSE)
HongmengAddition = protobuf.Message(HONGMENGADDITION)
HongmengHeroInfo = protobuf.Message(HONGMENGHEROINFO)
HongmengInfoIndication = protobuf.Message(HONGMENGINFOINDICATION)
HongmengSteleNewHandIndication = protobuf.Message(HONGMENGSTELENEWHANDINDICATION)
MergeSoulRequest = protobuf.Message(MERGESOULREQUEST)
MergeSoulResponse = protobuf.Message(MERGESOULRESPONSE)
OpenResonanceRequest = protobuf.Message(OPENRESONANCEREQUEST)

View File

@ -14,9 +14,17 @@ local _FuncGuideList = {}
function this.Initialize()
Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.OnFunctionOpen)
Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, this.OnLevelChange)
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.HongMengGuide,this.HongMengGuideFun)
end
function this.HongMengGuideFun(OnOff)
--鸿蒙碑开启引导
if OnOff == 1 then
-- body
table.insert(_FuncGuideList, 101612)
this.CheckFuncGuide()
end
end
function this.OnLevelChange()
-- 首充引导特殊处理到十级开放
if PlayerManager.level == 10 then
@ -60,9 +68,11 @@ function this.InitData(guideData)
end
-- 测试功能引导用
-- Timer.New(function()
-- this.OnFunctionOpen(78)
-- end, 1):Start()
--Timer.New(function()
-- this.OnFunctionOpen(86)
-- print("6666666")
-- this.HongMengGuideFun()
--end, 1):Start()
end

View File

@ -571,50 +571,57 @@ end
function this.RefreshEnvoyPoint()
-- body
if this.hongmengAdditions[1].heroTid == 0 then
if this.hongmengAdditions[1] then
-- body
local sum = this:HongMengTowerUpLimit()
if this.hongmengAdditions[1].value <= sum then
if this.hongmengAdditions[1].heroTid == 0 then
-- body
for i = 1, #this.hongmengGuards do
local sum = this:HongMengTowerUpLimit()
if this.hongmengAdditions[1].value <= sum then
-- body
if this.hongmengGuards[i].heroId == "" and this.hongmengGuards[i].time == 0 then
for i = 1, #this.hongmengGuards do
-- body
return true
if this.hongmengGuards[i].heroId == "" and this.hongmengGuards[i].time == 0 then
-- body
return true
end
end
end
end
end
return false
end
function this.RefreshUpTowerPoint()
-- body
if this.hongmengAdditions[1].heroTid == 0 then
if this.hongmengAdditions[1] then
-- body
local sum = this:HongMengTowerUpLimit()
if this.hongmengAdditions[1].value >= sum then
if this.hongmengAdditions[1].heroTid == 0 then
-- body
return false
else
local data = this.GetHongMengUpData()
-- LogGreen(data.LevelUp[1][2].." "..data.LevelUp[2][2])
-- LogYellow(BagManager.GetTotalItemNum(UpViewRechargeType.Gold))
if data and BagManager.GetTotalItemNum(UpViewRechargeType.Gold) >= data.LevelUp[1][2] then
local sum = this:HongMengTowerUpLimit()
if this.hongmengAdditions[1].value >= sum then
-- body
if BagManager.GetTotalItemNum(UpViewRechargeType.GrowthAmulet) >= data.LevelUp[2][2] then
return true
return false
else
local data = this.GetHongMengUpData()
-- LogGreen(data.LevelUp[1][2].." "..data.LevelUp[2][2])
-- LogYellow(BagManager.GetTotalItemNum(UpViewRechargeType.Gold))
if data and BagManager.GetTotalItemNum(UpViewRechargeType.Gold) >= data.LevelUp[1][2] then
-- body
if BagManager.GetTotalItemNum(UpViewRechargeType.GrowthAmulet) >= data.LevelUp[2][2] then
return true
end
end
return false
end
else
return false
end
else
return false
end
return false
end
--票战力

View File

@ -95,7 +95,7 @@ function GongMingResultTips:OnOpen(flag)
-- end
-- end
-- Util.GetGameObject(this.TextOneAll,"textFa"):GetComponent("Text").text = string.format("%d",herodata.talismanList)
if HeroManager.IsTenTalent(herodata.star) then
if HeroManager.IsTenTalent(herodata.id) then
-- body
local data = HarmonyManager:GetAdditions()
Util.GetGameObject(this.TextTwoAll,"textDegree"):GetComponent("Text").text = data[1].value

View File

@ -239,6 +239,7 @@ function HongMengEnvoyPanel:UpdateFun(data)
end
end
end
self:RunTimerFun()
-- local equip_count = 1
-- local equip_list = {}

View File

@ -76,13 +76,13 @@ function HongMengUnLoadPanel:SetItem(go,data,index)
Util.GetGameObject(go.transform, "frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(data.heroConfig.Quality,data.star))
if index == 0 then
-- body
if HarmonyManager.hongmengTablet>=HarmonyManager.TowerStartLimit then
-- body
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",data.lv)
else
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",data.lv)
end
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",data.lv)
-- if HarmonyManager.hongmengTablet>=HarmonyManager.TowerStartLimit then
-- -- body
-- Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",data.lv)
-- else
-- end
else
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("%d",data.oriLv)

View File

@ -118,10 +118,10 @@ function this.RunTimerFun()
if value.Empty ~=nil then
-- body
--print(value.Empty," ")
if value.Empty.activeSelf == false then
-- body
value.Empty:SetActive(true)
end
-- if value.Empty.activeSelf == false then
-- -- body
-- value.Empty:SetActive(true)
-- end
end
local time_content = TimeToFelaxible(HarmonyManager.hongmengHeroInfos[value.index].time - GetTimeStamp())

View File

@ -55,7 +55,7 @@ end
--装备
HeroData.__get__.equipIdList = function(self)
local equipStar = HarmonyManager.GetSingleAdditions(HarmonyAddType.AddEquip)
--LogPink("self._equipIdList "..#self._equipIdList )
--LogPink("self._equipIdList "..equipStar )
if #self._equipIdList > 0 then
self.harmonyGongMing = false
return self._equipIdList

View File

@ -117,8 +117,15 @@ function this.RegisterMessage(network)
socket:RegistNetMessage(MessageTypeProto_pb.HERO_SKIN_USE_INDICATION, this.HeroSkinUseIndication)
-- 鸿蒙阵数据推送
socket:RegistNetMessage(MessageTypeProto_pb.HONGMENG_INFO_INDICATION,this.HongMengIndication)
socket:RegistNetMessage(MessageTypeProto_pb.HONGMENG_STELE_NEW_HAND_INDICATION,this.OpenHongMengTowerGuideIndication)
end
function this.OpenHongMengTowerGuideIndication(buffer)
local data = buffer:DataByte()
local msg = HeroInfoProto_pb.HongmengSteleNewHandIndication()
msg:ParseFromString(data)
LogGreen(msg.state)
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.HongMengGuide,msg.state)
end
function this.HongMengIndication(buffer)
local data = buffer:DataByte()
local msg = HeroInfoProto_pb.HongmengInfoIndication()

View File

@ -167,9 +167,13 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
if HarmonyManager.IsChangeColor(heroData.dynamicId) then
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
GongMingMask:SetActive(true)
elseif HarmonyManager:IsEnvoy(heroData.dynamicId) then
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
GongMingMask:SetActive(true)
elseif HarmonyManager:IsEnvoy(heroData.dynamicId) and HarmonyManager.hongmengAdditions[1] then
if HarmonyManager.hongmengAdditions[1].heroTid == 0 then
-- body
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
GongMingMask:SetActive(true)
end
end
end
Util.AddOnceClick(GongMingMask, function()