From 4f48659ed51c0e087e55da91ec76cbcdd7a87486 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 15 十一月 2018 17:40:58 +0800
Subject: [PATCH] 4788 【后端】【1.3】洗炼必增由消耗仙玉改为消耗道具

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_FamilyParty.py |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 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 6da20b6..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,15 +431,21 @@
             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))
+        addExp = 0
         if giveLV:
-            Item_AddLV.DoAddLVEx(curPlayer, giveLV, True, True, 0)
+            addExp = Item_AddLV.DoAddLVEx(curPlayer, giveLV, True, True, 0)
         reLV = curPlayer.GetLV()
         reExp = PlayerControl.GetPlayerReExp(curPlayer)
         giveExp = eval(IpyGameDataPY.GetFuncCompileCfg('FamilyPartySitAward'))
@@ -447,7 +453,7 @@
             PlayerControl.PlayerControl(curPlayer).AddExp(giveExp)
             exp = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExp % playerID)
             expPoint = gameWorld.GetGameWorldDictByKey(FBPlayerDict_TotalExpPoint % playerID)
-            newTotalExp = expPoint*ChConfig.Def_PerPointValue+exp+giveExp
+            newTotalExp = expPoint*ChConfig.Def_PerPointValue+exp+giveExp+addExp
             gameWorld.SetGameWorldDict(FBPlayerDict_TotalExp % playerID, newTotalExp%ChConfig.Def_PerPointValue)
             gameWorld.SetGameWorldDict(FBPlayerDict_TotalExpPoint % playerID, newTotalExp/ChConfig.Def_PerPointValue)
             

--
Gitblit v1.8.0