From 1a593b10b7d9dd7887a5928f263702aa458478da Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 20 十月 2022 15:49:23 +0800
Subject: [PATCH] 9673 【后端】【越南】【BT7】【主干】古神战场增加玩家掉落BUFF功能(NPC击杀玩家也可掉落buff)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py
index 4a1e4d7..6da0d8b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py
+++ b/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
--
Gitblit v1.8.0