Merge branch '0活动开发聚集地/灵兽抽卡' into master_xma_local

# Conflicts:
#	Assets/ManagedResources/Prefabs/UI/DynamicActicity/DynamicActivityPanel.prefab
#	Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
#	Assets/ManagedResources/~Lua/Modules/DynamicActivity/DynamicActivityPanel.lua
dev_chengFeng
ZhangBiao 2020-11-12 17:21:42 +08:00
commit 2c143deea9
33 changed files with 73928 additions and 2420 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6f067a822ab071a4a9b01771df955cbf
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: e38d3835f94fc194f81f24ca1e47a91e
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: 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: 23e60b3e0c607e942a9a0eeff64306c3
vertices: []
indices:
edges: []
weights: []
spritePackingTag: DynamicActivityAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 21ebb4f784e028c4eaddbc22d4f7f10f
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: 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: f7437539b2ff87043ba4f05448210c1d
vertices: []
indices:
edges: []
weights: []
spritePackingTag: DynamicActivityAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 8e89d678cb598a5469ae51adeb182687
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: 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: 3eb18b718f0928f4c97e49906f33d7d1
vertices: []
indices:
edges: []
weights: []
spritePackingTag: DynamicActivityAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 9e8f01a8eccaefa42965d1de9c40dfa3
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: 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: 068bde52aead1a349ade1342a0b721b3
vertices: []
indices:
edges: []
weights: []
spritePackingTag: DynamicActivityAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 54b6493f792933a409d6f5e155b6db3c
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: 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: fe6ce4c0e7a087f4d88920a5cda25ef5
vertices: []
indices:
edges: []
weights: []
spritePackingTag: TagButtonAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: e2b81002ecf34f945baeea65a5b4f29e
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: 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: 3f44843fef0c43248bf928467f7b54ec
vertices: []
indices:
edges: []
weights: []
spritePackingTag: TagButtonAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 79d393049ad16a643b4349ec646d9eeb
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: 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: d8357a563d8f552499d0a5c481e19d93
vertices: []
indices:
edges: []
weights: []
spritePackingTag: TagButtonAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: add5a59d72c6133408a05f83c3cec2af
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: 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: 166fe0794dcc5d44997d1aefc17821da
vertices: []
indices:
edges: []
weights: []
spritePackingTag: TagButtonAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -640,6 +640,7 @@ RedPointType = {
MonthGiftPage = 2019, -- 每月礼包
Celebration = 2020,--社稷大典
YiJingBaoKu = 2021,--易经宝库
LingShouBaoGe = 2022,--灵兽宝阁
---聊天相关-----
Chat = 207,
Chat_Friend = 2070,
@ -1074,6 +1075,9 @@ ActivityTypeDef = {
EightDayGift = 56,--八日登陆
SignInfo = 57,--三日七日签到
Celebration = 60,--主题活动 社稷大典
ShenYiTianJiang = 71, --神衣天降
LingShouBaoGe = 100,--灵兽宝阁
LingShowTeHui = 101, --灵兽特惠
--主题活动
FindFairy=43,--限时招募
@ -1085,9 +1089,6 @@ ActivityTypeDef = {
TreasureStore = 6000,--百宝商会
YiJingBaoKu = 8000,--易经宝库
ShenYiTianJiang = 71, --神衣天降
LingShowTeHui = 101, --灵兽特惠
}
--活动结束需要处理面板关闭类型
ActivityTypePanel = {
@ -1488,6 +1489,7 @@ HELP_TYPE = {
Pokemon=74,--灵兽玩法
PokemonResolve=75,--灵兽放生
YiJingBaoKu=77,--易经宝库
LingShouBaoGe=78,--灵兽宝阁
}
NumToComplexFont = {
@ -2051,6 +2053,7 @@ PRE_REWARD_POOL_TYPE = {
LOTTERY_SOUL=10,--魂印抽取
LOTTERY_SOUL_UP=11,--魂印抽取UP
LING_SHOU= 12,--灵兽
LING_SHOU_UP= 13,--灵兽抽取UP
}
DirectBuyType = {
XSHL = 11,--限时豪礼

View File

@ -177,6 +177,7 @@ ConfigName = {
HeroSkin = "HeroSkin",
BlessingConfigNew = "BlessingConfigNew",
BlessingRewardPoolNew = "BlessingRewardPoolNew",
SpiritAnimalSummon = "SpiritAnimalSummon"
}
require "Framework/GameDataBase"

View File

@ -355,6 +355,8 @@ UIName = {
PokemonSingleResultPanel=354,--灵兽
GeneralRewardPopup = 355,--通用奖励领取弹窗
GeneralBigPopup = 357,--通用大弹窗界面
LingShouBaoGeOneResultPanel = 358,--灵兽宝阁单抽
LingShouBaoGeTenResultPanel = 359,--灵兽宝阁十抽
}
SubUIConfig = {

View File

@ -6,10 +6,15 @@ local rate={}
local listSoulUpPre={} --魂印
local soulRate={}
local listMonsterUpPre={} --灵兽
local monsterRate={}
local mainMonsterRate=0
local panelType
local detailText={
[1] = HELP_TYPE.TimeLimitedCall,
[2] = HELP_TYPE.QianKunBox,
[3] = HELP_TYPE.LingShouBaoGe
}
function ActivityDetail:ctor(gameObject,type,effect)
@ -53,11 +58,90 @@ function ActivityDetail:OnShow()
elseif panelType==2 then--乾坤包囊
self:ReFreshUpSoul()
self:RefreshSoulRate()
str2=ActivityGiftManager.GetTimeStartToEnd(ActivityTypeDef.FindFairy)
str2=ActivityGiftManager.GetTimeStartToEnd(ActivityTypeDef.QianKunBox)
elseif panelType==3 then--灵兽宝阁
self:ReFreshUpMonster()
self:RefreshMonsterRate()
str2=ActivityGiftManager.GetTimeStartToEnd(ActivityTypeDef.LingShouBaoGe)
end
self.time.text=Language[12170]..str2
end
--============================灵兽宝阁功能======================================
function ActivityDetail:ReFreshUpMonster()
self.LookDetailBtn:SetActive(false)
local UpMonster=RecruitManager.GetRewardPreviewData(PRE_REWARD_POOL_TYPE.LING_SHOU_UP)
local rewardData,showData,curScore = DynamicActivityManager.LingShouBuildData()
if(not listMonsterUpPre) then
listMonsterUpPre={}
end
if(not monsterRate) then
monsterRate={}
end
for n,m in ipairs(UpMonster) do
if m and m.Reward[1] == showData.monsterId then
if not listMonsterUpPre[n] then
listMonsterUpPre[n] = SubUIManager.Open(SubUIConfig.ItemView,self.itemGrid.transform)
end
listMonsterUpPre[n]:OnOpen(false, {m.Reward[1], m.Reward[2]}, 1.1, true)
local weight = self:ReculateUpMonsterRate(m.Reward[1])
local tempName = listMonsterUpPre[n].name:GetComponent("Text").text
mainMonsterRate = weight
listMonsterUpPre[n].name:GetComponent("Text").text="<color=#EDB64C>"..string.format("%.2f", (weight/100000)*100) .."%</color>"
listMonsterUpPre[n].gameObject:SetActive(true)
table.insert(monsterRate,{tag=Language[12223],name=tempName,value=weight})
end
end
end
--计算所有的比重
function ActivityDetail:ReculateUpMonsterRate(id)
local UpMonster=RecruitManager.GetRewardPreviewData(PRE_REWARD_POOL_TYPE.LING_SHOU_UP)
for n,m in ipairs(UpMonster) do
if m and id==m.Reward[1] then
return m.Weight
end
end
return 0
end
function ActivityDetail:RefreshMonsterRate()
local list1={}
local list2={}
local list3={}
local list4={}
local monsterRateList={}
local UpMonster=RecruitManager.GetRewardPreviewData(PRE_REWARD_POOL_TYPE.LING_SHOU_UP)
for index, v in ipairs(UpMonster) do
if itemConfig[v.Reward[1]].Quantity==5 and (itemConfig[v.Reward[1]].ItemType==22 or itemConfig[v.Reward[1]].ItemType==21) then
table.insert(list1,v)--金色灵兽碎片
elseif itemConfig[v.Reward[1]].Quantity==4 and (itemConfig[v.Reward[1]].ItemType==22 or itemConfig[v.Reward[1]].ItemType==21) then
table.insert(list2,v)--紫色灵兽碎片
elseif itemConfig[v.Reward[1]].Quantity==3 and (itemConfig[v.Reward[1]].ItemType==22 or itemConfig[v.Reward[1]].ItemType==21) then
table.insert(list3,v)--蓝色灵兽碎片
else
table.insert(list4,v)--其他
end
end
table.insert(monsterRateList,{tag=Language[10192],name="金色奖励",value=self:ReculateRate(list1)-mainMonsterRate})
table.insert(monsterRateList,{tag=Language[10195],name="紫色奖励",value=self:ReculateRate(list2)})
table.insert(monsterRateList,{tag=Language[10196],name="蓝色奖励",value=self:ReculateRate(list3)})
table.insert(monsterRateList,{tag=Language[11766],name=Language[11766],value=self:ReculateRate(list4)})
for n,m in ipairs(monsterRateList) do
if m and m.value>0 then
local o=Util.GetGameObject(self.gameObject,"panel/rate/rate/rateprefab"..n)
if not o then
else
o.gameObject:SetActive(true)
Util.GetGameObject(o.gameObject,"star"):GetComponent("Text") .text=m.tag
Util.GetGameObject(o.gameObject,"name"):GetComponent("Text") .text=m.name
Util.GetGameObject(o.gameObject,"rate"):GetComponent("Text") .text=string.format("%.2f",(m.value/100000)*100).."%"
end
end
end
end
--============================乾坤包囊功能======================================
function ActivityDetail:ReFreshUpSoul()
self.LookDetailBtn:SetActive(false)
@ -132,7 +216,7 @@ function ActivityDetail:RefreshSoulRate()
end
--============================破阵诛仙功能======================================
--============================限时召唤功能======================================
function ActivityDetail:ReFreshUpHero()
self.LookDetailBtn:SetActive(true)
local UpHero=RecruitManager.GetRewardPreviewData(PRE_REWARD_POOL_TYPE.TIME_LIMITED_UP)
@ -219,6 +303,8 @@ function ActivityDetail:LookDetailBtnAction()
UIManager.OpenPanel(UIName.HeroPreviewPanel,true,false)
elseif panelType ==2 then
LogPurple(Language[12224])
elseif panelType ==3 then
LogPurple(Language[12224])
end
end
@ -247,6 +333,16 @@ function ActivityDetail:OnHide()
end
soulRate={}
end
if monsterRate then
for n,m in ipairs(monsterRate) do
if not monsterRate[n] then
local o=Util.GetGameObject(self.gameObject,"panel/rate/rateprefab"..n)
o.gameObject.SetActive(false)
end
end
monsterRate={}
end
end
function ActivityDetail:OnDestroy()
@ -254,6 +350,8 @@ function ActivityDetail:OnDestroy()
rate=nil
listSoulUpPre=nil
soulRate=nil
listMonsterUpPre=nil
monsterRate=nil
end
return ActivityDetail

View File

@ -164,4 +164,80 @@ function this.GetLeftRewardData()
return data
end
function this.LingShouBuildData()
local rewardData={}
local showData={}
local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.LingShouBaoGe)
local activityId = ActData.activityId
local LSrewardData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",activityId)
local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId)
local singleRecruit = array[1]
local tenRecruit = array[2]
local curScore = 0
--第一条为选择抽取的灵兽信息
for index, value in ipairs(ActData.mission) do
local v = ActData.mission[index]
if v.missionId == 0 then
if v.progress == 0 then
local mergePool = singleRecruit.MergePool
local poolId = ConfigManager.GetConfigDataByKey(ConfigName.LotterySpecialConfig,"Type",mergePool).pool_id
local tempData = ConfigManager.GetConfigDataByKey(ConfigName.LotteryRewardConfig,"Pool",poolId)
showData.sasId = 0
showData.monsterId = tempData.Reward[1]
showData.iconId = LSrewardData[1].Reward[1][1]
else
local tempData = SpiritAnimalSummonConfig[v.progress]
showData.sasId = tempData.Id
showData.monsterId = tempData.FocusID
showData.iconId = tempData.TargetItemList[2]
end
end
end
--剩下的是奖励信息
for i = 1, #LSrewardData do
local v = LSrewardData[i]
for index, value in ipairs(ActData.mission) do
if v.Id == value.missionId then
local data = {}
data.missionId = value.missionId
data.reward = {}
data.iconId = showData.iconId
data.num = v.Reward[1][2]
data.value = v.Values[1][1]
curScore = ActData.mission[index].progress
if curScore >= data.value then
if value.state == 0 then
data.state = 1--可领的
else
data.state = 2--领完的
end
else
data.state = 0--不可领的
end
table.insert(rewardData,data)
end
end
end
return rewardData,showData,curScore
end
function this.LingShouUpCheckRed()
local freeTime = 0
local lotterySetting=ConfigManager.GetConfig(ConfigName.LotterySetting)
local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.LingShouBaoGe)
local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",ActData.activityId)
local freeTimesId=lotterySetting[array[1].Id].FreeTimes
if freeTimesId > 0 then
freeTime = PrivilegeManager.GetPrivilegeRemainValue(freeTimesId)
end
local rewardData,showData,curScore = DynamicActivityManager.LingShouBuildData()
for i = 1, #rewardData do
if rewardData[i].state == 1 or freeTime >=1 then
return true
end
end
return false
end
return this

View File

@ -67,53 +67,58 @@ local tabs = {
default = "s_shenyitianjiang_anniu_02", lock = "s_shenyitianjiang_anniu_02", select = "s_shenyitianjiang_anniu_01",
rpType = "",panelType = PanelType.Main,ActType = ActivityTypeDef.ShenYiTianJiang
},
[16] = { --灵兽特惠
[16] = { --灵兽宝阁
default = "l_lingshou_lingshoubaogeanniu02", lock = "l_lingshou_lingshoubaogeanniu02", select = "l_lingshou_lingshoubaogeanniu01",
rpType = RedPointType.LingShouBaoGe,panelType = PanelType.Main,ActType = ActivityTypeDef.LingShouBaoGe
},
[17] = { --灵兽特惠
default = "l_lishoutehui_xianshibiao0", lock = "l_lishoutehui_xianshibiao0", select = "l_lishoutehui_anniu",
rpType = "",panelType = PanelType.Main,ActType = ActivityTypeDef.LingShowTeHui
},
[17] = { --珍奇礼包
[18] = { --珍奇礼包
default = "z_zhenqibaoge_anniu_02", lock = "z_zhenqibaoge_anniu_02", select = "z_zhenqibaoge_anniu_01",
rpType = "",panelType = PanelType.Main,ActType = ActivityTypeDef.DynamicAct_Treasure
},
[18] = { --累计充值 一天一刷
[19] = { --累计充值 一天一刷
default = "r_huodong_leijichengzhianniu_01", lock = "r_huodong_leijichengzhianniu_01", select = "r_huodong_leijichengzhianniu",
rpType = RedPointType.DynamicActRecharge,panelType = PanelType.Main,ActType = ActivityTypeDef.AccumulativeRechargeExper
},
[19] = { --累计充值 一周一刷
[20] = { --累计充值 一周一刷
default = "r_huodong_leijichengzhianniu_01", lock = "r_huodong_leijichengzhianniu_01", select = "r_huodong_leijichengzhianniu",
rpType = RedPointType.DynamicActRecharge,panelType = PanelType.Main,ActType = ActivityTypeDef.DynamicAct_recharge
},
[20] = { --限时商市
[21] = { --限时商市
default = "x_xianshishangshi_anniu_02", lock = "x_xianshishangshi_anniu_02", select = "x_xianshishangshi_anniu_01",
rpType = "",panelType = PanelType.Main,ActType = ActivityTypeDef.DynamicAct_TimeLimitShop
},
[21] = { --限时兑换
[22] = { --限时兑换
default = "r_xianshiduihuan_anniu_01", lock = "r_xianshiduihuan_anniu_01", select = "r_xianshiduihuan_anniu",
rpType = "",panelType = PanelType.Main,ActType = ActivityTypeDef.LimitExchange
},
}
local _PageInfo = {--后期可以做成tableInserticon名字都去读表
[1] = 1,
[2] = 1,
[3] = 1,
[4] = 1,
[5] = 1,
[6] = 1,
[7] = 1,
[8] = 1,
[1] = 1,--第二周 破阵诛仙
[2] = 1,--第三周 勇冠三军
[3] = 1,--第四周 叱咤风云
[4] = 1,--第五周 丹心碧血
[5] = 1,--第六周 势不可挡
[6] = 1,--第七周 勇往直前
[7] = 1,--第八周 运筹帷幄
[8] = 1,--第九周 移山倒海
[9] = 1,
[10] = 1,
[11] = 2,
[11] = 2,--社稷大典
[12] = 9,--易经宝库
[13] = 3,
[14] = 4,
[13] = 3,--限时召唤
[14] = 4,--乾坤宝盒
[15] = 10,--神衣天降
[16] = 11,
[17] = 5,
[18] = 6,
[16] = 12,--灵兽宝阁
[17] = 11,
[18] = 5,
[19] = 6,
[20] = 7,
[21] = 9,
[20] = 6,
[21] = 7,
[22] = 8,
}
local curActivityCount = {
[1] = require("Modules/DynamicActivity/DynamicTaskPage"),
@ -127,6 +132,7 @@ local curActivityCount = {
[9] = require("Modules/DynamicActivity/YiJingBaoKu"),
[10] = require("Modules/DynamicActivity/ShengYiTianJiang"),
[11] = require("Modules/DynamicActivity/LingShowTeHui"),
[12] = require("Modules/DynamicActivity/LingShouBaoGe"),
}
--初始化组件(用于子类重写)

View File

@ -0,0 +1,308 @@
local LingShouBaoGe= quick_class("LingShouBaoGe")
local this = LingShouBaoGe
local ActivityDetail = require("Modules/DynamicActivity/ActivityDetail")--活动详情
local lotterySetting=ConfigManager.GetConfig(ConfigName.LotterySetting)
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local artConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local SpiritAnimalConfig = ConfigManager.GetConfig(ConfigName.SpiritAnimal)
local SpiritAnimalSummonConfig = ConfigManager.GetConfig(ConfigName.SpiritAnimalSummon)
local activityId = 0
local singleRecruit = nil
local tenRecruit = nil
local sortingOrder = 0
local parent
local freeTime= 0 --免费抽取次数
local showData = {}
local rewardData = {}
local curScore = 0
local Live
local bgName
local ActData=nil
local LSrewardData=nil
--按钮类型
local bType={
Btn1=1,
Btn10=2
}
--type与lotterySetting表中的id对应
local btns={ [bType.Btn1]={name="Btn1",isInfo="1次"}, [bType.Btn10]={name="Btn10",isInfo="10次"}}
function LingShouBaoGe:ctor(mainPanel, gameObject)
this.mainPanel = mainPanel
this.gameObject = gameObject
this:InitComponent(gameObject)
this:BindEvent()
end
function LingShouBaoGe:InitComponent(gameObject)
this.helpBtn = Util.GetGameObject(this.gameObject,"help")
this.helpPosition=this.helpBtn:GetComponent("RectTransform").localPosition
this.preview = Util.GetGameObject(this.gameObject,"rightUp/preview")
this.change = Util.GetGameObject(this.gameObject,"rightUp/change")
this.detailBtn = Util.GetGameObject(this.gameObject,"rightUp/detailBtn")
this.upper=Util.GetGameObject(this.gameObject,"bottom/times"):GetComponent("Text") ---召唤上限
this.tip1=Util.GetGameObject(this.gameObject,"bottom/Tip1"):GetComponent("Text") ---刷新时间
this.tip2=Util.GetGameObject(this.gameObject,"bottom/Tip2"):GetComponent("Text") ---必出
this.btnGroup=Util.GetGameObject(this.gameObject,"bottom/btngroup")
this.detail= Util.GetGameObject(this.gameObject, "detail")
this.detail.gameObject:SetActive(false)
this.grid = Util.GetGameObject(this.gameObject, "aniRoot")
--mid
this.progressValue = Util.GetGameObject(this.gameObject, "mid/progress/value"):GetComponent("Image")--fillAmount
this.reward = Util.GetGameObject(this.gameObject, "mid/reward")
this.value = Util.GetGameObject(this.gameObject, "mid/value")
end
function LingShouBaoGe:BindEvent()
Util.AddClick(this.helpBtn, function()
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.LingShouBaoGe,this.helpPosition.x,this.helpPosition.y)
end)
Util.AddClick(this.detailBtn, function()
ActivityDetail.new(this.detail,3)
end)
Util.AddClick(this.change, function()
LogYellow("更改灵兽")
end)
Util.AddClick(this.preview, function()
local fb = ConfigManager.GetConfigData(ConfigName.FakeBattle, 1006)
local testFightData = {
fightData = loadstring("return "..fb.FightData)(),
fightSeed = fb.TimeSeed,
fightType = 0,
maxRound = 20
}
UIManager.OpenPanel(UIName.BattlePanel, testFightData, BATTLE_TYPE.Test)
end)
end
function LingShouBaoGe:OnShow(_sortingOrder,_parent)
parent = _parent
sortingOrder = _sortingOrder
this.gameObject:SetActive(true)
this:Refresh()
end
function LingShouBaoGe:Refresh()
ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.LingShouBaoGe)
activityId = ActData.activityId
LSrewardData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",activityId)
local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId)
singleRecruit = array[1]
tenRecruit = array[2]
this.change:SetActive(false)
CheckRedPointStatus(RedPointType.LingShouBaoGe)
this:refreshBtnShow()--刷新按钮显示
this:TimeCountDown()--时间
this:SetData()--加载界面数据立绘+进度条
end
function LingShouBaoGe:SetData()
rewardData={}
showData={}
rewardData,showData,curScore = DynamicActivityManager.LingShouBuildData()
--设置立绘
bgName = artConfig[SpiritAnimalConfig[showData.monsterId].Live].Name
local pos = SpiritAnimalConfig[showData.monsterId].Position
local scale = SpiritAnimalConfig[showData.monsterId].Scale
Live = poolManager:LoadLive(bgName, this.grid.transform, Vector3.one*scale, Vector2.New(pos[1],pos[2]))
local leftTime = lotterySetting[singleRecruit.Id].DiamondBoxContain[1][2] - ActData.value
this.tip2.text = Language[11480].."<color=green>"..leftTime.."</color>次必出灵兽·"..SpiritAnimalConfig[showData.monsterId].Name
--设置奖励
this.progressValue.fillAmount = curScore/LSrewardData[#LSrewardData].Values[1][1]
Util.GetGameObject(this.value, "num"):GetComponent("Text").text = curScore
Util.GetGameObject(this.value, "tips"):GetComponent("Text").text = "宝阁值"
for i = 1, this.reward.transform.childCount do
local item = this.reward.transform:GetChild(i-1)
Util.GetGameObject(item, "num/Text"):GetComponent("Text").text = LSrewardData[i].Reward[1][2]
Util.GetGameObject(item, "Text"):GetComponent("Text").text = LSrewardData[i].Values[1][1]
Util.GetGameObject(item, "icon"):GetComponent("Image").sprite = Util.LoadSprite(artConfig[SpiritAnimalConfig[showData.monsterId].Icon].Name)
Util.GetGameObject(item, "red"):SetActive(rewardData[i].state == 1)
local btn = Util.GetGameObject(item, "icon")
Util.AddOnceClick(btn,function ()
if rewardData[i].state == 1 then
NetManager.GetActivityRewardRequest(rewardData[i].missionId,activityId,function (drop)
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,function ()
this:Refresh()
end)
end)
else
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,LSrewardData[i].Reward[1][1],nil)
end
end)
end
end
function LingShouBaoGe:refreshBtnShow()
--下方的数量显示
local maxtimesId=lotterySetting[singleRecruit.Id].MaxTimes
local curTimes=PrivilegeManager.GetPrivilegeUsedTimes(maxtimesId)
this.upper.text = Language[12225]..curTimes.."/"..privilegeConfig[maxtimesId].Condition[1][2]--召唤上限
--是否是免费抽
local freeTimesId=lotterySetting[singleRecruit.Id].FreeTimes
if freeTimesId > 0 then
freeTime = PrivilegeManager.GetPrivilegeRemainValue(freeTimesId)
RecruitManager.freeUseTimeList[freeTimesId] = freeTime
end
--按钮赋值
for n, m in ipairs(btns) do
local btn = Util.GetGameObject(this.btnGroup,m.name)
local redPot = Util.GetGameObject(btn.gameObject,"RedPoint")
local info = Util.GetGameObject(btn.gameObject,"Content/Info"):GetComponent("Text")
local icon = Util.GetGameObject(btn.gameObject,"Content/Icon"):GetComponent("Image")
local num = Util.GetGameObject(btn.gameObject,"Content/Num"):GetComponent("Text")
--存在免费次数 并且 免费>=1 并且是1按钮
local isFree = freeTime and freeTime >= 1 and n == bType.Btn1
redPot.gameObject:SetActive(isFree)
icon.gameObject:SetActive(not isFree)
num.gameObject:SetActive(not isFree)
local itemId=0
local itemNum=0
local type = 0
type = n == bType.Btn1 and singleRecruit.Id or tenRecruit.Id
local d = RecruitManager.GetExpendData(type)
if isFree then
info.text=" "..Language[11759]
else
itemId = d[1]
itemNum = d[2]
icon.sprite = Util.LoadSprite(artResourcesConfig[itemConfig[itemId].ResourceID].Name)
info.text = m.isInfo
num.text = "x"..itemNum
end
Util.AddOnceClick(btn,function()
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.LingShowTen)
if n == bType.Btn1 then
if isFree then
self:Recruit(type,maxtimesId,0,0,state,freeTimesId)
else
self:Recruit(type,maxtimesId,itemId,itemNum,state,freeTimesId)
end
elseif n==bType.Btn10 then
self:Recruit(type,maxtimesId,itemId,itemNum,state,freeTimesId)
end
end)
end
end
function LingShouBaoGe:Recruit(id,RecruitMaxtimesId,itemId,itemNum,state,freeTimesId)
local generalType = id%2 == 0 and RecruitType.LingShowSingle or RecruitType.LingShowTen
local num = id%2 == 0 and 1 or 10
--是否超过每日最大上限
if PrivilegeManager.GetPrivilegeRemainValue(RecruitMaxtimesId) < num then
PopupTipPanel.ShowTip(Language[11760])
return
end
if itemId ~= 0 then
if BagManager.GetItemCountById(itemId) < itemNum then
PopupTipPanel.ShowTip(itemConfig[itemId].Name..Language[10492])
return
end
end
if itemId == 16 and state == 0 then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,generalType,
function()
RecruitManager.RecruitRequest(id,function(msg)
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,id,msg.drop,activityId,function ()
this:Refresh()
end)
end,freeTimesId,itemId,itemNum)
end,itemNum)
else
RecruitManager.RecruitRequest(id, function(msg)
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,id,msg.drop,activityId,function ()
this:Refresh()
end)
end,freeTimesId,itemId,itemNum)
end
end
--- 将一段时间转换为天时分秒
function LingShouBaoGe:TimeToDHMS(second)
local day = math.floor(second / (24 * 3600))
local minute = math.floor(second / 60) % 60
local sec = math.floor(second % 60)
local hour = math.floor(math.floor(second - day * 24 * 3600 - sec - minute * 60) / 3600)
if day <= 0 and hour <= 0 then
return string.format(Language[12231],minute, sec)
else
return string.format(Language[12232],day, hour)
end
end
--刷新时间
function LingShouBaoGe:TimeCountDown()
if this.timer then
this.timer:Stop()
this.timer = nil
end
local timeDown=CalculateSecondsNowTo_N_OClock(5)
this.tip1.text = TimeToHMS(timeDown)..Language[12200]
this.timer = Timer.New(function()
if timeDown < 1 then
this.timer:Stop()
this.timer = nil
parent:ClosePanel()
return
end
timeDown = timeDown - 1
this.tip1.text = TimeToHMS(timeDown)..Language[12200]
end, 1, -1, true)
this.timer:Start()
end
function LingShouBaoGe:OnHide()
if Live then
poolManager:UnLoadLive(bgName, Live)
end
this.gameObject:SetActive(false)
this.detail.gameObject:SetActive(false)
if this.timer then
this.timer:Stop()
this.timer = nil
end
end
function LingShouBaoGe:OnDestroy()
if Live then
poolManager:UnLoadLive(bgName, Live)
end
ActivityDetail.OnDestroy()
end
--添加事件监听(用于子类重写)
function LingShouBaoGe:AddListener()
end
--移除事件监听(用于子类重写)
function LingShouBaoGe:RemoveListener()
end
return LingShouBaoGe

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e242728feeff84c429e6c008ea480d64
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,153 @@
require("Base/BasePanel")
LingShouBaoGeOneResultPanel = Inherit(BasePanel)
local this=LingShouBaoGeOneResultPanel
local ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local lotterySetting = ConfigManager.GetConfig(ConfigName.LotterySetting)
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local itemNum=0 --抽卡小号道具数量
local isFree=false
local itemId = 0
local RecruitMaxtimesId = 0
local freeTimesId = 0
local activityId = nil
local singleRecruit = nil
local tenRecruit = nil
--活动抽卡类型(动态的数据)
local drawtType={
FindFairySingle=0,
}
local orginLayer
local itemViewList = {}
--初始化组件(用于子类重写)
function LingShouBaoGeOneResultPanel:InitComponent()
orginLayer = 10
self.bg = Util.GetGameObject(self.gameObject, "effect")
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft, panelType = PanelType.ElementDrawCard })
screenAdapte(self.bg)
this.btnBack=Util.GetGameObject(self.gameObject, "bottom/backButton")
this.openOneAgainButton=Util.GetGameObject(self.gameObject, "bottom/openOneAgainButton")
this.content3=Util.GetGameObject(self.gameObject,"bottom/openOneAgainButton/Content3")
this.itemIcon3=Util.GetGameObject(this.content3, "icon"):GetComponent("Image")
this.itemNum3=Util.GetGameObject(this.content3, "num"):GetComponent("Text")
this.itemInfo3=Util.GetGameObject(this.content3, "info"):GetComponent("Text")
this.tipText=Util.GetGameObject(this.openOneAgainButton, "Text"):GetComponent("Text")
this.content=Util.GetGameObject(self.gameObject, "content")
this.detailImage=Util.GetGameObject(self.gameObject, "Tip")
end
--绑定事件(用于子类重写)
function LingShouBaoGeOneResultPanel:BindEvent()
Util.AddClick(this.btnBack, function ()
self:ClosePanel()
end)
Util.AddClick(this.openOneAgainButton, function ()
--是否超过每日最大上限
if PrivilegeManager.GetPrivilegeRemainValue(RecruitMaxtimesId) < 1 then
PopupTipPanel.ShowTip(Language[11760])
return
end
if not isFree then
if BagManager.GetItemCountById(itemId) < itemNum then
PopupTipPanel.ShowTip(ItemConfig[itemId].Name..Language[10492])
return
end
end
RecruitManager.RecruitRequest(this.recruitType, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(RecruitMaxtimesId,1)--记录抽卡次数
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop,activityId)
end,freeTimesId,itemId,itemNum)
end)
end
--添加事件监听(用于子类重写)
function LingShouBaoGeOneResultPanel:AddListener()
end
--移除事件监听(用于子类重写)
function LingShouBaoGeOneResultPanel:RemoveListener()
end
function LingShouBaoGeOneResultPanel:OnSortingOrderChange()
Util.AddParticleSortLayer(self.bg, self.sortingOrder - orginLayer)
orginLayer = self.sortingOrder
if this.view then
this.view:OnOpen(true,this.itemDataList[1],1.4,true,false,false,self.sortingOrder)
end
end
--界面打开时调用(用于子类重写)
function LingShouBaoGeOneResultPanel:OnOpen(...)
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.LingShou})
local args = { ... }
this.drop=args[1]
this.recruitType = args[2]
activityId = args[3]
this.detailImage:SetActive(false)
this.content3:SetActive(true)
--获取免费次数
local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId)
singleRecruit = array[1]
tenRecruit = array[2]
local currLottery= ConfigManager.GetConfigData(ConfigName.LotterySetting,singleRecruit.Id)
freeTimesId=currLottery.FreeTimes
RecruitMaxtimesId = currLottery.MaxTimes
local freeTime=0
if freeTimesId>0 then
freeTime= PrivilegeManager.GetPrivilegeRemainValue(freeTimesId)
RecruitManager.freeUseTimeList[freeTimesId] = freeTime
end
isFree=freeTime and freeTime >= 1
if isFree then
this.itemNum3.gameObject:SetActive(false)
this.itemIcon3.gameObject:SetActive(false)
this.itemInfo3.text="免费召唤"
this.tipText.gameObject:SetActive(false)
else
this.itemNum3.gameObject:SetActive(true)
this.itemIcon3.gameObject:SetActive(true)
this.itemInfo3.text="再来1次"
itemId=0
local d = RecruitManager.GetExpendData(this.recruitType)
itemId = d[1]
itemNum = d[2]
this.tipText.gameObject:SetActive(false)
this.itemIcon3.sprite=Util.LoadSprite(artResourcesConfig[ItemConfig[itemId].ResourceID].Name)
this.itemNum3.text= "×"..itemNum
end
this.itemDataList = {}
this.itemDataList = BagManager.GetTableByBackDropData(this.drop)
if not itemViewList then
itemViewList = {}
end
for k,v in pairs(itemViewList) do
v.gameObject:SetActive(false)
end
for i = 1, #this.itemDataList do
if not itemViewList[i] then
Util.GetTransform(this.content, "itemContent"..i).gameObject:SetActive(true)
itemViewList[i] = SubUIManager.Open(SubUIConfig.ItemView,Util.GetTransform(this.content, "itemContent"..i))
end
itemViewList[i].gameObject:SetActive(true)
itemViewList[i]:OnOpen(true,this.itemDataList[i],1.4,true,false,false,self.sortingOrder)
end
end
--界面关闭时调用(用于子类重写)
function LingShouBaoGeOneResultPanel:OnClose()
end
--界面销毁时调用(用于子类重写)
function LingShouBaoGeOneResultPanel:OnDestroy()
SubUIManager.Close(this.UpView)
this.view = nil
itemViewList = {}
end
return LingShouBaoGeOneResultPanel

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b4fc91ffec61dd64d86b466384623326
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,165 @@
require("Base/BasePanel")
require("Base/Stack")
LingShouBaoGeTenResultPanel = Inherit(BasePanel)
local this=LingShouBaoGeTenResultPanel
local ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local gameSetting=ConfigManager.GetConfig(ConfigName.GameSetting)
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
local itemId=0
local itemNum=0 --抽卡小号道具数量
local activityId = nil
local singleRecruit = nil
local tenRecruit = nil
local lotterySetting = ConfigManager.GetConfig(ConfigName.LotterySetting)
this.contentList={}
this.contentListParent={}
this.isElementDrawPanel=false
local orginLayer
--初始化组件(用于子类重写)
function LingShouBaoGeTenResultPanel:InitComponent()
orginLayer = 0
self.bg = Util.GetGameObject(self.gameObject, "effect")
screenAdapte(self.bg)
this.btnBack=Util.GetGameObject(self.gameObject, "bottom/backButton")
this.openTenAgainButton=Util.GetGameObject(self.gameObject, "bottom/openTenAgainButton")
this.costImage=Util.GetGameObject(self.gameObject, "bottom/openTenAgainButton/Image")
this.detailImage=Util.GetGameObject(self.gameObject, "Tip")
this.content1=Util.GetGameObject(self.gameObject,"bottom/openTenAgainButton/Content1")
this.itemIcon1=Util.GetGameObject(this.content1,"Icon"):GetComponent("Image")
this.detailImage1=Util.GetGameObject(this.content1,"Tip")
this.detailText1 = Util.GetGameObject(this.detailImage1, "contentDetailText"):GetComponent("Text")
this.content3=Util.GetGameObject(self.gameObject,"bottom/openTenAgainButton/Content3")
this.infoTxt=Util.GetGameObject(this.content3,"info"):GetComponent("Text")
this.itemIcon3=Util.GetGameObject(this.content3, "icon"):GetComponent("Image")
this.itemNum3=Util.GetGameObject(this.content3, "num"):GetComponent("Text")
this.content2=Util.GetGameObject(self.gameObject,"bottom/openTenAgainButton/Content2")
this.itemIcon2=Util.GetGameObject(this.content2,"Icon"):GetComponent("Image")
this.itemNum2=Util.GetGameObject(this.content2,"Num"):GetComponent("Text")
this.tipText=Util.GetGameObject(this.openTenAgainButton, "Text"):GetComponent("Text")
for i = 1, 10 do
this.contentList[i]=Util.GetGameObject(self.gameObject, "content/itemAnimEffect"..i.."/image/Kuang/itemName/itemContent")
this.contentListParent[i]=Util.GetGameObject(self.gameObject, "content/itemAnimEffect"..i)
end
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft})--, panelType = PanelType.ElementDrawCard })
end
--绑定事件(用于子类重写)
function LingShouBaoGeTenResultPanel:BindEvent()
Util.AddClick(this.btnBack, function ()
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
self:ClosePanel()
end)
Util.AddClick(this.openTenAgainButton, function ()
local maxTimesId = lotterySetting[singleRecruit.Id].MaxTimes
local freeTimesId = lotterySetting[singleRecruit.Id].FreeTimes
--是否超过每日最大上限
if PrivilegeManager.GetPrivilegeRemainValue(maxTimesId) < 10 then
LogGreen("maxTimesId:"..maxTimesId.." times"..PrivilegeManager.GetPrivilegeRemainValue(maxTimesId))
PopupTipPanel.ShowTip(Language[11760])
return
end
if BagManager.GetItemCountById(itemId) < itemNum then
PopupTipPanel.ShowTip(ItemConfig[itemId].Name..Language[10492])
return
end
RecruitManager.RecruitRequest(this.recruitType, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(maxTimesId,10)--记录抽卡次数
UIManager.OpenPanel(UIName.PokemonSingleResultPanel,this.recruitType,msg.drop,activityId)
end,freeTimesId,itemId,itemNum)
end)
end
--添加事件监听(用于子类重写)
function LingShouBaoGeTenResultPanel:AddListener()
end
--移除事件监听(用于子类重写)
function LingShouBaoGeTenResultPanel:RemoveListener()
end
function LingShouBaoGeTenResultPanel:OnSortingOrderChange()
Util.AddParticleSortLayer(self.bg, self.sortingOrder - orginLayer)
for i = 1, 10 do
Util.AddParticleSortLayer(this.contentListParent[i], self.sortingOrder - orginLayer)
end
orginLayer = self.sortingOrder
if this.views and this.itemDataList then
for index, view in pairs(this.views) do
view:OnOpen(true,this.itemDataList[index],1.4,true,false,false,self.sortingOrder)
end
end
end
--界面打开时调用(用于子类重写)
function LingShouBaoGeTenResultPanel:OnOpen(...)
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.LingShou})
local args = { ... }
this.drop=args[1]
this.recruitType = args[2]
activityId = args[3]
this.detailImage:SetActive(false)
this.content1:SetActive(false)
this.content2:SetActive(false)
this.content3:SetActive(true)
local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId)
singleRecruit = array[1]
tenRecruit = array[2]
local d
d = RecruitManager.GetExpendData(this.recruitType)
itemId = d[1]
itemNum = d[2]
this.itemIcon3.sprite=Util.LoadSprite(artResourcesConfig[ItemConfig[itemId].ResourceID].Name)
this.tipText.gameObject:SetActive(false)
this.infoTxt.text="再来10次"
this.itemNum3.text= "×"..itemNum
local itemDataList={}
itemDataList=BagManager.GetTableByBackDropData(this.drop)
if not this.views then
this.views = {}
end
for k,v in pairs(this.views) do
v.gameObject:SetActive(false)
end
this.itemDataList = itemDataList
local dataNum = #itemDataList > 10 and 10 or #itemDataList
for i = dataNum, 1, -1 do
if not this.views[i] then
this.views[i] = SubUIManager.Open(SubUIConfig.ItemView,this.contentList[i].transform)
end
this.views[i].gameObject:SetActive(true)
local curItemData = itemDataList[i]
local contentGO = this.contentListParent[i]
this.views[i]:OnOpen(true,curItemData,1.4,true,false,false,self.sortingOrder)
contentGO:SetActive(true)
end
end
--界面关闭时调用(用于子类重写)
function LingShouBaoGeTenResultPanel:OnClose()
end
--界面销毁时调用(用于子类重写)
function LingShouBaoGeTenResultPanel:OnDestroy()
SubUIManager.Close(this.UpView)
this.views = nil
this.contentList={}
this.contentListParent={}
this.views = {}
end
return LingShouBaoGeTenResultPanel

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1cb9b55611616cd4bb317181735f35d7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -196,6 +196,7 @@ function this.InitRedPointAllRelate()
RPData:SetParent(RedPointType.DynamicActTask, RedPointType.DynamicActivity)
RPData:SetParent(RedPointType.DynamicActRecharge, RedPointType.DynamicActivity)
RPData:SetParent(RedPointType.Celebration, RedPointType.DynamicActivity)
RPData:SetParent(RedPointType.LingShouBaoGe, RedPointType.DynamicActivity)
-- 好友红点
RPData:SetParent(RedPointType.Friend_GetAllReward, RedPointType.Friend_Reward)
@ -418,6 +419,7 @@ function this.RegisterRedCheckFunc()
RPData:AddCheckFunc(RedPointType.DynamicActTask, OperatingManager.CheckDynamicActTaskRed)
RPData:AddCheckFunc(RedPointType.DynamicActRecharge, OperatingManager.CheckLeiJiChongZhiRedData)
RPData:AddCheckFunc(RedPointType.Celebration, DynamicActivityManager.SheJiCheckRedPoint)
RPData:AddCheckFunc(RedPointType.LingShouBaoGe, DynamicActivityManager.LingShouUpCheckRed)
RPData:AddCheckFunc(RedPointType.OrdinaryExplore, CarbonManager.CarbonRedCheck)
RPData:AddCheckFunc(RedPointType.HeroExplore, CarbonManager.CarbonRedCheck)

