9415 【BT】【后端】古神战场(增加周榜个人数据同步)
| | |
| | | ("SubCmd", c_ubyte),
|
| | | ("BuyOpenCountToday", c_ubyte), # 今日已购买开启战场次数
|
| | | ("HighScoreToday", c_int), # 今日最高积分
|
| | | ("EnterCountWeek", c_int), # 本周总参与次数
|
| | | ("BuyOpenCountWeek", c_int), # 本周总购买召集次数
|
| | | ("HighScoreTotalWeek", c_int), # 本周每日最高分累加总分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.SubCmd = 0x07
|
| | | self.BuyOpenCountToday = 0
|
| | | self.HighScoreToday = 0
|
| | | self.EnterCountWeek = 0
|
| | | self.BuyOpenCountWeek = 0
|
| | | self.HighScoreTotalWeek = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | BuyOpenCountToday:%d,
|
| | | HighScoreToday:%d
|
| | | HighScoreToday:%d,
|
| | | EnterCountWeek:%d,
|
| | | BuyOpenCountWeek:%d,
|
| | | HighScoreTotalWeek:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.BuyOpenCountToday,
|
| | | self.HighScoreToday
|
| | | self.HighScoreToday,
|
| | | self.EnterCountWeek,
|
| | | self.BuyOpenCountWeek,
|
| | | self.HighScoreTotalWeek
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | ("SubCmd", c_ubyte),
|
| | | ("BuyOpenCountToday", c_ubyte), # 今日已购买开启战场次数
|
| | | ("HighScoreToday", c_int), # 今日最高积分
|
| | | ("EnterCountWeek", c_int), # 本周总参与次数
|
| | | ("BuyOpenCountWeek", c_int), # 本周总购买召集次数
|
| | | ("HighScoreTotalWeek", c_int), # 本周每日最高分累加总分
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.SubCmd = 0x07
|
| | | self.BuyOpenCountToday = 0
|
| | | self.HighScoreToday = 0
|
| | | self.EnterCountWeek = 0
|
| | | self.BuyOpenCountWeek = 0
|
| | | self.HighScoreTotalWeek = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | BuyOpenCountToday:%d,
|
| | | HighScoreToday:%d
|
| | | HighScoreToday:%d,
|
| | | EnterCountWeek:%d,
|
| | | BuyOpenCountWeek:%d,
|
| | | HighScoreTotalWeek:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.BuyOpenCountToday,
|
| | | self.HighScoreToday
|
| | | self.HighScoreToday,
|
| | | self.EnterCountWeek,
|
| | | self.BuyOpenCountWeek,
|
| | | self.HighScoreTotalWeek
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_EnterCountWeek, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_BuyOpenCountWeek, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_HighScoreTotalWeek, 0)
|
| | | SyncCrossBattlefieldPlayerInfo(curPlayer)
|
| | | return
|
| | |
|
| | | #// C1 09 跨服战场购买开启场次 #tagCMCrossBattlefieldBuyOpen
|
| | |
| | | todayBuyOpenCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountToday)
|
| | | updTodayBuyOpenCount = todayBuyOpenCount + 1
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_BuyOpenCountToday, updTodayBuyOpenCount)
|
| | | SyncCrossBattlefieldPlayerInfo(curPlayer)
|
| | |
|
| | | isSameWeek = GameWorld.CheckTimeIsSameWeek(buyTime)
|
| | | if isSameWeek:
|
| | | weekBuyOpenCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountWeek)
|
| | | updWeekBuyOpenCount = weekBuyOpenCount + 1
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_BuyOpenCountWeek, updWeekBuyOpenCount)
|
| | | |
| | | SyncCrossBattlefieldPlayerInfo(curPlayer)
|
| | | |
| | | GameWorld.Log("购买召集跨服战场结果: openHour=%s,openMinute=%s,faction=%s,updTodayBuyOpenCount=%s,updWeekBuyOpenCount=%s,buyTime=%s,isToday=%s,isSameWeek=%s"
|
| | | % (openHour, openMinute, faction, updTodayBuyOpenCount, updWeekBuyOpenCount, GameWorld.ChangeTimeNumToStr(buyTime), isToday, isSameWeek), playerID)
|
| | |
|
| | |
| | | PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_CrossBattlefield, addCnt)
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_HighScoreToday, highScoreToday)
|
| | | SyncCrossBattlefieldPlayerInfo(curPlayer)
|
| | |
|
| | | if isSameWeek:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_EnterCountWeek, enterCountWeek)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_Battlefield_HighScoreTotalWeek, highScoreWeekTotal)
|
| | | |
| | | SyncCrossBattlefieldPlayerInfo(curPlayer)
|
| | | |
| | | # 成就
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_Battlefield_Join, 1)
|
| | | if isCalled:
|
| | |
| | | clientPack = ChPyNetSendPack.tagMCCrossBattlefieldPlayerInfo()
|
| | | clientPack.BuyOpenCountToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountToday)
|
| | | clientPack.HighScoreToday = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_HighScoreToday)
|
| | | clientPack.EnterCountWeek = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_EnterCountWeek)
|
| | | clientPack.BuyOpenCountWeek = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_BuyOpenCountWeek)
|
| | | clientPack.HighScoreTotalWeek = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Battlefield_HighScoreTotalWeek)
|
| | | NetPackCommon.SendFakePack(curPlayer, clientPack)
|
| | | return
|
| | |
|