From b961d09f3d47773bc0ae6faaeda880ef4791419f Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 12 三月 2019 09:53:37 +0800
Subject: [PATCH] 6307 【后端】【2.0】多套装备开发单(强化配置修改)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py |   45 +++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 41 insertions(+), 4 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py
index 4bd727b..b244271 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_BZZD.py
@@ -32,7 +32,13 @@
 import PlayerSuccess
 import PlayerBossReborn
 import PlayerFairyCeremony
+import PlayerNewFairyCeremony
+import PlayerActLogin
+import PlayerWeekParty
 import ItemControler
+import GameFuncComm
+import SkillShell
+import BuffSkill
 
 import random
 import math
@@ -182,17 +188,21 @@
         FBCommon.AddEnterFBCount(curPlayer, ChConfig.Def_FBMapID_BZZD)
         PlayerBossReborn.AddBossRebornActionCnt(curPlayer, ChConfig.Def_BRAct_XJMJ, 1)
         PlayerFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_XJMJ, 1)
+        PlayerNewFairyCeremony.AddFCPartyActionCnt(curPlayer, ChConfig.Def_PPAct_XJMJ, 1)
+        PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_XJMJ, 1)
+        PlayerActLogin.AddLoginAwardActionCnt(curPlayer, ChConfig.Def_LoginAct_XJMJ, 1)
         FBCommon.UpdateFBEnterTick(curPlayer)
         gameFB.SetPlayerGameFBDict(playerID, FBPlayerDict_EnterLV, playerLV)
         PyGameData.g_bzzdPlayerKillNPCCntDict.pop(playerID, 0)
         
         logType = FBCommon.GetFBJoinType(curPlayer, False)
         EventReport.WriteEvent_FB(curPlayer, ChConfig.Def_FBMapID_BZZD, 0, ChConfig.CME_Log_Start, logType)
-        
+    fbPlayerCnt = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenPlayerCnt)
+    isTeamEnter = (teamID and fbPlayerCnt > 1)
+    if not isTeamEnter:
+        CheckHurtBuff(curPlayer, tick)
     showState = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_GuideState, ChConfig.GuideState_BZZDShow)
     if not showState:
-        fbPlayerCnt = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenPlayerCnt)
-        isTeamEnter = (teamID and fbPlayerCnt > 1)
         if not isTeamEnter:
             FBCommon.SendFBEncourageInfo(curPlayer, 0)
             GameWorld.Log("首次单人进入该副本,需要等前端播完副本场景引导秀才正常进入准备阶段!", playerID)
@@ -241,9 +251,28 @@
     if goldPaper:
         PlayerControl.GiveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, goldPaper)
     if itemID:
-        ItemControler.GivePlayerItem(curPlayer, itemID, 1, 1, [IPY_GameWorld.rptItem])
+        ItemControler.GivePlayerItem(curPlayer, itemID, 1, 0, [IPY_GameWorld.rptItem])
     GameWorld.DebugLog("首次进入给奖励:silverMoney=%s,goldPaper=%s,itemID=%s" 
                        % (silverMoney, goldPaper, itemID), curPlayer.GetPlayerID())
+    return
+
+def CheckHurtBuff(curPlayer, tick, isAdd=True):
+    #人物等级低于世界等级X级,单人挑战仙界密境获得伤害BUFF加成
+    if not GameFuncComm.GetFuncCanUse(curPlayer, ShareDefine.GameFuncID_WorldLV):
+        return
+    playerID = curPlayer.GetID()
+    enterLV = GameWorld.GetGameFB().GetPlayerGameFBDictByKey(playerID, FBPlayerDict_EnterLV)
+    if enterLV < GameFuncComm.GetFuncLimitLV(ShareDefine.GameFuncID_WorldLV):
+        return
+    curLV = curPlayer.GetLV()
+    worldlv = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
+    buffID = IpyGameDataPY.GetFuncCfg('XjmjAddHarm', 2)
+    lvRange = IpyGameDataPY.GetFuncCfg('XjmjAddHarm')
+    if isAdd and worldlv - curLV >=lvRange:
+        curSkill = GameWorld.GetGameData().GetSkillBySkillID(buffID)
+        SkillShell.__DoLogic_AddBuff(curPlayer, curPlayer, curSkill, False, tick, 0, 0)
+    if not isAdd and worldlv - curLV < lvRange:
+        BuffSkill.DelBuffBySkillID(curPlayer, buffID, tick)
     return
 
 ## 客户端发送开始副本
@@ -276,6 +305,9 @@
 def DoExitFB(curPlayer, tick):
     # 清除鼓舞buff
     FBCommon.ClearEncourageBuff(curPlayer, tick)
+    buffID = IpyGameDataPY.GetFuncCfg('XjmjAddHarm', 2)
+    BuffSkill.DelBuffBySkillID(curPlayer, buffID, tick)
+    FBCommon.UpdFBLineNPCStrengthenLV(curPlayer.GetPlayerID(), True)
     return
 
 ##玩家主动离开副本.
@@ -285,6 +317,11 @@
 def DoPlayerLeaveFB(curPlayer, tick):
     return
 
+def OnPlayerLVUp(curPlayer):
+    CheckHurtBuff(curPlayer, GameWorld.GetGameWorld().GetTick(), False)
+    FBCommon.UpdFBLineNPCStrengthenLV(curPlayer.GetPlayerID(), False)
+    return
+
 ## 获得副本帮助信息
 #  @param curPlayer 当前玩家(被通知对象)
 #  @param tick 当前时间

--
Gitblit v1.8.0