View File

@ -14,6 +14,7 @@ local timeNum2--第二个特效等待播放的时间
local timeNum3--第三个特效等待播放的时间
local type --抽卡类型
local index=0 --十连抽索引
local activityId--活动id
local orginLayer
local heroStaticData
@ -75,6 +76,7 @@ function PokemonSingleResultPanel:OnOpen(...)
local args = { ... }
type = args[1]
drop = args[2]
activityId = args[3]
_heroTable = drop.pokemon
end
@ -135,11 +137,24 @@ function PokemonSingleResultPanel:OnClose()
poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO)
end
heroStaticData, testLiveGO = nil, nil
if type == RecruitType.LingShowSingle then
UIManager.OpenPanel(UIName.PokemonSummonOneResultPanel, drop,type)
else
UIManager.OpenPanel(UIName.PokemonSummonTenResultPanel, drop,type)
if activityId then--限时活动抽卡
local singleRecruit
local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId)
singleRecruit = array[1]
if type == singleRecruit.Id then
UIManager.OpenPanel(UIName.LingShouBaoGeOneResultPanel, drop,type,activityId)
else
UIManager.OpenPanel(UIName.LingShouBaoGeTenResultPanel, drop,type,activityId)
end
else--灵兽山抽卡
if type == RecruitType.LingShowSingle then
UIManager.OpenPanel(UIName.PokemonSummonOneResultPanel, drop,type)
else
UIManager.OpenPanel(UIName.PokemonSummonTenResultPanel, drop,type)
end
end
_heroTable={}
drop = {}
end

