From 93591a53c1cdabb4e595fa4d5c36eb89998a6e6f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 25 五月 2019 18:50:56 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(召唤木桩由玩家召唤兽改为普通NPC)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SummonNPC.py | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 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 d37ba58..1afdd2c 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
@@ -17,6 +17,8 @@
import GameWorld
import NPCCommon
import PlayerFB
+import PlayerControl
+import ShareDefine
#
#逻辑实现
@@ -29,7 +31,7 @@
#输入命令格式错误
if not paramList:
GameWorld.DebugAnswer(curPlayer, "SummonNPC npcID 个数")
- GameWorld.DebugAnswer(curPlayer, "SummonNPC npcID 个数 前端场景ID lineID")
+ GameWorld.DebugAnswer(curPlayer, "SummonNPC npcID 个数 前端场景ID lineID 血量")
return
#NPC对象ID
@@ -44,18 +46,22 @@
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
+ setHP = paramList[4] if len(paramList) > 4 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:
+ 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)
- NPCCommon.SummonPriWoodPile(curPlayer, npcID, npcCount)
+
+ hp = setHP % ShareDefine.Def_PerPointValue
+ hpEx = setHP / ShareDefine.Def_PerPointValue
+ NPCCommon.SummonPriWoodPile(curPlayer, npcID, npcCount, hp, hpEx)
return
for _ in range(npcCount):
--
Gitblit v1.8.0