From 25883a40381ae15b5b124fb62e839dcf80af9a7b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 15 八月 2024 16:36:04 +0800
Subject: [PATCH] 5107 【越南】【香港】【主干】【砍树】神兵系统修改(神兵技能支持升级;增加神兵命令 GodWeapon)
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py
index 96adcd2..2b5adfb 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFriend.py
@@ -126,6 +126,7 @@
askFriendPack.Name = curPlayer.GetName()
askFriendPack.LV = curPlayer.GetLV()
askFriendPack.RealmLV = curPlayer.GetOfficialRank()
+ askFriendPack.Face = curPlayer.GetFace()
NetPackCommon.SendFakePack(tagPlayer, askFriendPack)
@@ -214,6 +215,12 @@
GameWorld.Log('DeleteFriend -> 封包异常 ->没有这个玩家', playerID)
return
+ couple = PyDataManager.GetDBPyCoupleManager().GetCouple(playerID)
+ if couple and couple.GetCoupleID(playerID) == friendID:
+ #GameWorld.Log('DeleteFriend -> 封包异常 ->伴侣不能删除好友.friendID=%s' % friendID, playerID)
+ PlayerControl.NotifyCode(curPlayer, "DelFriendCoupleLimit")
+ return
+
#离线好友同时删除记录
PyDataManager.GetFriendManager().DelFriendBoth(playerID, friendID)
@@ -224,6 +231,12 @@
if tagPlayer != None:
PlayerControl.NotifyCode(tagPlayer, 'Friend_DeleteFriend2', [curPlayer.GetName()])
PlayerTeam.OnTeamMemFriendChange(curPlayer, friendID, False)
+
+ # 亲密度减少
+ decIntimacyPer = IpyGameDataPY.GetFuncCfg("IntimacyReduce", 1)
+ if decIntimacyPer:
+ PyDataManager.GetIntimacyManager().DelIntimacyBothPer(playerID, friendID, decIntimacyPer)
+
return
@@ -389,6 +402,12 @@
# return
#===========================================================================
+ couple = PyDataManager.GetDBPyCoupleManager().GetCouple(curPlayer.GetID())
+ if couple and couple.GetCoupleID(curPlayer.GetID()) == tagID:
+ #GameWorld.DebugLog("伴侣不能加入黑名单! tagID=%s" % tagID, curPlayer.GetID())
+ PlayerControl.NotifyCode(curPlayer, "AddBlackCoupleLimit")
+ return
+
tagPlayer = GameWorld.GetPlayerManager().FindPlayerByID(tagID)
if not tagPlayer:
curCache = PlayerViewCache.FindViewCache(tagID)
@@ -410,6 +429,11 @@
PlayerControl.NotifyCode(curPlayer, 'AddBlackList', [playerName])
+ # 亲密度减少
+ decIntimacyPer = IpyGameDataPY.GetFuncCfg("IntimacyReduce", 2)
+ if decIntimacyPer:
+ PyDataManager.GetIntimacyManager().DelIntimacyBothPer(curPlayer.GetPlayerID(), tagID, decIntimacyPer)
+
return
@@ -473,6 +497,15 @@
players.Sync_SocialsInfo(curPlayer)
return
+#亲密
+def __OnPlayerLoginIntimacylist(curPlayer, tick):
+ intimacys = PyDataManager.GetIntimacyManager().GetIntimacys(curPlayer.GetID())
+ if intimacys == None:
+ return
+
+ intimacys.Sync_SocialsInfo(curPlayer)
+ return
+
## 玩家登陆
# @param curPlayer 当前玩家
# @param tick 当前时间
@@ -486,6 +519,7 @@
__OnPlayerLoginEnemy(curPlayer, tick)
__OnPlayerLoginContacts(curPlayer, tick)
__OnPlayerLoginBlacklist(curPlayer, tick)
+ __OnPlayerLoginIntimacylist(curPlayer, tick)
# 向当前玩家通知相关联的所有玩家信息
PlayerSocial.Sync_AllSocialsInfo(curPlayer)
@@ -625,6 +659,7 @@
rceFriendsData.LV = tagPlayer.GetLV()
rceFriendsData.Job = tagPlayer.GetJob()
rceFriendsData.RealmLV = tagPlayer.GetOfficialRank()
+ rceFriendsData.Face = tagPlayer.GetFace()
sendPack.FriendsList.append(rceFriendsData)
#GameWorld.DebugLog("Client_RecommendFriends:%s"%sendPack.FriendsList)
@@ -684,6 +719,8 @@
rceFriendsData.Name = tagPlayer.GetName()
rceFriendsData.LV = tagPlayer.GetLV()
rceFriendsData.Job = tagPlayer.GetJob()
+ rceFriendsData.RealmLV = tagPlayer.GetOfficialRank()
+ rceFriendsData.Face = tagPlayer.GetFace()
sendPack.FriendsList.append(rceFriendsData)
--
Gitblit v1.8.0