ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SummonNPC.py
@@ -16,6 +16,9 @@
import ChConfig
import GameWorld
import NPCCommon
import PlayerFB
import PlayerControl
import ShareDefine
#
#逻辑实现
@@ -26,8 +29,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,7 +44,24 @@
    
    npcType = npcData.GetType()
    if npcType in [ChConfig.ntPriWoodPilePVE, ChConfig.ntPriWoodPilePVP]:
        NPCCommon.SummonPriWoodPile(curPlayer, npcID, npcCount)
        mapID = paramList[2] if len(paramList) > 2 else 0
        lineID = paramList[3] if len(paramList) > 3 else 0
        setHP = paramList[4] if len(paramList) > 4 else 0
        if not mapID:
            GameWorld.DebugAnswer(curPlayer, "木桩怪必须指定地图ID才能召唤!")
            return
        customMapID = PlayerControl.GetCustomMapID(curPlayer)
        customLineID = PlayerControl.GetCustomLineID(curPlayer)
        if mapID != customMapID or lineID != customLineID:
            if customMapID:
                PlayerFB.DoExitCustomScene(curPlayer)
            tick = GameWorld.GetGameWorld().GetTick()
            PlayerFB.DoEnterCustomScene(curPlayer, mapID, lineID, tick)
        hp = setHP % ShareDefine.Def_PerPointValue
        hpEx = setHP / ShareDefine.Def_PerPointValue
        NPCCommon.SummonPriWoodPile(curPlayer, npcID, npcCount, hp, hpEx)
        return
    
    for _ in range(npcCount):