hxp
2021-05-26 130ec4fa6335c77e396353c766bea495085d003b
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):