From cfe9bd530c8ff9805562585ec2efe6f64632a25c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 10 二月 2025 11:42:37 +0800
Subject: [PATCH] 10337 【越南】【英文】【BT】【砍树】优化天星塔过关触发任务脚本;

---
 ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py |   41 +++++++++++++++++++++++++++++++++++------
 1 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py
index f5b5b61..11f4b33 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py
@@ -49,12 +49,40 @@
 #  @return None
 #  @remarks 函数详细说明.
 def OnExec(orderId, gmCmdDict):
+    strMsg = ""
     gmCmdDict = ClearEmptyFromDict(gmCmdDict)
-    PlayerIDList = eval(gmCmdDict.get('PlayerIDList', '[]'))
+    GameWorld.DebugLog("GMT_AddPersonalCompensation gmCmdDict:%s" % gmCmdDict)
+    queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')
+    if queryType == GMCommon.Def_GMKey_FamilyID:
+        sendFamilyIDList = []
+        PlayerIDList = []
+        familyIDList = gmCmdDict.get("playerList", "").split(",")
+        GameWorld.Log("发送仙盟邮件: familyIDList=%s" % familyIDList)
+        for familyID in familyIDList:
+            familyID = GameWorld.ToIntDef(familyID)
+            familyInfo = {"familyID":familyID}
+            memberIDList = []
+            family = GameWorld.GetFamilyManager().FindFamily(familyID)
+            if not family:
+                GameWorld.DebugLog("    not family %s" % familyID)
+                continue
+            for index in range(family.GetCount()):
+                curMember = family.GetAt(index)
+                curMemberID = curMember.GetPlayerID()
+                if curMemberID:
+                    memberIDList.append(curMemberID)
+            PlayerIDList += memberIDList
+            familyInfo["PlayerIDList"] = memberIDList
+            sendFamilyIDList.append(familyInfo)
+        GameWorld.Log("    send FamilyIDList=%s" % sendFamilyIDList)
+        GameWorld.Log("    send PlayerIDList=%s" % PlayerIDList)
+        strMsg = str(sendFamilyIDList)
+    else:
+        PlayerIDList = eval(gmCmdDict.get('PlayerIDList', '[]'))
     if PlayerIDList == []:
-        GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)    
+        GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)
         return
-
+    
     LimitTime = gmCmdDict.get('EndTime', '2050-12-13 00:00:00')
     
     curServerTime = GameWorld.GetCurrentDataTimeStr()
@@ -63,6 +91,7 @@
         GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_InvalidTime)
         return
         
+    MailType = int(gmCmdDict.get('MailType', '0'))
     Title = gmCmdDict.get('Title', '')
     Text = gmCmdDict.get('Text', '')
     GUID = str(uuid.uuid1())
@@ -91,11 +120,11 @@
     #    GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)
     #    return
     PlayerCompensation.AddPersonalItem(GUID, addItemDictList, PlayerIDList, 
-                                       LimitTime, "%s<$_$>%s<$_$>%s"%(sender, Title, Text),
+                                       LimitTime, PlayerCompensation.GetMailText(Title, Text, MailType, sender),
                                        gold, goldPaper, silver, detail=detail)
     
     #执行成功
-    GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success)  
+    GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success, strMsg)
     # 流向
     DataRecordPack.DR_ToolGMOperate(0, '', '', 'GMT_AddPersonalCompensation', str(gmCmdDict))
     return
@@ -109,7 +138,7 @@
     addItemDict['Count'] = GameWorld.ToIntDef(gmCmdDict.get('ItemCnt%s'%itemIndexStr, '0'))
     if addItemDict['Count'] == 0:
         return {}
-    addItemDict['IsBind'] = GameWorld.ToIntDef(gmCmdDict.get('IsBind%s'%itemIndexStr, '0'))
+    addItemDict['IsAuctionItem'] = GameWorld.ToIntDef(gmCmdDict.get('IsBind%s'%itemIndexStr, '0'))
     #添加UserData信息
     addItemDict['UserData'] = ''
     UserDataDict = {}

--
Gitblit v1.8.0