From c280ced8be799a899efc78b21cc807d435ab6609 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 10 二月 2026 19:34:03 +0800
Subject: [PATCH] 66 【公会】基础主体-服务端(退出公会时间根据当前是否互通取对应的本服或跨服时间;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
index 6439486..f8f6636 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py
@@ -807,12 +807,17 @@
             joinCDMinute = joinCDMinuteList[kickedCnt - 1] if len(joinCDMinuteList) >= kickedCnt else joinCDMinuteList[-1]
     if joinCDMinute:
         cdTimes = joinCDMinute * 60
-        passTimes = int(time.time()) - leaveFamilyTime
+        passTimes = GetFamilyTime() - leaveFamilyTime
         if passTimes < cdTimes:
             GameWorld.DebugLog("加入公会CD中: leaveCnt=%s,kickedCnt=%s,lastVoluntarily=%s,leaveFamilyTime=%s(%s),passTimes=%s < %s" 
                    % (leaveCnt, kickedCnt, lastVoluntarily, leaveFamilyTime, GameWorld.ChangeTimeNumToStr(leaveFamilyTime), passTimes, cdTimes))
             return True
     return False
+
+def GetFamilyTime():
+    if GameWorld.IsMainServer() and DBFamily.IsFamilyCross():
+        return CrossMgr.GetSSServerMgr().GetCrossTime()
+    return int(time.time())
 
 def AutoJoinFamily(crossPlayer):
     if crossPlayer.GetFamilyID():
@@ -2187,7 +2192,7 @@
     curPlayer.SetFamilyActiveValue(0)
     curPlayer.SetLastWeekFamilyActiveValue(0)
     curPlayer.SetFamilyLV(0)
-    PlayerControl.SetLeaveFamilyTimeEx(curPlayer, int(time.time()))
+    PlayerControl.SetLeaveFamilyTimeEx(curPlayer, GetFamilyTime())
     leaveCnt, kickedCnt, _ = PlayerControl.GetLeaveFamilyInfo(curPlayer)
     GameWorld.DebugLog("__OnLeaveFamily: isVoluntarily=%s,leaveCnt=%s,kickedCnt=%s" % (isVoluntarily, leaveCnt, kickedCnt))
     delMoneyType, delMoneyPer = IpyGameDataPY.GetFuncCfg("FamilyLeave", 3), 0

--
Gitblit v1.8.0