From 898494b9c3f767f7da9d02d91db3898bdf9aeffd Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 04 十二月 2019 16:21:27 +0800
Subject: [PATCH] 8346 【恺英】【后端】协助系统(修改为正在进行中的协助信息, 增加boss伤血榜单通知)
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py | 59 +++++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 39 insertions(+), 20 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py
index 8bd9d39..b911b61 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerTalk.py
@@ -496,13 +496,18 @@
return
def NotifyTalkCache(curPlayer):
- ##上线通知聊天缓存
- sendPack = ChPyNetSendPack.tagGCTalkCache()
- sendPack.Clear()
- sendPack.InfoList = []
+ ##上线通知非脱机离线后的聊天缓存
+ if PlayerControl.GetIsTJG(curPlayer):
+ return
+ playerID = curPlayer.GetPlayerID()
+ unTJLogoffTime = PyGameData.g_unTJLogoffTime.get(playerID, 0)
+
+ familyCacheList, worldCacheList = [], []
familyID = curPlayer.GetFamilyID()
if familyID and familyID in PyGameData.g_familyTalkCache:
for curTime, name, playerID, content, extras in PyGameData.g_familyTalkCache[familyID]:
+ if curTime < unTJLogoffTime:
+ continue
contentInfo = ChPyNetSendPack.tagGCTalkCacheInfo()
contentInfo.Clear()
contentInfo.ChannelType = 2
@@ -513,20 +518,34 @@
contentInfo.Content = content
contentInfo.Len = len(content)
contentInfo.Extras = extras
- sendPack.InfoList.append(contentInfo)
- elif PyGameData.g_worldTalkCache:
- for curTime, name, playerID, content, extras in PyGameData.g_worldTalkCache:
- contentInfo = ChPyNetSendPack.tagGCTalkCacheInfo()
- contentInfo.Clear()
- contentInfo.ChannelType = 1
- contentInfo.Name = name
- contentInfo.NameLen = len(name)
- contentInfo.PlayerID = playerID
- contentInfo.Time = curTime
- contentInfo.Content = content
- contentInfo.Len = len(content)
- contentInfo.Extras = extras
- sendPack.InfoList.append(contentInfo)
- sendPack.Count = len(sendPack.InfoList)
- NetPackCommon.SendFakePack(curPlayer, sendPack)
+ familyCacheList.append(contentInfo)
+
+ for curTime, name, playerID, content, extras in PyGameData.g_worldTalkCache:
+ if curTime < unTJLogoffTime:
+ continue
+ contentInfo = ChPyNetSendPack.tagGCTalkCacheInfo()
+ contentInfo.Clear()
+ contentInfo.ChannelType = 1
+ contentInfo.Name = name
+ contentInfo.NameLen = len(name)
+ contentInfo.PlayerID = playerID
+ contentInfo.Time = curTime
+ contentInfo.Content = content
+ contentInfo.Len = len(content)
+ contentInfo.Extras = extras
+ worldCacheList.append(contentInfo)
+
+ if familyCacheList:
+ sendPack = ChPyNetSendPack.tagGCTalkCache()
+ sendPack.Clear()
+ sendPack.InfoList = familyCacheList
+ sendPack.Count = len(sendPack.InfoList)
+ NetPackCommon.SendFakePack(curPlayer, sendPack)
+
+ if worldCacheList:
+ sendPack = ChPyNetSendPack.tagGCTalkCache()
+ sendPack.Clear()
+ sendPack.InfoList = worldCacheList
+ sendPack.Count = len(sendPack.InfoList)
+ NetPackCommon.SendFakePack(curPlayer, sendPack)
return
\ No newline at end of file
--
Gitblit v1.8.0