View File

@ -41,7 +41,8 @@ function this.RecruitRequest(recruitType, func, privilegeId,_itemId,_itemNum)
if BagManager.GetItemCountById(itemId) >= itemNum or (this.freeUseTimeList[privilegeId] and this.freeUseTimeList[privilegeId] >= 1) then
NetManager.RecruitRequest(recruitType, function(msg)
local data = ConfigManager.GetConfigData(ConfigName.LotterySetting,recruitType)
if (RecruitType.Single == recruitType or RecruitType.NormalSingle==recruitType or (data.LotteryType == 3 and data.PerCount == 1) or(data.LotteryType == 9 and data.PerCount == 1) or RecruitType.LingShowSingle== recruitType ) then --若某抽卡类型有免费次数
if (RecruitType.Single == recruitType or RecruitType.NormalSingle==recruitType or (data.LotteryType == 3 and data.PerCount == 1) or(data.LotteryType == 9 and data.PerCount == 1) or
RecruitType.LingShowSingle== recruitType ) or (data.LotteryType == 10 and data.PerCount == 1) then --若某抽卡类型有免费次数
if this.freeUseTimeList[privilegeId] and this.freeUseTimeList[privilegeId] >= 1 then
PrivilegeManager.RefreshPrivilegeUsedTimes(privilegeId, 1)
this.freeUseTimeList[privilegeId] = PrivilegeManager.GetPrivilegeRemainValue(privilegeId)
@ -226,7 +227,8 @@ function this.GetRewardPreviewData(type)
elseif type==PRE_REWARD_POOL_TYPE.TIME_LIMITED
or type==PRE_REWARD_POOL_TYPE.TIME_LIMITED_UP
or type==PRE_REWARD_POOL_TYPE.LOTTERY_SOUL
or type==PRE_REWARD_POOL_TYPE.LOTTERY_SOUL_UP then
or type==PRE_REWARD_POOL_TYPE.LOTTERY_SOUL_UP
or type==PRE_REWARD_POOL_TYPE.LING_SHOU_UP then
return this.GetActivityPreviewData(type)
elseif type==PRE_REWARD_POOL_TYPE.LING_SHOU then
return this.previewLingShou
@ -243,6 +245,8 @@ function this.GetActivityPreviewData(type)
elseif type==PRE_REWARD_POOL_TYPE.LOTTERY_SOUL
or type==PRE_REWARD_POOL_TYPE.LOTTERY_SOUL_UP then
curActivityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.QianKunBox)
elseif type==PRE_REWARD_POOL_TYPE.LING_SHOU_UP then
curActivityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.LingShouBaoGe)
end
local data = nil
if curActivityId ~= nil then --活动招募
@ -260,6 +264,8 @@ function this.GetActivityPreviewData(type)
or type == PRE_REWARD_POOL_TYPE.LOTTERY_SOUL_UP then
data = ConfigManager.GetConfigDataByKey(ConfigName.LotterySpecialConfig,"Type",data.MergePool)
poolId = data.pool_id
elseif type == PRE_REWARD_POOL_TYPE.LING_SHOU_UP then
poolId = data.DiamondBoxContain[1][1]
end
else
LogRed("lotterySetting表里没有这个活动:"..curActivityId)