From a15e3af5eb36a3c4eb6016e824faca23d6d6a9dc Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 14 一月 2019 11:06:06 +0800
Subject: [PATCH] 5768 【后端】【1.5】新增8-14天活动功能(通知修改)
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py | 29 +++++++++++++++++++++++++----
1 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
index a9dd91e..36086f0 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldBoss.py
@@ -41,6 +41,7 @@
import PyGameDataStruct
import PyDataManager
import PlayerControl
+import CrossRealmMsg
import CommFunc
import PyGameData
import PlayerGeTui
@@ -529,16 +530,33 @@
##--------------------------------------------------------------------------------------------------
+def CrossServerMsg_DropGoodItem(msgList, tick):
+ ## 收到跨服服务器同步的掉落好物品信息
+ playerID = msgList[0]
+ curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
+ if curPlayer:
+ msgList[1] = curPlayer.GetName() # 本服玩家在线,修改为本服玩家的名字展示
+ OnKillBossDropGoodItem(msgList, tick)
+ return
+
def OnKillBossDropGoodItem(msgList, tick):
# playerName, mapID, npcID, itemID, userData
- if len(msgList) != 7:
+ if len(msgList) != 8:
return
- playerID, killerName, mapID, npcID, itemID, userData, weightValue = msgList
- GameWorld.DebugLog("击杀Boss掉落好物品: mapID=%s,npcID=%s,killerName=%s,itemID=%s, userData=%s, weightValue=%s"
- % (mapID, npcID, killerName, itemID, userData, weightValue))
+ playerID, killerName, mapID, npcID, itemID, userData, weightValue, serverGroupID = msgList
+ GameWorld.DebugLog("击杀Boss掉落好物品: mapID=%s,npcID=%s,killerName=%s,itemID=%s, userData=%s, weightValue=%s, serverGroupID=%s"
+ % (mapID, npcID, killerName, itemID, userData, weightValue, serverGroupID))
maxRecordCnt = IpyGameDataPY.GetFuncCfg('DropRecordNum')
if not maxRecordCnt:
return
+
+ if GameWorld.IsCrossServer():
+ # 同步到玩家对应子服
+ if not serverGroupID:
+ return
+ CrossRealmMsg.SendMsgToClientServer(ShareDefine.CrossServerMsg_DropGoodItem, msgList, [serverGroupID])
+ return
+
recType = ShareDefine.Def_UniversalGameRecType_BossDropGoodItemInfo
universalRecMgr = GameWorld.GetUniversalRecMgr()
recordList = universalRecMgr.GetTypeList(recType)
@@ -568,6 +586,9 @@
PlayerUniversalGameRec.MapServer_UniversalGameRec(None, recType, [mapID, npcID, itemID, playerID, weightValue],
[killerName, "", userData])
+
+ msgList = [killerName, playerID, mapID, npcID, itemID, userData]
+ PlayerControl.WorldNotify(0, 'DropRecord' , msgList)
return
--
Gitblit v1.8.0