From 0ca7f7bf908b784ceb915fba916450b21d364aac Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 27 十二月 2019 16:31:31 +0800
Subject: [PATCH] 8350 【主干】【后端】添加按仙盟为单位给盟成员群发邮件(个人邮件增加发送仙盟成员支持,仅发邮件时的仙盟成员可收到)
---
ServerPython/db/PyMongoDataServer/GMToolLogicProcess/ProjSpecialProcess.py | 4 ++++
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py | 35 +++++++++++++++++++++++++++++++----
ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMCommon.py | 1 +
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMCommon.py | 1 +
4 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMCommon.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMCommon.py
index e4427d0..0fb4e60 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMCommon.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMCommon.py
@@ -81,6 +81,7 @@
Def_GMKey_PlayerName = 'playerName'
Def_GMKey_PlayerAccID = 'accID'
Def_GMKey_FamilyName = 'familyName'
+Def_GMKey_FamilyID = 'familyID'
Def_GMKey_PackIndex = 'packIndex'
Def_GMKey_IP = 'IP'
Def_GMKey_QueryType = 'queryType'
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py
index 156cd8a..8309b56 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_AddPersonalCompensation.py
@@ -49,12 +49,39 @@
# @return None
# @remarks 函数详细说明.
def OnExec(orderId, gmCmdDict):
+ strMsg = ""
gmCmdDict = ClearEmptyFromDict(gmCmdDict)
- PlayerIDList = eval(gmCmdDict.get('PlayerIDList', '[]'))
+ 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()
@@ -95,7 +122,7 @@
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
diff --git a/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMCommon.py b/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMCommon.py
index 129ff30..d37589e 100644
--- a/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMCommon.py
+++ b/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMCommon.py
@@ -97,6 +97,7 @@
Def_GMKey_PlayerName = 'playerName'
Def_GMKey_PlayerAccID = 'accID'
Def_GMKey_FamilyName = 'familyName'
+Def_GMKey_FamilyID = 'familyID'
Def_GMKey_PackIndex = 'packIndex'
Def_GMKey_IP = 'IP'
Def_GMKey_QueryType = 'queryType'
diff --git a/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/ProjSpecialProcess.py b/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/ProjSpecialProcess.py
index a634f1d..416ce9c 100644
--- a/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/ProjSpecialProcess.py
+++ b/ServerPython/db/PyMongoDataServer/GMToolLogicProcess/ProjSpecialProcess.py
@@ -261,6 +261,10 @@
playerIDList = []
queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')
+ if queryType == GMCommon.Def_GMKey_FamilyID:
+ # 根据家族ID的不处理,直接推
+ return GMCommon.Def_SendToGameServer, ""
+
playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')
for playerFind in playerList:
--
Gitblit v1.8.0