Exemple #1
0
 public UOMessageEventArgs(string text, Hue hue, MessageType type, MessageFont font, string lang = null)
 {
     Text = text;
     Hue = hue;
     Type = type;
     Font = font;
     Language = lang;
     AffixType = AffixType.None;
 }
Exemple #2
0
 public MessageUnicodeRequest(MessageType type, Hue hue, MessageFont font, string lang, string text)
     : base(0xAD)
 {
     WriteByte((byte)type);
     WriteUShort(hue);
     WriteUShort((ushort)font);
     WriteASCII(lang, 4);
     WriteUnicode(text);
 }
Exemple #3
0
 public UOMessageEventArgs(string text, Hue hue, MessageType type, MessageFont font,
     uint cliloc, AffixType affixType = AffixType.None, string affix = null)
 {
     Text = text;
     Hue = hue;
     Type = type;
     Font = font;
     Cliloc = cliloc;
     AffixType = affixType;
     Affix = affix;
 }
Exemple #4
0
 public MessageUnicode(Serial serial, Graphic graphic, MessageType type, Hue hue,
     MessageFont font, string lang, string name, string text)
     : base(0xAE)
 {
     WriteUInt(serial);
     WriteUShort(graphic);
     WriteByte((byte)type);
     WriteUShort(hue);
     WriteUShort((ushort)font);
     WriteASCII(lang, 4);
     WriteASCII(name, 30);
     WriteUnicode(text);
 }
Exemple #5
0
 public UOMessageEventArgs(Entity parent, string text, string name, Hue hue, MessageType type, MessageFont font, bool unicode = false, string lang = null)
 {
     Parent    = parent;
     Text      = text;
     Name      = name;
     Hue       = hue;
     Type      = type;
     Font      = font;
     Language  = lang;
     AffixType = AffixType.None;
     IsUnicode = unicode;
 }
Exemple #6
0
        public static void Say(string message, ushort hue = 0xFFFF, MessageType type = MessageType.Regular, MessageFont font = MessageFont.Normal)
        {
            if (hue == 0xFFFF)
            {
                hue = Engine.Profile.Current.SpeechHue;
            }

            if (FileManager.ClientVersion >= ClientVersions.CV_500A)
            {
                Socket.Send(new PUnicodeSpeechRequest(message, type, font, hue, "ENU"));
            }
            else
            {
                Socket.Send(new PASCIISpeechRequest(message, type, font, hue));
            }
        }
Exemple #7
0
 public static void Say(string message, ushort hue = 0x17, MessageType type = MessageType.Regular, MessageFont font = MessageFont.Normal)
 {
     Socket.Send(new PUnicodeSpeechRequest(message, type, font, hue, "ENU"));
 }
Exemple #8
0
        public static void OnMessage(Entity parent, string text, string name, Hue hue, MessageType type, MessageFont font, bool unicode = false, string lang = null)
        {
            switch (type)
            {
            case MessageType.Focus:
            case MessageType.Whisper:
            case MessageType.Yell:
            case MessageType.Spell:
            case MessageType.Regular:
            case MessageType.Label:
                parent?.AddOverhead(type, text, (byte)font, hue, unicode);
                break;

            case MessageType.Emote:
                parent?.AddOverhead(type, $"*{text}*", (byte)font, hue, unicode);
                break;

            case MessageType.Command:

            case MessageType.Encoded:
            case MessageType.System:
            case MessageType.Party:
            case MessageType.Guild:
            case MessageType.Alliance:
                break;

            default:
                parent?.AddOverhead(type, text, (byte)font, hue, unicode);
                break;
            }

            Message.Raise(new UOMessageEventArgs(parent, text, name, hue, type, font, unicode, lang), parent ?? _system);
        }
Exemple #9
0
 public static void Say(string message, ushort hue = defaultHue, MessageType type = MessageType.Regular, MessageFont font = MessageFont.Normal) => GameActions.Say(message, hue, type, font);
Exemple #10
0
 public static void Print(this Entity entity, string message, ushort hue = defaultHue, MessageType type = MessageType.Regular, MessageFont font = MessageFont.Normal, bool unicode = true) => OnMessage(entity, message, entity.Name, hue, type, font, unicode, "ENU");
Exemple #11
0
 public static void Print(string message, ushort hue = defaultHue, MessageType type = MessageType.Regular, MessageFont font = MessageFont.Normal, bool unicode = true) => Print(_system, message, hue, type, font, unicode);
Exemple #12
0
 public UOMessageEventArgs(Entity parent, string text, Hue hue, MessageType type, MessageFont font, uint cliloc, bool unicode = false, AffixType affixType = AffixType.None, string affix = null)
 {
     Parent    = parent;
     Text      = text;
     Hue       = hue;
     Type      = type;
     Font      = font;
     Cliloc    = cliloc;
     AffixType = affixType;
     Affix     = affix;
     IsUnicode = unicode;
 }
Exemple #13
0
 public static void Print(string message, ushort hue = defaultHue,
                          MessageType type           = MessageType.Regular, MessageFont font = MessageFont.Normal)
 {
     Print(system, message, hue, type, font);
 }
Exemple #14
0
 public static void Say(string message, ushort hue = defaultHue,
     MessageType type = MessageType.Regular, MessageFont font = MessageFont.Normal)
 {
     new MessageUnicodeRequest(type, hue, font, language, message)
         .SendToServer();
 }
Exemple #15
0
 public static void Print(this Entity entity, string message, ushort hue = defaultHue,
     MessageType type = MessageType.Regular, MessageFont font = MessageFont.Normal)
 {
     new MessageUnicode(entity.Serial, entity.Graphic, type, hue, font, language, entity.Name ?? string.Empty, message)
         .SendToClient();
 }
Exemple #16
0
 public static void Print(string message, ushort hue = defaultHue,
     MessageType type = MessageType.Regular, MessageFont font = MessageFont.Normal)
 {
     Print(system, message, hue, type, font);
 }
Exemple #17
0
 public static void Say(string message, ushort hue = defaultHue,
                        MessageType type           = MessageType.Regular, MessageFont font = MessageFont.Normal)
 {
     new MessageUnicodeRequest(type, hue, font, language, message)
     .SendToServer();
 }
Exemple #18
0
 public static void Print(this Entity entity, string message, ushort hue = defaultHue,
                          MessageType type = MessageType.Regular, MessageFont font = MessageFont.Normal)
 {
     new MessageUnicode(entity.Serial, entity.Graphic, type, hue, font, language, entity.Name ?? string.Empty, message)
     .SendToClient();
 }