| | |
| | | curCache = None
|
| | | tagPlayerName = ""
|
| | | if tagPlayer == None:
|
| | | curCache = PlayerViewCache.ViewCacheMgr.FindCache(tagPlayerID)
|
| | | curCache = PlayerViewCache.FindViewCache(tagPlayerID)
|
| | | if not curCache:
|
| | | PlayerControl.NotifyCode(curPlayer, "CanootTalk10")
|
| | | return
|
| | |
| | | return
|
| | |
|
| | | if curCache:
|
| | | cacheDict = eval(curCache.GetPropData())
|
| | | cacheDict = PlayerViewCache.GetCachePropDataDict(curCache)
|
| | | tagPlayerName = cacheDict["Name"]
|
| | |
|
| | | talkType = sendPack.GetTalkType()
|
| | |
| | | content = sendPack.GetContent()
|
| | | extraValue = sendPack.GetExtraValue()
|
| | | extras = sendPack.GetExtras()
|
| | | crossPlayerName = CrossRealmPlayer.GetCrossPlayerName(curPlayer)
|
| | |
|
| | | ## 发送到跨服服务器,直接使用跨服boss的分区配置
|
| | | dataMsg = {"PlayerID":playerID, "Content":content, "ExtraValue":extraValue, "Extras":extras}
|
| | | dataMsg = {"PlayerID":playerID, "Name":crossPlayerName, "Content":content, "ExtraValue":extraValue, "Extras":extras}
|
| | | CrossRealmMsg.SendMsgToCrossServer(ShareDefine.ClientServerMsg_ChatCrossWorld, dataMsg)
|
| | | return
|
| | |
|
| | | def ClientServerMsg_ChatCrossWorld(serverGroupID, msgData, tick):
|
| | | ## 收到子服跨服世界频道聊天
|
| | | zoneIpyData = CrossRealmPlayer.GetServerCrossZoneIpyData(ChConfig.Def_FBMapID_CrossPenglai, serverGroupID)
|
| | | zoneIpyData = CrossRealmPlayer.GetCrossZoneIpyDataByServerGroupID(0, serverGroupID)
|
| | | if not zoneIpyData:
|
| | | return
|
| | | serverGroupIDList = zoneIpyData.GetServerGroupIDList()
|
| | |
| | | ## 收到跨服世界频道聊天
|
| | |
|
| | | playerID = msgData["PlayerID"]
|
| | | crossPlayerName = msgData["Name"]
|
| | | content = msgData["Content"]
|
| | | extraValue = msgData["ExtraValue"]
|
| | | extras = msgData["Extras"]
|
| | |
|
| | | curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
|
| | | if curPlayer:
|
| | | curPlayer.ChatCountry(content, extraValue, extras)
|
| | | sendPack = ChNetSendPack.tagTalkCountry()
|
| | | sendPack.Clear()
|
| | | sendPack.Name = crossPlayerName
|
| | | sendPack.NameLen = len(sendPack.Name)
|
| | | sendPack.PlayerID = playerID
|
| | | sendPack.Content = content
|
| | | sendPack.Len = len(sendPack.Content)
|
| | | sendPack.ExtraValue = extraValue
|
| | | sendPack.Extras = extras
|
| | | |
| | | # 全服广播在线玩家
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for i in xrange(playerManager.GetActivePlayerCount()):
|
| | | player = playerManager.GetActivePlayerAt(i)
|
| | | if player == None:
|
| | | continue
|
| | | if PlayerControl.GetIsTJG(player):
|
| | | continue
|
| | | NetPackCommon.SendFakePack(player, sendPack)
|
| | | #curPlayer.ChatCountry(content, extraValue, extras)
|
| | | return
|
| | |
|
| | | ## 公频(封包参数)
|