Browse Source

Unused methods removed.

master
MagicBot 1 year ago
parent
commit
46d50d315a
  1. 194
      src/engine/Enum.java

194
src/engine/Enum.java

@ -144,18 +144,10 @@ public class Enum {
this.scaleHeight = scaleHeight; this.scaleHeight = scaleHeight;
} }
public int getRuneID() {
return this.runeID;
}
public static RaceType getRaceTypebyRuneID(int runeID) { public static RaceType getRaceTypebyRuneID(int runeID) {
return _raceTypeByID.get(runeID); return _raceTypeByID.get(runeID);
} }
public float getScaleHeight(){
return this.scaleHeight;
}
public static void initRaceTypeTables() { public static void initRaceTypeTables() {
for (RaceType raceType : RaceType.values()) { for (RaceType raceType : RaceType.values()) {
@ -163,6 +155,14 @@ public class Enum {
} }
} }
public int getRuneID() {
return this.runeID;
}
public float getScaleHeight() {
return this.scaleHeight;
}
public MonsterType getMonsterType() { public MonsterType getMonsterType() {
return monsterType; return monsterType;
} }
@ -218,11 +218,6 @@ public class Enum {
return runCombat; return runCombat;
} }
public float getSwim() {
return swim;
}
public float getFlyRun() { public float getFlyRun() {
return flyRun; return flyRun;
} }
@ -257,10 +252,6 @@ public class Enum {
this.listType = listType; this.listType = listType;
} }
public int getListType() {
return this.listType;
}
public static FriendListType getListTypeByID(int listType) { public static FriendListType getListTypeByID(int listType) {
FriendListType outType = null; FriendListType outType = null;
@ -271,6 +262,7 @@ public class Enum {
} }
return outType; return outType;
} }
} }
public enum DispatchChannel { public enum DispatchChannel {
@ -335,10 +327,6 @@ public class Enum {
this.meshID = meshID; this.meshID = meshID;
} }
public int getMeshID() {
return meshID;
}
public static CharterType getCharterTypeByID(int charterID) { public static CharterType getCharterTypeByID(int charterID) {
CharterType outType = null; CharterType outType = null;
@ -348,6 +336,10 @@ public class Enum {
} }
return outType; return outType;
} }
public int getMeshID() {
return meshID;
}
} }
@ -425,8 +417,14 @@ public class Enum {
this.zoneUUID = uuid; this.zoneUUID = uuid;
} }
public int getZoneUUID() { public static Ruins getRandomRuin() {
return this.zoneUUID;
Ruins ruins;
ruins = Ruins.values()[ThreadLocalRandom.current()
.nextInt(Ruins.values().length)];
return ruins;
} }
public Vector3fImmutable getLocation() { public Vector3fImmutable getLocation() {
@ -455,16 +453,6 @@ public class Enum {
return spawnLocation; return spawnLocation;
} }
public static Ruins getRandomRuin() {
Ruins ruins;
ruins = Ruins.values()[ThreadLocalRandom.current()
.nextInt(Ruins.values().length)];
return ruins;
}
} }
public enum Guards { public enum Guards {
@ -578,8 +566,8 @@ public class Enum {
RESOURCE(34), RESOURCE(34),
REALMCHARTER(35); REALMCHARTER(35);
private final int _value;
private final static HashMap<Integer, ItemType> _typeLookup = new HashMap<>(); private final static HashMap<Integer, ItemType> _typeLookup = new HashMap<>();
private final int _value;
ItemType(int value) { ItemType(int value) {
this._value = value; this._value = value;
@ -646,22 +634,6 @@ public class Enum {
this.token = token; this.token = token;
} }
public int getBlueprintUUID() {
return blueprintUUID;
}
public int getEffectFlag() {
return effectFlag;
}
public int getToken() {
return token;
}
public EffectsBase getEffectBase() {
return PowersManager.getEffectByToken(token);
}
public static SpireType getByBlueprintUUID(int uuid) { public static SpireType getByBlueprintUUID(int uuid) {
SpireType outType = SpireType.GROUNDING; SpireType outType = SpireType.GROUNDING;
@ -678,6 +650,22 @@ public class Enum {
return outType; return outType;
} }
public int getBlueprintUUID() {
return blueprintUUID;
}
public int getEffectFlag() {
return effectFlag;
}
public int getToken() {
return token;
}
public EffectsBase getEffectBase() {
return PowersManager.getEffectByToken(token);
}
} }
public enum TransactionType { public enum TransactionType {
@ -771,6 +759,7 @@ public class Enum {
Powerblock, Powerblock,
Steel, Steel,
Drain; Drain;
public static DamageType GetDamageType(String modName) { public static DamageType GetDamageType(String modName) {
DamageType damageType; DamageType damageType;
if (modName.isEmpty()) if (modName.isEmpty())
@ -939,6 +928,7 @@ public class Enum {
VAMPDRAIN, VAMPDRAIN,
WEAPON, WEAPON,
Wizardry; Wizardry;
public static SourceType GetSourceType(String modName) { public static SourceType GetSourceType(String modName) {
SourceType returnMod; SourceType returnMod;
if (modName.isEmpty()) if (modName.isEmpty())
@ -1136,6 +1126,7 @@ public class Enum {
Track, Track,
Transform, Transform,
WeaponMove; WeaponMove;
public static StackType GetStackType(String modName) { public static StackType GetStackType(String modName) {
StackType stackType; StackType stackType;
if (modName.isEmpty()) if (modName.isEmpty())
@ -1236,6 +1227,7 @@ public class Enum {
return modType; return modType;
} }
} }
public enum MovementState { public enum MovementState {
IDLE, IDLE,
@ -1371,18 +1363,28 @@ public class Enum {
this.reqLvl = reqLvl; this.reqLvl = reqLvl;
} }
public long getFlag() { public static CharacterSkills GetCharacterSkillByToken(int token) {
return flag; for (CharacterSkills skill : CharacterSkills.values()) {
if (skill.token == token)
return skill;
} }
public int getReqLvl() { Logger.info("Returned No Skill for token " + token + ". Defaulting to Axe");
return this.reqLvl; return CharacterSkills.Axe;
}
public long getFlag() {
return flag;
} }
public void setFlag(long flag) { public void setFlag(long flag) {
this.flag = flag; this.flag = flag;
} }
public int getReqLvl() {
return this.reqLvl;
}
public int getToken() { public int getToken() {
return token; return token;
} }
@ -1390,16 +1392,6 @@ public class Enum {
public void setToken(int token) { public void setToken(int token) {
this.token = token; this.token = token;
} }
public static CharacterSkills GetCharacterSkillByToken(int token) {
for (CharacterSkills skill : CharacterSkills.values()) {
if (skill.token == token)
return skill;
}
Logger.info("Returned No Skill for token " + token + ". Defaulting to Axe");
return CharacterSkills.Axe;
}
} }
; ;
@ -1456,7 +1448,8 @@ public class Enum {
Warrior(SexType.NONE), Warrior(SexType.NONE),
Wizard(SexType.NONE), Wizard(SexType.NONE),
Nightstalker(SexType.NONE), Nightstalker(SexType.NONE),
Necromancer(SexType.NONE),; Necromancer(SexType.NONE),
;
private SexType sexRestriction; private SexType sexRestriction;
@ -2494,37 +2487,14 @@ public class Enum {
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}); new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"});
GuildType(String name, String[][] ranks, String[] leadershipTypes) {
this.name = name;
this.ranks = ranks;
this.leadershipTypes = leadershipTypes;
}
private final String name; private final String name;
private final String[][] ranks; //Stored Rank#->Gender(M,F) private final String[][] ranks; //Stored Rank#->Gender(M,F)
private final String[] leadershipTypes; private final String[] leadershipTypes;
public String getCharterName() { GuildType(String name, String[][] ranks, String[] leadershipTypes) {
return this.name; this.name = name;
} this.ranks = ranks;
this.leadershipTypes = leadershipTypes;
public int getNumberOfRanks() {
return ranks.length;
}
public String getRankForGender(int rank, boolean male) {
if(ranks.length < rank) {
return "";
}
if(ranks[rank].length != 1 && !male) {
return ranks[rank][1];
}
return ranks[rank][0];
}
public String getLeadershipType(int i) {
return leadershipTypes[i];
} }
public static GuildType getGuildTypeFromCharter(ItemBase itemBase) { public static GuildType getGuildTypeFromCharter(ItemBase itemBase) {
@ -2611,6 +2581,29 @@ public class Enum {
return GuildType.values()[i]; return GuildType.values()[i];
} }
public String getCharterName() {
return this.name;
}
public int getNumberOfRanks() {
return ranks.length;
}
public String getRankForGender(int rank, boolean male) {
if (ranks.length < rank) {
return "";
}
if (ranks[rank].length != 1 && !male) {
return ranks[rank][1];
}
return ranks[rank][0];
}
public String getLeadershipType(int i) {
return leadershipTypes[i];
}
} }
public enum MinionClass { public enum MinionClass {
@ -2655,14 +2648,13 @@ public class Enum {
UNDEADMAGE(980102, 1675, MinionClass.MAGE, "Adept", "Undead"), UNDEADMAGE(980102, 1675, MinionClass.MAGE, "Adept", "Undead"),
WEREWOLFGUARD(980104, 0, MinionClass.MELEE, "Guard", "Werewolf"), WEREWOLFGUARD(980104, 0, MinionClass.MELEE, "Guard", "Werewolf"),
WEREBEARGUARD(980103, 0, MinionClass.MELEE, "Guard", "Werebear"); WEREBEARGUARD(980103, 0, MinionClass.MELEE, "Guard", "Werebear");
public static HashMap<Integer, MinionType> ContractToMinionMap = new HashMap<>();
private final int captainContractID; private final int captainContractID;
private final int equipSetID; private final int equipSetID;
private final MinionClass minionClass; private final MinionClass minionClass;
private final String name; private final String name;
private final String race; private final String race;
public static HashMap<Integer,MinionType> ContractToMinionMap = new HashMap<>();
MinionType(int captainContractID, int equipSetID, MinionClass minionClass, String name, String race) { MinionType(int captainContractID, int equipSetID, MinionClass minionClass, String name, String race) {
this.captainContractID = captainContractID; this.captainContractID = captainContractID;
@ -2679,18 +2671,6 @@ public class Enum {
ContractToMinionMap.put(minionType.captainContractID, minionType); ContractToMinionMap.put(minionType.captainContractID, minionType);
} }
public int getCaptainContractID() {
return captainContractID;
}
public int getEquipSetID() {
return equipSetID;
}
public MinionClass getMinionClass() {
return minionClass;
}
public String getName() { public String getName() {
return name; return name;
} }
@ -2715,8 +2695,8 @@ public class Enum {
ACCEPTTAX(7), ACCEPTTAX(7),
CONFIRMPROTECT(8); CONFIRMPROTECT(8);
private final int type;
public static HashMap<Integer, SupportMsgType> typeLookup = new HashMap<>(); public static HashMap<Integer, SupportMsgType> typeLookup = new HashMap<>();
private final int type;
SupportMsgType(int messageType) { SupportMsgType(int messageType) {
this.type = messageType; this.type = messageType;

Loading…
Cancel
Save