9673 【后端】【越南】【BT7】【主干】古神战场增加玩家掉落BUFF功能(NPC击杀玩家也可掉落buff)
1个文件已修改
15 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py
@@ -1469,10 +1469,10 @@
    if atkObjType == IPY_GameWorld.gotPlayer:
        NotifyBattlefieldHelp(False, atkObj) # 击杀的暂只实时通知自己
        
        # 玩家被玩家击杀,掉落个人buff
        if defObjType == IPY_GameWorld.gotPlayer:
            DoDropPersonBuffOnKilled(atkObj, defObj, tick)
    # 玩家被击杀,掉落个人buff
    if defObjType == IPY_GameWorld.gotPlayer:
        DoDropPersonBuffOnKilled(atkObj, defObj, tick)
    return
def DoFB_NPCDead(curNPC):
@@ -1843,10 +1843,13 @@
            NotifyBattlefieldHelp()
    return
def DoDropPersonBuffOnKilled(atkPlayer, defPlayer, tick):
def DoDropPersonBuffOnKilled(atkObj, defPlayer, tick):
    dropPersonBuffNPCList = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldDropPersonBuff", 1)
    if not dropPersonBuffNPCList:
        return
    atkObjType = atkObj.GetGameObjType()
    playerID = atkObj.GetPlayerID() if atkObjType == IPY_GameWorld.gotPlayer else 0
    
    dropNPCIDList = []
    for npcID in dropPersonBuffNPCList:
@@ -1873,7 +1876,7 @@
        if not dropX:
            continue
        npcID = dropNPCIDList.pop(0)
        NPCCommon.SummonMapNpc(npcID, dropX, dropY, playerID=atkPlayer.GetPlayerID())
        NPCCommon.SummonMapNpc(npcID, dropX, dropY, playerID=playerID)
        
    return