礼物添加总属性显示,逍遥游寻仙修改

dev_one_discount
wangzhenxing 2023-09-19 18:03:00 +08:00
parent c99a7bf4b3
commit 600f270128
22 changed files with 2581 additions and 66 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: bb524cce3854a5a43bb0f0519a8fdbc4
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 65
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 56
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: cc71bb53d0622ad4099ce7b7f12f27e6
vertices: []
indices:
edges: []
weights: []
spritePackingTag: TagAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -10508,6 +10508,123 @@ MonoBehaviour:
m_LineSpacing: 1
m_Text: "\u96F7\u9B42\u7684\u540D\u5B57"
LanguageIndex: 0
--- !u!1 &2574615405018608539
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5616311273031041115}
- component: {fileID: 6682919895382187291}
- component: {fileID: 9131739779783993382}
- component: {fileID: 3694046879489600230}
m_Layer: 5
m_Name: btn_help
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5616311273031041115
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2574615405018608539}
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: 9007592198577183178}
m_RootOrder: 18
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -50, y: -305}
m_SizeDelta: {x: 68, y: 68}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6682919895382187291
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2574615405018608539}
m_CullTransparentMesh: 0
--- !u!114 &9131739779783993382
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2574615405018608539}
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: 47b0d71d3c8ef79468a5fb4d8ec5f365, 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!114 &3694046879489600230
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2574615405018608539}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 9131739779783993382}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!1 &2861895675268491109
GameObject:
m_ObjectHideFlags: 0
@ -26364,6 +26481,7 @@ RectTransform:
- {fileID: 3635082941967675174}
- {fileID: 8896062136282262912}
- {fileID: 4426010549696857006}
- {fileID: 5616311273031041115}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -31336,6 +31454,7 @@ GameObject:
- component: {fileID: 8896062136282262912}
- component: {fileID: 1637935814676146768}
- component: {fileID: 3190073306504808160}
- component: {fileID: 5173649778686089229}
m_Layer: 5
m_Name: collectImg
m_TagString: Untagged
@ -31399,6 +31518,48 @@ MonoBehaviour:
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &5173649778686089229
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6668947799968925689}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 3190073306504808160}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!1 &6900316905341203219
GameObject:
m_ObjectHideFlags: 0

View File

@ -126,6 +126,7 @@ RectTransform:
- {fileID: 279390374401093025}
- {fileID: 5987092642999130965}
- {fileID: 9115163719476813900}
- {fileID: 223793619702561078}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -5650,6 +5651,123 @@ MonoBehaviour:
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 0
m_ChildControlHeight: 0
--- !u!1 &1336104246635325114
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 223793619702561078}
- component: {fileID: 4705537261379448976}
- component: {fileID: 1601744089821025595}
- component: {fileID: 5536041114956457834}
m_Layer: 5
m_Name: btn_help
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &223793619702561078
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1336104246635325114}
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: 4072935318317542415}
m_RootOrder: 21
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -65, y: -230.3}
m_SizeDelta: {x: 68, y: 68}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4705537261379448976
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1336104246635325114}
m_CullTransparentMesh: 0
--- !u!114 &1601744089821025595
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1336104246635325114}
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: 47b0d71d3c8ef79468a5fb4d8ec5f365, 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!114 &5536041114956457834
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1336104246635325114}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1601744089821025595}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!1 &1558974222827538013
GameObject:
m_ObjectHideFlags: 0
@ -36912,7 +37030,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 522, y: -426.31}
m_AnchoredPosition: {x: 522, y: -426.31006}
m_SizeDelta: {x: 6, y: -1318.85}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1248130864413631210

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 165ac67a7cc15ad42864c6a70876d17b
timeCreated: 1555918210
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2012,6 +2012,8 @@ HELP_TYPE = {
GodPrint=129,--神印
GodWeapon=139,--神兵玩法
GodsWayTreasure=140, --多队塔秘宝
GiftShop = 141, --礼物商店
Gift = 142, --礼物
}
NumToComplexFont = {

View File

@ -504,6 +504,7 @@ UIName = {
RoleGiftPanel=512, --英雄礼包界面
PlayerGiftPanel=513, --主角礼包界面
SelectGiftListPopup = 514,--选择礼物列表
XiaoyaoGetItemPopup = 515,--逍遥游获取物品界面
}
SubUIConfig = {

View File

@ -678,6 +678,7 @@ function UIManager.DoLanguageCheck(spLoader, gameObject)
end
end
-- 判断是否需要翻译
LogError("gameObject.name==="..gameObject.name)
if table.indexof(ExceptPrefabList, gameObject.name) then
return
end

View File

@ -64,6 +64,7 @@ function this.InitGemsInfo(msg)
end
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Gem)
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Gift)
-- --获取新战力
-- NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)
-- local tempPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)

