예제 #1
0
 public void Notify(string text, ServerConstants.NoticeType type = ServerConstants.NoticeType.Popup)
 {
     foreach (Character character in Characters)
     {
         Character.Notify(character, text, type);
     }
 }
예제 #2
0
        public static Packet BroadcastMessage(ServerConstants.NoticeType messageType, string message)
        {
            Packet broadcastMessage = new Packet(ServerOperationCode.BroadcastMsg);

            broadcastMessage
            .WriteByte((byte)messageType);

            if (messageType == ServerConstants.NoticeType.ScrollingText)
            {
                broadcastMessage.WriteBool(!string.IsNullOrEmpty(message));
            }

            broadcastMessage.WriteString(message);

            return(broadcastMessage);
        }