From 1ff1a06e097892e77f7b7e889ab00e0e6b0f373e Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 27 十一月 2018 17:17:21 +0800
Subject: [PATCH] 5100 【1.3】【后端】盟主退位判断时间由原来每日0点判断修改为每小时判断1次
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py | 11 ++++++++---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py | 2 ++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
index 39688d0..52c8054 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -130,6 +130,8 @@
#__ClearTreasureDropCount()
#记录当前时间
GameLogInfo.Set_Server_Hour()
+
+ PlayerFamily.FamilyOnHour()
return
## 触发每日事件(参数 -> 当前时间)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
index c0f96d8..1d7b633 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamily.py
@@ -2534,8 +2534,6 @@
# if useMoney > 0:
# #帮会日常维持消耗{%S1%}银两帮会资金
# PlayerControl.FamilyNotify(family.GetID(), 'jiazu_lhs_272921', [useMoney])
- #自动传位
- __AutoChangeLeader(family)
#通知客户端刷新
family.Broadcast_FamilyChange()
@@ -2593,6 +2591,13 @@
return
+def FamilyOnHour():
+ familyManager = GameWorld.GetFamilyManager()
+ for i in xrange(familyManager.GetCount()):
+ family = familyManager.GetAt(i)
+ #自动传位
+ __AutoChangeLeader(family)
+ return
#---------------------------------------------------------------------
##通知地图服务器, 玩家家族属性刷新
# @param curFamily 家族实例
@@ -2744,7 +2749,7 @@
'''自动传位'''
# 获得帮主下线了多久(小时)
leaderOffLineTime = GetLeaderOfflineTime(curFamily)
- GameWorld.DebugLog('帮主下线了%s小时'%leaderOffLineTime)
+ GameWorld.DebugLog('帮主下线了%s小时'%leaderOffLineTime, curFamily.GetID())
if leaderOffLineTime < IpyGameDataPY.GetFuncCfg('AutoChangeLeader'):
return
--
Gitblit v1.8.0