From 5d9a338c76eba9fd98f95bdff77b78e4c657382e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 23 五月 2019 21:17:16 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(增加过滤炼丹等级通用配置)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SummonNPC.py | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SummonNPC.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SummonNPC.py
index 6d274af..d37ba58 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SummonNPC.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SummonNPC.py
@@ -16,6 +16,7 @@
import ChConfig
import GameWorld
import NPCCommon
+import PlayerFB
#
#逻辑实现
@@ -26,8 +27,9 @@
# @remarks 函数详细说明.
def OnExec(curPlayer, paramList):
#输入命令格式错误
- if not paramList or len(paramList) > 2:
+ if not paramList:
GameWorld.DebugAnswer(curPlayer, "SummonNPC npcID 个数")
+ GameWorld.DebugAnswer(curPlayer, "SummonNPC npcID 个数 前端场景ID lineID")
return
#NPC对象ID
@@ -40,6 +42,19 @@
npcType = npcData.GetType()
if npcType in [ChConfig.ntPriWoodPilePVE, ChConfig.ntPriWoodPilePVP]:
+ mapID = paramList[2] if len(paramList) > 2 else 0
+ lineID = paramList[3] if len(paramList) > 3 else 0
+ if not mapID:
+ GameWorld.DebugAnswer(curPlayer, "木桩怪必须指定地图ID才能召唤!")
+ return
+
+ sceneMapID = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomSceneMapID)
+ sceneLineID = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomSceneLineID)
+ if mapID != sceneMapID or lineID != sceneLineID:
+ if sceneMapID:
+ PlayerFB.DoExitCustomScene(curPlayer)
+ tick = GameWorld.GetGameWorld().GetTick()
+ PlayerFB.DoEnterCustomScene(curPlayer, mapID, lineID, tick)
NPCCommon.SummonPriWoodPile(curPlayer, npcID, npcCount)
return
--
Gitblit v1.8.0