using Fantasy; using Fantasy.Platform.Net; namespace NB.Chat; public static class ChatHelper { /// /// 发送一个聊天消息给ChatScene(不能在ChatScene中调用) /// /// /// /// public static void SendChatMessage(Scene scene, long chatUnitRouteId, ChatInfoTree tree) { if (scene.SceneType == SceneType.Social) { Log.Warning("ChatHelper.SendChatMessage: scene is not a chat scene."); return; } var other2ChatChatMessage = new Other2Chat_ChatMessage() { ChatInfoTree = tree }; // scene.NetworkMessagingComponent.SendInnerRoute(chatUnitRouteId, other2ChatChatMessage); scene.NetworkMessagingComponent.Send(chatUnitRouteId, other2ChatChatMessage); } }