Esempio n. 1
0
 public static TimeGate getByIcon(int icon) {
   for (TimeGate gate : TimeGate.values()) {
     if (gate.getIcon() == icon) {
       return gate;
     }
   }
   return null; // Default
 }
Esempio n. 2
0
 public static String getTimeGateSelection(MapleCharacter chr) {
   String mapselect = "";
   for (TimeGate gate : TimeGate.values()) {
     if ((chr.getQuestStatus(gate.getRequieredQuest()) == gate.getRequieredQuestState())
         || gate.getRequieredQuest() == 0) {
       mapselect += "#" + gate.getIcon() + "#" + gate.getName();
     }
   }
   if (mapselect == null || "".equals(mapselect)) {
     mapselect = "#-1# There are no locations you can move to.";
   }
   return mapselect;
 }
Esempio n. 3
0
 public static int getGateLocation(int icon) {
   return TimeGate.getByIcon(icon) != null
       ? TimeGate.getByIcon(icon).getMap()
       : TimeGate.YEAR_2099.getMap(); // Year 2099 as default
 }