public static string GetPlayerStatusByID(PlayerMaster pm, PlayerStatusType statusType, ToilluminateEntities db) { switch (statusType) { case PlayerStatusType.Active: if (pm.ActiveFlag != "2") { return(pm.ActiveFlag); } else { return(GetInheritGroupStatus((int)pm.GroupID, PlayerStatusType.Active, db)); } case PlayerStatusType.Online: if (pm.OnlineFlag != "2") { return(pm.OnlineFlag); } else { return(GetInheritGroupStatus((int)pm.GroupID, PlayerStatusType.Online, db)); } default: return(""); } }
public static bool isPlayerOnline(PlayerMaster pm, ToilluminateEntities db) { return(GetPlayerStatusByID(pm, PlayerStatusType.Online, db) == "1"); }