From 7d0019192b6df3e01bcfee0c2f4b62d036fa9e3a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 02 三月 2026 19:58:13 +0800
Subject: [PATCH] 501 【武将】武将时装-服务端(增加时装形象,与时装属性相互独立;每个武将物品独立,UserData原78-皮肤形象索引,增加82-皮肤属性索引;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFamily.py |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 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 9e5032a..356f407 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():
@@ -1596,13 +1601,19 @@
     if CheckFamilyNameExists(crossPlayer, newName, fromServerID):
         return
     
+    zoneMgr = familyMgr.GetZoneFamilyMgrByFamilyID(familyID)
+    if not zoneMgr:
+        return
+    
+    if not zoneMgr.FamilyRemainName(family, newName):
+        return
+    
+    if cdHours:
+        SetRenameTime(family, curTime)
+        
     moneyType, moneyValue = IpyGameDataPY.GetFuncEvalCfg("FamilyRename", 1)
     if moneyType and moneyValue:
         CrossPlayer.CostPlayerResources(crossPlayer, "FamilyRename", costMoneyDict={moneyType:moneyValue})
-        
-    family.SetName(newName)        
-    if cdHours:
-        SetRenameTime(family, curTime)
         
     crossPlayerMgr = CrossPlayer.GetCrossPlayerMgr()
     for index in xrange(family.GetCount()):
@@ -1921,7 +1932,7 @@
     curMember.SetContribTotal(contribTotal)
     GameWorld.DebugLog("增加成员贡献: familyID=%s,addContribValue=%s,contribDay=%s,contribTotal=%s" % (familyID, addContribValue, contribDay, contribTotal), playerID)
     
-    Broadcast_FamilyInfo(familyID, isSyncMem=False) # 成员贡献
+    Broadcast_FamilyInfo(familyID, changeMemIDList=[playerID]) # 成员贡献
     return
 
 ## ------------------------------------------------------------------------------------------------
@@ -2181,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