public static TimeGate getByIcon(int icon) { for (TimeGate gate : TimeGate.values()) { if (gate.getIcon() == icon) { return gate; } } return null; // Default }
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; }