9905 【BT0.1】【主干】新增每周、每月限购
# Conflicts:
# PySysDB/PySysDBPY.h
# ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
# ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
| | |
| | | ("RecordID", c_ubyte),
|
| | | ("TodayPayCount", c_ushort), # 今日已购买次数
|
| | | ("TotalPayCount", c_int), # 累计总购买次数
|
| | | ("WeekPayCount", c_ushort), # 周总购买次数
|
| | | ("MonthPayCount", c_ushort), # 月总购买次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.RecordID = 0
|
| | | self.TodayPayCount = 0
|
| | | self.TotalPayCount = 0
|
| | | self.WeekPayCount = 0
|
| | | self.MonthPayCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | DumpString = '''// A1 10 充值购买次数信息 //tagMCCoinToGoldCountInfo:
|
| | | RecordID:%d,
|
| | | TodayPayCount:%d,
|
| | | TotalPayCount:%d
|
| | | TotalPayCount:%d,
|
| | | WeekPayCount:%d,
|
| | | MonthPayCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.RecordID,
|
| | | self.TodayPayCount,
|
| | | self.TotalPayCount
|
| | | self.TotalPayCount,
|
| | | self.WeekPayCount,
|
| | | self.MonthPayCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | Def_PDict_CTGRealFirstTime = "CTGRealFirstTime" # 首次真实货币充值时间戳
|
| | | Def_PDict_TodayCTGCoinTotal = "TodayCTGCoinTotal" # 当日充值Coin数
|
| | | Def_PDict_TodayCTGCount = "TodayCTGCount_%s" # 当日充值次数,参数(CTG对应的商品记录ID)
|
| | | Def_PDict_WeekCTGCount = "WeekCTGCount_%s" # 本周充值次数,参数(CTG对应的商品记录ID)
|
| | | Def_PDict_MonthCTGCount = "MonthCTGCount_%s" # 本月充值次数,参数(CTG对应的商品记录ID)
|
| | | Def_PDict_CTGGoodsBuyCount = "CTGGoodsBuyCount_%s" # 对应充值商品已购买次数,参数(CTG对应的商品记录ID)
|
| | | Def_PDict_OnlineRechargeTHAward = "OnlineRechargeTHAward" # 在线特惠充值额外奖励 - 是否已领取奖励
|
| | | Def_PDict_DayFreeGoldGiftState = "DayFreeGoldGiftState" # 每日免费直购礼包领取记录
|
| | |
| | | ("RecordID", c_ubyte),
|
| | | ("TodayPayCount", c_ushort), # 今日已购买次数
|
| | | ("TotalPayCount", c_int), # 累计总购买次数
|
| | | ("WeekPayCount", c_ushort), # 周总购买次数
|
| | | ("MonthPayCount", c_ushort), # 月总购买次数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.RecordID = 0
|
| | | self.TodayPayCount = 0
|
| | | self.TotalPayCount = 0
|
| | | self.WeekPayCount = 0
|
| | | self.MonthPayCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | DumpString = '''// A1 10 充值购买次数信息 //tagMCCoinToGoldCountInfo:
|
| | | RecordID:%d,
|
| | | TodayPayCount:%d,
|
| | | TotalPayCount:%d
|
| | | TotalPayCount:%d,
|
| | | WeekPayCount:%d,
|
| | | MonthPayCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.RecordID,
|
| | | self.TodayPayCount,
|
| | | self.TotalPayCount
|
| | | self.TotalPayCount,
|
| | | self.WeekPayCount,
|
| | | self.MonthPayCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | recordID = ipyData.GetRecordID()
|
| | | totalBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGGoodsBuyCount % recordID)
|
| | | todayBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCount % recordID)
|
| | | if not totalBuyCount and not todayBuyCount:
|
| | | weekBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_WeekCTGCount % recordID)
|
| | | monthBuyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_MonthCTGCount % recordID)
|
| | | if not totalBuyCount and not todayBuyCount and not weekBuyCount and not monthBuyCount:
|
| | | continue
|
| | | syncRecordIDList.append(recordID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CTGGoodsBuyCount % recordID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCount % recordID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_WeekCTGCount % recordID, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_MonthCTGCount % recordID, 0)
|
| | | if syncRecordIDList:
|
| | | PlayerCoin.Sync_CoinToGoldCountInfo(curPlayer, syncRecordIDList)
|
| | |
|
| | |
| | | #需要在一周到来的时候重置玩家数据的操作都可以放到函数里面
|
| | | ResetPlayerWeekData(curPlayer)
|
| | |
|
| | | PlayerCoin.OnWeek(curPlayer)
|
| | | |
| | | #计算这一周的在线时间
|
| | | CalcWeekOnlineTime(curPlayer)
|
| | |
|
| | |
| | | return
|
| | |
|
| | | if onEventType == ShareDefine.Def_OnEventType:
|
| | | pass
|
| | | PlayerCoin.OnMonth(curPlayer)
|
| | | #签到
|
| | | #PlayerSignDay.SignDayOnMonth(curPlayer)
|
| | |
|