From 75c9a27cbaf01b12d56351390d7f91e9ae2b1c27 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 24 八月 2021 16:14:59 +0800 Subject: [PATCH] 8796 【主干】【gt_1.101.1】【后端】Part1 2、每日在线送符印寻宝20次(创角7日在线改为使用新表及新封包B113通知); --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnlinePrize.py | 33 ++++++++++++++++----------------- 1 files changed, 16 insertions(+), 17 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnlinePrize.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnlinePrize.py index bc5658c..16e5fce 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnlinePrize.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerOnlinePrize.py @@ -28,6 +28,13 @@ import time +''' +特殊说明: + 港台主干要修改为创角七日奖励,但是因为前端热更问题,前端无法使用旧表跟旧封包 A3 08 在线奖励信息 #tagMCOnlinePrize + 为了保持前后端逻辑统一,后端不再动旧表跟旧封包A308,防止修改后前端报错 + 使用新表及新封包 B1 13 在线奖励信息新 #tagMCOnlinePrizeNew +''' + #//A5 06 玩家领取在线奖励 #tagCMGetOnlinePrize # #struct tagCMGetOnlinePrize @@ -41,20 +48,12 @@ curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index) creatRoleDay = GameWorld.GetCreateRoleDays(curPlayer) prizeIndex = clientPack.Index - isDaily = 0 # 主干固定为0,非每日 - GameWorld.DebugLog("领取每日在线奖励: isDaily=%s,prizeIndex=%s" % (isDaily, prizeIndex)) + GameWorld.DebugLog("领取在线奖励: creatRoleDay=%s,prizeIndex=%s" % (creatRoleDay, prizeIndex)) if prizeIndex <= 0: GameWorld.DebugLog("prizeIndex需要从1开始,我也不想,保留原逻辑吧!!!") return - if isDaily: - dayID = 0 # 0代表每日的 - ipyData = IpyGameDataPY.GetIpyGameDataNotLog('OnlineAward', creatRoleDay) - if ipyData: - GameWorld.DebugLog("当天有创角天定制在线奖励,不能领取日常在线奖励!creatRoleDay=%s" % creatRoleDay) - return - else: - dayID = creatRoleDay - ipyData = IpyGameDataPY.GetIpyGameData('OnlineAward', dayID) + dayID = creatRoleDay + ipyData = IpyGameDataPY.GetIpyGameData('OnlineAwardNew', dayID) if not ipyData: return #先纠正一次时间 @@ -137,15 +136,15 @@ # @param None # @return None def SendOnlinePrizeInfo(curPlayer): - onlineAwardCount = IpyGameDataPY.IPY_Data().GetOnlineAwardCount() - if not onlineAwardCount: + dataCount = IpyGameDataPY.IPY_Data().GetOnlineAwardNewCount() + if not dataCount: return creatRoleDay = GameWorld.GetCreateRoleDays(curPlayer) - sendPack = ChPyNetSendPack.tagMCOnlinePrize() + sendPack = ChPyNetSendPack.tagMCOnlinePrizeNew() sendPack.Clear() sendPack.OnlineTime = GetOnlineTime(curPlayer) * 1000 sendPack.PrizeInfo = [curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_OnlinePrizeNote % creatRoleDay)] # 创角7日的与前端约定固定只发当天的 -# for i in xrange(onlineAwardCount): +# for i in xrange(dataCount): # dayID = i + 1#i+1,增加了每日支持,从0开始,代表每日 # sendPack.PrizeInfo.append(curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_OnlinePrizeNote % dayID)) sendPack.Len = len(sendPack.PrizeInfo) @@ -193,9 +192,9 @@ if creatRoleDay <= 1: return mailAwardDay = creatRoleDay - 1 - ipyData = IpyGameDataPY.GetIpyGameDataNotLog('OnlineAward', mailAwardDay) + ipyData = IpyGameDataPY.GetIpyGameDataNotLog('OnlineAwardNew', mailAwardDay) if not ipyData: - ipyData = IpyGameDataPY.GetIpyGameDataNotLog('OnlineAward', 0) + ipyData = IpyGameDataPY.GetIpyGameDataNotLog('OnlineAwardNew', 0) if not ipyData: return mailAwardDay = 0 # 昨日非定制的,且有配置0常规的,则补发0的 -- Gitblit v1.8.0