View File

@ -86,10 +86,12 @@ end
function this.GetHeroGiftAddPro(_id)
local data={}
if not this.allHeroGifts[_id] then
LogError("英雄gift======================nil")
return data
end
for i=1,#this.allHeroGifts do
local id=this.allHeroGifts[i]
local list=this.allHeroGifts[_id]
for i=1,#list do
local id=list[i]
local pro = equipConfig[id].Property
if pro and #pro>0 then
for k = 1, #pro do
@ -122,43 +124,43 @@ end
--获取主角礼物增加的属性
function this.GetPlayerGiftAddPro()
local data={}
-- for i=1,#this.playerGifts do
-- local id=this.playerGifts[i]
-- local pro = equipConfig[id].PlayerProperty
-- if pro and #pro>0 then
-- for k = 1, #pro do
-- local key=pro[k][1]
-- local value= pro[k][2]
-- if tonumber(key) ~=nil and tonumber(key)~=0 then
-- if key~=0 and key~=nil then
-- if not data[key] then
-- data[key] = 0
-- end
-- data[key] = data[key] + value
-- end
-- end
-- end
-- end
for i=1,#this.playerGifts do
local id=this.playerGifts[i]
local pro = equipConfig[id].PlayerProperty
if pro and #pro>0 then
for k = 1, #pro do
local key=pro[k][1]
local value= pro[k][2]
if tonumber(key) ~=nil and tonumber(key)~=0 then
if key~=0 and key~=nil then
if not data[key] then
data[key] = 0
end
data[key] = data[key] + value
end
end
end
end
-- local pro2 = equipConfig[id].Property
-- if pro2 and #pro2>0 and pro2[1][1]~=0 and pro2[1][1]~=nil then
-- for k = 1, #pro2 do
-- local key=pro2[k][1]
-- local value=pro2[k][2]
-- if tonumber(key) ~=nil and tonumber(key)~=0 then
-- if not data[key] then
-- data[key] = 0
-- end
-- if value and value~=0 then
-- LogError("pro2[k][1]==="..key.." value=="..value)
-- data[key] = data[key] + value
-- end
-- end
local pro2 = equipConfig[id].Property
if pro2 and #pro2>0 and pro2[1][1]~=0 and pro2[1][1]~=nil then
for k = 1, #pro2 do
local key=pro2[k][1]
local value=pro2[k][2]
if tonumber(key) ~=nil and tonumber(key)~=0 then
if not data[key] then
data[key] = 0
end
if value and value~=0 then
LogError("pro2[k][1]==="..key.." value=="..value)
data[key] = data[key] + value
end
end
-- end
-- end
end
end
-- end
end
return data
end

View File

@ -123,9 +123,9 @@ Func_Prop_Func = {
-- 礼物
[Func_Prop_Type.Gift] = function()
local allPro = GiftManager.GetPlayerGiftAddPro()
for k, v in pairs(allPro) do
LogError("主角礼物 k====".. k .." v==".. v)
end
-- for k, v in pairs(allPro) do
-- LogError("主角礼物 k====".. k .." v==".. v)
-- end
return allPro
end,
--神兵属性加成
@ -227,6 +227,10 @@ Func_Prop_Filter = {
[Func_Prop_Type.Gem] = function(funcData, heroData)
return funcData
end,
-- 礼物
[Func_Prop_Type.Gift] = function(funcData, heroData)
return funcData
end,
--神兵属性加成
[Func_Prop_Type.Weapon] = function(funcData, heroData,formationId)
local heroFormationNum = FormationManager.GetCurIndexForMationNum(formationId)

View File

@ -585,6 +585,9 @@ Hero_Prop_Func = {
--礼物
[Hero_Prop_Type.Gift] =function(_heroData)
local addPro=GiftManager.GetHeroGiftAddPro(_heroData.dId)
-- for key, value in pairs(addPro) do
-- LogError("gift key==="..key.." value=="..value)
-- end
return addPro
end,
[Hero_Prop_Type.GodSoul] = function(_heroData)

View File

@ -7327,13 +7327,21 @@ function NetManager.GiftEquipWearRequest(_type,_roleId,_ids,_func)
for i=1,#_ids do
table.insert(data.giftIds,_ids[i])
end
local oldWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
local msg = data:SerializeToString()
Network:SendMessageWithCallBack(MessageTypeProto_pb.GiftEquipWearRequest,MessageTypeProto_pb.GiftEquipWearResponse,msg,function(buffer)
--msg:ParseFromString(data)
LogError("------------------------")
if _func then
_func()
end
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Gift)
HeroPropManager.SetDirtyByType(_roleId, Hero_Prop_Type.Gift)
--获取新战力
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)
local tempPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
if oldWarPower ~= tempPower then
UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldWarPower,newValue = tempPower})
end
end)
end

