| | |
| | | import ChConfig
|
| | | import GameWorld
|
| | | import NPCCommon
|
| | | import ShareDefine
|
| | |
|
| | | #
|
| | | #逻辑实现
|
| | |
| | | # @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 个数 血量")
|
| | | return
|
| | |
|
| | | #NPC对象ID
|
| | |
| | |
|
| | | npcType = npcData.GetType()
|
| | | if npcType in [ChConfig.ntPriWoodPilePVE, ChConfig.ntPriWoodPilePVP]:
|
| | | NPCCommon.SummonPriWoodPile(curPlayer, npcID, npcCount)
|
| | | setHP = paramList[2] if len(paramList) > 2 else 0
|
| | | hp = setHP % ShareDefine.Def_PerPointValue
|
| | | hpEx = setHP / ShareDefine.Def_PerPointValue
|
| | | NPCCommon.SummonPriWoodPile(curPlayer, npcID, npcCount, hp, hpEx)
|
| | | return
|
| | |
|
| | | for _ in range(npcCount):
|