diff --git a/Fika.Core/Coop/Utils/FikaGlobals.cs b/Fika.Core/Coop/Utils/FikaGlobals.cs index f64d9f8e..b9502338 100644 --- a/Fika.Core/Coop/Utils/FikaGlobals.cs +++ b/Fika.Core/Coop/Utils/FikaGlobals.cs @@ -133,9 +133,24 @@ public static bool IsDedicatedProfile(this Profile profile) return profile.Info.GroupId.ToLower() == "dedicated"; } + /// + /// Forces the to be set on a profile + /// + /// + /// public static void SetProfileNickname(this InfoClass infoClass, string nickname) { Traverse.Create(infoClass).Field("MainProfileNickname").Value = nickname; } + + /// + /// Checks whether a profile belongs to a player or an AI + /// + /// + /// True if the profile belongs to a player, false if it belongs to an AI + public static bool IsPlayerProfile(this Profile profile) + { + return profile.QuestsData != null || !string.IsNullOrEmpty(profile.PetId); + } } }