|
| 1 | +/* |
| 2 | + * Copyright (c) dec4234 2021. Access is granted, without any express warranties or guarantees of |
| 3 | + * any kind, to all wishing to use this software for their benefit. No one may specifically claim credit, or |
| 4 | + * ownership of this software without the explicit permission of the author. |
| 5 | + * |
| 6 | + * GitHub -> https://github.com/dec4234/JavaDestinyAPI |
| 7 | + */ |
| 8 | + |
| 9 | +package material.stats.activities; |
| 10 | + |
| 11 | +/** |
| 12 | + * A collection of 2 to 4 letter identifiers for Activities |
| 13 | + * Also Hash Identifiers |
| 14 | + * |
| 15 | + * e.g. DSC for Deep Stone Crypt |
| 16 | + */ |
| 17 | +public enum ActivityIdentifier { |
| 18 | + |
| 19 | + // RAIDS |
| 20 | + LEVIATHAN("LEV", "2693136602", ActivityMode.RAID), |
| 21 | + EATER_OF_WORLDS("EOW", "3089205900", ActivityMode.RAID), |
| 22 | + SPIRE_OF_STARS("SOS", "119944200", ActivityMode.RAID), |
| 23 | + |
| 24 | + LAST_WISH("LW", "2122313384", ActivityMode.RAID), |
| 25 | + SCOURGE_OF_THE_PAST("SOTP", "548750096", ActivityMode.RAID), |
| 26 | + CROWN_OF_SORROW("COS", "3333172150", ActivityMode.RAID), |
| 27 | + |
| 28 | + GARDEN_OF_SALVATION("GOS", "8155984757", ActivityMode.RAID), |
| 29 | + |
| 30 | + DEEP_STONE_CRYPT("DSC", "910380154", ActivityMode.RAID), |
| 31 | + VAULT_OF_GLASS("VOG", "", ActivityMode.RAID); |
| 32 | + |
| 33 | + private String identifier; |
| 34 | + private String hash; |
| 35 | + private ActivityMode mode; |
| 36 | + |
| 37 | + ActivityIdentifier(String identifier, String hash, ActivityMode mode) { |
| 38 | + this.identifier = identifier; |
| 39 | + this.hash = hash; |
| 40 | + this.mode = mode; |
| 41 | + } |
| 42 | + |
| 43 | + public String getIdentifier() { |
| 44 | + return identifier; |
| 45 | + } |
| 46 | + |
| 47 | + /** |
| 48 | + * Get the directorActivityHash of the Activity |
| 49 | + * Can be used to compare different activities |
| 50 | + */ |
| 51 | + public String getHash() { |
| 52 | + return hash; |
| 53 | + } |
| 54 | + |
| 55 | + public ActivityMode getMode() { return mode; } |
| 56 | + |
| 57 | + public static ActivityIdentifier fromShorthand(String shortHand) { |
| 58 | + for(ActivityIdentifier activityIdentifier : ActivityIdentifier.values()) { |
| 59 | + if(activityIdentifier.getIdentifier().equals(shortHand)) { |
| 60 | + return activityIdentifier; |
| 61 | + } |
| 62 | + } |
| 63 | + |
| 64 | + return null; |
| 65 | + } |
| 66 | +} |
0 commit comments