【功能】==========公会红包
parent
7a1894e75e
commit
6ab70e6e8d
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
|
|
@ -0,0 +1,99 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c7aaeb068711d47479942875700add8f
|
||||
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: 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: 2710a87c9a6d7d0469564ccab0cac808
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag: GuildAtlas
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -0,0 +1,99 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 335d82f09da45fc49b44fd446ec99dca
|
||||
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: 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: 7cab2ccbc81c6e24780aa583005a5197
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
spritePackingTag: GuildAtlas
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -165,6 +165,7 @@ GameObject:
|
|||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4076188123946629247}
|
||||
- component: {fileID: 4658830408958243389}
|
||||
m_Layer: 5
|
||||
m_Name: ChatTipView
|
||||
m_TagString: Untagged
|
||||
|
|
@ -186,6 +187,7 @@ RectTransform:
|
|||
- {fileID: 8831934225575947771}
|
||||
- {fileID: 1784279187603376772}
|
||||
- {fileID: 719635812246948822}
|
||||
- {fileID: 5374433590836753722}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
@ -194,6 +196,35 @@ RectTransform:
|
|||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 480.5, y: 68.30005}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &4658830408958243389
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3406049303903296641}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fcf53bbee510dca40b2f81e3c0d426c6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
tweenSequeue:
|
||||
- initV3: {x: 0, y: 0, z: 10}
|
||||
initFloat: 0
|
||||
isInit: 1
|
||||
changeV3: {x: 0, y: 0, z: -10}
|
||||
changeFloat: 0
|
||||
duration: 0.2
|
||||
delay: 0
|
||||
curveType: 1
|
||||
changeType: 2
|
||||
sequeueType: 1
|
||||
loop: 99999999
|
||||
loopType: 1
|
||||
targetObj: {fileID: 5374433590836753722}
|
||||
isPlayAudio: 0
|
||||
isHaveCloseBtn: 0
|
||||
isPlayOnOpen: 1
|
||||
--- !u!1 &4801463901571785126
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -268,6 +299,143 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &5194767735720643030
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5374433590836753722}
|
||||
- component: {fileID: 5624456641661415722}
|
||||
- component: {fileID: 8121788389246017803}
|
||||
- component: {fileID: 8645292281163848114}
|
||||
- component: {fileID: 1372551759188525827}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5374433590836753722
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5194767735720643030}
|
||||
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: 4076188123946629247}
|
||||
m_RootOrder: 3
|
||||
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: 45.45498, y: 412}
|
||||
m_SizeDelta: {x: 85, y: 102}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5624456641661415722
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5194767735720643030}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &8121788389246017803
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5194767735720643030}
|
||||
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: 335d82f09da45fc49b44fd446ec99dca, 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 &8645292281163848114
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5194767735720643030}
|
||||
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: 8121788389246017803}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
--- !u!95 &1372551759188525827
|
||||
Animator:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5194767735720643030}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: 69ed871880e516945ade16153b5e10c4, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorControllerStateOnDisable: 0
|
||||
--- !u!1 &5666183199212342315
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -845,6 +845,8 @@ RedPointType = {
|
|||
Guild_Skill = 1050,
|
||||
Guild_DeathPos=1051,
|
||||
Guild_Transcript = 1052,
|
||||
Guid_SendPackage = 1053,
|
||||
Guid_GetPackage = 1054,
|
||||
--东海寻仙
|
||||
FindFairy_OneView = 2361,--东海寻仙主界面
|
||||
FindFairy_ThreeView = 2362,--东海寻仙进阶赠礼
|
||||
|
|
|
|||
|
|
@ -241,6 +241,7 @@ GameEvent = {
|
|||
Chat = {
|
||||
OnChatDataChanged = "Chat.OnChatDataChanged",
|
||||
OnMainChatChanged = "Chat.OnMainChatChanged",
|
||||
OnRedPackageNumChanged="Chat.OnRedPackageNumChanged",
|
||||
},
|
||||
MissionDaily = {
|
||||
OnMissionDailyChanged = "MissionDaily.OnMissionDailyChanged",
|
||||
|
|
@ -313,6 +314,7 @@ GameEvent = {
|
|||
GuildRedPacket={
|
||||
OnRefreshGetRedPacket="GuildRedPacket.OnRefreshGetRedPacket",
|
||||
OnCloseRedPointClick="GuildRedPacket.OnCloseRedPointClick",
|
||||
AuoGetRedPackage ="AuoGetRedPackage",
|
||||
},
|
||||
FiveAMRefresh = {
|
||||
ServerNotifyRefresh = "FiveAMRefresh.ServerNotifyRefresh",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ local _ConditionConfig = {
|
|||
--上阵[a]个神将通过关卡
|
||||
[3]=function(condition)
|
||||
local v1 = condition[1]
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 end)
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 end,true)
|
||||
if BattleUtil.LengthOfTable(list)<=v1 then
|
||||
return 1
|
||||
end
|
||||
|
|
@ -45,7 +45,7 @@ local _ConditionConfig = {
|
|||
[5]=function(condition)
|
||||
local v1 = condition[1]
|
||||
local v2 = condition[2]
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 and v.element==v1 end)
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 and v.element==v1 end,true)
|
||||
if BattleUtil.LengthOfTable(list)>=v2 then
|
||||
return 1
|
||||
end
|
||||
|
|
@ -63,7 +63,7 @@ local _ConditionConfig = {
|
|||
--不上阵[a]职能神将通过关卡
|
||||
[7]=function(condition)
|
||||
local v1 = condition[1]
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 and v.professionId==v1 end)
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 and v.professionId==v1 end,true)
|
||||
if BattleUtil.LengthOfTable(list)==0 then
|
||||
return 1
|
||||
end
|
||||
|
|
@ -72,7 +72,7 @@ local _ConditionConfig = {
|
|||
--不上阵[a]阵营神将通过关卡
|
||||
[8]=function(condition)
|
||||
local v1 = condition[1]
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 and v.element==v1 end)
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 and v.element==v1 end,true)
|
||||
if BattleUtil.LengthOfTable(list)==0 then
|
||||
return 1
|
||||
end
|
||||
|
|
@ -81,7 +81,7 @@ local _ConditionConfig = {
|
|||
--佩戴xxxid被动通过关卡
|
||||
[9]=function(condition)
|
||||
local v1 = condition[1]
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 end)
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 end,true)
|
||||
if not list or #list==0 then
|
||||
return 0
|
||||
end
|
||||
|
|
@ -105,7 +105,7 @@ local _ConditionConfig = {
|
|||
--全部上阵[a]职业神将通过关卡
|
||||
[11]=function(condition)
|
||||
local v1 = condition[1]
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 and v.professionId~=v1 end)
|
||||
local list = RoleManager.Query(function(v) return v.camp == 0 and v.professionId~=v1 end,true)
|
||||
if BattleUtil.LengthOfTable(list)==0 then
|
||||
return 1
|
||||
end
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ function this.OnBuffAdd(caster,target,buff)
|
|||
if caster and target and buff then
|
||||
if caster.camp==0 and buff.type==BuffName.Control then
|
||||
local type=buff.ctrlType
|
||||
LogError("ctrltype=="..type)
|
||||
if ctrlNumList[type] then
|
||||
ctrlNumList[type]=ctrlNumList[type]+1
|
||||
else
|
||||
|
|
|
|||
|
|
@ -263,6 +263,7 @@ function this.ChatDataAdapter(channel, data)
|
|||
|
||||
GuildRedPacketManager.isCheck = true
|
||||
CheckRedPointStatus(RedPointType.Guild_RedPacket)
|
||||
CheckRedPointStatus(RedPointType.Guid_GetPackage)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -258,6 +258,9 @@ function this.JoinGuildSuccess()
|
|||
UIManager.OpenPanel(UIName.GuildMainCityPanel)
|
||||
--
|
||||
PopupTipPanel.ShowTip(Language[10377])
|
||||
MyGuildManager.ReuqsetRedPackage(function()
|
||||
CheckRedPointStatus(RedPointType.Guid_GetPackage)
|
||||
end)
|
||||
end
|
||||
|
||||
-- 设置数据类型
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ function this.Initialize()
|
|||
this.MyGuildLogList = {}
|
||||
this._MemWalkData = {}
|
||||
this.MyFeteInfo={}
|
||||
this.MyGuidRedPackage={}
|
||||
this.PackageNum=0
|
||||
end
|
||||
|
||||
-- 登录初始化数据
|
||||
|
|
@ -167,6 +169,32 @@ function MyGuildManager.RequestChangeLogo(logoId, func)
|
|||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.DataUpdate)
|
||||
end)
|
||||
end
|
||||
--请求可以领取红包数据
|
||||
function MyGuildManager.ReuqsetRedPackage(func)
|
||||
NetManager.GetAllRedPacketResponse(function(msg)
|
||||
local num=0
|
||||
local SpecialConfig=ConfigManager.GetConfigData(ConfigName.SpecialConfig,115)
|
||||
for i = 1, #msg.info do
|
||||
local config=ConfigManager.GetConfigData(ConfigName.GuildRedPackConfig,msg.info[i].redType)
|
||||
|
||||
if msg.info[i].isGet==0 and (config.Num-msg.info[i].getCount)>0 then
|
||||
if config.BaseType~=2 or PlayerManager.dailyRedPack< tonumber(SpecialConfig.Value) then
|
||||
LogError("红包id:"..config.Id)
|
||||
num=num+1
|
||||
end
|
||||
end
|
||||
end
|
||||
this.PackageNum=num
|
||||
if func then
|
||||
func(msg)
|
||||
end
|
||||
end)
|
||||
|
||||
end
|
||||
--获取红包数据
|
||||
function MyGuildManager.GetRedPackageNum()
|
||||
return this.PackageNum
|
||||
end
|
||||
|
||||
-- 获取我的公会信息
|
||||
function MyGuildManager.GetMyGuildInfo()
|
||||
|
|
@ -177,6 +205,25 @@ end
|
|||
function MyGuildManager.GetMyGuildMemList()
|
||||
return this.MyGuildMemList
|
||||
end
|
||||
--获取福利红包数据
|
||||
function MyGuildManager.GetMyGuidRedPackage()
|
||||
return this.MyGuidRedPackage
|
||||
end
|
||||
--设置福利红包数据
|
||||
function MyGuildManager.SetMyGuidRedPackage(data)
|
||||
local list={}
|
||||
if data then
|
||||
for key, value in pairs(data) do
|
||||
if value.id then
|
||||
LogError(" package id =="..value.id.." num=="..value.num)
|
||||
local data={}
|
||||
data.num=value.num
|
||||
list[value.id]=data
|
||||
end
|
||||
end
|
||||
end
|
||||
this.MyGuidRedPackage=list
|
||||
end
|
||||
|
||||
-- 获取我的公会的会长信息
|
||||
function MyGuildManager.GetMyGuildMasterInfo()
|
||||
|
|
|
|||
|
|
@ -11,11 +11,49 @@ end
|
|||
-- 检查公会红包红点
|
||||
function this.CheckGuildRedPacketRedPoint()
|
||||
-- Log("<color=yellow>"..tostring(this.isCheck).."</color>")
|
||||
if this.isCheck then
|
||||
return this.isCheck
|
||||
-- if this.isCheck then
|
||||
-- return this.isCheck
|
||||
-- else
|
||||
-- return false
|
||||
-- end
|
||||
LogError("检测发红包红点")
|
||||
local list=MyGuildManager.GetMyGuidRedPackage()
|
||||
if list then
|
||||
for key, value in pairs(list) do
|
||||
if value.num>0 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
function this.CheckIsCanGetPackage()
|
||||
|
||||
-- NetManager.GetAllRedPacketResponse(function(msg)
|
||||
|
||||
-- -- local data={}
|
||||
-- -- for i,v in ipairs(msg.info) do
|
||||
-- -- table.insert(data,v)
|
||||
-- -- end
|
||||
|
||||
-- local dataLength=#msg.info
|
||||
-- LogError("+++++++++++++++ "..dataLength )
|
||||
-- if dataLength>0 then
|
||||
-- return true
|
||||
-- end
|
||||
|
||||
-- return false
|
||||
-- end)
|
||||
LogError("can send package num:"..MyGuildManager.PackageNum)
|
||||
if MyGuildManager.PackageNum>0 then
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Chat.OnRedPackageNumChanged)
|
||||
return true
|
||||
else
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Chat.OnRedPackageNumChanged)
|
||||
return false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
return this
|
||||
|
|
@ -9,25 +9,29 @@ local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
|||
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1) }
|
||||
local _TabData = {
|
||||
[1]= {txt = Language[11037]},
|
||||
[2]= {txt = Language[11038]},
|
||||
[3]= {txt = Language[11039]},
|
||||
[2]= {txt = "发福利红包"},
|
||||
[3]= {txt = Language[11038]},
|
||||
[4]= {txt = Language[11039]},
|
||||
}
|
||||
--子模块脚本
|
||||
this.contents = {
|
||||
--主面板
|
||||
[1] = {view = require("Modules/Guild/RedPacketView/RedPacket_SendView"), panelName = "SendView"},
|
||||
--发送福利红包
|
||||
[2] = {view = require("Modules/Guild/RedPacketView/RedPacket_SendWealView"), panelName = "SendWealView"},
|
||||
--天官赐福
|
||||
[2] = {view = require("Modules/Guild/RedPacketView/RedPacket_GetView"), panelName = "GetView"},
|
||||
[3] = {view = require("Modules/Guild/RedPacketView/RedPacket_GetView"), panelName = "GetView"},
|
||||
--每日仙缘礼
|
||||
[3] = {view = require("Modules/Guild/RedPacketView/RedPacket_RankView"), panelName = "RankView"},
|
||||
[4] = {view = require("Modules/Guild/RedPacketView/RedPacket_RankView"), panelName = "RankView"},
|
||||
}
|
||||
-- this.contentPanel={}
|
||||
this.sortingOrder = 0
|
||||
this.curIndex=1
|
||||
--初始化组件(用于子类重写)
|
||||
function RedPacketPanel:InitComponent()
|
||||
this.panel=Util.GetGameObject(self.gameObject, "Panel")
|
||||
this.backBtn=Util.GetGameObject(this.panel,"BackBtn")
|
||||
this.tabbox = Util.GetGameObject(this.panel, "TabBox")
|
||||
this.tabbox = Util.GetGameObject(this.panel, "Contents/TabBox")
|
||||
|
||||
this.content=Util.GetGameObject(this.panel,"Contents")
|
||||
this.contentPanel={}
|
||||
|
|
@ -69,21 +73,39 @@ function RedPacketPanel:RemoveListener()
|
|||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function RedPacketPanel:OnOpen()
|
||||
|
||||
function RedPacketPanel:OnOpen(index)
|
||||
if index then
|
||||
this.curIndex=index
|
||||
end
|
||||
end
|
||||
|
||||
local redPointList
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function RedPacketPanel:OnShow()
|
||||
BindRedPointObject(RedPointType.Guild_RedPacket,this.redPoint)
|
||||
CheckRedPointStatus(RedPointType.Guild_RedPacket)
|
||||
-- BindRedPointObject(RedPointType.Guild_RedPacket,this.redPoint)
|
||||
|
||||
this.tabbox:SetActive(true)
|
||||
this.TabCtrl = TabBox.New()
|
||||
this.TabCtrl:SetTabAdapter(this.TabAdapter)
|
||||
this.TabCtrl:SetChangeTabCallBack(this.OnTabChange)
|
||||
this.TabCtrl:Init(this.tabbox, _TabData)
|
||||
this.TabCtrl:Init(this.tabbox, _TabData,this.curIndex)
|
||||
|
||||
redPointList = {}
|
||||
for i = 1, Util.GetGameObject(this.tabbox,"box").transform.childCount do
|
||||
redPointList[i] =Util.GetGameObject(Util.GetGameObject(this.tabbox,"box").transform:GetChild(i-1).gameObject,"RedPoint")
|
||||
redPointList[i]:SetActive(false)
|
||||
end
|
||||
|
||||
if redPointList[2] and redPointList[3] then
|
||||
BindRedPointObject(RedPointType.Guid_SendPackage, redPointList[2])
|
||||
BindRedPointObject(RedPointType.Guid_GetPackage, redPointList[3])
|
||||
end
|
||||
CheckRedPointStatus(RedPointType.Guid_SendPackage)
|
||||
CheckRedPointStatus(RedPointType.Guid_GetPackage)
|
||||
end
|
||||
|
||||
|
||||
|
||||
--重设层级
|
||||
function RedPacketPanel:OnSortingOrderChange()
|
||||
this.sortingOrder = self.sortingOrder
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ local this=RedPacketPopup
|
|||
this.playerScrollHead={}--滚动条头像
|
||||
this.sendPlayerHead={}--发送者头像
|
||||
--红包资源名
|
||||
local RedPacketName={"g_ghhb_ming_01_zh","g_ghhb_ming_02_zh","g_ghhb_ming_03_zh"}
|
||||
local RedPacketName={"g_ghhb_ming_01_zh","g_ghhb_ming_02_zh","g_ghhb_ming_03_zh","g_ghhb_ming_04_zh"}
|
||||
--红包按钮状态图片
|
||||
local BtnStateImage={"g_ghhb_qiang","g_ghhb_lingqu","g_ghhb_lingwan"}--抢 已领取 已领完
|
||||
|
||||
|
|
@ -71,9 +71,17 @@ end
|
|||
--初始化面板
|
||||
function this.InitView(redId,id)
|
||||
local config=ConfigManager.GetConfigData(ConfigName.GuildRedPackConfig,id)
|
||||
|
||||
this.title.sprite=Util.LoadSprite(RedPacketName[id])
|
||||
this.titleTip.text=GetLanguageStrById(config.SendWord)
|
||||
local index=id
|
||||
if index>3 then
|
||||
index=4
|
||||
end
|
||||
this.title.sprite=Util.LoadSprite(RedPacketName[index])
|
||||
if config.BaseType==1 then
|
||||
this.titleTip.text=GetLanguageStrById(config.SendWord)
|
||||
elseif config.BaseType==2 then
|
||||
this.titleTip.text=GetLanguageStrById(config.RuleDes)
|
||||
end
|
||||
|
||||
|
||||
NetManager.GetRedPackageDetailRequest(redId,function(msg)
|
||||
-- logWarnTrance(TimeToDHMS(msg.remainTime))
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
----- 公会红包-抢红包 -----
|
||||
local this = {}
|
||||
this={}
|
||||
local sortingOrder=0
|
||||
--红包资源名
|
||||
local RedPacketName={"g_ghhb_ming_01_zh","g_ghhb_ming_02_zh","g_ghhb_ming_03_zh"}
|
||||
local RedPacketName={"g_ghhb_ming_01_zh","g_ghhb_ming_02_zh","g_ghhb_ming_03_zh","g_ghhb_ming_04_zh"}
|
||||
--红包按钮状态图片
|
||||
local BtnStateImage={"g_ghhb_qiang_zh","g_ghhb_lingqu_zh","g_ghhb_lingwan_zh"}--抢 已领取 已领完
|
||||
|
||||
|
||||
function this:InitComponent(gameObject)
|
||||
this.group=Util.GetGameObject(gameObject,"Root/Group")--红包父节点
|
||||
this.noInfo=Util.GetGameObject(gameObject,"NoInfo")--无红包提示
|
||||
|
|
@ -20,16 +21,26 @@ end
|
|||
|
||||
function this:BindEvent()
|
||||
|
||||
|
||||
end
|
||||
|
||||
function this:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.GuildRedPacket.OnRefreshGetRedPacket, this.InitGetView)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.GuildRedPacket.AuoGetRedPackage, this.AutoGetRedPackage)
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.GuildRedPacket.OnRefreshGetRedPacket, this.InitGetView)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.GuildRedPacket.AuoGetRedPackage, this.AutoGetRedPackage)
|
||||
end
|
||||
|
||||
local isAuto=false
|
||||
--自动抢红包
|
||||
function this:AutoGetRedPackage()
|
||||
isAuto=true
|
||||
end
|
||||
|
||||
|
||||
function this:OnShow(_sortingOrder)
|
||||
-- logWarnTrance("打开抢红包")
|
||||
sortingOrder=_sortingOrder
|
||||
|
|
@ -38,6 +49,7 @@ end
|
|||
|
||||
function this:OnClose()
|
||||
-- logWarnTrance("关闭抢红包")
|
||||
isAuto=false
|
||||
end
|
||||
|
||||
function this:OnDestroy()
|
||||
|
|
@ -47,6 +59,7 @@ end
|
|||
--初始化抢红包面板
|
||||
function this:InitGetView()
|
||||
local dataLength=0
|
||||
isAuto=false
|
||||
NetManager.GetAllRedPacketResponse(function(msg)
|
||||
-- logWarnTrance(#msg.info)
|
||||
-- for index, value in ipairs(msg.info) do
|
||||
|
|
@ -57,19 +70,58 @@ function this:InitGetView()
|
|||
for i,v in ipairs(msg.info) do
|
||||
table.insert(data,v)
|
||||
end
|
||||
LogError("len=========="..LengthOfTable(data))
|
||||
this:DataSort(data)
|
||||
dataLength=#msg.info
|
||||
|
||||
this.noInfo:SetActive(dataLength==0)
|
||||
|
||||
this.scrollView:SetData(data,function(index,root)
|
||||
this:SetView(root,data[index])
|
||||
end)
|
||||
this.scrollView:SetIndex(1)
|
||||
if isAuto then
|
||||
local SpecialConfig=ConfigManager.GetConfigData(ConfigName.SpecialConfig,115)
|
||||
for key, value in pairs(data) do
|
||||
local config=ConfigManager.GetConfigData(ConfigName.GuildRedPackConfig,value.redType)
|
||||
if value.isGet==0 and (config.Num-value.getCount)>0 and isAuto then
|
||||
if config.BaseType~=2 or PlayerManager.dailyRedPack< tonumber(SpecialConfig.Value) then
|
||||
isAuto=false
|
||||
LogError("redid============"..value.redId)
|
||||
NetManager.GetRobRedPackageRequest(value.redId,function(msg)
|
||||
local success=msg.isSuccess
|
||||
local itemId=msg.itemId
|
||||
local count=msg.count
|
||||
if success==1 then--红包抢成功
|
||||
local itemName=GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.ItemConfig,itemId).Name)
|
||||
UIManager.OpenPanel(UIName.RedPacketPopup,config.Id,value.redType)
|
||||
--红包类型大于3的是福利红包
|
||||
if value.redType>3 then
|
||||
PlayerManager.SettDailyRedPackageTime(PlayerManager.dailyRedPack+1)
|
||||
end
|
||||
MyGuildManager.ReuqsetRedPackage(function()
|
||||
CheckRedPointStatus(RedPointType.Guid_GetPackage)
|
||||
end)
|
||||
PopupTipPanel.ShowTip(string.format(Language[11046],itemName,count))
|
||||
else--抢红包失败
|
||||
LogError(Language[11047])
|
||||
PopupTipPanel.ShowTip(Language[11047])
|
||||
end
|
||||
this:InitGetView()
|
||||
--检测可领取红包的数量
|
||||
end)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
function this:SetView(root,data)
|
||||
LogError("-------------------")
|
||||
local nameImage=Util.GetGameObject(root,"NameImage"):GetComponent("Image")--红包名
|
||||
local fromPlayer=Util.GetGameObject(root,"FromPlayer"):GetComponent("Text")--红包来自玩家名
|
||||
local getBtn=Util.GetGameObject(root,"GetBtn")--抢红包按钮
|
||||
|
|
@ -77,10 +129,20 @@ function this:SetView(root,data)
|
|||
local getBtnImage=Util.GetGameObject(root,"GetBtn/Image"):GetComponent("Image")--按钮状态图片
|
||||
local numOrRecordBtn=Util.GetGameObject(root,"NumOrRecord")
|
||||
local numOrRecordText=Util.GetGameObject(root,"NumOrRecord/Text"):GetComponent("Text")--剩余礼包数或查看记录
|
||||
local getInfo=Util.GetGameObject(root,"GetInfo"):GetComponent("Text")--获取信息
|
||||
local redId=data.redId
|
||||
local redType=data.redType
|
||||
if redType>3 then
|
||||
redType=4
|
||||
end
|
||||
local config=ConfigManager.GetConfigData(ConfigName.GuildRedPackConfig,data.redType)
|
||||
|
||||
nameImage.sprite=Util.LoadSprite(RedPacketName[data.redType])
|
||||
if config.BaseType==1 then
|
||||
getInfo.gameObject:SetActive(false)
|
||||
else
|
||||
getInfo.gameObject:SetActive(true)
|
||||
getInfo.text=config.RuleDes
|
||||
end
|
||||
nameImage.sprite=Util.LoadSprite(RedPacketName[redType])
|
||||
fromPlayer.text=Language[11042]..data.userName.."</color>"
|
||||
|
||||
getBtn:GetComponent("Button").interactable=(config.Num-data.getCount)~=0 and data.isGet==0 --抢红包按钮开关
|
||||
|
|
@ -92,6 +154,7 @@ function this:SetView(root,data)
|
|||
numOrRecordText.text=Language[11043]
|
||||
getBtnImage.sprite=Util.LoadSprite(BtnStateImage[2]) --Language[10101]
|
||||
else
|
||||
LogError("redid"..redId)
|
||||
numOrRecordText.text=Language[10580]..(config.Num-data.getCount).."/"..config.Num
|
||||
getBtnImage.sprite=Util.LoadSprite(BtnStateImage[1]) --Language[11044]
|
||||
end
|
||||
|
|
@ -109,12 +172,20 @@ function this:SetView(root,data)
|
|||
if success==1 then--红包抢成功
|
||||
local itemName=GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.ItemConfig,itemId).Name)
|
||||
UIManager.OpenPanel(UIName.RedPacketPopup,redId,data.redType)
|
||||
--红包类型大于3的是福利红包
|
||||
if data.redType>3 then
|
||||
PlayerManager.SettDailyRedPackageTime(PlayerManager.dailyRedPack+1)
|
||||
end
|
||||
PopupTipPanel.ShowTip(string.format(Language[11046],itemName,count))
|
||||
MyGuildManager.ReuqsetRedPackage(function()
|
||||
CheckRedPointStatus(RedPointType.Guid_GetPackage)
|
||||
end)
|
||||
else--抢红包失败
|
||||
PopupTipPanel.ShowTip(Language[11047])
|
||||
end
|
||||
this:InitGetView()
|
||||
end)
|
||||
|
||||
end)
|
||||
Util.AddOnceClick(numOrRecordBtn,function()--查看记录
|
||||
NetManager.GetRedPackageDetailRequest(redId,function(msg)
|
||||
|
|
|
|||
|
|
@ -260,6 +260,7 @@ function this.RechargeSuccessFunc(id)
|
|||
this.SetInfo(curIndex)
|
||||
--PopupTipPanel.ShowTip(string.format( Language[11051],GetLanguageStrById(redpack.Name)))
|
||||
ChatManager.RequestSendRedPacket(curIndex)
|
||||
CheckRedPointStatus(RedPointType.Guid_GetPackage)
|
||||
end
|
||||
|
||||
return this
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
----- 公会红包-发红包 -----
|
||||
local this = {}
|
||||
local sortingOrder=0
|
||||
local packageConfig=nil
|
||||
|
||||
function this:InitComponent(gameObject)
|
||||
this.itemPre=Util.GetGameObject(gameObject,"Item")
|
||||
this.scrollRoot=Util.GetGameObject(gameObject,"scrollRect")
|
||||
this.scrollView=SubUIManager.Open(SubUIConfig.ScrollCycleView,this.scrollRoot.transform,this.itemPre, nil,
|
||||
Vector2.New(this.scrollRoot.transform.rect.width,this.scrollRoot.transform.rect.height),1,2,Vector2.New(80,100))
|
||||
this.scrollView.moveTween.MomentumAmount = 1
|
||||
this.scrollView.moveTween.Strength = 2
|
||||
this.scrollView.gameObject:GetComponent("RectTransform").anchoredPosition= Vector2.New(0,0)
|
||||
this.scrollView.gameObject:GetComponent("RectTransform").anchorMin = Vector2.New(0.5, 0.5)
|
||||
this.scrollView.gameObject:GetComponent("RectTransform").anchorMax = Vector2.New(0.5, 0.5)
|
||||
this.scrollView.gameObject:GetComponent("RectTransform").pivot = Vector2.New(0.5, 0.5)
|
||||
|
||||
this.infoTitle=Util.GetGameObject(gameObject,"infoPanel/Content/Title/Text"):GetComponent("Text")
|
||||
this.infoTitle.text="福利红包"
|
||||
Util.GetGameObject(gameObject,"infoPanel/Content/Text1"):GetComponent("Text").text="红包个数:"
|
||||
Util.GetGameObject(gameObject,"infoPanel/Content/Text2"):GetComponent("Text").text="红包金额:"
|
||||
this.numTxt=Util.GetGameObject(gameObject,"infoPanel/Content/numTxt"):GetComponent("Text")
|
||||
this.sumTxt=Util.GetGameObject(gameObject,"infoPanel/Content/num2Txt"):GetComponent("Text")
|
||||
this.rewardImg=Util.GetGameObject(gameObject,"infoPanel/Content/Image"):GetComponent("Image")
|
||||
this.infoObj=Util.GetGameObject(gameObject,"infoPanel")
|
||||
Util.AddClick(this.infoObj,function()
|
||||
this.infoObj.gameObject:SetActive(false)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
|
||||
function this:OnShow(_sortingOrder)
|
||||
sortingOrder=_sortingOrder
|
||||
this:InitView()
|
||||
end
|
||||
|
||||
function this:BindEvent()
|
||||
|
||||
end
|
||||
|
||||
function this:AddListener()
|
||||
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
||||
end
|
||||
|
||||
function this:OnDestroy()
|
||||
|
||||
end
|
||||
|
||||
---初始化面板
|
||||
function this:InitView()
|
||||
packageConfig=ConfigManager.GetConfig(ConfigName.GuildRedPackConfig)
|
||||
if not packageConfig then
|
||||
return
|
||||
end
|
||||
local packages=MyGuildManager.GetMyGuidRedPackage()
|
||||
local showList={}
|
||||
|
||||
for key, value in pairs(packages) do
|
||||
local config=packageConfig[key]
|
||||
--福利红包并且在限定等级
|
||||
if config and config.BaseType == 2 and PlayerManager.level>=config.Level then
|
||||
-- if packages[i] then
|
||||
value.config=config
|
||||
table.insert(showList,value)
|
||||
--end
|
||||
end
|
||||
end
|
||||
if LengthOfTable(showList)==0 then
|
||||
return
|
||||
end
|
||||
table.sort(showList,function(a,b)
|
||||
if a.num==b.num then
|
||||
return a.config.Sort<b.config.Sort
|
||||
else
|
||||
return a.num>b.num -- body
|
||||
end
|
||||
end)
|
||||
--设置滚动区信息
|
||||
this.scrollView:SetData(showList,function(index,root)
|
||||
this:ShowItemInfo(root,showList[index])
|
||||
end)
|
||||
end
|
||||
--显示红包数据
|
||||
function this:ShowItemInfo(go,data)
|
||||
if not data then
|
||||
return
|
||||
end
|
||||
local nameImage=Util.GetGameObject(go,"NameImage"):GetComponent("Image")
|
||||
local icon=Util.GetGameObject(go,"Icon"):GetComponent("Image")
|
||||
local desTxt=Util.GetGameObject(go,"Desc"):GetComponent("Text")
|
||||
local numTxt=Util.GetGameObject(go,"numTxt"):GetComponent("Text")
|
||||
local btn_send=Util.GetGameObject(go,"btn_send")
|
||||
local sendTxt=Util.GetGameObject(go,"btn_send/Text"):GetComponent("Text")
|
||||
nameImage.sprite=Util.LoadSprite("g_ghhb_ming_04_zh")
|
||||
icon.sprite=Util.LoadSprite(GetResourcePath(data.config.IconId))
|
||||
desTxt.text= data.config.RuleDes
|
||||
local num=data.num
|
||||
numTxt.text="数量:"..data.num
|
||||
btn_send:GetComponent("Button").interactable=num>0
|
||||
Util.SetGray(btn_send,num<1)
|
||||
|
||||
--发红包按钮
|
||||
Util.AddOnceClick(btn_send,function()
|
||||
NetManager.RequestWelfareRedPacket(data.config.Id,function()
|
||||
PopupTipPanel.ShowTip("成功发送福利红包!")
|
||||
this:InitView()
|
||||
--刷新发送福利红包按钮红点
|
||||
CheckRedPointStatus(RedPointType.Guid_SendPackage)
|
||||
MyGuildManager.ReuqsetRedPackage()
|
||||
CheckRedPointStatus(RedPointType.Guid_GetPackage)
|
||||
--发送公会信息
|
||||
local redpack=ConfigManager.GetConfigData(ConfigName.GuildRedPackConfig,data.config.Id)
|
||||
if not PlayerManager.familyId then return end
|
||||
-- 构建字符串
|
||||
local channel = CHAT_CHANNEL.FAMILY
|
||||
|
||||
local content = string.format(
|
||||
"%d#%s#%s",--"%d#%d#%d#%s#%d#%d|",
|
||||
GLOBAL_CHAT_TYPE.GUILD_REDPACKET,
|
||||
PlayerManager.nickName,
|
||||
redpack.Name
|
||||
)
|
||||
-- 发送消息
|
||||
NetManager.RequestSendChatMsg(channel, content, 0, function()
|
||||
local msgId = ChatManager.GetMsgIdFlag(channel)
|
||||
NetManager.RequestChatMsg(channel, msgId, function(data)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
--显示红包信息
|
||||
Util.AddOnceClick(go,function()
|
||||
this.infoObj.gameObject:SetActive(true)
|
||||
this.numTxt.text=data.config.TotalMoney[1]
|
||||
this.sumTxt.text=data.config.TotalMoney[2]
|
||||
this.rewardImg.sprite=Util.LoadSprite(GetResourcePath(data.config.IconId))
|
||||
end)
|
||||
|
||||
|
||||
end
|
||||
return this
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d2eae81c520066e44bb39c7bba196373
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -464,7 +464,8 @@ function this.ExecuteLoading()
|
|||
function() NetManager.GetHeroSkinData(LoadingPanel.OnStep) end,
|
||||
function() NetManager.HongMengInfoResponse(LoadingPanel.OnStep) end,
|
||||
function() NetManager.AllBookEnableResponse(LoadingPanel.OnStep) end,
|
||||
function() NetManager.HardStageRequest(LoadingPanel.OnStep) end,
|
||||
function() MyGuildManager.ReuqsetRedPackage(LoadingPanel.OnStep) end,
|
||||
--function() NetManager.HardStageRequest(LoadingPanel.OnStep) end,
|
||||
--[[[35] =]] function() -- 登录请求最终接口,所有请求放在此接口之前
|
||||
-- 登录成功确认
|
||||
NetManager.LoginConfimRequest()
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ function this.RegisterMessage(network)
|
|||
socket:RegistNetMessage(MessageTypeProto_pb.DEATH_PATH_STATUS_CHANGE_INDICATION, this.GuildRefreshDeathPosStatus)
|
||||
socket:RegistNetMessage(MessageTypeProto_pb.DEATH_PATH_DO_REWARD_INDICATION, this.GuildDoRewardIndication)
|
||||
socket:RegistNetMessage(MessageTypeProto_pb.DEATH_PATH_FIRST_CHANGE_INDICATION, this.GuildFirstChangeIndication)
|
||||
--福利红包推送
|
||||
socket:RegistNetMessage(MessageTypeProto_pb.WELFARE_RED_PACKET_INFO, this.WelfareRedPacketPush)
|
||||
--
|
||||
socket:RegistNetMessage(MessageTypeProto_pb.UPDATE_USER_EXP_INDICATION, this.UpdateUserExp)
|
||||
--秘盒跨季度刷新
|
||||
|
|
@ -130,7 +132,22 @@ function this.RegisterMessage(network)
|
|||
socket:RegistNetMessage(MessageTypeProto_pb.HARD_STAGE_INFO_RESPONSE, this.HardStageResponse)
|
||||
-- 神印信息推送
|
||||
socket:RegistNetMessage(MessageTypeProto_pb.PurpleMansionSealIndication, this.PracticeImprintData)
|
||||
|
||||
end
|
||||
|
||||
--后端推送福利红包数据
|
||||
function this.WelfareRedPacketPush(buffer)
|
||||
local data = buffer:DataByte()
|
||||
local msg = PlayerInfoProto_pb.WelfareRedPacketPush()
|
||||
msg:ParseFromString(data)
|
||||
LogError("推送过来红包数据")
|
||||
if msg.redpacket then
|
||||
MyGuildManager.SetMyGuidRedPackage(msg.redpacket)
|
||||
CheckRedPointStatus(RedPointType.Guid_SendPackage)
|
||||
end
|
||||
-- BagManager.BagIndicationRefresh(msg)
|
||||
end
|
||||
|
||||
function this.OpenHongMengTowerGuideIndication(buffer)
|
||||
local data = buffer:DataByte()
|
||||
local msg = HeroInfoProto_pb.HongmengSteleNewHandIndication()
|
||||
|
|
@ -754,6 +771,7 @@ end
|
|||
-- 更新关卡ID
|
||||
function this.FreshFightId(buffer)
|
||||
Log("后端推送关卡状态!")
|
||||
LogError("==============")
|
||||
local data=buffer:DataByte()
|
||||
local msg=FightInfoProto_pb.MainLevelFightUpdateIndication()
|
||||
msg:ParseFromString(data)
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ function this.PlayerInfoRequest(func)
|
|||
PlayerManager.skin = msg.player.decrotion--皮肤
|
||||
PlayerManager.ride = msg.player.ride--坐骑
|
||||
PlayerManager.rideLevel = msg.player.rideLevel
|
||||
PlayerManager.dailyRedPack=msg.dailyredpack
|
||||
HeadManager.SetHeadFrameAllData(msg.headFrameBag)
|
||||
if msg.player.sex then
|
||||
NameManager.SetRoleSex(msg.player.sex)
|
||||
|
|
@ -1931,6 +1932,7 @@ end
|
|||
|
||||
-- 请求发送聊天数据
|
||||
function this.RequestSendChatMsg(type, msg, friend, func)
|
||||
LogError(tostring(msg))
|
||||
if string.utf8len(msg) > 140 then
|
||||
PopupTipPanel.ShowTip(Language[11345])
|
||||
return
|
||||
|
|
@ -2514,6 +2516,23 @@ function this.RequestDismissGuild(dType, func)
|
|||
end)
|
||||
end
|
||||
|
||||
-- 发送福利红包
|
||||
function this.RequestWelfareRedPacket(_id,func)
|
||||
local data = PlayerInfoProto_pb.WelfareRedPacketSendRequest()
|
||||
LogError("redpacket id==".._id)
|
||||
data.id=_id
|
||||
local msg = data:SerializeToString()
|
||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.WELFARE_RED_PACKET_SEND_REQUEST, MessageTypeProto_pb.WELFARE_RED_PACKET_SEND_RESPONSE, msg, function(buffer)
|
||||
local data = buffer:DataByte()
|
||||
local msg = PlayerInfoProto_pb.WelfareRedPacketSendResponse()
|
||||
msg:ParseFromString(data)
|
||||
MyGuildManager.SetMyGuidRedPackage(msg.redpacket)
|
||||
if func then
|
||||
func()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
--请求公会行走
|
||||
function this.GuildWalkRequest(pathList, func)
|
||||
Log("FAMILY_WALK_REQUEST")
|
||||
|
|
@ -5068,7 +5087,7 @@ end
|
|||
function NetManager.HardStageRequest(func)
|
||||
local data = PlayerInfoProto_pb.HardStageRequest()
|
||||
local msg = data:SerializeToString()
|
||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.HARD_STAGE_INFO_REQUEST, MessageTypeProto_pb.HARD_STAGE_INFO_RESPONSE, msg, function(buffer)
|
||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.HARD_STAGE_INFO_REQUEST, MessageTypeProto_pb.HARD_STAGE_INFO_RESPONSE, msg, function(buffer)
|
||||
local data = buffer:DataByte()
|
||||
local msg = PlayerInfoProto_pb.HardStageResponse()
|
||||
msg:ParseFromString(data)
|
||||
|
|
@ -5076,7 +5095,7 @@ function NetManager.HardStageRequest(func)
|
|||
if func then
|
||||
func(msg)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end
|
||||
--山河社稷图领取宝箱奖励
|
||||
function NetManager.GetHardStageChapterReward(_chapterId,_rewradId,func)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ this.isRefreshMainPanelNpc = true
|
|||
this.userSkinList = {}--[id] = {skinId , overTime}
|
||||
this.userTitleList = {}--[id] = {titleId , overTime}
|
||||
this.userMountList = {}--[id] = {mountId , overTime}
|
||||
|
||||
--每日福利红包抢夺次数
|
||||
this.dailyRedPack = 0
|
||||
local update = function()
|
||||
local dt = Time.unscaledDeltaTime
|
||||
this.serverTime = this.serverTime + dt
|
||||
|
|
@ -60,6 +61,16 @@ end
|
|||
function this.InitServerTime()
|
||||
UpdateBeat:Add(update, this)
|
||||
end
|
||||
--获取公会福利红包抢夺次数
|
||||
function this.GetDailyRedPackageTime()
|
||||
return this.dailyRedPack
|
||||
end
|
||||
|
||||
--获取公会福利红包抢夺次数
|
||||
function this.SettDailyRedPackageTime(time)
|
||||
this.dailyRedPack=time
|
||||
LogError("time=="..this.dailyRedPack)
|
||||
end
|
||||
|
||||
function this.ResetLocalData(var)--初始化所有本地的每日一刷--1是五点推送、2是登陆检测
|
||||
local func1 = function ()
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ function this.InitRedPointAllRelate()
|
|||
RPData:SetParent(RedPointType.Guild_Apply, RedPointType.Guild_House_Apply)
|
||||
RPData:SetParent(RedPointType.Guild_Shop, RedPointType.Guild)
|
||||
RPData:SetParent(RedPointType.Guild_Boss, RedPointType.Guild)
|
||||
--RPData:SetParent(RedPointType.Guild_RedPacket, RedPointType.Guild)
|
||||
RPData:SetParent(RedPointType.Guild_RedPacket, RedPointType.Guild)
|
||||
RPData:SetParent(RedPointType.Guild_Fete, RedPointType.Guild)
|
||||
RPData:SetParent(RedPointType.Guild_Aid, RedPointType.Guild)
|
||||
RPData:SetParent(RedPointType.Guild_AidMy, RedPointType.Guild_Aid)
|
||||
|
|
@ -260,7 +260,8 @@ function this.InitRedPointAllRelate()
|
|||
RPData:SetParent(RedPointType.Guild_Transcript, RedPointType.Guild)
|
||||
RPData:SetParent(RedPointType.Guild_Skill, RedPointType.Guild)
|
||||
RPData:SetParent(RedPointType.Guild_DeathPos, RedPointType.Guild)
|
||||
|
||||
RPData:SetParent(RedPointType.Guid_SendPackage, RedPointType.Guild_RedPacket)
|
||||
RPData:SetParent(RedPointType.Guid_GetPackage, RedPointType.Guild_RedPacket)
|
||||
RPData:SetParent(RedPointType.Chat_Friend, RedPointType.Chat)
|
||||
-- 东海寻仙
|
||||
RPData:SetParent(RedPointType.FindFairy_OneView, RedPointType.FindFairy)
|
||||
|
|
@ -446,6 +447,8 @@ function this.RegisterRedCheckFunc()
|
|||
RPData:AddCheckFunc(RedPointType.Guild_Skill, GuildSkillManager.RefreshAllGuildSkillRedPoint)
|
||||
-- 公会红包
|
||||
--RPData:AddCheckFunc(RedPointType.Guild_RedPacket,GuildRedPacketManager.CheckGuildRedPacketRedPoint)
|
||||
RPData:AddCheckFunc(RedPointType.Guid_SendPackage,GuildRedPacketManager.CheckGuildRedPacketRedPoint)
|
||||
RPData:AddCheckFunc(RedPointType.Guid_GetPackage,GuildRedPacketManager.CheckIsCanGetPackage)
|
||||
--公会祭祀
|
||||
RPData:AddCheckFunc(RedPointType.Guild_Fete,MyGuildManager.CheckGuildFeteRedPoint)
|
||||
--公会十绝阵
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ function ChatTipView:InitComponent()
|
|||
self.btn = Util.GetGameObject(self.transform, "button")
|
||||
self.content = Util.GetGameObject(self.transform, "content"):GetComponent("Text")
|
||||
self.redpot = Util.GetGameObject(self.transform, "icon/redpot")
|
||||
self.redPackage = Util.GetGameObject(self.transform, "Image")
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
|
@ -35,25 +36,42 @@ function ChatTipView:BindEvent()
|
|||
UIManager.OpenPanel(UIName.ChatPanel, 2, 2)
|
||||
end
|
||||
end)
|
||||
Util.AddClick(self.redPackage,function()
|
||||
UIManager.OpenPanel(UIName.RedPacketPanel,3)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.GuildRedPacket.AuoGetRedPackage)
|
||||
end)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function ChatTipView:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Chat.OnMainChatChanged, self.RefreshChatShow, self)
|
||||
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Chat.OnRedPackageNumChanged, self.CheckRedPackageShow, self)
|
||||
BindRedPointObject(RedPointType.Chat, self.redpot)
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function ChatTipView:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Chat.OnMainChatChanged, self.RefreshChatShow, self)
|
||||
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Chat.OnRedPackageNumChanged, self.CheckRedPackageShow, self)
|
||||
ClearRedPointObject(RedPointType.Chat, self.redpot)
|
||||
end
|
||||
|
||||
function ChatTipView:CheckRedPackageShow()
|
||||
if MyGuildManager.PackageNum>0 then
|
||||
self.redPackage.gameObject:SetActive(true)
|
||||
self.freeBtnAnim.enabled=true
|
||||
else
|
||||
self.redPackage.gameObject:SetActive(false)
|
||||
end
|
||||
end
|
||||
--界面打开时调用(用于子类重写)
|
||||
function ChatTipView:OnOpen(viewType)
|
||||
self._ViewType = viewType or VIEW_TYPE.MAIN
|
||||
if MyGuildManager.PackageNum>0 then
|
||||
self.redPackage.gameObject:SetActive(true)
|
||||
else
|
||||
self.redPackage.gameObject:SetActive(false)
|
||||
end
|
||||
self:RefreshChatShow()
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue