From 6fe1261afc29cf9940ae6758c12c0056adf85110 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 05 十一月 2018 15:17:03 +0800
Subject: [PATCH] 2281 【主干】仙盟宴会传功过并获得经验的玩家的,受别人邀请还可以再次获得经验

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 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 ab964ba..d87eb9a 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
@@ -39,7 +39,6 @@
 ) = range(3)
 
 #---战盟副本---
-Map_FamilyPartyFB_FamilyID = "FamilyPartyFB_FamilyID"  # 对应的家族id
 Map_FamilyPartyFB_StartTick = "Map_FamilyPartyFB_StartTick"  # 副本开始时间
 GameFBDict_LastEnterFbDay = 'LastEnterFbDay_%s'  #上次进入活动的开服天
 FBPlayerDict_TotalExp = 'XMYH_TotalExp%s'  # 获得的总经验
@@ -60,7 +59,6 @@
 # @remarks 开启副本
 def OnOpenFB(tick):
     gameFB = GameWorld.GetGameFB()
-    gameFB.SetGameFBDict(Map_FamilyPartyFB_FamilyID, 0)
     gameFB.ClearAllPlayerGameFBDict()  # 清除所有玩家对应的副本字典信息
     gameFB.SetGameFBDict(ChConfig.Map_FBDict_NotifyStart, 0)
     return
@@ -160,8 +158,6 @@
         return
     curPlayer.Sync_TimeTick(IPY_GameWorld.tttTowerTake, 0, closeFB_RemainTick, True) 
     GameWorld.DebugLog('closeFB_RemainTick=%s' % closeFB_RemainTick)
-    if not gameFB.GetGameFBDictByKey(Map_FamilyPartyFB_FamilyID):
-        gameFB.SetGameFBDict(Map_FamilyPartyFB_FamilyID, curPlayer.GetFamilyID())
        
     openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay)
     if gameWorld.GetGameWorldDictByKey(GameFBDict_LastEnterFbDay % playerID) != openServerDay + 1:
@@ -196,8 +192,12 @@
 # @return 返回值无意义
 # @remarks 副本定时器
 def OnProcess(tick):
+    familyID = GameWorld.GetGameWorld().GetPropertyID()
+    if not familyID:
+        return
     gameFB = GameWorld.GetGameFB()
     fbStep = gameFB.GetFBStep()
+
     #GameWorld.DebugLog("    OnProcess...")
     if fbStep == FB_Step_Open:
         if FBCommon.GetFBFuncOpenState(ChConfig.Def_FBMapID_FamilyParty):
@@ -221,7 +221,7 @@
                 remaindTick = max(0, __GetRemainTick(tick) - 1000)
                 if remaindTick <= (notifySecond + 1) * 1000:   
                     #remaindSecond = remaindTick / 1000
-                    familyID = gameFB.GetGameFBDictByKey(Map_FamilyPartyFB_FamilyID)
+                    
                     PlayerControl.FamilyNotify(familyID, "Party_OverTime", [notifySecond])
                      
                     GameWorld.GetGameFB().SetGameFBDict(ChConfig.Map_FBDict_NotifyStart, notifyIndex + 1)
@@ -431,10 +431,15 @@
             return
         curPlayer.StopMove()
         curPlayer.Sit()
-        if tagPlayer.GetPlayerAction() not in [IPY_GameWorld.paSit, IPY_GameWorld.paPreparing]:
-            tagPlayer.StopMove()
-            tagPlayer.Sit()
+        if not gameWorld.GetGameWorldDictByKey(FBPlayerDict_HasSit % tagPlayerID):
+            if tagPlayer.GetPlayerAction() not in [IPY_GameWorld.paSit, IPY_GameWorld.paPreparing]:
+                tagPlayer.StopMove()
+                tagPlayer.Sit()
     elif actionType == 1:  #打坐结束给奖励
+        hasSit = gameWorld.GetGameWorldDictByKey(FBPlayerDict_HasSit % playerID)
+        if hasSit:
+            GameWorld.Log('打坐结束给奖励,玩家已打坐过一次', playerID)
+            return
         reLV = curPlayer.GetLV()
         worldlv = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
         giveLV = eval(IpyGameDataPY.GetFuncCompileCfg('FamilyPartySitAward', 2))

--
Gitblit v1.8.0