From 304b381ffa86f534e5335b48a156176a06e2f20e Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 27 十二月 2018 15:59:44 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index 70637d6..f09873c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -5673,6 +5673,21 @@
 def GetChatBubbleBox(curPlayer): return curPlayer.GetExAttr10()
 def SetChatBubbleBox(curPlayer, value): return curPlayer.SetExAttr10(value, False, True)
 
+## 玩家所属服务器组ID
+def GetPlayerServerGroupID(curPlayer): return curPlayer.GetExAttr13()
+def UpdPlayerServerGroupID(curPlayer):
+    # 更新自己的服务器组ID, 跨服服务器不处理
+    if GameWorld.IsCrossServer():
+        return
+    serverGroupID = GameWorld.GetServerGroupID()
+    if not serverGroupID:
+        return
+    playerServerGroupID = curPlayer.GetExAttr13()
+    if playerServerGroupID != serverGroupID:
+        curPlayer.SetExAttr13(serverGroupID, False, True)
+        GameWorld.DebugLog("更新玩家所属服务器组ID: serverGroupID=%s" % serverGroupID)
+    return
+
 ##获得玩家威望值
 def GetPrestige(curPlayer): return 0
 def SetPrestige(curPlayer, value): return

--
Gitblit v1.8.0