From c3bbd3b0263fc6c2127cd9f072f497f46f98758b Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 07 二月 2026 21:43:20 +0800
Subject: [PATCH] 389 流向记录(简化战斗流向记录,只统计出场的武将ID;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTalk.py | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTalk.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTalk.py
index ff8820f..8d4e576 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTalk.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTalk.py
@@ -20,12 +20,12 @@
import ShareDefine
import IPY_GameWorld
import ChPyNetSendPack
-import CrossRealmPlayer
import PlayerViewCache
import NetPackCommon
import IpyGameDataPY
import PlayerControl
import PlayerFamily
+import CrossPlayer
import DBDataMgr
import math
@@ -36,7 +36,8 @@
}
def OnPlayerLogin(curPlayer):
- NotifyTalkCache(curPlayer)
+ crossPlayer = CrossPlayer.GetCrossPlayerMgr().FindCrossPlayer(curPlayer.GetPlayerID())
+ NotifyTalkCache(crossPlayer, [IPY_GameWorld.tcWorld])
return
#// B3 20 聊天 #tagCSTalk
@@ -63,9 +64,6 @@
elif channelType == IPY_GameWorld.tcCountry:
if GameWorld.IsCrossServer():
- return
- if not CrossRealmPlayer.IsCrossServerOpen():
- PlayerControl.NotifyCode(curPlayer, "CrossMatching18")
return
if not __CheckTalk(curPlayer, channelType, content, tick):
@@ -98,10 +96,10 @@
if channelType == IPY_GameWorld.tcWorld:
NetPackCommon.SendFackPackOnline(clientPack)
+ DoTalkCache(channelType, playerID, content, bubbleBox, familyID)
elif channelType == IPY_GameWorld.tcFamily:
- PlayerFamily.Broadcast_FamilyPack(familyID, clientPack)
+ PlayerFamily.OnFamilyTalk(curPlayer, familyID, clientPack, tick)
- DoTalkCache(channelType, playerID, content, bubbleBox, familyID)
return
def __CheckTalk(curPlayer, channelType, content, tick, checkGMForbidenTalk=True):
@@ -168,13 +166,17 @@
return
-def NotifyTalkCache(curPlayer):
+def NotifyTalkCache(crossPlayer, channelTypeList):
##上线通知聊天缓存
-
+ # @param channelTypeList: 指定需要通知聊天缓存频道列表,不同频道的缓存可能存储在不同的服务器,如公会在公会数据所在服等
+ if not crossPlayer:
+ return
for channelType in ChannelCacheMax.keys():
+ if channelType not in channelTypeList:
+ continue
cacheList = []
if channelType == IPY_GameWorld.tcFamily:
- familyID = curPlayer.GetFamilyID()
+ familyID = crossPlayer.GetFamilyID()
if not familyID:
continue
familyActonMgr = DBDataMgr.GetFamilyActionMgr().GetFamilyAction(familyID, ShareDefine.Def_ActionType_TalkCache)
@@ -231,6 +233,6 @@
clientPack.ChannelType = channelType
clientPack.InfoList = packCacheList
clientPack.Count = len(clientPack.InfoList)
- NetPackCommon.SendFakePack(curPlayer, clientPack)
+ CrossPlayer.SendFakePack(crossPlayer, clientPack)
return
--
Gitblit v1.8.0