From 9af0249fece9b00490c758a2438a4be0744de59c Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 25 二月 2021 14:37:08 +0800 Subject: [PATCH] 8716 【主干】【后端】【BT2】H.活动-节日祈愿(节日登录修改为连续登录领奖模式); --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastLogin.py | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastLogin.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastLogin.py index fbcc757..7a47dba 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastLogin.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFeastLogin.py @@ -80,11 +80,15 @@ ## 设置某一天已登录,可领奖 dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0) loginState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastLoginState) - if loginState & pow(2, dayIndex): + loginCount, lastRecordDay = loginState / 10, loginState % 10 + curDay = dayIndex + 1 + if lastRecordDay >= curDay: + GameWorld.DebugLog(" 节日登录未达记录录登天或已记录登录! dayIndex=%s,loginState=%s,lastRecordDay(%s) >= curDay(%s)" % (dayIndex, loginState, lastRecordDay, curDay)) return - updLoginState = loginState | pow(2, dayIndex) + loginCount += 1 + updLoginState = loginCount * 10 + curDay PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FeastLoginState, updLoginState) - GameWorld.DebugLog(" 节日登录设置天登录: dayIndex=%s,loginState=%s,updLoginState=%s" % (dayIndex, loginState, updLoginState)) + GameWorld.DebugLog(" 节日登录设置天登录: dayIndex=%s,loginState=%s,updLoginState=%s,loginCount=%s" % (dayIndex, loginState, updLoginState, loginCount)) return True def GetFeastLoginAward(curPlayer, dayNum): @@ -125,8 +129,9 @@ awardIndex = dayNum - 1 loginState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastLoginState) - if not loginState & pow(2, awardIndex): - GameWorld.DebugLog("节日登录活动该天未登录,无法领奖!dayNum=%s,awardIndex=%s,loginState=%s" % (dayNum, awardIndex, loginState)) + loginCount = loginState / 10 + if dayNum > loginCount: + GameWorld.DebugLog("节日登录活动登录天不足,无法领奖!dayNum=%s > loginCount=%s,loginState=%s" % (dayNum, loginCount, loginState)) return awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastLoginAwardState) @@ -152,8 +157,10 @@ def Sync_FeastLoginPlayerInfo(curPlayer): ## 通知活动玩家信息 + loginState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastLoginState) + loginCount = loginState / 10 clientPack = ChPyNetSendPack.tagMCFeastLoginPlayerInfo() - clientPack.LoginState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastLoginState) + clientPack.LoginState = pow(2, loginCount) - 1 clientPack.LoginAward = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FeastLoginAwardState) NetPackCommon.SendFakePack(curPlayer, clientPack) return -- Gitblit v1.8.0