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; }
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); }
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; }
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); }
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; }
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)); } }
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")); }
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); }
public static void Say(string message, ushort hue = defaultHue, MessageType type = MessageType.Regular, MessageFont font = MessageFont.Normal) => GameActions.Say(message, hue, type, font);
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");
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);
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; }
public static void Print(string message, ushort hue = defaultHue, MessageType type = MessageType.Regular, MessageFont font = MessageFont.Normal) { Print(system, message, hue, type, font); }
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(); }
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(); }