法灵红点提交
parent
7965174646
commit
e795b4834b
|
@ -32,6 +32,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1118299119}
|
||||
- {fileID: 1496767545273597782}
|
||||
m_Father: {fileID: 6296292245052451673}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -30765,6 +30766,154 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &3570538997582358149
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 369069840846733777}
|
||||
- component: {fileID: 4754947953892722188}
|
||||
- component: {fileID: 6432307983996063928}
|
||||
m_Layer: 5
|
||||
m_Name: redPoint
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &369069840846733777
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3570538997582358149}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2653083820719992595}
|
||||
m_RootOrder: 2
|
||||
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: 43.8, y: 42.6}
|
||||
m_SizeDelta: {x: 25, y: 25}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4754947953892722188
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3570538997582358149}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &6432307983996063928
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3570538997582358149}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: 095467b0a413f5344815d6f08dc95336, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &3574704202863708625
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1496767545273597782}
|
||||
- component: {fileID: 1809506500578323808}
|
||||
- component: {fileID: 141855516044972208}
|
||||
m_Layer: 5
|
||||
m_Name: redPoint
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1496767545273597782
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3574704202863708625}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 739613256}
|
||||
m_RootOrder: 1
|
||||
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: 96.2, y: 24.1}
|
||||
m_SizeDelta: {x: 25, y: 25}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1809506500578323808
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3574704202863708625}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &141855516044972208
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3574704202863708625}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: 095467b0a413f5344815d6f08dc95336, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &3658400813746277255
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -62683,6 +62832,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 8461575811254997287}
|
||||
- {fileID: 1279726352388132861}
|
||||
- {fileID: 369069840846733777}
|
||||
m_Father: {fileID: 4546861846584646984}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
|
@ -104,8 +104,75 @@ function this.GetCanBlessEquipList()
|
|||
return list
|
||||
end
|
||||
|
||||
--检测法灵护佑红点
|
||||
function this.CheckEquipBlessRedPoint(_did)
|
||||
local data=this.allEquipData[_did]
|
||||
if data then
|
||||
if data.lv< this.GetBlessOpenLv() then
|
||||
return false
|
||||
end
|
||||
if data.bless and #data.bless ==this.GetBlessEquipNum() then
|
||||
return false
|
||||
end
|
||||
if data then
|
||||
local list=this.GetCanBlessEquipList()
|
||||
if #list>0 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
|
||||
--检测法灵强化红点
|
||||
function this.CheckEquipStrongRedPoint(_did)
|
||||
local data=this.allEquipData[_did]
|
||||
if data then
|
||||
local isEnough=false
|
||||
--检测法宝能否升级
|
||||
local config=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.EquipTalismana,"TalismanaId",data.staticId,"Level",data.lv)
|
||||
if config then
|
||||
local cost=config.RankupBasicMaterial
|
||||
local coinNum=0
|
||||
local selectMat={}
|
||||
if #cost>0 then
|
||||
isEnough=true
|
||||
for i = 1, #cost do
|
||||
local id=cost[i][1]
|
||||
local list={}
|
||||
local bagNum=0
|
||||
if id == 0 then
|
||||
id=data.staticId
|
||||
list=FaLingManager.GetAllUpListNoBless(id)
|
||||
if #selectMat==0 then
|
||||
for j=1,#list do
|
||||
if #selectMat < cost[i][2] and list[j].lv==0 then
|
||||
table.insert(selectMat,list[j].did)
|
||||
end
|
||||
end
|
||||
end
|
||||
bagNum=#selectMat
|
||||
else
|
||||
bagNum=BagManager.GetItemCountById(cost[i][1])
|
||||
end
|
||||
LogError("bagnum============================"..bagNum)
|
||||
if cost[i][2] > bagNum then
|
||||
isEnough=false
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
if isEnough then
|
||||
return isEnough
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
--获取护佑开启等级
|
||||
function this.GetBlessOpenLv()
|
||||
local config = ConfigManager.GetConfigData(ConfigName.SpecialConfig, 166)
|
||||
|
@ -131,10 +198,8 @@ function this.GetEquipAddPropByDid(_did)
|
|||
end
|
||||
|
||||
if this.allEquipData[_did] then
|
||||
LogError("1111111111111111111111".._did)
|
||||
local data=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.EquipTalismana,"TalismanaId",this.allEquipData[_did].staticId,"Level",this.allEquipData[_did].lv)
|
||||
if data then
|
||||
LogError("2222222222222222222222222222222".._did)
|
||||
local blessNum=#this.allEquipData[_did].bless
|
||||
local add=this.GetBlessEquipAddPro()*blessNum
|
||||
if data.Property and #data.Property>0 then
|
||||
|
@ -216,11 +281,9 @@ end
|
|||
--移除法灵的庇护法灵
|
||||
function this.RemoveEquipBlessEquip(_did,_blessId)
|
||||
if this.allEquipData[_did] and this.allEquipData[_blessId] then
|
||||
LogError("数据厘米11111111111111111111111111111111111")
|
||||
--table.removebyvalue(this.allEquipData[_did].bless,this.allEquipData[_blessId])
|
||||
for k, v in pairs(this.allEquipData[_did].bless) do
|
||||
if v.did==_blessId then
|
||||
LogError("移除成功")
|
||||
table.removebyvalue(this.allEquipData[_did].bless,v)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4104,57 +4104,40 @@ end
|
|||
|
||||
--单个英雄法宝红点
|
||||
function this.GetIsShowTalismanRedPoint(curHeroData)
|
||||
LogError("获取法宝红点----------------------------------------------")
|
||||
local isOpen = TalismanManager.GetCurHeroIsOpenTalisman(curHeroData)
|
||||
-- if HarmonyManager.IsChangeColor(curHeroData.dynamicId) then
|
||||
-- -- body
|
||||
-- return false
|
||||
-- end
|
||||
if not isOpen then
|
||||
LogError("++++++++++++++++++++++++++++++++++++++++++++++no open")
|
||||
return false
|
||||
--功能未开启
|
||||
end
|
||||
local equipTalismana = ConfigManager.GetConfigData(ConfigName.HeroConfig, curHeroData.id).EquipTalismana
|
||||
--当前法宝数据 data[1]星级 data[2]法宝ID
|
||||
if not equipTalismana then
|
||||
return false
|
||||
end
|
||||
--获取最大等级
|
||||
TalismanManager.GetStartAndEndStar()
|
||||
--local maxLv = TalismanManager.AllTalismanEndStar[equipTalismana[2]]
|
||||
local maxLv = 50
|
||||
LogError("maxlv===="..maxLv)
|
||||
--获取当前法宝等级
|
||||
local curLv = HeroManager.GetTalismanLv(curHeroData.dynamicId)
|
||||
--获取当前等级与下一等级表数据
|
||||
local nextLv = 0
|
||||
if (curLv + 1) <= maxLv then
|
||||
nextLv = curLv + 1
|
||||
end
|
||||
local isMaxStar = curLv >= maxLv
|
||||
if isMaxStar then
|
||||
return false --已满级
|
||||
end
|
||||
local curTalismanConFig =
|
||||
ConfigManager.GetConfigDataByDoubleKey(
|
||||
ConfigName.EquipTalismana,
|
||||
"Level",
|
||||
curLv,
|
||||
"TalismanaId",
|
||||
equipTalismana[2]
|
||||
)
|
||||
--local nextTalismanConFig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.EquipTalismana, "TalismanaId", equipTalismana[2], "Level", nextLv)
|
||||
--需要判断材料够不够
|
||||
for i = 1, #curTalismanConFig.RankupBasicMaterial do
|
||||
local needNum = curTalismanConFig.RankupBasicMaterial[i][2]
|
||||
--需要物品数量
|
||||
local haveNum = BagManager.GetItemCountById(curTalismanConFig.RankupBasicMaterial[i][1])
|
||||
--已有物品数量
|
||||
if haveNum < needNum then
|
||||
return false
|
||||
--材料不足
|
||||
end
|
||||
end
|
||||
--如果英雄没装备法宝
|
||||
if curHeroData.baublesId==nil or curHeroData.baublesId=="" then
|
||||
local list=FaLingManager.GetAllEquipDataNoBless()
|
||||
if #list>0 then
|
||||
LogError("有法宝可以穿戴----------------------------------------------")
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
else
|
||||
--如果有法宝
|
||||
local isStrong=FaLingManager.CheckEquipStrongRedPoint(curHeroData.baublesId)
|
||||
if isStrong then
|
||||
return true
|
||||
end
|
||||
local isBless=FaLingManager.CheckEquipBlessRedPoint(curHeroData.baublesId)
|
||||
if isBless then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
|
||||
|
||||
end
|
||||
|
||||
--改变英雄礼物
|
||||
|
|
|
@ -71,6 +71,7 @@ function FaLingSingleShowPopup:InitComponent()
|
|||
self.btnStrong=Util.GetGameObject(self.btnGrid, "btnStrong")
|
||||
self.btnDown = Util.GetGameObject(self.btnGrid, "btnDown")
|
||||
self.btnAdd = Util.GetGameObject(self.btnGrid, "btnAdd")
|
||||
self.btnStrongRed=Util.GetGameObject(self.btnGrid, "btnStrong/redPoint")
|
||||
--装备获取途径--btmBar
|
||||
self.canGetPre = Util.GetGameObject(self.btmBar, "scroll/canGetPre")
|
||||
self.canGetGrid = Util.GetGameObject(self.btmBar, "scroll")
|
||||
|
@ -197,6 +198,7 @@ function FaLingSingleShowPopup:OnShow()
|
|||
lv=self.equipData.lv
|
||||
self.hLv.text=lv
|
||||
self.hLv.gameObject:SetActive(lv>0)
|
||||
self.btnStrongRed:SetActive(FaLingManager.CheckEquipStrongRedPoint(self.equipData.did))
|
||||
equipConfigData=ConfigManager.GetConfigData(ConfigName.ItemConfig, self.equipData.staticId)
|
||||
local itemConfigData=ConfigManager.GetConfigData(ConfigName.ItemConfig,self.equipData.staticId)
|
||||
local aaa=equipConfigData.Quantity
|
||||
|
@ -249,6 +251,7 @@ function FaLingSingleShowPopup:OnShow()
|
|||
go.gameObject:SetActive(true)
|
||||
local add = Util.GetGameObject(go,"add")
|
||||
local itemObj=Util.GetGameObject(go,"grid")
|
||||
local red=Util.GetGameObject(go,"redPoint")
|
||||
local farme=Util.GetGameObject(go,"grid"):GetComponent("Image")
|
||||
local icon=Util.GetGameObject(go,"grid/icon"):GetComponent("Image")
|
||||
local name=Util.GetGameObject(go,"grid/Text"):GetComponent("Text")
|
||||
|
@ -282,9 +285,12 @@ function FaLingSingleShowPopup:OnShow()
|
|||
UIManager.OpenPanel(UIName.GMCommonConfirmPanel,args)
|
||||
end)
|
||||
end
|
||||
red:SetActive(false)
|
||||
else
|
||||
itemObj:SetActive(false)
|
||||
add:SetActive(true)
|
||||
red:SetActive(FaLingManager.CheckEquipBlessRedPoint(self.equipData.did))
|
||||
|
||||
end
|
||||
Util.AddClick(add,function()
|
||||
if self.openType~=2 then
|
||||
|
|
|
@ -129,6 +129,11 @@ function FaLingStrongPopup:OnShow()
|
|||
--上部装备基础信息
|
||||
self.equipData=FaLingManager.GetEquipDataByDid(self.equipData.did)
|
||||
lv=self.equipData.lv
|
||||
if lv>0 then
|
||||
self.hLv.gameObject:SetActive(true)
|
||||
else
|
||||
self.hLv.gameObject:SetActive(false)
|
||||
end
|
||||
self.hLv.text=lv
|
||||
Log("装备id:"..tostring(self.equipData.staticId).." openType:"..tostring(self.openType))
|
||||
equipConfigData=ConfigManager.GetConfigData(ConfigName.ItemConfig, self.equipData.staticId)
|
||||
|
|
Loading…
Reference in New Issue