From f4f907ae6ae2f22207859230e8fc88583fe3a723 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 10 十一月 2021 11:26:11 +0800
Subject: [PATCH] 9341 【BT5】【主干】【后端】情缘系统

---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py
index 96adcd2..c971cf3 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py
@@ -214,6 +214,11 @@
         GameWorld.Log('DeleteFriend -> 封包异常 ->没有这个玩家', playerID)
         return
     
+    coupleID = PlayerControl.GetCoupleID(curPlayer)
+    if coupleID == friendID:
+        GameWorld.Log('DeleteFriend -> 封包异常 ->伴侣不能删除好友,coupleID=%s' % coupleID, playerID)
+        return
+    
     #离线好友同时删除记录
     PyDataManager.GetFriendManager().DelFriendBoth(playerID, friendID)
     
@@ -389,6 +394,10 @@
     #    return
     #===========================================================================
     
+    if tagID == PlayerControl.GetCoupleID(curPlayer):
+        GameWorld.DebugLog("伴侣不能加入黑名单! tagID=%s" % tagID, curPlayer.GetID())
+        return
+    
     tagPlayer = GameWorld.GetPlayerManager().FindPlayerByID(tagID)
     if not tagPlayer:
         curCache = PlayerViewCache.FindViewCache(tagID)

--
Gitblit v1.8.0