From 960534606fe676a61e63913da5a2e68c50b63dd8 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期日, 09 十月 2022 16:27:00 +0800
Subject: [PATCH] 9687 【后端】【越南】【主干】【BT7】野外根据境界动态刷怪(取NPC怪物等级逻辑优化)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 988e9cf..e239ee3 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -109,10 +109,16 @@
     curNPC.SetTickTypeCount(ChConfig.TYPE_NPC_Tick_Count)
     return
 
-def GetNPCLV(curNPC):
+def GetNPCLV(curNPC, curPlayer=None):
     # NPC等级
     if hasattr(curNPC, "GetCurLV"):
         return max(curNPC.GetCurLV(), curNPC.GetLV())
+    if curPlayer and PlayerControl.GetRealmDifficulty(curPlayer):
+        npcID = curNPC.GetNPCID()
+        needRealmLV = PlayerControl.GetDifficultyRealmLV(PlayerControl.GetRealmDifficulty(curPlayer))
+        realmNPCIpyData = IpyGameDataPY.GetIpyGameDataNotLog("NPCRealmStrengthen", npcID, needRealmLV)
+        if realmNPCIpyData:
+            return realmNPCIpyData.GetLV()
     return curNPC.GetLV()
 
 def GetNPCDataEx(npcID):
@@ -5076,7 +5082,7 @@
         if mapFBType != IPY_GameWorld.fbtNull:
             FBLogic.DoFB_DropOwner(curPlayer , curNPC)
         else:
-            if curNPC.GetLV()>=curPlayer.GetLV() - IpyGameDataPY.GetFuncCfg('DailyQuestKillMonster'):
+            if GetNPCLV(curNPC) >= curPlayer.GetLV() - IpyGameDataPY.GetFuncCfg('DailyQuestKillMonster'):
                 PlayerActivity.AddDailyActionFinishCnt(curPlayer, ShareDefine.DailyActionID_KillNPC)
                 PlayerActGarbageSorting.AddActGarbageTaskProgress(curPlayer, ChConfig.Def_GarbageTask_KillNPC)
             PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_FeastRedPack_KillSpecificNPC, 1, [npcID])

--
Gitblit v1.8.0