From ef24f527ec8215a5053f1b33be33b8fe5b05d3ff Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 20 六月 2019 19:56:03 +0800
Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - 伤害值防止小于0的情况

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
index 3f5d124..8a22982 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_SkyTower.py
@@ -63,7 +63,7 @@
 def GetTowerIpyData(floor):
     return IpyGameDataPY.GetIpyGameData('SkyTower', floor)
 
-def OnFBPlayerLogin(curPlayer):
+def OnFBPlayerOnLogin(curPlayer):
     SyncSkyTowerInfo(curPlayer)
     return
 
@@ -73,7 +73,7 @@
 def SyncSkyTowerInfo(curPlayer):
     ttInfo = ChPyNetSendPack.tagMCSkyTowerInfo()
     ttInfo.Clear()
-    ttInfo.floorID = __GetSkyTowerCurFloor(curPlayer)
+    ttInfo.Floor = __GetSkyTowerCurFloor(curPlayer)
     NetPackCommon.SendFakePack(curPlayer, ttInfo)
     return
 
@@ -144,6 +144,21 @@
 #  @param tick
 #  @return None
 def DoEnterFB(curPlayer, tick):
+    gameFB = GameWorld.GetGameFB()
+    fbStep = gameFB.GetFBStep()
+    
+    if fbStep == FB_State_FightPrepare:
+        notify_tick = __GetTrialCfg()[Def_PrepareTime] * 1000 - (tick - GameWorld.GetGameFB().GetFBStepTick())
+        curPlayer.Sync_TimeTick(IPY_GameWorld.tttWaitStart, 0, max(notify_tick, 0), True)
+        
+    elif fbStep == FB_State_Fighting:
+        notify_tick = __GetTrialCfg()[Def_FightTime] * 1000 - (tick - GameWorld.GetGameFB().GetFBStepTick())
+        curPlayer.Sync_TimeTick(IPY_GameWorld.tttTowerTake, 0, max(notify_tick, 0), True)
+    elif fbStep > FB_State_Fighting:
+        PlayerControl.PlayerLeaveFB(curPlayer)
+        return
+
+
     # 不做处理,有副本行为客户端发包选择挑战关卡
     #EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_SkyTower, 0, ChConfig.CME_Log_Start)
     return
@@ -224,7 +239,6 @@
 
 ## 开始副本关卡
 def StartfloorID(curPlayer, floorID, tick):
-    PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_SkyTower)
     if curPlayer.GetPlayerAction() == IPY_GameWorld.paDie:
         GameWorld.DebugLog("复活玩家...", curPlayer.GetPlayerID())
         ChPlayer.PlayerRebornByType(curPlayer, ChConfig.rebornType_City, tick)
@@ -309,25 +323,22 @@
     
             
     if ipyData.GetIsNotify():
-        IPY_Data = IpyGameDataPY.IPY_Data()
-        maxLevel = IPY_Data.GetRuneTowerByIndex(IPY_Data.GetRuneTowerCount()-1).GetID()
-        sysMark = 'RuneTowerInfo_1' if floorID == maxLevel else 'GeRen_liubo_471172'
-        PlayerControl.WorldNotify(0, sysMark,
-                                  [curPlayer.GetPlayerName(), floorID / 100])
+        #IPY_Data = IpyGameDataPY.IPY_Data()
+        #maxLevel = IPY_Data.GetRuneTowerByIndex(IPY_Data.GetRuneTowerCount()-1).GetID()
+        sysMark = 'KillGodTowerInfo_1'# if floorID == maxLevel else 'GeRen_liubo_471172'
+        PlayerControl.WorldNotify(0, sysMark, [curPlayer.GetPlayerName(), floorID])
     #更新关卡
     SetSkyTowerCurfloorID(curPlayer, floorID)
     # 给过关奖励
-    prizeDict = __GiveFBPassPrize(curPlayer, floorID)
+    prizeDict = __GiveFBPassPrize(curPlayer, ipyData)
     # 过关时间
     costTime = tick - GameWorld.GetGameFB().GetFBStepTick()
     prizeDict[FBCommon.Over_costTime] = costTime
     __SendSkyTowerOverInfo(curPlayer, floorID, True, prizeDict)
-    
+    PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_SkyTower)
     
     SyncSkyTowerInfo(curPlayer) # 同步最新关卡信息
     __SetFBToFreeTime(tick)
-    #每日任务
-    PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_Tower)
     return
 
 

--
Gitblit v1.8.0