From e0f8672ce49e360e4a318ac81c20f84b05d6bbe8 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 11 三月 2019 21:13:06 +0800
Subject: [PATCH] 6118 【后端】【1.5.200】新增技能效果

---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTeam.py |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 55 insertions(+), 1 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTeam.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTeam.py
index 3f00186..34aca2e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTeam.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTeam.py
@@ -1877,6 +1877,7 @@
     #如果队伍正在匹配中,则通知状态
     if IsTeamMatchingPlayer(curTeamID):
         Sync_TeamMatchState(curPlayer, True)
+    OnTeamMemFamilyRefresh(curPlayer, curPlayer.GetFamilyID())
     return True
 
 #---------------------------------------------------------------------
@@ -2794,6 +2795,10 @@
                                                    ["TeamEnterDefaultMe", "TeamEnterDefaultAll"], "SingleEnterDefaul"],
                      ShareDefine.EntFBAskRet_Sit:[["TeamMatchingSITMe", "TeamMatchingSITAll"], 
                                                   ["TeamEnterSITMe", "TeamEnterSITAll"], "Carry_lhs_697674"],
+                     ShareDefine.EntFBAskRet_CrossPKMatching:[["CrossMatching9", "CrossMatching10"], 
+                                                  ["CrossMatching11", "CrossMatching12"], "CrossMatching8"],
+                     ShareDefine.EntFBAskRet_InCrossMap:[["CrossMap6", "CrossMap7"], 
+                                                  ["CrossMap8", "CrossMap9"], "CrossMap5"],
                      ShareDefine.EntFBAskRet_Other:[["TeamMatchingDefaultMe", "TeamMatchingDefaultAll"], 
                                                    ["TeamEnterDefaultMe", "TeamEnterDefaultAll"], "SingleEnterDefaul"],
                      }
@@ -2953,10 +2958,59 @@
     PyGameData.g_prepareTeamDict.pop(teamID)
     
     # 同步进入组队副本的队员关系到目标地图
-    relationInfo = str([teamID, friendList, memFamilyIDDict, memNameDict])
+    relationInfo = str(["InitRelation", teamID, friendList, memFamilyIDDict, memNameDict])
     leader.MapServer_QueryPlayerResult(0, 0, "EnterFBTeamRelation", relationInfo, len(relationInfo))
     return
 
+def OnTeamMemFriendChange(curPlayer, tagPlayerID, isFriend):
+    ## 队员好友关系变更,离线也同步
+    teamID = curPlayer.GetTeamID()
+    if not teamID:
+        GameWorld.DebugLog("好友变更,无队伍不管!")
+        return
+    curMapData = GameWorld.GetMap(curPlayer.GetMapID())
+    if not curMapData or curMapData.GetMapFBType() != ChConfig.fbtTeam:
+        GameWorld.DebugLog("好友变更,不在组队副本不管!")
+        return
+    
+    isSameTeam = False
+    playerID = curPlayer.GetPlayerID()
+    curTeam = curPlayer.GetTeam()
+    for index in xrange(curTeam.GetMemberCount()):
+        memberInfo = curTeam.GetMemberInfo(index)
+        if not memberInfo:
+            continue
+        memPlayerID = memberInfo.GetPlayerID()
+        if tagPlayerID == memPlayerID:
+            isSameTeam = True
+            break
+        
+    if not isSameTeam:
+        GameWorld.DebugLog("好友关系变更,不是同队伍不管!")
+        return
+    
+    relationInfo = str(["FriendChange", teamID, playerID, tagPlayerID, isFriend])
+    curPlayer.MapServer_QueryPlayerResult(0, 0, "EnterFBTeamRelation", relationInfo, len(relationInfo))
+    return
+
+def OnTeamMemFamilyRefresh(curPlayer, familyID):
+    ## 队员仙盟变更,仅在线同步,上线同步
+    if not curPlayer:
+        return
+    teamID = curPlayer.GetTeamID()
+    if not teamID:
+        GameWorld.DebugLog("家族变更,无队伍不管!")
+        return
+    curMapData = GameWorld.GetMap(curPlayer.GetMapID())
+    if not curMapData or curMapData.GetMapFBType() != ChConfig.fbtTeam:
+        GameWorld.DebugLog("家族变更,不在组队副本不管!")
+        return
+    playerID = curPlayer.GetPlayerID()
+    familyID = curPlayer.GetFamilyID()
+    relationInfo = str(["FamilyChange", teamID, playerID, familyID])
+    curPlayer.MapServer_QueryPlayerResult(0, 0, "EnterFBTeamRelation", relationInfo, len(relationInfo))
+    return
+
 def __CheckTeamFBPlayerExist(curTeam):
     ##玩家离开副本
     # @param curTeam 队伍实例

--
Gitblit v1.8.0