fix: Fixes buff icons showing up when you log in (#2072)

This commit is contained in:
Kamron Batman 2025-01-17 21:47:44 -08:00 • committed by GitHub
parent b6950fc77c
commit b90f9e51ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)