From b90f9e51acf155a1823c08a3b84439d2360f2163 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Fri, 17 Jan 2025 21:47:44 -0800 Subject: [PATCH] fix: Fixes buff icons showing up when you log in (#2072) --- Projects/UOContent/Misc/BuffIcons.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Projects/UOContent/Misc/BuffIcons.cs b/Projects/UOContent/Misc/BuffIcons.cs index f72fd3c27..46ab80109 100644 --- a/Projects/UOContent/Misc/BuffIcons.cs +++ b/Projects/UOContent/Misc/BuffIcons.cs @@ -1,4 +1,5 @@ using System; +using ModernUO.CodeGeneratedEvents; using Server.Mobiles; using Server.Network; @@ -108,17 +109,15 @@ namespace Server Enabled = ServerConfiguration.GetOrUpdateSetting("buffIcons.enable", Core.ML); } - public static void ResendBuffsOnClientVersionReceived(NetState ns, ClientVersion cv) + [OnEvent(nameof(PlayerMobile.PlayerLoginEvent))] + public static void OnLogin(PlayerMobile pm) { if (!Enabled) { return; } - if (ns.Mobile is PlayerMobile pm) - { - Timer.StartTimer(pm.ResendBuffs); - } + pm.ResendBuffs(); } public static void AddBuff(Mobile m, BuffInfo b)