This commit is contained in:
chenxi 2023-05-08 14:39:11 +08:00
parent 1a117affae
commit eb1d1b9fbf
6 changed files with 20 additions and 17 deletions

View File

@ -143,7 +143,7 @@ function LoginManager:loginFinish(data)
data.max_chapter = DataManager.ChapterData:getNewChapterId()
-- data.ads_num = DataManager.PlayerData:getAdCount()
-- data.pay_money = DataManager.PlayerData:getPaymentCount()
data.play_days = DataManager.PlayerData:getLoginDay()
-- data.play_days = DataManager.PlayerData:getLoginDay()
data.now_version = Platform:getClientVersion()
CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data)

View File

@ -5,9 +5,13 @@ local ProtoMsgType = {
[109702075] = "PigLevelDownRsp",
[132242856] = "ChapterSettlementReq",
[132244689] = "ChapterSettlementRsp",
[147147672] = "EnergyByADReq",
[147149505] = "EnergyByADRsp",
[516281556] = "GuideFundMarkReq",
[516283389] = "GuideFundMarkRsp",
[531558517] = "PigPlayUpdateNtf",
[554454681] = "EnergyByDiamondReq",
[554456514] = "EnergyByDiamondRsp",
[565555292] = "MallPayNtf",
[565621982] = "MallPayReq",
[565623815] = "MallPayRsp",
@ -82,9 +86,13 @@ local ProtoMsgType = {
PigLevelDownRsp = 109702075,
ChapterSettlementReq = 132242856,
ChapterSettlementRsp = 132244689,
EnergyByADReq = 147147672,
EnergyByADRsp = 147149505,
GuideFundMarkReq = 516281556,
GuideFundMarkRsp = 516283389,
PigPlayUpdateNtf = 531558517,
EnergyByDiamondReq = 554454681,
EnergyByDiamondRsp = 554456514,
MallPayNtf = 565555292,
MallPayReq = 565621982,
MallPayRsp = 565623815,
@ -159,9 +167,13 @@ local ProtoMsgType = {
PigLevelDownRsp = "PigLevelDownRsp",
ChapterSettlementReq = "ChapterSettlementReq",
ChapterSettlementRsp = "ChapterSettlementRsp",
EnergyByADReq = "EnergyByADReq",
EnergyByADRsp = "EnergyByADRsp",
GuideFundMarkReq = "GuideFundMarkReq",
GuideFundMarkRsp = "GuideFundMarkRsp",
PigPlayUpdateNtf = "PigPlayUpdateNtf",
EnergyByDiamondReq = "EnergyByDiamondReq",
EnergyByDiamondRsp = "EnergyByDiamondRsp",
MallPayNtf = "MallPayNtf",
MallPayReq = "MallPayReq",
MallPayRsp = "MallPayRsp",

View File

@ -1,7 +1,5 @@
local BagData = class("BagData", BaseData)
local ItemConst = require "app/module/item/item_const"
BagData.RECOVERY_TYPE = {
TIMELY = 1,
DAILY = 2,

View File

@ -44,7 +44,7 @@ function ItemData:init(data)
if recoveryInfo then
local obj = {
id = v.id,
ts = v.ts,
ts = v.ts // 1000,
limit = recoveryInfo.limit,
recoveryType = recoveryInfo.type,
time = recoveryInfo.time

View File

@ -3,15 +3,13 @@ local FormationData = class("FormationData", BaseData)
function FormationData:init(data)
self.data.dirty = false
self.formations = {}
-- 目前只有主线关卡的
if data and data.heroes then
-- for formationType, formation in pairs(data.heroes) do
local clientFormation = {}
-- self.formations[formationType] = clientFormation
self.formations[GConst.BattleConst.BATTLE_TYPE.STAGE] = clientFormation -- 暂时写死
for matchType, heroId in pairs(data.heroes) do
clientFormation[matchType] = heroId
end
-- end
local clientFormation = {}
for matchType, heroId in pairs(data.heroes) do
clientFormation[tonumber(matchType)] = heroId
end
self.formations[GConst.BattleConst.BATTLE_TYPE.STAGE] = clientFormation
end
end

View File

@ -6,7 +6,6 @@ function PlayerData:init(data)
self.data.exp = data.exp or 0
self.data.dirty = false
self.data.payAmount = data.pay_amount or 0
self.loginDay = data.loginDay or 1
self.lastLoginTime = data.lastLoginTime or Time:getBeginningOfServerToday()
end
@ -33,8 +32,4 @@ function PlayerData:getExpPercent()
return 0
end
function PlayerData:getLoginDay()
return self.loginDay
end
return PlayerData