From 99c992cba2159ff3b48bc953abb8439c39fb9e70 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 03 九月 2018 17:28:01 +0800
Subject: [PATCH] fix:3222 【后端】仙盟宴会结束后发邮件参与奖励

---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
index 095ede0..b600d6f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
@@ -41,6 +41,15 @@
     NotifyFamilyPartyQuestion(curPlayer)
     return
 
+def OnPlayerChangeMap(curPlayer, tick):
+    if curPlayer.GetMapID() != ChConfig.Def_FBMapID_FamilyParty:
+        return
+    playerID = curPlayer.GetID()
+    if playerID not in PyGameData.g_partyheroAnswerDict:
+        PyGameData.g_partyheroAnswerDict[playerID] = 0
+    return
+
+
 def NotifyFamilyPartyQuestion(curPlayer):
     #刚登录的或刚进仙盟的补发最近的题目
     gameWorld = GameWorld.GetGameWorld()
@@ -104,6 +113,14 @@
             PlayerCompensation.SendPersonalItemMailEx('', content, day, [topHeroID], itemList)
                 
             PlayerControl.WorldNotify(0, 'Party_TopPlayer', [topHeroName])
+        
+        #给参与奖励
+        joinPlayerIDList = PyGameData.g_partyheroAnswerDict.keys()
+        if joinPlayerIDList:
+            joinReward = IpyGameDataPY.GetFuncEvalCfg('PartyReward')
+            if joinReward:
+                PlayerCompensation.SendMailByKey('FamilyParty', joinPlayerIDList, joinReward)
+            
     return
 
 def __GetFamilyAnswerRankList():

--
Gitblit v1.8.0