// ----------------------------------------------------------------------------------- // checkGroupCount // Checks if there is still space in the group (Party, Guild or Realm) // ----------------------------------------------------------------------------------- public bool checkGroupCount(Player player) { if (playerGroupType == GroupType.Party) { return(groupNames.Any(x => x == player.party.party.members[0]) || (getGroupCount < getMaxGroupCount)); } else if (playerGroupType == GroupType.Guild) { return(groupNames.Any(x => x == player.guild.name) || (getGroupCount < getMaxGroupCount)); } return(true); }
// ----------------------------------------------------------------------------------- // UCE_HasUnlockedClass // ----------------------------------------------------------------------------------- public bool UCE_HasUnlockedClass(Player player) { if (player == null || player.name == "") { return(false); } return(UCE_unlockedClasses.Any(s => s == player.name)); }
// ----------------------------------------------------------------------------------- // UCE_HasAccountUnlock // ----------------------------------------------------------------------------------- public bool UCE_HasAccountUnlock(string unlockableName) { if (string.IsNullOrWhiteSpace(unlockableName)) { return(true); } return(UCE_accountUnlockables.Any(s => s == unlockableName.ToLower())); }
public void UCE_OnSelect_InteractableWorkbench(UCE_InteractableWorkbench _UCE_selectedWorkbench) { UCE_selectedWorkbench = _UCE_selectedWorkbench; UCE_CraftingProfessionRequirement requiredProfession = getRequiredCraftingProfession(); if (requiredProfession != null) { List <UCE_Tmpl_Recipe> recipes = new List <UCE_Tmpl_Recipe>(); // -- filter recipes that match the workbench's profession // -- filter recipes that match the players recipe list recipes.AddRange( UCE_Tmpl_Recipe.dict.Values.ToList().Where( x => x.requiredCraft == requiredProfession.template && UCE_recipes.Any(r => r == x.name) ) ); if (recipes.Count > 0) { if (!_UCE_UI_Crafting) { _UCE_UI_Crafting = FindObjectOfType <UCE_UI_Crafting>(); } _UCE_UI_Crafting.Show(UCE_selectedWorkbench.gameObject, requiredProfession.template, recipes); } else { UCE_PopupShow(UCE_selectedWorkbench.nothingMessage); } } else { UCE_PopupShow(UCE_selectedWorkbench.nothingMessage); } }