View File

@ -188,7 +188,9 @@ function PlayerInfoPopup:InitComponent()
end
this.pokemonObj=Util.GetGameObject(self.transform, "tipImage/panel/pokemonInfo").gameObject
this.weaponInfo=Util.GetGameObject(self.transform, "tipImage/panel/weaponInfo")
this.newGemInfo=Util.GetGameObject(self.transform, "tipImage/panel/newGemInfo")
this.newGemInfo:SetActive(false)
this.boxLine = Util.GetGameObject(self.transform, "tipImage/panel/defendbox/line")
this.btnBox = Util.GetGameObject(self.transform, "tipImage/panel/box")
-- this.bgImg= Util.GetGameObject(self.transform, "tipImage/tipImage"):GetComponent("RectTransform")

View File

@ -36,7 +36,8 @@ function Practice:InitComponent()
Util.GetGameObject(self.Btns, "rightGrid/gemBtn"):GetComponent("Image").sprite=self.spLoader:LoadSprite("x_xiuxing_mingge_zh")
self.giftBtn = Util.GetGameObject(self.Btns, "rightGrid/giftBtn")
self.gemRedPoint = Util.GetGameObject(self.giftBtn, "redPoint")
self.giftRedPoint = Util.GetGameObject(self.giftBtn, "redPoint")
self.giftRedPoint:SetActive(false)
Util.GetGameObject(self.Btns, "rightGrid/giftBtn"):GetComponent("Image").sprite=self.spLoader:LoadSprite("s_gift_player_zh")
self.fourQuadrantBtn = Util.GetGameObject(self.Btns, "rightGrid/yushenBtn")
self.fourQuadrantRedPoint = Util.GetGameObject(self.fourQuadrantBtn, "redPoint")
@ -458,6 +459,7 @@ function Practice:RefreshBtn()
self.fourQuadrantBtn:SetActive(globalSystemConfig.IsOpen==1)
self.talsmanSoulBtn:SetActive(ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.TailsmanSoul))
self.incarnationBtn:SetActive(ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.Incarnation))
self.giftBtn:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.Gift))
self.noOpenTip:SetActive(false)
if XinXianConfig[PracticeManager.PracticeLevel + 1] then
self.button:SetActive(true)

View File

