// ------------------------------------------------------------------------------- // getCanUseLocation // ------------------------------------------------------------------------------- public static bool getCanUseLocation(CanUseLocation useLocation) { switch (useLocation) { case CanUseLocation.Everywhere: return(true); case CanUseLocation.InBattle: return(Finder.battle.InBattle); case CanUseLocation.InNormalBattle: return(Finder.battle.InBattle && !Finder.battle.InBossBattle); case CanUseLocation.InTown: return(Finder.map.locationType == LocationType.Town && !Finder.battle.InBattle); case CanUseLocation.InTownOrWorldmap: return((Finder.map.locationType == LocationType.Town || Finder.map.locationType == LocationType.Worldmap) && !Finder.battle.InBattle); case CanUseLocation.InDungeon: return(Finder.map.locationType != LocationType.Town && !Finder.battle.InBattle); case CanUseLocation.InBattleAndDungeon: return(Finder.map.locationType != LocationType.Town && (!Finder.battle.InBattle || !Finder.battle.InBossBattle || (Finder.battle.InBattle || Finder.battle.InBossBattle))); case CanUseLocation.InNormalBattleAndDungeon: return(Finder.map.locationType != LocationType.Town && (!Finder.battle.InBattle || (Finder.battle.InBattle && !Finder.battle.InBossBattle))); case CanUseLocation.InWorldmap: return(Finder.map.locationType == LocationType.Worldmap); } return(false); }
// ------------------------------------------------------------------------------- // getLocationTypeDescription // ------------------------------------------------------------------------------- public string getLocationTypeDescription(CanUseLocation useLocation) { return(languages[language].useLocationDescriptions.FirstOrDefault(x => x.useLocation == useLocation).description); }