From 545986a8fdde345b28cf3004be84c6cfe79a3dc1 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 19 四月 2019 11:29:12 +0800
Subject: [PATCH] 6459 【后端】【2.0】缥缈仙域开发单(跨服分区逻辑优化,支持跨服妖王分区状态同步)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossDemonKing.py |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossDemonKing.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossDemonKing.py
index f8d42f1..301da44 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossDemonKing.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossDemonKing.py
@@ -60,13 +60,14 @@
 def OnGetFBEnterPos(curPlayer, mapID, lineId, ipyEnterPosInfo, tick):
     return ipyEnterPosInfo
 
-def GetCurFBLineBOSSID(lineID=-1):
+def GetCurFBLineBOSSID(mapID=-1, lineID=-1):
     #该分线刷的BOSSID
+    if mapID == -1:
+        mapID = ChConfig.Def_FBMapID_CrossDemonKing if GameWorld.IsCrossServer() else ChConfig.Def_FBMapID_DemonKing
     if lineID == -1:
         lineID = GetCurFBFuncLineID()
-    if lineID == -1:
+    if mapID == -1 or lineID == -1:
         return 0
-    mapID = ChConfig.Def_FBMapID_CrossDemonKing if GameWorld.IsCrossServer() else ChConfig.Def_FBMapID_DemonKing
     ipyData = IpyGameDataPY.GetIpyGameDataByCondition("FairyDomain", {"MapID":mapID, "LineID":lineID})
     if not ipyData:
         return 0
@@ -76,13 +77,13 @@
 def GetCurFBFuncLineID():
     ## 获取本线路功能线路ID
     if GameWorld.IsCrossServer():
-        return GameWorld.GetGameWorld().GetPropertyID() % 1000
+        return GameWorld.GetGameWorld().GetPropertyID() % 10000 / 10
     return GameWorld.GetGameWorld().GetPropertyID() - 1
 
 def GetCurFBLineZoneID():
     ## 获取本线路所属跨服分区
     if GameWorld.IsCrossServer():
-        return GameWorld.GetGameWorld().GetPropertyID() / 1000
+        return GameWorld.GetGameWorld().GetPropertyID() / 10000
     return 0
 
 ## 进副本
@@ -90,7 +91,7 @@
     playerID = curPlayer.GetPlayerID()
     zoneID = GetCurFBLineZoneID()
     funcLineID = GetCurFBFuncLineID()
-    bossID = GetCurFBLineBOSSID(funcLineID)
+    bossID = GetCurFBLineBOSSID(lineID=funcLineID)
     visitCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FairyDomainVisitCnt)
     GameWorld.Log("DoEnterFB zoneID=%s,funcLineID=%s,bossID=%s,visitCount=%s" % (zoneID, funcLineID, bossID, visitCount), playerID)
     PyGameData.g_fbPickUpItemDict.pop(playerID, 0)
@@ -154,7 +155,7 @@
 def __FBNPCOnKilled(curNPC, tick):
     bossID = curNPC.GetNPCID()
     funcLineID = GetCurFBFuncLineID()
-    if bossID != GetCurFBLineBOSSID(funcLineID):
+    if bossID != GetCurFBLineBOSSID(lineID=funcLineID):
         return
     
     zoneID = GetCurFBLineZoneID()
@@ -187,7 +188,7 @@
             ownerName = curPlayer.GetPlayerName()
         giveItemList = __GetDemonKingPrizeItemList(curPlayer, mapID, funcLineID, eventID, isOwner)
         GameWorld.Log("玩家奖励: %s" % giveItemList, playerID)
-        ChItem.DropItem(curPlayer, giveItemList, bossID, dropPosX, dropPosY, isOnlySelfSee=True, isDropDisperse=True)
+        ChItem.DoMapDropItem(curPlayer, giveItemList, bossID, dropPosX, dropPosY, isOnlySelfSee=True, isDropDisperse=True)
         #curPlayer.Sync_TimeTick(ChConfig.tttPickupItem, 0, ChConfig.Def_FBPickupItemTime, True)
         if not isCrossServer:
             __SetDemonKingVisitState(curPlayer, mapID, funcLineID, PlayerFairyDomain.FDEventState_Visited)

--
Gitblit v1.8.0