28 lines
767 B
C#
28 lines
767 B
C#
using Fantasy;
|
|
using Fantasy.Async;
|
|
using Fantasy.Platform.Net;
|
|
|
|
namespace Hotfix;
|
|
|
|
public static class ChatHelper
|
|
{
|
|
|
|
/// <summary>
|
|
/// 全服广播
|
|
/// </summary>
|
|
/// <param name="scene"></param>
|
|
/// <param name="message"></param>
|
|
public static void BoardCast(Scene scene,string message)
|
|
{
|
|
var gateConfigs = SceneConfigData.Instance.GetSceneBySceneType(SceneType.Gate);
|
|
var netMessageComponent = scene.NetworkMessagingComponent;
|
|
foreach (var gateConfig in gateConfigs)
|
|
{
|
|
Log.Debug(gateConfig.RouteId.ToString());
|
|
netMessageComponent.SendInnerRoute(gateConfig.RouteId, new Chat2G_BoardMessage()
|
|
{
|
|
Message = message
|
|
});
|
|
}
|
|
}
|
|
} |