From f5cd3e2c7831b5f7e8865475804580ec713702ad Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 26 十一月 2021 11:24:41 +0800 Subject: [PATCH] 9341 【BT5】【主干】【后端】情缘系统(吃喜糖改为随机获得一种物品) --- ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/Couple.py | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/Couple.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/Couple.py index f5164e8..50dc7d3 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/Couple.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/Couple.py @@ -26,7 +26,7 @@ GameWorld.DebugAnswer(curPlayer, "---------- %s" % GameWorld.GetCurrentDataTimeStr()) GameWorld.DebugAnswer(curPlayer, "清除伴侣: Couple 0") GameWorld.DebugAnswer(curPlayer, "重置聘礼: Couple 0 1") - GameWorld.DebugAnswer(curPlayer, "设置伴侣: Couple 1 目标ID [可选聘礼ID]") + GameWorld.DebugAnswer(curPlayer, "设置成亲: Couple 1 伴侣ID [可选聘礼ID]") GameWorld.DebugAnswer(curPlayer, "设亲密度: Couple 2 目标ID 亲密度") GameWorld.DebugAnswer(curPlayer, "增加密度: Couple 3 目标ID 亲密度") return @@ -67,19 +67,21 @@ return - # 设置伴侣 + # 设置成亲 elif value1 == 1: - if couple: - GameWorld.DebugAnswer(curPlayer, "已有伴侣! coupleID=%s" % couple.GetCoupleID(playerID)) - return tagPlayerID = gmList[1] if len(gmList) > 1 else 0 if not tagPlayerID or tagPlayerID == playerID: GameWorld.DebugAnswer(curPlayer, "非法伴侣玩家ID:%s,playerID=%s" % (tagPlayerID, playerID)) return + if couple: + if couple.GetCoupleID(playerID) != tagPlayerID: + GameWorld.DebugAnswer(curPlayer, "已有伴侣! coupleID=%s" % couple.GetCoupleID(playerID)) + return tagCouple = coupleMgr.GetCouple(tagPlayerID) if tagCouple: - GameWorld.DebugAnswer(curPlayer, "对方已有伴侣! tagCoupleID=%s" % tagCouple.GetCoupleID(tagPlayerID)) - return + if tagCouple.GetCoupleID(tagPlayerID) != playerID: + GameWorld.DebugAnswer(curPlayer, "对方已有伴侣! tagCoupleID=%s" % tagCouple.GetCoupleID(tagPlayerID)) + return bridePriceID = gmList[2] if len(gmList) > 2 else 1 -- Gitblit v1.8.0