@ -70,17 +70,29 @@ function PlayerGiftPanel:InitComponent()
this.collectImg.sprite=this.spLoader:LoadSprite("gh_tt_8")
this.barImg=Util.GetGameObject(self.gameObject, "progressbar/progress1"):GetComponent("Image")
this.barNum=Util.GetGameObject(self.gameObject, "progressbar/num"):GetComponent("Text")
this.btn_help=Util.GetGameObject(self.gameObject, "btn_help")
end
--绑定事件(用于子类重写)
function PlayerGiftPanel:BindEvent()
Util.AddClick(this.btn_help,function()
UIManager.OpenPanel(UIName.HelpPopup, HELP_TYPE.Gift,0,0)
end)
Util.AddClick(this.collectImg.gameObject,function()
local data = {}
local singData = {}
singData.title = "当前礼物总加成"
singData.pro = IncarnationManager.GetproDesLst(GiftManager.GetPlayerGiftAddPro(),"00FF00")
singData.tip ="" --"总加成包括化身之力提供的属性"
table.insert(data,singData)
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.IncarnationDes,data)
end)
Util.AddClick(this.btnBack,function()
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
self:ClosePanel()
end)
for i = 1, 2 do
Util.AddClick(tabs[i],function()
-- isPlayAnim = true
@ -94,14 +106,25 @@ function PlayerGiftPanel:BindEvent()
end
function this.ChangePowerValue()
local WarPower = 0
for k, v in pairs(teamHero) do
WarPower = WarPower+ HeroPowerManager.GetHeroPower(k,FormationTypeDef.FORMATION_NORMAL)
end
WarPower=WarPower+PracticeManager.GetPracticeAddPower()
this.force.text = WarPower
end
--添加事件监听(用于子类重写)
function PlayerGiftPanel:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, this.RefreshWindowData)
Game.GlobalEvent:AddEvent(GameEvent.Formation.OnFormationPowerChange,this.ChangePowerValue)
end
--移除事件监听(用于子类重写)
function PlayerGiftPanel:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, this.RefreshWindowData)
Game.GlobalEvent:RemoveEvent(GameEvent.Formation.OnFormationPowerChange,this.ChangePowerValue)
end
@ -130,14 +153,7 @@ end
local collectNum=0
function this.RefreshWindowData()
collectNum=0
local WarPower = 0
for i = 1, #teamHero do
WarPower = WarPower+ HeroPowerManager.GetHeroPower(teamHero[i],FormationTypeDef.FORMATION_NORMAL)
end
WarPower=WarPower+PracticeManager.GetPracticeAddPower()
this.force.text = WarPower
this.ChangePowerValue()
--显示上面赠送的
local list=GiftManager.GetPlayerGifts()
local maxNum=16
@ -145,18 +161,36 @@ function this.RefreshWindowData()
maxNum=#list+4
end
local giftDatas={}
allUpIds={}
for i=1,maxNum do
local data={}
data.type=1
data.qua=0
data.id=0
if i<=#list then
data.id=list[i]
data.type=2
data.qua=itemConfig[list[i]].Quantity
table.insert(allUpIds,data.id)
end
table.insert(giftDatas,data)
end
allUpIds={}
table.sort(giftDatas,function(a,b)
if a.type==b.type then
if a.qua and a.qua==b.qua then
return a.id<b.id
else
return a.qua>b.qua
end
else
return a.type>b.type
end
end)
this.UpScrollView:SetData(giftDatas,
function(index, go)
this.SingleUpItemShow(go, giftDatas[index])
table.insert(allUpIds,giftDatas[index].id)
end
)
--显示收集度
@ -198,6 +232,11 @@ function this.SingleUpItemShow(_go,data)
add:SetActive(false)
name.text=itemConfig[data.id].Name
icon.sprite=this.spLoader:LoadSprite(GetResourcePath(itemConfig[data.id].ResourceID))
Util.AddOnceClick(icon.gameObject,function()
BagManager.isBagPanel=false
UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup2,this,data,0,false,nil,nil,4)
end
)
else
frame.sprite=this.spLoader:LoadSprite("r_characterbg_blue")
icon.gameObject:SetActive(false)

View File

