From ffa8a645ed6a92a3c723bbf5c7f1eb4d5425c826 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 17 十一月 2021 15:15:34 +0800 Subject: [PATCH] 9341 【BT5】【主干】【后端】情缘系统(优化情缘系统) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py index aae8f25..b25c494 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py @@ -6200,9 +6200,29 @@ def GetChatBubbleBox(curPlayer): return curPlayer.GetExAttr10() def SetChatBubbleBox(curPlayer, value): return curPlayer.SetExAttr10(value, False, True) -##伴侣ID -def GetCoupleID(curPlayer): return curPlayer.GetExAttr11() -def SetCoupleID(curPlayer, coupleID): return curPlayer.SetExAttr11(coupleID, False, False) +##伴侣 +def GetCoupleID(curPlayer): + coupleInfo = GetCoupleInfo(curPlayer.GetPlayerID()) + return coupleInfo[0] if coupleInfo else 0 +def GetCoupleName(curPlayer): + coupleInfo = GetCoupleInfo(curPlayer.GetPlayerID()) + return coupleInfo[1] if coupleInfo else "" +def GetCoupleJob(curPlayer): + coupleInfo = GetCoupleInfo(curPlayer.GetPlayerID()) + return coupleInfo[2] if coupleInfo else 1 +def GetBridePriceMaxID(curPlayer): + coupleInfo = GetCoupleInfo(curPlayer.GetPlayerID()) + return coupleInfo[3] if coupleInfo else 0 +def GetCoupleInfo(playerID): + if playerID not in PyGameData.g_coupleInfo: + return + return PyGameData.g_coupleInfo[playerID] +def SetCoupleInfo(playerID, coupleInfo): + if not coupleInfo: + PyGameData.g_coupleInfo.pop(playerID, None) + else: + PyGameData.g_coupleInfo[playerID] = coupleInfo + return ## 玩家所属服务器组ID def GetPlayerServerGroupID(curPlayer): return curPlayer.GetExAttr13() -- Gitblit v1.8.0