public static void OnMessage(Entity entity, UOMessageEventArgs args) { switch (args.Type) { case MessageType.Regular: if (entity != null && entity.Serial.IsValid) { entity.AddGameText(args.Type, args.Text, (byte)args.Font, args.Hue, args.IsUnicode); Engine.SceneManager.GetScene <GameScene>().Journal.Add(args.Text, args.Font, args.Hue, entity.Name); } else { Service.Get <ChatControl>().AddLine(args.Text, (byte)args.Font, args.Hue, args.IsUnicode); Engine.SceneManager.GetScene <GameScene>().Journal.Add(args.Text, args.Font, args.Hue, "System"); } break; case MessageType.System: Service.Get <ChatControl>().AddLine(args.Text, (byte)args.Font, args.Hue, args.IsUnicode); Engine.SceneManager.GetScene <GameScene>().Journal.Add(args.Text, args.Font, args.Hue, "System"); break; case MessageType.Emote: if (entity != null && entity.Serial.IsValid) { entity.AddGameText(args.Type, $"*{args.Text}*", (byte)args.Font, args.Hue, args.IsUnicode); Engine.SceneManager.GetScene <GameScene>().Journal.Add($"*{args.Text}*", args.Font, args.Hue, entity.Name); } else { Engine.SceneManager.GetScene <GameScene>().Journal.Add($"*{args.Text}*", args.Font, args.Hue, "System"); } break; case MessageType.Label: if (entity != null && entity.Serial.IsValid) { entity.AddGameText(args.Type, args.Text, (byte)args.Font, args.Hue, args.IsUnicode); } Engine.SceneManager.GetScene <GameScene>().Journal.Add(args.Text, args.Font, args.Hue, "You see"); break; case MessageType.Focus: break; case MessageType.Whisper: break; case MessageType.Yell: break; case MessageType.Spell: if (entity != null && entity.Serial.IsValid) { entity.AddGameText(args.Type, args.Text, (byte)args.Font, args.Hue, args.IsUnicode); Engine.SceneManager.GetScene <GameScene>().Journal.Add(args.Text, args.Font, args.Hue, entity.Name); } break; case MessageType.Party: Service.Get <ChatControl>().AddLine(args.Text, (byte)args.Font, args.Hue, args.IsUnicode); Engine.SceneManager.GetScene <GameScene>().Journal.Add(args.Text, args.Font, args.Hue, "Party"); break; case MessageType.Guild: Service.Get <ChatControl>().AddLine($"[Guild] [{entity.Name}]: {args.Text}", (byte)args.Font, args.Hue, args.IsUnicode); Engine.SceneManager.GetScene <GameScene>().Journal.Add(args.Text, args.Font, args.Hue, "Party"); break; case MessageType.Alliance: Service.Get <ChatControl>().AddLine($"[Alliance] [{entity.Name}]: {args.Text}", (byte)args.Font, args.Hue, args.IsUnicode); Engine.SceneManager.GetScene <GameScene>().Journal.Add(args.Text, args.Font, args.Hue, "Party"); break; case MessageType.Command: break; case MessageType.Encoded: break; default: throw new ArgumentOutOfRangeException(); } Message.Raise(args, entity ?? _system); }
public static void OnLocalizedMessage(Entity entity, UOMessageEventArgs args) { LocalizedMessage.Raise(args, entity ?? _system); }
public static void OnLocalizedMessage(Entity entity, UOMessageEventArgs args) { LocalizedMessageReceived.Raise(args, entity); }