From 0c27822ef5e6c67782ed143a4ff03ecfbdfda1fb Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 23 五月 2022 16:52:58 +0800
Subject: [PATCH] 9415 【BT】【后端】古神战场(副本内功能完整版本)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 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 5eda952..6b08c4f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -135,9 +135,7 @@
 def SetSuppressFightPower(curNPC, value): return curNPC.SetThunderDef(min(value, ShareDefine.Def_UpperLimit_DWord))
 def GetCommendFightPower(curNPC): return curNPC.GetFireDef() # 火防代表推荐战力
 def GetDropOwnerType(curNPC): return curNPC.GetThunderAtk() # 雷攻代表掉落归属类型
-def GetFaction(curNPC):
-    faction = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_Faction)
-    return faction if faction else curNPC.GetCountry()
+def GetFaction(curNPC): return curNPC.GetCountry()
 def GetSkillAtkRate(curNPC): return curNPC.GetPoisionAtk() # 毒攻代表NPC技能伤害加成万分率
 def GetFinalHurt(curNPC): return curNPC.GetFireAtk() # 火攻代表NPC最终固定伤害加成, 普攻也有效果
 def SetFinalHurt(curNPC, hurt): return curNPC.SetFireAtk(hurt) # 火攻代表NPC最终固定伤害加成, 普攻也有效果
@@ -2167,7 +2165,10 @@
     
     if playerID > 0:
         curSummon.SetDict(ChConfig.Def_NPC_Dict_SummonMapNPCPlayerID, playerID)
-    
+        
+    if curSummon.GetType() == ChConfig.ntRobot:
+        __OnFBRobotReborn(curSummon, curSummon.GetLV())
+        
     FBLogic.DoFBRebornSummonNPC(curSummon, tick)
     __NotifyMapPlayerSummonMapNPC(npcId, rebornX, rebornY)
     return curSummon
@@ -3521,6 +3522,9 @@
         #得到地图刷新点
         posMap = curNPC.GetRefreshPosAt(curNPC.GetCurRefreshPointIndex())
         #范围校验
+        if not posMap:
+            GameWorld.ErrLog("__Func_GetRandPosInRefreshArea GetRefreshPosAt error: return None! npcID=%s" % curNPC.GetNPCID())
+            return
         posMapX = posMap.GetPosX()
         posMapY = posMap.GetPosY()
         
@@ -5654,8 +5658,8 @@
     collTimeReduceRate = PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_CollTimeReduceRate)
     if collTimeReduceRate:
         prepareTime = max(1000, int(prepareTime * (ShareDefine.Def_MaxRateValue - collTimeReduceRate) / float(ShareDefine.Def_MaxRateValue)))
-    PlayerControl.Sync_PrepareBegin(curPlayer, prepareTime, IPY_GameWorld.pstMissionCollecting, prepareID=curNPC.GetID())
-    
+    prepareType = IPY_GameWorld.pstCollecting if curNPC.GetType() == IPY_GameWorld.ntCollection else IPY_GameWorld.pstMissionCollecting
+    PlayerControl.Sync_PrepareBegin(curPlayer, prepareTime, prepareType, prepareID=curNPC.GetID())
     if collectNPCIpyData.GetLostHPPer():
         curPlayer.SetDict(ChConfig.Def_PlayerKey_CollectLostHPTick, tick)
         

--
Gitblit v1.8.0