@ -79,10 +79,27 @@ function RoleGiftPanel:InitComponent()
this.collectImg=Util.GetGameObject(self.gameObject, "collectImg"):GetComponent("Image")
this.lvTxt=Util.GetGameObject(self.gameObject, "lvTxt"):GetComponent("Text")
this.collectImg.sprite=this.spLoader:LoadSprite("gh_tt_8")
this.btn_help=Util.GetGameObject(self.gameObject, "btn_help")
end
--绑定事件(用于子类重写)
function RoleGiftPanel:BindEvent()
Util.AddClick(this.btn_help,function()
UIManager.OpenPanel(UIName.HelpPopup, HELP_TYPE.Gift,0,0)
end)
Util.AddClick(this.collectImg.gameObject,function()
local data = {}
local singData = {}
singData.title = "当前礼物总加成"
singData.pro = IncarnationManager.GetproDesLst(GiftManager.GetHeroGiftAddPro(curHeroData.dynamicId),"00FF00")
singData.tip ="" --"总加成包括化身之力提供的属性"
table.insert(data,singData)
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.IncarnationDes,data)
end)
Util.AddClick(this.btnBack,function()
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
self:ClosePanel()
@ -192,27 +209,41 @@ function this.RefreshWindowData()
this.force.text = WarPower
--显示上面赠送的
local list=GiftManager.GetHeroGifts(curHeroData.dynamicId)
LogError("当前英雄穿戴 礼物数量 "..#list)
lv,curNum,maxNum=GiftManager.GetCollectLvAndNum()
this.lvTxt.text="收集度"..lv..""
LogError("lv========="..lv.." curnum=="..curNum.." maxNum=="..maxNum)
--LogError("lv========="..lv.." curnum=="..curNum.." maxNum=="..maxNum)
--local maxNum=20
local giftDatas={}
allUpIds={}
for i=1,maxNum do
local data={}
data.type=1
data.qua=0
data.id=0
if i<=#list then
data.type=2
data.id=list[i]
data.qua=itemConfig[list[i]].Quantity
table.insert(allUpIds,data.id)
end
table.insert(giftDatas,data)
end
allUpIds={}
table.sort(giftDatas,function(a,b)
if a.type==b.type then
if a.qua and a.qua==b.qua then
return a.id<b.id
else
return a.qua>b.qua
end
else
return a.type>b.type
end
end)
this.UpScrollView:SetData(giftDatas,
function(index, go)
this.SingleUpItemShow(go, giftDatas[index],index)
if giftDatas[index].id and giftDatas[index].id~=0 then
table.insert(allUpIds,giftDatas[index].id)
end
end
)
--显示下面可赠送的
@ -241,7 +272,6 @@ function this.SingleUpItemShow(_go,data,_index)
icon.sprite=this.spLoader:LoadSprite(GetResourcePath(itemConfig[data.id].ResourceID))
Util.AddOnceClick(icon.gameObject,function()
if curHeroData==nil then
LogError("curherodata================nil")
return
end
BagManager.isBagPanel=false
@ -274,7 +304,6 @@ function this:OnClickTabBtn(_index)
allEquip = BagManager.GetBagItemDataByItemType(ItemBaseType.HeroGift)
-- this:SortEquipDatas(allEquip)
local count = 0
for i=1,#allEquip do
count = count + 1
if CheckListIsContainValue1(allUpIds,allEquip[i].id) then
@ -291,7 +320,7 @@ function this:OnClickTabBtn(_index)
return a.quality>b.quality
end
else
return a.isUp>b.isUp
return a.isUp > b.isUp
end
end)

View File

@ -698,6 +698,7 @@ end
function this:UpdateHeroInfoData()
this:UpdateBtnList()
this.GodSoulBtn.gameObject:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.shenhun) and curHeroData.heroConfig.IsSoulOpen)
this.giftBtn.gameObject:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.Gift))
for k,v in pairs(this.PageList) do
v:OnHide()
end

View File

