From 2fcecf0b2c9d314868f999defc976ffd56ba8a3e Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 06 六月 2019 10:50:30 +0800
Subject: [PATCH] 6805 【后端】【2.0】副本前端化(木桩支持属性成长)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index 04951b4..8778e5b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -165,6 +165,15 @@
randMaxLV = gameFB.GetGameFBDictByKey(ChConfig.Def_FB_NPCStrengthenMaxLV)
strengthenLV = random.randint(randMinLV, randMaxLV)
+ # 木桩怪最大、平均成长等级处理,直接取归属玩家等级
+ if lvStrengthenType in [1, 2] and curNPC.GetType() in [ChConfig.ntPriWoodPilePVE, ChConfig.ntPriWoodPilePVP]:
+ owner = None
+ summonPlayerID = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_PriWoodPilePlayerID)
+ if summonPlayerID:
+ owner = GameWorld.GetObj(summonPlayerID, IPY_GameWorld.gotPlayer)
+ if owner:
+ strengthenLV = owner.GetLV()
+
if strengthenIpyData.GetCmpNPCBaseLV():
strengthenLV = max(strengthenLV, curNPC.GetLV())
@@ -2065,8 +2074,8 @@
maxCount = 3
nowCount = len(playerPriWoodNPCList)
summonCount = min(count, maxCount - nowCount)
- #GameWorld.DebugLog("召唤: count=%s,maxCount=%s,nowCount=%s,summonCount=%s,hp=%s,hpEx=%s"
- # % (count, maxCount, nowCount, summonCount, hp, hpEx))
+ GameWorld.DebugLog("召唤木桩: npcID=%s,count=%s,maxCount=%s,nowCount=%s,summonCount=%s,hp=%s,hpEx=%s"
+ % (npcID, count, maxCount, nowCount, summonCount, hp, hpEx))
if summonCount <= 0:
return
@@ -2090,6 +2099,7 @@
#技能召唤坐标 ChConfig.Def_SummonAppearDist
summonPos = GameMap.GetEmptyPlaceInArea(curPlayer.GetPosX(), curPlayer.GetPosY(), 3)
summonNPC.Reborn(summonPos.GetPosX(), summonPos.GetPosY(), False)
+ NPCControl(summonNPC).ResetNPC_Init(isReborn=True)
if hp or hpEx:
summonNPC.SetHP(hp)
summonNPC.SetHPEx(hpEx)
--
Gitblit v1.8.0