fix: Fixes extension method refactors causing crash (#1529)

This commit is contained in:
Kamron Batman 2023-10-02 22:24:16 -07:00 • committed by GitHub
parent f2de2fbb77
commit e18115dd94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 5 deletions

View file

@ -65,8 +65,16 @@ public class ChampionTitleSystem : GenericPersistence
}
}
public static bool GetChampionTitleContext(PlayerMobile player, out ChampionTitleContext context) =>
_championTitleContexts.TryGetValue(player, out context);
public static bool GetChampionTitleContext(PlayerMobile player, out ChampionTitleContext context)
{
if (player != null && _championTitleContexts.TryGetValue(player, out context))
{
return true;
}
context = null;
return false;
}
public static ChampionTitleContext GetOrCreateChampionTitleContext(PlayerMobile player)
{