From 93b6f00c8b142fee8560d58c54d71de135584788 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 03 十二月 2021 18:48:52 +0800 Subject: [PATCH] 9341 【BT5】【主干】【后端】情缘系统(增加魅力等级属性;伴侣亲密度等级属性;优化已成亲的伴侣再次提亲时直接成亲) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py index 6b70901..c723b63 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerSocial.py @@ -329,6 +329,8 @@ if not curPlayer: return nowIntimacy + self.__SyncMapServerCoupleIntimacy(curPlayer, tagID) + tagName = "" socialPlayer = PyDataManager.GetPersonalSocialManager().GetSocialPlayer(tagID) if socialPlayer: @@ -349,9 +351,32 @@ return 0 intimacyObj.Intimacy = setValue if curPlayer: + self.__SyncMapServerCoupleIntimacy(curPlayer, tagID) self.Sync_SocialsInfo(curPlayer, [tagID]) return intimacyObj.Intimacy + def __SyncMapServerCoupleIntimacy(self, curPlayer, tagID): + ## 同步地图玩家伴侣亲密度 + playerID = curPlayer.GetPlayerID() + couple = PyDataManager.GetDBPyCoupleManager().GetCouple(playerID) + if not couple: + return + if couple.GetCoupleID(playerID) != tagID: + return + self.SyncMapServerIntimacy(curPlayer, tagID) + return + + def SyncMapServerIntimacy(self, curPlayer, tagID): + ## 同步地图玩家伴侣亲密度 + playerID = curPlayer.GetPlayerID() + intimacyValue = 0 + intimacyObj = self.GetIntimacyObj(tagID) + if intimacyObj: + intimacyValue = intimacyObj.Intimacy + cmdInfo = ["SyncMapServerIntimacy", [tagID, intimacyValue]] + PlayerControl.MapServer_QueryPlayer_DoLogic(curPlayer, "Love", cmdInfo, playerID) + return + # 整个游戏的亲密管理 class IntimacyManager(object): def __init__(self): -- Gitblit v1.8.0