hxp
2019-06-06 2fcecf0b2c9d314868f999defc976ffd56ba8a3e
6805 【后端】【2.0】副本前端化(木桩支持属性成长)
1个文件已修改
14 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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)