From fd9a7fa5180364b6f1bbc269682ddf83167d6c99 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 31 八月 2018 16:36:21 +0800
Subject: [PATCH] Fix: 伤血公式参考战力等级改为世界等级;

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
index 2460d51..d39dbf9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py
@@ -26,8 +26,9 @@
 import GameWorldProcess
 import PlayerFairyCeremony
 import EventReport
-
-
+import PyGameData
+import ItemCommon
+import ItemControler
 
 #当前副本地图的状态
 (
@@ -194,6 +195,8 @@
     elif fbStep == FB_Step_Fighting:
         if not FBCommon.GetFBFuncOpenState(ChConfig.Def_FBMapID_FamilyParty):
             GiveJoinPrize()
+            FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0)
+            PyGameData.g_familyPartyInfo = []
             FBCommon.SetFBStep(FB_Step_Over, tick)
             FBCommon.DoLogic_FBKickAllPlayer()
             GameWorldProcess.CloseFB(tick)
@@ -229,7 +232,7 @@
 
     addPoint, addExp = IpyGameDataPY.GetFuncEvalCfg('PartyReward',2)
     #仙盟贡献度
-    PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addPoint, True, ShareDefine.Def_AddFAVReason_FamilyParty)
+    PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addPoint, True, ShareDefine.Def_AddFAVReason_FamilyParty, True)
     #答题经验更新
     PlayerControl.PlayerControl(curPlayer).AddExp(addExp)
     
@@ -323,9 +326,15 @@
     hasCollect = gameWorld.GetGameWorldDictByKey(FBPlayerDict_HasCollect%playerID)
     getCnt = gameWorld.GetGameWorldDictByKey(ChConfig.Map_Player_AreaReward_GetCnt%playerID)
     isFull = 1 if getCnt >= IpyGameDataPY.GetFuncCfg('FamilyPartyAreaAward', 3) else 0
-                
-    
     helpDict = {FBCommon.Help_exp:exp, FBCommon.Help_expPoint:expPoint,FBCommon.Help_score:totalPoint, "hasCollect":hasCollect, "isFullExp":isFull}
+    if PyGameData.g_familyPartyInfo:
+        rankList = []
+        for i, info in enumerate(PyGameData.g_familyPartyInfo[0], 1):
+            rankList.append({"rank":i, "name":info[1], "cnt":info[2]})
+        helpDict['familyPartyRank'] = rankList
+        helpDict['familyPartyTop'] = {'name':PyGameData.g_familyPartyInfo[1], "cnt":PyGameData.g_familyPartyInfo[2]}
+    
+    
     GameWorld.DebugLog("DoFBHelp %s" % helpDict, playerID)
     FBCommon.Notify_FBHelp(curPlayer, helpDict)
     return
@@ -340,6 +349,11 @@
     hasCollect = GameWorld.GetGameWorld().GetGameWorldDictByKey(FBPlayerDict_HasCollect%curPlayer.GetID())
     if hasCollect:
         PlayerControl.NotifyCode(curPlayer, 'Party_HadCollected')
+        return
+    needSpace = len(IpyGameDataPY.GetFuncEvalCfg('FamilyPartyDesk', 3))
+    packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
+    if needSpace > packSpace:
+        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
         return
     return True
 
@@ -363,6 +377,9 @@
     
     GameWorld.DebugLog('    宴会采集成功!', playerID)
     #给奖励
+    itemAward = IpyGameDataPY.GetFuncEvalCfg('FamilyPartyDesk', 3)
+    for itemID, itemCount, isBind in itemAward:
+        ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isBind, [IPY_GameWorld.rptItem])
     addPoint = IpyGameDataPY.GetFuncCfg('FamilyPartyDesk')
     PlayerControl.NotifyCode(curPlayer, 'Party_CollectSuccess', [addPoint])
     PlayerFamily.AddPlayerFamilyActiveValue(curPlayer, addPoint, True, ShareDefine.Def_AddFAVReason_FamilyParty)

--
Gitblit v1.8.0