Add: 增加活动线隐藏NPC逻辑支持;
骑宠争夺伤害前x名广播提示修改;
3个文件已修改
27 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/KillScreenNPC.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FamilyRobBoss.py 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/KillScreenNPC.py
@@ -86,7 +86,8 @@
        return
    if curNPC.GetType() not in [IPY_GameWorld.ntMonster]:
        return
    if not curNPC.GetVisible():
        return
    curHP = GameObj.GetHP(curNPC)
    AttackCommon.NPCAddObjInHurtList(curPlayer, curNPC, curHP, curHP)
    
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FamilyRobBoss.py
@@ -258,7 +258,7 @@
    curNPCPlayerOrderAwardDict = ownerFamilyPlayerOrderAwardDict.get(bossID, {})
    maxOrder = max(curNPCPlayerOrderAwardDict) if curNPCPlayerOrderAwardDict else 0
    curOrder = 0
    #orderPlayerNameList = []
    orderPlayerNameList = []
    for hurtPlayer in npcHisHurtPlayerList:
        # 只算归属仙盟的
        if hurtPlayer.familyID != ownerFamilyID:
@@ -268,13 +268,14 @@
        batchPlayerIDList.append([hurtPlayer.objID])
        batchAddItemList.append(awardItemList)
        batchParamList.append([bossID, curOrder])
        #orderPlayerNameList.append(hurtPlayer.name)
        orderPlayerNameList.append(hurtPlayer.name)
        GameWorld.Log("    归属仙盟第%s名额外奖励: %s" % (curOrder, awardItemList))
        if curOrder >= maxOrder:
            break
    if batchPlayerIDList:
        PlayerControl.SendMailBatch("FairyGrabBoss2", batchPlayerIDList, batchAddItemList, batchParamList)
        #PlayerControl.WorldNotify(0, "FairyGrabBossRank", orderPlayerNameList + [bossID])
        orderPlayerName = ShareDefine.Def_Space.join(orderPlayerNameList)
        PlayerControl.WorldNotify(0, "FairyGrabBossRank", [orderPlayerName, bossID])
        
    # 参与仙盟历史伤血奖励, 算历史伤血
    joinAwardNeedHurtHPPer = IpyGameDataPY.GetFuncCfg("FairyGrabBoss", 2)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py
@@ -46,6 +46,7 @@
import SkillShell
import FBLogic
import PassiveBuffEffMng
import IpyGameDataPY
#---------------------------------------------------------------------
#导入所有的NPCAI
GameWorld.ImportAll("Script\\NPC\\" , "NPCAI")
@@ -136,11 +137,25 @@
def __Func_InitNPC(tick):
    #调用NPC AI击杀触发
    NPCCommon.OnNPCDie = OnNPCDie
    GameWorld.Log("NPC Initing...FB %d"%GameWorld.GetGameWorld().GetCurGameWorldIndex())
    gameWorldIndex = GameWorld.GetGameWorld().GetCurGameWorldIndex()
    GameWorld.Log("NPC Initing...FB %d" % gameWorldIndex)
    mapID = GameWorld.GetMap().GetMapID()
    # 由于某些常规线boss区域要重复利用,所以活动线独立,不开放给玩家,仅特定活动时系统传入
    activityMapLineDict = IpyGameDataPY.GetFuncEvalCfg("MapLine", 2, {})
    if mapID in activityMapLineDict:
        activityLineID = max(0, activityMapLineDict[mapID] - 1)
    hideNPCIDList = [] # 需要隐藏的NPCID列表
    if gameWorldIndex == activityLineID:
        hideNPCIDList = IpyGameDataPY.GetFuncEvalCfg("MapLine", 3)
        GameWorld.Log("    hideNPCIDList=%s" % hideNPCIDList)
    gameNPC = GameWorld.GetNPCManager()
    npcCount = gameNPC.GetNPCCount()
    for i in xrange(npcCount):
        curNPC = gameNPC.GetNPCByIndex(i)
        if curNPC.GetNPCID() in hideNPCIDList:
            curNPC.SetVisible(False)
            continue
        #初始化
        NPCCommon.InitNPC(curNPC)