@ -101,7 +101,7 @@ function this:BindEvent()
Util.AddClick(this.shopBtn, function ()
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(XiaoYaoManager.curMapId),tostring(1)),0)
XiaoYaoManager.CheckRedPoint2()
UIManager.OpenPanel(UIName.XiaoyaoHeroGetPopup)
UIManager.OpenPanel(UIName.XiaoyaoGetItemPopup)
end)
--转盘点击
Util.AddClick(this.rouleBtn, function ()

View File

@ -0,0 +1,240 @@
require("Base/BasePanel")
XiaoyaoGetItemPopup = Inherit(BasePanel)
local this=XiaoyaoGetItemPopup
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
local FreeTravelStore=ConfigManager.GetConfig(ConfigName.FreeTravelStore)
local HeroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
local artResourceConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
local curHeroData = {}
local curIndex = 1
local heroData = {}
local pointPrefabs = {}
local allSkillDatas = {}
local costId = 0
local costNum = 0
local heroSData
local itemView
--初始化组件(用于子类重写)
function XiaoyaoGetItemPopup:InitComponent()
this.spLoader = SpriteLoader.New()
this.titleText = Util.GetGameObject(self.transform, "Panel/bg/title"):GetComponent("Text")
this.BtnBack=Util.GetGameObject(self.transform, "Panel/bg/btnBack")
this.remainTimes = Util.GetGameObject(self.transform, "Panel/remainTimes"):GetComponent("Text")
this.costIcon=Util.GetGameObject(self.transform,"Panel/buyPanel/item/proImage/proImage"):GetComponent("Image")
this.costNum=Util.GetGameObject(self.transform,"Panel/buyPanel/item/heroName"):GetComponent("Text")
this.buyBtn = Util.GetGameObject(self.transform,"Panel/buyPanel/buy")
this.itemPar=Util.GetGameObject(self.transform,"Panel/bg/itemPar")
this.pointGrid = Util.GetGameObject(self.transform,"Panel/buyPanel/grid")
this.point = Util.GetGameObject(self.transform,"Panel/buyPanel/point")
this.selectKuang = Util.GetGameObject(self.transform,"Panel/buyPanel/select")
this.leftBtn= Util.GetGameObject(self.transform,"Panel/leftBtn")
this.rightBtn = Util.GetGameObject(self.transform,"Panel/rightBtn")
this.zhekouImage = Util.GetGameObject(self.transform,"Panel/buyPanel/Image"):GetComponent("Image")
itemView = SubUIManager.Open(SubUIConfig.ItemView, this.itemPar.transform)
end
local triggerCallBack
--绑定事件(用于子类重写)
function XiaoyaoGetItemPopup:BindEvent()
Util.AddClick(this.BtnBack, function()
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
self:ClosePanel()
end)
Util.AddClick(this.rightBtn, function()
curIndex = curIndex + 1
if curIndex > #heroData then
curIndex = 1
end
curHeroData = heroData[curIndex]
this:SetSelectHero(curHeroData)
end)
Util.AddClick(this.leftBtn, function()
curIndex = curIndex - 1
if curIndex < 1 then
curIndex = #heroData
end
curHeroData = heroData[curIndex]
this:SetSelectHero(curHeroData)
end)
Util.AddClick(this.buyBtn, function(msg)
if BagManager.GetItemCountById(costId) < costNum then
PopupTipPanel.ShowTip(GetLanguageStrById(itemConfig[costId].Name)..Language[10657])
else
local rightAction = function()
NetManager.XiaoyaoyouGetHeroRequest(curHeroData.goodsIndex,function(msg)
XiaoYaoManager.UpdateHeroData(curHeroData.goodsIndex)
XiaoYaoManager.GetHeroIndex = 0
this:OnShow()
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop,1)
end)
end
MsgPanel.ShowTwo(Language[11999]..costNum.."</color>"..GetLanguageStrById(itemConfig[costId].Name)..Language[12000]..GetLanguageStrById(heroSData.Name).."</color>]?", nil, rightAction, Language[10731], Language[10732], Language[12001],false,"")
end
end)
end
--添加事件监听(用于子类重写)
function XiaoyaoGetItemPopup:AddListener()
end
--移除事件监听(用于子类重写)
function XiaoyaoGetItemPopup:RemoveListener()
end
function this.CalculateHeroAllProValList(heroConFigData,_starNum,isCalculateStarVal)
local allAddProVal = {}
for i, v in ConfigPairs(propertyConfig) do
allAddProVal[i] = 0
end
local heroRankupConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.HeroRankupConfig, "Star", heroConFigData.Star, "LimitStar", _starNum)
local curLvNum=1
local breakId = 0
local upStarId = 0
if isCalculateStarVal then
--等级
curLvNum = heroRankupConfig.OpenLevel
--解锁天赋
for i, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.HeroRankupConfig)) do
if v.OpenStar == _starNum and v.Star==heroConFigData.Star then
if v.Type == 1 then
breakId = v.Id
end
if v.Type == 2 then
upStarId = v.Id
end
end
end
if breakId==0 then
breakId=6
end
end
allAddProVal[HeroProType.Attack]=HeroManager.CalculateProVal(heroConFigData.Attack, curLvNum, breakId,upStarId,HeroProType.Attack)
allAddProVal[HeroProType.Hp]=HeroManager.CalculateProVal(heroConFigData.Hp, curLvNum, breakId,upStarId,HeroProType.Hp)
allAddProVal[HeroProType.PhysicalDefence]=HeroManager.CalculateProVal(heroConFigData.PhysicalDefence, curLvNum, breakId,upStarId,HeroProType.PhysicalDefence)
allAddProVal[HeroProType.MagicDefence]=HeroManager.CalculateProVal(heroConFigData.MagicDefence, curLvNum, breakId,upStarId,HeroProType.MagicDefence)
Util.AddOnceClick(this.talentBtn,function()
UIManager.OpenPanel(UIName.RoleTalentPopup,heroConFigData,breakId,upStarId)
end)
if heroConFigData.OpenPassiveSkillRules then
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroConFigData,breakId,upStarId)
this.talentProgress.text = #openlists - compoundOpenNum .."/"..#heroConFigData.OpenPassiveSkillRules - compoundNum
end
return allAddProVal
end
--界面打开时调用(用于子类重写)
function XiaoyaoGetItemPopup:OnOpen()
this.titleText = "东海寻仙"
end
function XiaoyaoGetItemPopup:OnShow()
curIndex = XiaoYaoManager.GetHeroIndex < 1 and 1 or XiaoYaoManager.GetHeroIndex
heroData = XiaoYaoManager.GetHeroDatas()
if not heroData or #heroData < 1 then
this:ClosePanel()
return
end
curHeroData = heroData[curIndex]
for i = 1 , #pointPrefabs do
pointPrefabs[i].gameObject:SetActive(false)
end
for i = 1 , #heroData do
if not pointPrefabs[i] then
pointPrefabs[i] = newObjToParent(this.point,this.pointGrid)
end
pointPrefabs[i].gameObject:SetActive(true)
end
this:SetSelectHero(curHeroData)
end
function this:TimerDown()
if this.timer then
this.timer:Stop()
this.timer = nil
end
local timeDown = curHeroData.remainTime - PlayerManager.serverTime
local temp = 0
this.remainTimes.text = Language[10023]..TimeToHMS(timeDown)
this.timer = Timer.New(function()
if timeDown < 1 then
XiaoYaoManager.GetHeroIndex = 0
this:OnShow()
return
end
for i = 1 , #heroData do
temp = heroData[i].remainTime - PlayerManager.serverTime
if temp < 1 then
this:OnShow()
return
end
end
timeDown = timeDown - 1
this.remainTimes.text = Language[10023]..TimeToHMS(timeDown)
end, 1, -1, true)
this.timer:Start()
end
function this:SetSelectHero(curHeroData)
--LogGreen("curHeroData.goodsId :"..curHeroData.goodsId)
local heroSId = FreeTravelStore[curHeroData.goodsId].Goods[1]
heroSData = itemConfig[heroSId]
itemView:OnOpen(false, { heroSId, 1 }, 0.97,false,false,false,self.sortingOrder)
-- local heroStar = heroSData.Star
-- allSkillDatas = HeroManager.GetCurHeroSidAndCurStarAllSkillDatas(heroSId,heroStar)
this.selectKuang.transform:SetParent(pointPrefabs[curIndex].transform)
this.selectKuang:GetComponent("RectTransform").localPosition = Vector3.zero
this.ShowHeroBuyInfo(curHeroData)
this:TimerDown()
end
function this.ShowHeroBuyInfo(_heroSConfigData)
local heroBuyInfo = FreeTravelStore[curHeroData.goodsId]
costId = heroBuyInfo.Cost[1]
costNum = heroBuyInfo.Cost[2]
this.costIcon.sprite = this.spLoader:LoadSprite(artResourceConfig[itemConfig[costId].ResourceID].Name)
if BagManager.GetItemCountById(costId) < costNum then
this.costNum.text = "<color=#FF0000>" .. costNum .. "</color>"
else
this.costNum.text = "<color=#C8AD83>" .. costNum .. "</color>"
end
this.zhekouImage.sprite = this.spLoader:LoadSprite(heroBuyInfo.Discount)
end
--界面关闭时调用(用于子类重写)
function XiaoyaoGetItemPopup:OnClose()
Game.GlobalEvent:DispatchEvent(GameEvent.XiaoYao.RefreshEventShow)
if this.testLiveGO then
poolManager:UnLoadLive(this.testLiveGO.name, this.testLiveGO)
this.testLiveGO = nil
end
if this.timer then
this.timer:Stop()
this.timer = nil
end
end
--界面销毁时调用(用于子类重写)
function XiaoyaoGetItemPopup:OnDestroy()
this.spLoader:Destroy()
if this.testLiveGO then
poolManager:UnLoadLive(this.testLiveGO.name, this.testLiveGO)
this.testLiveGO = nil
end
if this.timer then
this.timer:Stop()
this.timer = nil
end
pointPrefabs = {}
SubUIManager.Close(itemView)
itemView=nil
end
return XiaoyaoGetItemPopup

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b542904bfb648844f9acd4539149849b
timeCreated: 1555918363
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: