From 31a441bf2842217a4fb215ae25d6e836980f52d4 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期四, 24 一月 2019 10:17:34 +0800 Subject: [PATCH] 5924 【后端】【1.5.100】诛仙Boss功能(杀人不红名) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py | 33 +++++++++++++++++++++------------ 1 files changed, 21 insertions(+), 12 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py index 0de2912..6895204 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py @@ -1572,14 +1572,6 @@ return inputText -## 是否跨服服务器 -# @param None None -# @return -def IsMergeServer(): - config = MapConfig.GetConfig() - - return config.get('IsMergeWarServe', 0) - def IsCrossServer(): ## 是否跨服服务器 return ToIntDef(ReadChConfig.GetPyMongoConfig("Merge", "IsMergeServer"), 0) @@ -1611,9 +1603,9 @@ ''' checkDate = ChangeTimeNumToDatetime(checkTime) curDate = GetCurrentTime() - if checkDate > curDate: - #DebugLog("检查时间比当前时间大") - return False + #if checkDate > curDate: + # #DebugLog("检查时间比当前时间大") + # return False Def_OnEventHour = ShareDefine.Def_OnEventHour chkYear, chkMonth, chkDay, chkHour = checkDate.year, checkDate.month, checkDate.day, checkDate.hour @@ -1630,6 +1622,7 @@ checkDateEx = datetime.datetime(chkYear, chkMonth, chkDay, 0, 0, 0) curDateEx = datetime.datetime(curYear, curMonth, curDay, 0, 0, 0) diffDays = (curDateEx - checkDateEx).days + ## 当前时间比检查的时间大1天 if diffDays == 1: if chkHour < Def_OnEventHour: #DebugLog("日期相差天数1, 不同天! chkHour(%s) < %s" % (chkHour, Def_OnEventHour)) @@ -1640,6 +1633,19 @@ return False #DebugLog("日期相差天数1, 同天! curHour(%s) < %s <= chkHour(%s)" % (curHour, Def_OnEventHour, chkHour)) + return True + + ## 当前时间比检查的时间小1天 + elif diffDays == -1: + if curHour < Def_OnEventHour: + #DebugLog("日期相差天数-1, 不同天! curHour(%s) < %s" % (curHour, Def_OnEventHour)) + return False + + if chkHour >= Def_OnEventHour: + #DebugLog("日期相差天数-1, 不同天! chkHour(%s) >= %s" % (chkHour, Def_OnEventHour)) + return False + + #DebugLog("日期相差天数-1, 同天! chkHour(%s) < %s <= curHour(%s)" % (chkHour, Def_OnEventHour, curHour)) return True #DebugLog("日期相差天数大于1,不同一天!") @@ -1799,7 +1805,8 @@ if updDictValue == 0: curPlayer.NomalDictDelProperty(keyName, 0) else: - curPlayer.NomalDictAddProperty(keyName, updDictValue) + import PlayerControl + PlayerControl.NomalDictSetProperty(curPlayer, keyName, updDictValue) #DebugLog("SetDictValueByBit keyFormat=%s,isBin=%s,bit=%s,keyNum=%s,keyName=%s,dictValue=%s,bitIndex=%s,updDictValue=%s" # % (keyFormat, isBin, bit, keyNum, keyName, dictValue, bitIndex, updDictValue)) return dictValue, updDictValue @@ -1840,12 +1847,14 @@ ## 发送信息到跨服服务器 msgList = str([msgType, dataMsg]) GetPlayerManager().GameServer_QueryPlayerResult(srcPlayerID, queryType, queryID, "SendMsgToCrossServer", msgList, len(msgList)) + DebugLog("发送跨服信息: %s, %s" % (msgType, dataMsg)) return def SendMsgToClientServer(msgType, dataMsg, serverGroupIDList, srcPlayerID=0, queryType=0, queryID=0): ## 发送信息到子服 msgList = str([msgType, dataMsg, serverGroupIDList]) GetPlayerManager().GameServer_QueryPlayerResult(srcPlayerID, queryType, queryID, "SendMsgToClientServer", msgList, len(msgList)) + DebugLog("发送子服信息: %s, %s, serverGroupIDList=%s" % (msgType, dataMsg, serverGroupIDList)) return ## 根据排行获取名次对应值 -- Gitblit v1.8.0