Merge branch '0活动开发聚集地/挚礼月卡' into china/dev

dev_chengFeng
gaoxin 2021-10-20 16:36:56 +08:00
commit 09ca5f98ad
29 changed files with 2231 additions and 564 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -92,6 +92,17 @@ TextureImporter:
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:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 689 KiB

After

Width:  |  Height:  |  Size: 788 KiB

View File

@ -1,7 +1,8 @@
fileFormatVersion: 2
guid: ead6197c344dc04418f198ed41813deb
TextureImporter:
fileIDToRecycleName: {}
fileIDToRecycleName:
21300000: y_yueka_di002
externalObjects: {}
serializedVersion: 9
mipmaps:
@ -91,9 +92,40 @@ TextureImporter:
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: []
sprites:
- serializedVersion: 2
name: y_yueka_di002
rect:
serializedVersion: 2
x: 0
y: 0
width: 1074
height: 769
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 4e7adab9bdc20c744bbb9c9be4b39d91
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []

Binary file not shown.

Before

Width:  |  Height:  |  Size: 635 KiB

After

Width:  |  Height:  |  Size: 738 KiB

View File

@ -1,7 +1,8 @@
fileFormatVersion: 2
guid: d67fb557ed2e5484fa76b2fa3a2a04e5
TextureImporter:
fileIDToRecycleName: {}
fileIDToRecycleName:
21300000: y_yueka_di003
externalObjects: {}
serializedVersion: 9
mipmaps:
@ -91,9 +92,40 @@ TextureImporter:
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: []
sprites:
- serializedVersion: 2
name: y_yueka_di003
rect:
serializedVersion: 2
x: 0
y: 0
width: 1069
height: 769
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: cdb1b71c9b3399f418ba269e9574cc86
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 KiB

View File

@ -0,0 +1,142 @@
fileFormatVersion: 2
guid: c1045d273092d4548a92081001de6976
TextureImporter:
fileIDToRecycleName:
21300000: y_yueka_di004
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 65
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 57
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
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:
- serializedVersion: 2
name: y_yueka_di004
rect:
serializedVersion: 2
x: 0
y: 0
width: 1069
height: 770
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: e43c126eb43ea914c9a6d7a76a89d932
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
spriteID: f81d7a6a892a7e747a77131b66810021
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -1,7 +1,8 @@
fileFormatVersion: 2
guid: 341f249142521b146aa4593bf99a529c
TextureImporter:
fileIDToRecycleName: {}
fileIDToRecycleName:
21300000: l_yueka_haohuayueka_zh
externalObjects: {}
serializedVersion: 9
mipmaps:
@ -104,7 +105,27 @@ TextureImporter:
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
sprites:
- serializedVersion: 2
name: l_yueka_haohuayueka_zh
rect:
serializedVersion: 2
x: 0
y: 0
width: 144
height: 275
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 70d53c973a9067f4cac86100018f4d84
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -1,7 +1,8 @@
fileFormatVersion: 2
guid: 5845f9e560a422e4584d26c308590fd4
TextureImporter:
fileIDToRecycleName: {}
fileIDToRecycleName:
21300000: l_yueka_putongyueka_zh
externalObjects: {}
serializedVersion: 9
mipmaps:
@ -104,7 +105,27 @@ TextureImporter:
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
sprites:
- serializedVersion: 2
name: l_yueka_putongyueka_zh
rect:
serializedVersion: 2
x: 0
y: 0
width: 143
height: 274
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 7167238810e1ef84386e52b51177aab9
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -0,0 +1,142 @@
fileFormatVersion: 2
guid: d5fdd180ac1f70a4b89002cbad4630e0
TextureImporter:
fileIDToRecycleName:
21300000: l_yueka_zhiliyueka_zh
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 65
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 57
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
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:
- serializedVersion: 2
name: l_yueka_zhiliyueka_zh
rect:
serializedVersion: 2
x: 0
y: 0
width: 144
height: 274
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 437d5e8194e5d1540969339854e232a2
vertices: []
indices:
edges: []
weights: []
outline: []
physicsShape: []
bones: []
spriteID: 1ba959062a9bcbf40a863707536a08c5
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2475,6 +2475,7 @@ DirectBuyType = {
MONTH_CARD_TYPE = {
MONTHCARD = 1,
LUXURYMONTHCARD = 2,
GIFT = 3,
}
--战力类型
WarPowerTypeAllNum = 3--战力类型总数量 下边结构加一种类型 此数值 + 1

View File

@ -307,7 +307,7 @@ function this.RefreshUpdateIndication(buffer)
ActivityGiftManager.isFirstForSupremeHero=false
BindPhoneNumberManager.InitBindInfo(msg.playerBindPhone)
LuckyTurnTableManager.ReceiveServerDataForFive(msg.posInfos,msg.posInfosAdvance)
OperatingManager.BackSetMonthCardGetStateData(msg.MonthDailyTake)
MonthCardManager.BackSetMonthCardGetStateData(msg.MonthDailyTake)
MyGuildManager.SetMyFeteInfo_FiveRefresh(msg)
MyGuildManager.SetGuildHelpInfo_FiveRefresh(msg)
-- CarbonManager.dailyChallengeInfo=msg.dailyChallengeInfo
@ -843,7 +843,7 @@ function this.RefreshAccuMoneyNum(buffer)
local msg=PlayerInfoProto_pb.RefreshRechargeIndication()
msg:ParseFromString(data)
VipManager.RefreshChargeMoney(msg.amount, false)
OperatingManager.RefreshMonthCardChargeMoney(msg)
MonthCardManager.RefreshMonthCardChargeMoney(msg)
end
-- 巅峰战阶段更新
@ -901,7 +901,7 @@ function this.RefreshMonthCardData(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.MonthCardIndication()
msg:ParseFromString(data)
OperatingManager.UpdateMonthCardData(msg)
MonthCardManager.UpdateMonthCardData(msg)
end
function this.RefreshGuildCarDelayProgressData(buffer)
local data = buffer:DataByte()

View File

@ -201,7 +201,7 @@ function this.PlayerInfoRequest(func)
OperatingManager.SetSignInData(msg.SignInInfo)
--月卡初始化数据
OperatingManager.InitMonthCardData(msg.monthinfos)
MonthCardManager.InitMonthCardData(msg.monthinfos)
--每日副本数据
CarbonManager.dailyChallengeInfo=msg.dailyChallengeInfo

View File

@ -63,8 +63,10 @@ end
function this.UpdateStatus()
local temp = TaskManager.GetTypeTaskList(TaskTypeDef.NiuQiChongTian)
for k,v in pairs(this.rewardData) do
v.state = temp[v.id].state
v.progress = temp[v.id].progress
if temp[v.id] then
v.state = temp[v.id].state
v.progress = temp[v.id].progress
end
end
CheckRedPointStatus(RedPointType.NiuQiChongTian_1)
CheckRedPointStatus(RedPointType.NiuQiChongTian_2)

View File

@ -210,7 +210,7 @@ function GrowthGiftPage:RequestBuy()
local giftGoodsInfo = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.GrowthReward, self.curGiftsId)
PayManager.Pay(giftGoodsInfo.goodsId, function(id)
-- 检测月卡激活是否需要拍脸
OperatingManager.CheckMonthCardPatFace()
MonthCardManager.CheckMonthCardPatFace()
self:RefreshStatus()
end)
end

View File

@ -0,0 +1,172 @@
MonthCardManager = {}
local this = MonthCardManager
--初始化月卡数据
local monthCardData = {}
function this.InitMonthCardData(data)
monthCardData = {}
--LogError("月卡信息初始化 "..#data)
for i = 1, #data do
--LogError("月卡信息初始化 "..data[i].id.." "..data[i].endingTime.." "..data[i].state)
local singleMonthCard = {}
singleMonthCard.id = data[i].id
singleMonthCard.endingTime = data[i].endingTime
singleMonthCard.state = data[i].state
singleMonthCard.totleAmt = data[i].totleAmt
-- LogError("月卡信息初始化 "..i.." 月卡累计充值 "..data[i].totleAmt)
table.insert(monthCardData,singleMonthCard)
end
CheckRedPointStatus(RedPointType.MonthCard)
end
--推送更新月卡数据
function this.UpdateMonthCardData(msg)
--LogError("月卡信息推送 "..#msg.monthinfos)
--当我数据没有 后端推过来的有数据 此时需要弹窗
this.showStr = ""
for i = 1, #msg.monthinfos do
if monthCardData[i].endingTime <= 0 then
this.showStr = Language[11384]
end
end
monthCardData = {}
local _CurActive = {}
for i = 1, #msg.monthinfos do
--LogError("月卡信息推送 "..msg.monthinfos[i].id.." "..msg.monthinfos[i].endingTime.." "..msg.monthinfos[i].state)
local singleMonthCard = {}
singleMonthCard.id = msg.monthinfos[i].id
singleMonthCard.endingTime = msg.monthinfos[i].endingTime
singleMonthCard.state = msg.monthinfos[i].state--0 未领取 1 已领取
singleMonthCard.totleAmt = msg.monthinfos[i].totleAmt
_CurActive[i] = true
table.insert(monthCardData,singleMonthCard)
end
-- 检测红点
CheckRedPointStatus(RedPointType.MonthCard)
-- 判断是否需要发送埋点数据
if this.showStr ~= "" then
if ActTimeCtrlManager.SingleFuncState(JumpType.Welfare) then
if _CurActive[MONTH_CARD_TYPE.MONTHCARD] then
--发送埋点数据
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.FirstBuyMonthCard,0)
end
if _CurActive[MONTH_CARD_TYPE.LUXURYMONTHCARD] then
--发送埋点数据
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.FirstBuyHeightMonthCard,0)
end
end
end
end
-- 检测月卡激活提示是否需要拍脸
function this.CheckMonthCardPatFace()
if this.showStr and this.showStr ~= "" then
MsgPanel.ShowTwo(this.showStr, function()
JumpManager.GoJump(36004)
end,
function()
UIManager.ClosePanel()
end,Language[10586],Language[11385])
-- 拍过后不再提示
this.showStr = ""
return true
end
end
function this.RefreshMonthCardChargeMoney(msg)
-- LogError("月卡金额信息推送 "..msg.monthSaveAmt.." "..msg.smonthSaveAmt)
monthCardData[MONTH_CARD_TYPE.MONTHCARD].totleAmt = msg.monthSaveAmt--月卡累计总额
monthCardData[MONTH_CARD_TYPE.LUXURYMONTHCARD].totleAmt = msg.smonthSaveAmt--豪华月卡累计总额
-- monthCardData[MONTH_CARD_TYPE.GIFT].totleAmt = msg.smonthSaveAmt--挚礼月卡累计总额
end
-- 月卡累计总额
function this.GetmonthSaveAmt(index)
if monthCardData[index] and monthCardData[index].totleAmt then
return monthCardData[index].totleAmt
end
return 0
end
-- 豪华月卡累计总额
function this.GetsmonthSaveAmt()
return smonthSaveAmt
end
--前端设置月卡领取状态数据
function this.SetMonthCardGetStateData(type,state)
if monthCardData[type] then
monthCardData[type].state = state--0 未领取 1 已领取
end
CheckRedPointStatus(RedPointType.MonthCard)
end
--后端设置月卡领取状态数据 datas已领取的月卡id 五点刷新
function this.BackSetMonthCardGetStateData(datas)
for i = 1, #monthCardData do
if monthCardData[i] then--0 未领取 1 已领取
if datas[i] then
monthCardData[i].state = 1
else
monthCardData[i].state = 0
end
end
end
--事件
CheckRedPointStatus(RedPointType.MonthCard)
Game.GlobalEvent:DispatchEvent(GameEvent.MonthCard.OnMonthCardUpdate)
end
--获取月卡数据
function this.GetMonthCardData()
if monthCardData then
return monthCardData
else
return nil
end
end
function this.IsMonthCardActive()
local curAllMonthCardData = this.GetMonthCardData()
local curMonthCardOpenState = curAllMonthCardData[MONTH_CARD_TYPE.MONTHCARD] and curAllMonthCardData[MONTH_CARD_TYPE.MONTHCARD].endingTime ~= 0
local curLuxuryMonthCardOpenState = curAllMonthCardData[MONTH_CARD_TYPE.LUXURYMONTHCARD] and curAllMonthCardData[MONTH_CARD_TYPE.LUXURYMONTHCARD].endingTime ~= 0
local isMonthCardActive = curLuxuryMonthCardOpenState
return isMonthCardActive
end
--月卡到期
local addTimeNum = 30 * 24 * 60 * 60
function this.RefreshMonthCardEnd()
for i = 1, #monthCardData do
if monthCardData[i] and monthCardData[i].endingTime > 0 then--0 未领取 1 已领取
local dayLuxuryNum = math.floor((monthCardData[i].endingTime + addTimeNum - GetTimeStamp()) / (24 * 3600))
if dayLuxuryNum < 0 then
monthCardData[i].endingTime = 0
monthCardData[i].state = 0 --0 未领取 1 已领取
monthCardData[i].totleAmt = 0
end
end
end
CheckRedPointStatus(RedPointType.MonthCard)
end
--单种月卡红点检测
function this.RefreshMonthCardRedPoint(type)
if monthCardData[type] then
if monthCardData[type].endingTime ~= 0 and monthCardData[type].state == 0 then
return true
end
end
return false
end
--所有月卡红点检测
function this.AllRefreshMonthCardRedPoint()
for i = 1, #monthCardData do
if monthCardData[i].endingTime ~= 0 and monthCardData[i].state == 0 then
return true
end
end
return false
end
--所有月卡激活状态
function this.GetMonthCardIsOpen(type)
if monthCardData[type] then
if monthCardData[type].endingTime ~= 0 then
return true
end
end
return false
end

View File

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

View File

@ -2,7 +2,8 @@
local MonthCardPage = {}
local cardData = {
[1] = { curState = 0 ,cardType = MONTH_CARD_TYPE.MONTHCARD},
[2] = { curState = 0 ,cardType = MONTH_CARD_TYPE.LUXURYMONTHCARD}
[2] = { curState = 0 ,cardType = MONTH_CARD_TYPE.LUXURYMONTHCARD},
[3] = { curState = 0 ,cardType = MONTH_CARD_TYPE.GIFT}
}
local sortingOrder = 0
local addTimeNum = 30 * 24 * 60 * 60
@ -39,7 +40,7 @@ function MonthCardPage:InitComponent()
self.cardPres[i].icon = Util.GetGameObject(self.cardPres[i].go, "day/icon"):GetComponent("Image")
self.cardPres[i].dayRightUpText = Util.GetGameObject(self.cardPres[i].go, "Image/Text"):GetComponent("Text")
self.cardPres[i].dayRightUpIcon = Util.GetGameObject(self.cardPres[i].go, "Image/icon"):GetComponent("Image")
Util.GetGameObject(self.cardPres[i].go, "day/icon"):GetComponent("RectTransform").anchoredPosition = offSetX[GetCurLanguage()]
-- Util.GetGameObject(self.cardPres[i].go, "day/icon"):GetComponent("RectTransform").anchoredPosition = offSetX[GetCurLanguage()]
end
end
@ -52,8 +53,8 @@ function MonthCardPage:BindEvent()
else
if self.curAllMonthCardData[cardData[i].cardType].state == 0 then
NetManager.MonthCardTakeDailyRequest(cardData[i].cardType, function(drop)
OperatingManager.SetMonthCardGetStateData(cardData[i].cardType,1)
self.curAllMonthCardData = OperatingManager.GetMonthCardData()
MonthCardManager.SetMonthCardGetStateData(cardData[i].cardType,1)
self.curAllMonthCardData = MonthCardManager.GetMonthCardData()
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function()
self:SetCardShow(i)
end)
@ -89,13 +90,13 @@ function MonthCardPage:OnShow(_sortingOrder)
self.gameObject:SetActive(true)
sortingOrder = _sortingOrder
OperatingManager.RefreshMonthCardEnd()
MonthCardManager.RefreshMonthCardEnd()
self:RefreshStoneShow()
end
-- 妖晶数量显示
function MonthCardPage:RefreshStoneShow(index)
self.curAllMonthCardData = OperatingManager.GetMonthCardData()
self.curAllMonthCardData = MonthCardManager.GetMonthCardData()
--月卡
for i = 1, #self.cardPres do
self:SetCardShow(i)
@ -108,10 +109,10 @@ function MonthCardPage:SetCardShow(i)
self.cardPres[i].day2.text = Language[11380]..monthCardConFig[cardData[i].cardType].BaseReward[1][2] .."</color>"
self.cardPres[i].icon.sprite = self.spLoader:LoadSprite(GetResourcePath(ConfigManager.GetConfigData(ConfigName.ItemConfig,monthCardConFig[cardData[i].cardType].BaseReward[1][1]).ResourceID))
self.cardPres[i].progress:SetActive(not cardData[i].curState)
self.cardPres[i].progress:GetComponent("Text").text = "("..OperatingManager.GetmonthSaveAmt(i).."/"..monthCardConFig[cardData[i].cardType].Price..")"
self.cardPres[i].progress:GetComponent("Text").text = "("..MonthCardManager.GetmonthSaveAmt(i).."/"..monthCardConFig[cardData[i].cardType].Price..")"
self.cardPres[i].dayRightUpText = monthCardConFig[cardData[i].cardType].ContiueDays * monthCardConFig[cardData[i].cardType].BaseReward[1][2]
self.cardPres[i].dayRightUpIcon = SetIcon(self.spLoader, monthCardConFig[cardData[i].cardType].BaseReward[1][1])
self.cardPres[i].monthRedPot:SetActive(OperatingManager.RefreshMonthCardRedPoint(cardData[i].cardType))
self.cardPres[i].monthRedPot:SetActive(MonthCardManager.RefreshMonthCardRedPoint(cardData[i].cardType))
self.cardPres[i].btnText = Language[11381]
if not cardData[i].curState then
self.cardPres[i].time:SetActive(false)
@ -136,6 +137,11 @@ function MonthCardPage:SetCardShow(i)
Util.GetGameObject(self.cardPres[i].month, "Text"):GetComponent("Text").text = Language[10101]
end
end
-- 物品点击显示详情
Util.AddOnceClick(self.cardPres[i].icon.gameObject, function()
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, monthCardConFig[cardData[i].cardType].BaseReward[1][1],nil,true)
end)
end
function MonthCardPage:SetMonthCardTimes(timeNums,timeCom,index)
@ -147,8 +153,8 @@ function MonthCardPage:SetMonthCardTimes(timeNums,timeCom,index)
self.timerList[index] = Timer.New(function()
timeCom:GetComponent("Text").text = Language[10023]..TimeStampToDateStr3(timeNums)
if timeNums < 0 then
OperatingManager.RefreshMonthCardEnd()
self.curAllMonthCardData = OperatingManager.GetMonthCardData()
MonthCardManager.RefreshMonthCardEnd()
self.curAllMonthCardData = MonthCardManager.GetMonthCardData()
self:SetCardShow(index)
self.timerList[index]:Stop()
self.timerList[index] = nil

View File

@ -5,6 +5,7 @@
* @Author MagicianJoker, fengliudianshao@outlook.com
* @Copyright Copyright (c) 2019, MagicianJoker
--]]
require("Modules.Operating.MonthCardManager")
OperatingManager = {}
local this = OperatingManager
@ -593,191 +594,6 @@ function this.GetShowTime(endTime)
end
--月卡开始
--初始化月卡数据
local monthSaveAmt = 0--月卡累计总额
local smonthSaveAmt = 0--豪华月卡累计总额
local monthCardData = {}
function this.InitMonthCardData(data)
monthCardData = {}
--LogError("月卡信息初始化 "..#data)
for i = 1, #data do
--LogError("月卡信息初始化 "..data[i].id.." "..data[i].endingTime.." "..data[i].state)
local singleMonthCard = {}
singleMonthCard.id = data[i].id
singleMonthCard.endingTime = data[i].endingTime
singleMonthCard.state = data[i].state
if i == MONTH_CARD_TYPE.MONTHCARD then
--LogError("月卡信息初始化 月卡累计充值 "..data[i].totleAmt)
monthSaveAmt = data[i].totleAmt
elseif i == MONTH_CARD_TYPE.LUXURYMONTHCARD then
--LogError("月卡信息初始化 豪华月卡累计充值 "..data[i].totleAmt)
smonthSaveAmt = data[i].totleAmt
end
table.insert(monthCardData,singleMonthCard)
end
CheckRedPointStatus(RedPointType.MonthCard)
end
--推送更新月卡数据
function this.UpdateMonthCardData(msg)
--LogError("月卡信息推送 "..#msg.monthinfos)
--当我数据没有 后端推过来的有数据 此时需要弹窗
this.showStr = ""
for i = 1, #msg.monthinfos do
if monthCardData[i].endingTime <= 0 then
this.showStr = Language[11384]
end
end
monthCardData = {}
local curActiveMONTHCARD = false
local curActiveLUXURYMONTHCARD = false
for i = 1, #msg.monthinfos do
--LogError("月卡信息推送 "..msg.monthinfos[i].id.." "..msg.monthinfos[i].endingTime.." "..msg.monthinfos[i].state)
local singleMonthCard = {}
singleMonthCard.id = msg.monthinfos[i].id
singleMonthCard.endingTime = msg.monthinfos[i].endingTime
singleMonthCard.state = msg.monthinfos[i].state--0 未领取 1 已领取
if i == MONTH_CARD_TYPE.MONTHCARD then
monthSaveAmt = msg.monthinfos[i].totleAmt
curActiveMONTHCARD = true
elseif i == MONTH_CARD_TYPE.LUXURYMONTHCARD then
smonthSaveAmt = msg.monthinfos[i].totleAmt
curActiveLUXURYMONTHCARD = true
end
table.insert(monthCardData,singleMonthCard)
end
CheckRedPointStatus(RedPointType.MonthCard)
if this.showStr ~= "" then
if ActTimeCtrlManager.SingleFuncState(JumpType.Welfare) then
if curActiveMONTHCARD then
--发送埋点数据
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.FirstBuyMonthCard,0)
end
if curActiveLUXURYMONTHCARD then
--发送埋点数据
CustomEventManager.SendCustomEvents(FBSDKCustomEventType.FirstBuyHeightMonthCard,0)
end
end
end
end
-- 检测月卡激活提示是否需要拍脸
function this.CheckMonthCardPatFace()
if this.showStr and this.showStr ~= "" then
MsgPanel.ShowTwo(this.showStr, function()
JumpManager.GoJump(36004)
end,
function()
UIManager.ClosePanel()
end,Language[10586],Language[11385])
-- 拍过后不再提示
this.showStr = ""
return true
end
end
function this.RefreshMonthCardChargeMoney(msg)
-- LogError("月卡金额信息推送 "..msg.monthSaveAmt.." "..msg.smonthSaveAmt)
monthSaveAmt = msg.monthSaveAmt--月卡累计总额
smonthSaveAmt = msg.smonthSaveAmt--豪华月卡累计总额
end
-- 月卡累计总额
function this.GetmonthSaveAmt(index)
if index == MONTH_CARD_TYPE.MONTHCARD then
return monthSaveAmt
else
return smonthSaveAmt
end
end
-- 豪华月卡累计总额
function this.GetsmonthSaveAmt()
return smonthSaveAmt
end
--前端设置月卡领取状态数据
function this.SetMonthCardGetStateData(type,state)
if monthCardData[type] then
monthCardData[type].state = state--0 未领取 1 已领取
end
CheckRedPointStatus(RedPointType.MonthCard)
end
--后端设置月卡领取状态数据 datas已领取的月卡id 五点刷新
function this.BackSetMonthCardGetStateData(datas)
for i = 1, #monthCardData do
if monthCardData[i] then--0 未领取 1 已领取
if datas[i] then
monthCardData[i].state = 1
else
monthCardData[i].state = 0
end
end
end
--事件
CheckRedPointStatus(RedPointType.MonthCard)
Game.GlobalEvent:DispatchEvent(GameEvent.MonthCard.OnMonthCardUpdate)
end
--获取月卡数据
function this.GetMonthCardData()
if monthCardData then
return monthCardData
else
return nil
end
end
function this.IsMonthCardActive()
local curAllMonthCardData = this.GetMonthCardData()
local curMonthCardOpenState = curAllMonthCardData[MONTH_CARD_TYPE.MONTHCARD] and curAllMonthCardData[MONTH_CARD_TYPE.MONTHCARD].endingTime ~= 0
local curLuxuryMonthCardOpenState = curAllMonthCardData[MONTH_CARD_TYPE.LUXURYMONTHCARD] and curAllMonthCardData[MONTH_CARD_TYPE.LUXURYMONTHCARD].endingTime ~= 0
local isMonthCardActive = curLuxuryMonthCardOpenState
return isMonthCardActive
end
--月卡到期
local addTimeNum = 30 * 24 * 60 * 60
function this.RefreshMonthCardEnd()
for i = 1, #monthCardData do
if monthCardData[i] and monthCardData[i].endingTime > 0 then--0 未领取 1 已领取
local dayLuxuryNum = math.floor((monthCardData[i].endingTime + addTimeNum - GetTimeStamp()) / (24 * 3600))
if dayLuxuryNum < 0 then
monthCardData[i].endingTime = 0
monthCardData[i].state = 0--0 未领取 1 已领取
if i == MONTH_CARD_TYPE.MONTHCARD then
monthSaveAmt = 0--月卡累计总额
else
smonthSaveAmt = 0--豪华月卡累计总额
end
end
end
end
CheckRedPointStatus(RedPointType.MonthCard)
end
--单种月卡红点检测
function this.RefreshMonthCardRedPoint(type)
if monthCardData[type] then
if monthCardData[type].endingTime ~= 0 and monthCardData[type].state == 0 then
return true
end
end
return false
end
--所有月卡红点检测
function this.AllRefreshMonthCardRedPoint()
for i = 1, #monthCardData do
if monthCardData[i].endingTime ~= 0 and monthCardData[i].state == 0 then
return true
end
end
return false
end
--所有月卡激活状态
function this.GetMonthCardIsOpen(type)
if monthCardData[type] then
if monthCardData[type].endingTime ~= 0 then
return true
end
end
return false
end
--月卡结束
--礼包抢购是否开启
function this.IsGiftBuyActive()
local activeNum = 0

View File

@ -406,7 +406,7 @@ function this.RegisterRedCheckFunc()
RPData:AddCheckFunc(RedPointType.Setting_Title,PlayerManager.GetPlayerTitleRedPoint)
--月卡
--24暂时关闭放开这里就行
RPData:AddCheckFunc(RedPointType.MonthCard,OperatingManager.AllRefreshMonthCardRedPoint)
RPData:AddCheckFunc(RedPointType.MonthCard,MonthCardManager.AllRefreshMonthCardRedPoint)
--连续充值
RPData:AddCheckFunc(RedPointType.ContinuityRecharge,ActivityGiftManager.GetContinuityRechargeRedPoint)
-- 头像红点

View File

@ -571,7 +571,7 @@ function RewardItemPopup:RedCheckFuns()
--检测是否需要弹每日任务飘窗
TaskManager.RefreshShowDailyMissionTipPanel()
-- 检测月卡激活是否需要拍脸
OperatingManager.CheckMonthCardPatFace()
MonthCardManager.CheckMonthCardPatFace()
--寻宝迷踪红点检测
CheckRedPointStatus(RedPointType.XunBaoMiZong)
end

View File

@ -277,7 +277,7 @@ function this.GetMonthCardOpenState()
--else
-- isActive = false
--end
local curAllMonthCardData = OperatingManager.GetMonthCardData()
local curAllMonthCardData = MonthCardManager.GetMonthCardData()
isActive = curAllMonthCardData[MONTH_CARD_TYPE.LUXURYMONTHCARD] and curAllMonthCardData[MONTH_CARD_TYPE.LUXURYMONTHCARD].endingTime ~= 0
return isActive
end

View File

@ -283,7 +283,7 @@ end
-- 点击领取按钮
function VipPanel:BtnRewardClick()
-- 豪华月卡的激活状态
local isActive = OperatingManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.LUXURYMONTHCARD)--VipManager.GetMonthCardOpenState()
local isActive = MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.LUXURYMONTHCARD)--VipManager.GetMonthCardOpenState()
local getState = VipManager.GetRewardState()
if not isActive then
JumpManager.GoJump(36004)
@ -307,7 +307,7 @@ end
-- 设置领取按钮显示状态
function VipPanel:RefreshBtnState()
local isActive = OperatingManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.LUXURYMONTHCARD)--VipManager.GetMonthCardOpenState()
local isActive = MonthCardManager.GetMonthCardIsOpen(MONTH_CARD_TYPE.LUXURYMONTHCARD)--VipManager.GetMonthCardOpenState()
Log("豪华月卡是否激活 -- " .. tostring(isActive))
local getState = VipManager.GetRewardState()
local str = ""