Browse Source

Unused methods removed.

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

452
src/engine/Enum.java

@ -100,32 +100,32 @@ public class Enum { @@ -100,32 +100,32 @@ public class Enum {
// RaceRuneID / AggroType, isFemale
AELFMALE(2000, MonsterType.Aelfborn, RunSpeed.STANDARD, CharacterSex.MALE,1.05f),
AELFFEMALE(2001, MonsterType.Aelfborn, RunSpeed.STANDARD, CharacterSex.FEMALE,1.05f),
ARACOIXMALE(2002, MonsterType.Aracoix, RunSpeed.STANDARD, CharacterSex.MALE,1),
ARACOIXFEMALE(2003, MonsterType.Aracoix, RunSpeed.STANDARD, CharacterSex.FEMALE,1),
CENTAURMALE(2004, MonsterType.Centaur, RunSpeed.CENTAUR, CharacterSex.MALE,1.2f),
AELFMALE(2000, MonsterType.Aelfborn, RunSpeed.STANDARD, CharacterSex.MALE, 1.05f),
AELFFEMALE(2001, MonsterType.Aelfborn, RunSpeed.STANDARD, CharacterSex.FEMALE, 1.05f),
ARACOIXMALE(2002, MonsterType.Aracoix, RunSpeed.STANDARD, CharacterSex.MALE, 1),
ARACOIXFEMALE(2003, MonsterType.Aracoix, RunSpeed.STANDARD, CharacterSex.FEMALE, 1),
CENTAURMALE(2004, MonsterType.Centaur, RunSpeed.CENTAUR, CharacterSex.MALE, 1.2f),
CENTAURFEMALE(2005, MonsterType.Centaur, RunSpeed.CENTAUR, CharacterSex.FEMALE, 1.2f),
DWARFMALE(2006, MonsterType.Dwarf, RunSpeed.STANDARD, CharacterSex.MALE,0.80000001f),
DWARFMALE(2006, MonsterType.Dwarf, RunSpeed.STANDARD, CharacterSex.MALE, 0.80000001f),
ELFMALE(2008, MonsterType.Elf, RunSpeed.STANDARD, CharacterSex.MALE, 1.4f),
ELFFEMALE(2009, MonsterType.Elf, RunSpeed.STANDARD, CharacterSex.FEMALE,1.1f),
ELFFEMALE(2009, MonsterType.Elf, RunSpeed.STANDARD, CharacterSex.FEMALE, 1.1f),
HALFGIANTMALE(2010, MonsterType.HalfGiant, RunSpeed.STANDARD, CharacterSex.MALE, 1.15f),
HUMANMALE(2011, MonsterType.Human, RunSpeed.STANDARD, CharacterSex.MALE,1),
HUMANFEMALE(2012, MonsterType.Human, RunSpeed.STANDARD, CharacterSex.FEMALE,1),
IREKEIMALE(2013, MonsterType.Irekei, RunSpeed.STANDARD, CharacterSex.MALE,1.1f),
IREKEIFEMALE(2014, MonsterType.Irekei, RunSpeed.STANDARD, CharacterSex.FEMALE,1.1f),
SHADEMALE(2015, MonsterType.Shade, RunSpeed.STANDARD, CharacterSex.MALE,1),
SHADEFEMALE(2016, MonsterType.Shade, RunSpeed.STANDARD, CharacterSex.FEMALE,1),
MINOMALE(2017, MonsterType.Minotaur, RunSpeed.MINOTAUR, CharacterSex.MALE,1.3f),
ARCHONMALE(2018, MonsterType.Celestial, RunSpeed.STANDARD, CharacterSex.MALE,1),
HALEGIANTOLDMALE(2019, MonsterType.HalfGiant, RunSpeed.STANDARD, CharacterSex.MALE,1.15f),
CSRFEMALE(2020, MonsterType.CSR, RunSpeed.STANDARD, CharacterSex.FEMALE,0.66000003f),
CSRMALE(2021, MonsterType.CSR, RunSpeed.STANDARD, CharacterSex.MALE,1),
NEPHMALE(2025, MonsterType.Nephilim, RunSpeed.STANDARD, CharacterSex.MALE,1.1f),
NEPHFEMALE(2026, MonsterType.Nephilim, RunSpeed.STANDARD, CharacterSex.FEMALE,1.1f),
HALFGIANTFEMALE(2027, MonsterType.HalfGiant, RunSpeed.STANDARD, CharacterSex.FEMALE,1.15f),
HUMANMALE(2011, MonsterType.Human, RunSpeed.STANDARD, CharacterSex.MALE, 1),
HUMANFEMALE(2012, MonsterType.Human, RunSpeed.STANDARD, CharacterSex.FEMALE, 1),
IREKEIMALE(2013, MonsterType.Irekei, RunSpeed.STANDARD, CharacterSex.MALE, 1.1f),
IREKEIFEMALE(2014, MonsterType.Irekei, RunSpeed.STANDARD, CharacterSex.FEMALE, 1.1f),
SHADEMALE(2015, MonsterType.Shade, RunSpeed.STANDARD, CharacterSex.MALE, 1),
SHADEFEMALE(2016, MonsterType.Shade, RunSpeed.STANDARD, CharacterSex.FEMALE, 1),
MINOMALE(2017, MonsterType.Minotaur, RunSpeed.MINOTAUR, CharacterSex.MALE, 1.3f),
ARCHONMALE(2018, MonsterType.Celestial, RunSpeed.STANDARD, CharacterSex.MALE, 1),
HALEGIANTOLDMALE(2019, MonsterType.HalfGiant, RunSpeed.STANDARD, CharacterSex.MALE, 1.15f),
CSRFEMALE(2020, MonsterType.CSR, RunSpeed.STANDARD, CharacterSex.FEMALE, 0.66000003f),
CSRMALE(2021, MonsterType.CSR, RunSpeed.STANDARD, CharacterSex.MALE, 1),
NEPHMALE(2025, MonsterType.Nephilim, RunSpeed.STANDARD, CharacterSex.MALE, 1.1f),
NEPHFEMALE(2026, MonsterType.Nephilim, RunSpeed.STANDARD, CharacterSex.FEMALE, 1.1f),
HALFGIANTFEMALE(2027, MonsterType.HalfGiant, RunSpeed.STANDARD, CharacterSex.FEMALE, 1.15f),
VAMPMALE(2028, MonsterType.Vampire, RunSpeed.STANDARD, CharacterSex.MALE, 1),
VAMPFEMALE(2029, MonsterType.Vampire, RunSpeed.STANDARD, CharacterSex.FEMALE,1);
VAMPFEMALE(2029, MonsterType.Vampire, RunSpeed.STANDARD, CharacterSex.FEMALE, 1);
@SuppressWarnings("unchecked")
private static HashMap<Integer, RaceType> _raceTypeByID = new HashMap<>();
@ -144,18 +144,10 @@ public class Enum { @@ -144,18 +144,10 @@ public class Enum {
this.scaleHeight = scaleHeight;
}
public int getRuneID() {
return this.runeID;
}
public static RaceType getRaceTypebyRuneID(int runeID) {
return _raceTypeByID.get(runeID);
}
public float getScaleHeight(){
return this.scaleHeight;
}
public static void initRaceTypeTables() {
for (RaceType raceType : RaceType.values()) {
@ -163,6 +155,14 @@ public class Enum { @@ -163,6 +155,14 @@ public class Enum {
}
}
public int getRuneID() {
return this.runeID;
}
public float getScaleHeight() {
return this.scaleHeight;
}
public MonsterType getMonsterType() {
return monsterType;
}
@ -218,11 +218,6 @@ public class Enum { @@ -218,11 +218,6 @@ public class Enum {
return runCombat;
}
public float getSwim() {
return swim;
}
public float getFlyRun() {
return flyRun;
}
@ -257,10 +252,6 @@ public class Enum { @@ -257,10 +252,6 @@ public class Enum {
this.listType = listType;
}
public int getListType() {
return this.listType;
}
public static FriendListType getListTypeByID(int listType) {
FriendListType outType = null;
@ -271,6 +262,7 @@ public class Enum { @@ -271,6 +262,7 @@ public class Enum {
}
return outType;
}
}
public enum DispatchChannel {
@ -335,10 +327,6 @@ public class Enum { @@ -335,10 +327,6 @@ public class Enum {
this.meshID = meshID;
}
public int getMeshID() {
return meshID;
}
public static CharterType getCharterTypeByID(int charterID) {
CharterType outType = null;
@ -348,6 +336,10 @@ public class Enum { @@ -348,6 +336,10 @@ public class Enum {
}
return outType;
}
public int getMeshID() {
return meshID;
}
}
@ -425,8 +417,14 @@ public class Enum { @@ -425,8 +417,14 @@ public class Enum {
this.zoneUUID = uuid;
}
public int getZoneUUID() {
return this.zoneUUID;
public static Ruins getRandomRuin() {
Ruins ruins;
ruins = Ruins.values()[ThreadLocalRandom.current()
.nextInt(Ruins.values().length)];
return ruins;
}
public Vector3fImmutable getLocation() {
@ -455,16 +453,6 @@ public class Enum { @@ -455,16 +453,6 @@ public class Enum {
return spawnLocation;
}
public static Ruins getRandomRuin() {
Ruins ruins;
ruins = Ruins.values()[ThreadLocalRandom.current()
.nextInt(Ruins.values().length)];
return ruins;
}
}
public enum Guards {
@ -578,8 +566,8 @@ public class Enum { @@ -578,8 +566,8 @@ public class Enum {
RESOURCE(34),
REALMCHARTER(35);
private final int _value;
private final static HashMap<Integer, ItemType> _typeLookup = new HashMap<>();
private final int _value;
ItemType(int value) {
this._value = value;
@ -646,22 +634,6 @@ public class Enum { @@ -646,22 +634,6 @@ public class Enum {
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) {
SpireType outType = SpireType.GROUNDING;
@ -678,6 +650,22 @@ public class Enum { @@ -678,6 +650,22 @@ public class Enum {
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 {
@ -771,14 +759,15 @@ public class Enum { @@ -771,14 +759,15 @@ public class Enum {
Powerblock,
Steel,
Drain;
public static DamageType GetDamageType(String modName){
public static DamageType GetDamageType(String modName) {
DamageType damageType;
if (modName.isEmpty())
return DamageType.None;
try{
try {
damageType = DamageType.valueOf(modName.replace(",", ""));
}catch(Exception e){
} catch (Exception e) {
Logger.error(e);
return DamageType.None;
}
@ -939,14 +928,15 @@ public class Enum { @@ -939,14 +928,15 @@ public class Enum {
VAMPDRAIN,
WEAPON,
Wizardry;
public static SourceType GetSourceType(String modName){
public static SourceType GetSourceType(String modName) {
SourceType returnMod;
if(modName.isEmpty())
if (modName.isEmpty())
return SourceType.None;
try{
try {
returnMod = SourceType.valueOf(modName.replace(",", ""));
}catch(Exception e){
} catch (Exception e) {
Logger.error(modName);
Logger.error(e);
return SourceType.None;
@ -955,7 +945,7 @@ public class Enum { @@ -955,7 +945,7 @@ public class Enum {
}
}
public enum EffectSourceType{
public enum EffectSourceType {
None,
AttackSpeedBuff,
Bleeding,
@ -1014,14 +1004,14 @@ public class Enum { @@ -1014,14 +1004,14 @@ public class Enum {
WereformSPRecBuff,
WereformStrBuff;
public static EffectSourceType GetEffectSourceType(String modName){
public static EffectSourceType GetEffectSourceType(String modName) {
EffectSourceType returnMod;
if(modName.isEmpty())
if (modName.isEmpty())
return EffectSourceType.None;
try{
try {
returnMod = EffectSourceType.valueOf(modName.replace(",", ""));
}catch(Exception e){
} catch (Exception e) {
Logger.error(e);
return EffectSourceType.None;
}
@ -1136,14 +1126,15 @@ public class Enum { @@ -1136,14 +1126,15 @@ public class Enum {
Track,
Transform,
WeaponMove;
public static StackType GetStackType(String modName){
public static StackType GetStackType(String modName) {
StackType stackType;
if (modName.isEmpty())
return StackType.None;
try{
try {
stackType = StackType.valueOf(modName.replace(",", ""));
}catch(Exception e){
} catch (Exception e) {
Logger.error(modName);
Logger.error(e);
return StackType.None;
@ -1222,20 +1213,21 @@ public class Enum { @@ -1222,20 +1213,21 @@ public class Enum {
WeaponRange,
WeaponSpeed;
public static ModType GetModType(String modName){
public static ModType GetModType(String modName) {
ModType modType;
if (modName.isEmpty())
return ModType.None;
try{
try {
modType = ModType.valueOf(modName.replace(",", ""));
}catch(Exception e){
} catch (Exception e) {
Logger.error(e);
return ModType.None;
}
return modType;
}
}
public enum MovementState {
IDLE,
@ -1371,18 +1363,28 @@ public class Enum { @@ -1371,18 +1363,28 @@ public class Enum {
this.reqLvl = reqLvl;
}
public long getFlag() {
return flag;
public static CharacterSkills GetCharacterSkillByToken(int token) {
for (CharacterSkills skill : CharacterSkills.values()) {
if (skill.token == token)
return skill;
}
public int getReqLvl() {
return this.reqLvl;
Logger.info("Returned No Skill for token " + token + ". Defaulting to Axe");
return CharacterSkills.Axe;
}
public long getFlag() {
return flag;
}
public void setFlag(long flag) {
this.flag = flag;
}
public int getReqLvl() {
return this.reqLvl;
}
public int getToken() {
return token;
}
@ -1390,16 +1392,6 @@ public class Enum { @@ -1390,16 +1392,6 @@ public class Enum {
public void setToken(int 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 { @@ -1456,7 +1448,8 @@ public class Enum {
Warrior(SexType.NONE),
Wizard(SexType.NONE),
Nightstalker(SexType.NONE),
Necromancer(SexType.NONE),;
Necromancer(SexType.NONE),
;
private SexType sexRestriction;
@ -1582,7 +1575,7 @@ public class Enum { @@ -1582,7 +1575,7 @@ public class Enum {
// building slot mechanics.
public enum BuildingGroup implements EnumBitSetHelper<BuildingGroup> {
NONE(0,0),
NONE(0, 0),
TOL(64f, 64f),
BARRACK(32f, 64f),
CHURCH(64f, 64f),
@ -1620,7 +1613,7 @@ public class Enum { @@ -1620,7 +1613,7 @@ public class Enum {
FORTRESS(64f, 64f),
CITADEL(64f, 64f),
WALLSTRAIGHTTOWER(16f, 64),
WALLSTAIRS(64,64);
WALLSTAIRS(64, 64);
private final Vector2f extents;
@ -1634,7 +1627,7 @@ public class Enum { @@ -1634,7 +1627,7 @@ public class Enum {
}
public enum UpdateType{
public enum UpdateType {
ALL,
MOVEMENT,
REGEN,
@ -1643,7 +1636,7 @@ public class Enum { @@ -1643,7 +1636,7 @@ public class Enum {
MOVEMENTSTATE;
}
public enum ServerType{
public enum ServerType {
WORLDSERVER,
LOGINSERVER,
NONE;
@ -2149,7 +2142,7 @@ public class Enum { @@ -2149,7 +2142,7 @@ public class Enum {
}
}
public enum PowerFailCondition{
public enum PowerFailCondition {
Attack,
AttackSwing,
@ -2165,7 +2158,7 @@ public class Enum { @@ -2165,7 +2158,7 @@ public class Enum {
UnEquip;
}
public enum PowerSubType{
public enum PowerSubType {
Amount,
Ramp,
UseAddFormula,
@ -2297,9 +2290,9 @@ public class Enum { @@ -2297,9 +2290,9 @@ public class Enum {
}
public enum GuildType {
NONE("None", new String[][] {{"None"}}, new String[] {"Thearchy", "Common Rule", "Theocracy", "Republic Rule"}),
NONE("None", new String[][]{{"None"}}, new String[]{"Thearchy", "Common Rule", "Theocracy", "Republic Rule"}),
CATHEDRAL("Church of the All-Father", new String[][]{
{"Acolyte","Acolyte"},
{"Acolyte", "Acolyte"},
{"Catechist"},
{"Deacon", "Deaconess"},
{"Priest", "Priestess"},
@ -2307,8 +2300,8 @@ public class Enum { @@ -2307,8 +2300,8 @@ public class Enum {
{"Bishop", "Bishop"},
{"Lord Cardinal", "Lady Cardinal"},
{"Patriarch", "Matriarch"}},
new String[] {"Thearchy", "Common Rule", "Theocracy", "Republic Rule"}),
MILITARY("Military", new String[][] {
new String[]{"Thearchy", "Common Rule", "Theocracy", "Republic Rule"}),
MILITARY("Military", new String[][]{
{"Recruit"},
{"Footman"},
{"Corporal"},
@ -2316,7 +2309,7 @@ public class Enum { @@ -2316,7 +2309,7 @@ public class Enum {
{"Lieutenant"},
{"Captain"},
{"General"},
{"Lord Marshall","Lady Marshall"}},
{"Lord Marshall", "Lady Marshall"}},
new String[]{"Autocracy", "Common Rule", "Council Rule", "Militocracy"}),
TEMPLE("Temple of the Cleansing Flame", new String[][]{
{"Aspirant"},
@ -2327,9 +2320,9 @@ public class Enum { @@ -2327,9 +2320,9 @@ public class Enum {
{"Tribune"},
{"Lictor"},
{"Justiciar"},
{"Pontifex","Pontifectrix"}},
new String[] {"Despot Rule", "Common Rule", "Protectorship", "Republic Rule"}),
BARBARIAN("Barbarian Clan", new String[][] {
{"Pontifex", "Pontifectrix"}},
new String[]{"Despot Rule", "Common Rule", "Protectorship", "Republic Rule"}),
BARBARIAN("Barbarian Clan", new String[][]{
{"Barbarian"},
{"Skald"},
{"Raider"},
@ -2338,24 +2331,24 @@ public class Enum { @@ -2338,24 +2331,24 @@ public class Enum {
{"Chieftain"},
{"Thane"}},
new String[]{"Chiefdom", "Common Rule", "Council Rule", "Republic Rule"}),
RANGER("Ranger's Brotherhood", new String[][] {
RANGER("Ranger's Brotherhood", new String[][]{
{"Yeoman"},
{"Pathfinder"},
{"Tracker"},
{"Seeker"},
{"Protector"},
{"Guardian"},
{"Lord Protector","Lady Protector"}},
new String[]{"Despot Rule", "Collectivism","Council Rule","Republic Rule"}),
AMAZON("Amazon Temple", new String[][] {
{"Lord Protector", "Lady Protector"}},
new String[]{"Despot Rule", "Collectivism", "Council Rule", "Republic Rule"}),
AMAZON("Amazon Temple", new String[][]{
{"Amazon Thrall", "Amazon"},
{"Amazon Slave", "Amazon Warrior"},
{"Amazon Servant", "Amazon Chieftess"},
{"Amazon Consort", "Amazon Princess"},
{"Amazon Seneschal", "Majestrix"},
{"Amazon Regent", "Imperatrix"}},
new String[] {"Despot Rule", "Common Rule", "Gynarchy", "Gynocracy"}),
NOBLE("Noble House", new String[][] {
new String[]{"Despot Rule", "Common Rule", "Gynarchy", "Gynocracy"}),
NOBLE("Noble House", new String[][]{
{"Serf"},
{"Vassal"},
{"Exultant"},
@ -2365,8 +2358,8 @@ public class Enum { @@ -2365,8 +2358,8 @@ public class Enum {
{"Duke", "Duchess"},
{"King", "Queen"},
{"Emperor", "Empress"}},
new String[] {"Monarchy", "Common Rule", "Feodality", "Republic"}),
WIZARD("Wizard's Conclave", new String[][] {
new String[]{"Monarchy", "Common Rule", "Feodality", "Republic"}),
WIZARD("Wizard's Conclave", new String[][]{
{"Apprentice"},
{"Neophyte"},
{"Adeptus Minor"},
@ -2374,8 +2367,8 @@ public class Enum { @@ -2374,8 +2367,8 @@ public class Enum {
{"Magus"},
{"High Magus"},
{"Archmagus"}},
new String[] {"Despot Rule", "Common Rule", "Council Rule", "Magocracy"}),
MERCENARY("Mercenary Company", new String[][] {
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Magocracy"}),
MERCENARY("Mercenary Company", new String[][]{
{"Soldier"},
{"Man-at-Arms"},
{"Veteran"},
@ -2384,8 +2377,8 @@ public class Enum { @@ -2384,8 +2377,8 @@ public class Enum {
{"Commander"},
{"High Commander"},
{"Warlord"}},
new String[] {"Magistrature", "Mob Law", "Council Rule", "Republic Rule"}),
THIEVES("Thieve's Den", new String[][] {
new String[]{"Magistrature", "Mob Law", "Council Rule", "Republic Rule"}),
THIEVES("Thieve's Den", new String[][]{
{"Urchin"},
{"Footpad"},
{"Grifter"},
@ -2395,16 +2388,16 @@ public class Enum { @@ -2395,16 +2388,16 @@ public class Enum {
{"Treasurer"},
{"Grandmaster Thief"},
{"Grandfather"}},
new String[] {"Despot Rule", "Common Rule", "Oligarchy", "Republic Rule"}),
DWARF("Dwarf Hold", new String[][] {
new String[]{"Despot Rule", "Common Rule", "Oligarchy", "Republic Rule"}),
DWARF("Dwarf Hold", new String[][]{
{"Citizen"},
{"Master"},
{"Councilor"},
{"Thane"},
{"Great Thane"},
{"High Thane"}},
new String[] {"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
HIGHCOURT("High Court", new String[][] {
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
HIGHCOURT("High Court", new String[][]{
{"Eccekebe"},
{"Saedulor"},
{"Hodrimarth"},
@ -2414,8 +2407,8 @@ public class Enum { @@ -2414,8 +2407,8 @@ public class Enum {
{"Dar Thaelostor", "Dar Thaelostril"},
{"Aglaeron"},
{"Ellestor", "Elestril"}},
new String[] {"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
VIRAKT("Virakt", new String[][] {
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
VIRAKT("Virakt", new String[][]{
{"Jov'uus"},
{"Urikhan"},
{"Irkhan"},
@ -2424,8 +2417,8 @@ public class Enum { @@ -2424,8 +2417,8 @@ public class Enum {
{"Khal'uvho"},
{"Khar'uus"},
{"Kryqh'khalin"}},
new String[] {"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
BRIALIA("Coven of Brialia", new String[][] { // Unknown Rank names
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
BRIALIA("Coven of Brialia", new String[][]{ // Unknown Rank names
{"Devotee"},
{"Initiated"},
{"Witch of the First"},
@ -2434,8 +2427,8 @@ public class Enum { @@ -2434,8 +2427,8 @@ public class Enum {
{"Elder"},
{"Hierophant"},
{"Witch King", "Witch Queen"}},
new String[] {"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
UNHOLY("Unholy Legion", new String[][] { // Unknown Rank names
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
UNHOLY("Unholy Legion", new String[][]{ // Unknown Rank names
{"Footman"},
{"Fell Legionaire"},
{"Fell Centurion"},
@ -2444,23 +2437,23 @@ public class Enum { @@ -2444,23 +2437,23 @@ public class Enum {
{"Dark Master", "Dark Mistress"},
{"Dread Master", "Dread Mistress"},
{"Dread Lord", "Dread Lady"}},
new String[] {"Despot Rule", "Despot Rule", "Council Rule", "Republic Rule"}),
SCOURGE("Cult of the Scourge", new String[][] {
new String[]{"Despot Rule", "Despot Rule", "Council Rule", "Republic Rule"}),
SCOURGE("Cult of the Scourge", new String[][]{
{"Thrall"},
{"Mudir"},
{"Dark Brother", "Dark Sister"},
{"Hand of the Dark"},
{"Dark Father", "Dark Mother"}},
new String[] {"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
PIRATE("Pirate Crew", new String[][] {
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
PIRATE("Pirate Crew", new String[][]{
{"Midshipman", "Midshipwoman"},
{"Sailor"},
{"Third Mat"},
{"Second Mat"},
{"First Mate"},
{"Captain"}},
new String[] {"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
HERALD("Academy of Heralds", new String[][] {
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
HERALD("Academy of Heralds", new String[][]{
{"Pupil"},
{"Scribe"},
{"Recorder"},
@ -2470,7 +2463,7 @@ public class Enum { @@ -2470,7 +2463,7 @@ public class Enum {
{"Archivist"},
{"Loremaster"}},
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
CENTAUR("Centaur Cohort", new String[][] {
CENTAUR("Centaur Cohort", new String[][]{
{"Hoplite"},
{"Peltast"},
{"Myrmidon"},
@ -2479,8 +2472,8 @@ public class Enum { @@ -2479,8 +2472,8 @@ public class Enum {
{"Septenrion"},
{"Praetorian"},
{"Paragon"}},
new String[] {"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
KHREE("Aracoix Kh'ree", new String[][] {
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"}),
KHREE("Aracoix Kh'ree", new String[][]{
{"Duriacor"},
{"Exarch"},
{"Tetrarch"},
@ -2492,39 +2485,16 @@ public class Enum { @@ -2492,39 +2485,16 @@ public class Enum {
{"Araceos"},
{"Hierarch"}},
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;
}
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"});
private final String name;
private final String[][] ranks; //Stored Rank#->Gender(M,F)
private final String[] leadershipTypes;
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];
GuildType(String name, String[][] ranks, String[] leadershipTypes) {
this.name = name;
this.ranks = ranks;
this.leadershipTypes = leadershipTypes;
}
public static GuildType getGuildTypeFromCharter(ItemBase itemBase) {
@ -2533,7 +2503,7 @@ public class Enum { @@ -2533,7 +2503,7 @@ public class Enum {
// Must be a valid charter object
if(itemBase.getType().equals(ItemType.GUILDCHARTER) == false)
if (itemBase.getType().equals(ItemType.GUILDCHARTER) == false)
return GuildType.NONE; //No guild Type
// No switches on long in java. Cast to int
@ -2611,6 +2581,29 @@ public class Enum { @@ -2611,6 +2581,29 @@ public class Enum {
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 {
@ -2620,49 +2613,48 @@ public class Enum { @@ -2620,49 +2613,48 @@ public class Enum {
}
public enum MinionType {
AELFBORNGUARD(951,1637, MinionClass.MELEE, "Guard","Aelfborn"),
AELFBORNMAGE(952, 1635, MinionClass.MAGE,"Adept","Aelfborn"),
AMAZONGUARD(1500,1670, MinionClass.MELEE,"Guard","Amazon"),
AMAZONMAGE(1502, 1638, MinionClass.MAGE,"Fury","Amazon"),
ARACOIXGUARD(1600,1672,MinionClass.MELEE, "Guard","Aracoix"), //used guard captain equipset.
ARACOIXMAGE(1602,885,MinionClass.MAGE,"Adept","Aracoix"),
CENTAURGUARD(1650,1642, MinionClass.MELEE,"Guard","Centaur"),
CENTAURMAGE(1652, 1640, MinionClass.MAGE,"Druid","Centaur"),
DWARVENARCHER(845,1644, MinionClass.ARCHER, "Marksman","Dwarven"),
DWARVENGUARD(1050,1666, MinionClass.MELEE,"Guard","Dwarven"),
DWARVENMAGE(1052, 1643, MinionClass.MAGE,"War Priest","Dwarven"),
ELFGUARD(1180,1671, MinionClass.MELEE,"Guard","Elven"), //old 1645
ELFMAGE(1182, 1667, MinionClass.MAGE,"Adept","Elven"),
FORESTGUARD(1550,1668, MinionClass.MELEE,"Guard","Forest"), //captain changed to guard equipset
FORESTMAGE(1552, 436, MinionClass.MAGE,"Adept","Forest"),
HOLYGUARD(1525,1658, MinionClass.MELEE,"Guard","Holy Church"),
HOLYMAGE(1527, 1646, MinionClass.MAGE,"Prelate","Holy Church"),
HUMANARCHER(846,1654,MinionClass.ARCHER, "Archer","Human"),
HUMANGUARD(840,1665, MinionClass.MELEE, "Guard","Human"),
HUMANMAGE(848, 1655, MinionClass.MAGE,"Adept","Human"),
IREKEIGUARD(1350,1659, MinionClass.MELEE,"Guard","Irekei"),
IREKEIMAGE(1352, 1660, MinionClass.MAGE,"Adept","Irekei"),
MINOTAURARCHER(1701,0,MinionClass.ARCHER,"Archer","Minotaur"),
MINOTAURGUARD(1700,1673,MinionClass.MELEE,"Guard","Minotaur"),
NORTHMANGUARD(1250,1669, MinionClass.MELEE,"Guard","Northman"),
NORTHMANMAGE(1252, 1650, MinionClass.MAGE,"Runecaster","Northman"),
SHADEGUARD(1450,1662, MinionClass.MELEE,"Guard","Shade"),
SHADEMAGE(1452, 1664, MinionClass.MAGE,"Adept","Shade"),
TEMPLARGUARD(841,1564,MinionClass.MELEE,"Marksman","Templar"),
TEMPLEGUARD(1575,1652, MinionClass.MELEE,"Guard","Temple"),
TEMPLEMAGE(1577, 1656, MinionClass.MAGE,"Confessor","Temple"),
UNDEADGUARD(980100,1674,MinionClass.MELEE,"Guard","Undead"),
UNDEADMAGE(980102,1675,MinionClass.MAGE,"Adept","Undead"),
WEREWOLFGUARD(980104,0,MinionClass.MELEE,"Guard","Werewolf"),
WEREBEARGUARD(980103,0,MinionClass.MELEE,"Guard","Werebear");
AELFBORNGUARD(951, 1637, MinionClass.MELEE, "Guard", "Aelfborn"),
AELFBORNMAGE(952, 1635, MinionClass.MAGE, "Adept", "Aelfborn"),
AMAZONGUARD(1500, 1670, MinionClass.MELEE, "Guard", "Amazon"),
AMAZONMAGE(1502, 1638, MinionClass.MAGE, "Fury", "Amazon"),
ARACOIXGUARD(1600, 1672, MinionClass.MELEE, "Guard", "Aracoix"), //used guard captain equipset.
ARACOIXMAGE(1602, 885, MinionClass.MAGE, "Adept", "Aracoix"),
CENTAURGUARD(1650, 1642, MinionClass.MELEE, "Guard", "Centaur"),
CENTAURMAGE(1652, 1640, MinionClass.MAGE, "Druid", "Centaur"),
DWARVENARCHER(845, 1644, MinionClass.ARCHER, "Marksman", "Dwarven"),
DWARVENGUARD(1050, 1666, MinionClass.MELEE, "Guard", "Dwarven"),
DWARVENMAGE(1052, 1643, MinionClass.MAGE, "War Priest", "Dwarven"),
ELFGUARD(1180, 1671, MinionClass.MELEE, "Guard", "Elven"), //old 1645
ELFMAGE(1182, 1667, MinionClass.MAGE, "Adept", "Elven"),
FORESTGUARD(1550, 1668, MinionClass.MELEE, "Guard", "Forest"), //captain changed to guard equipset
FORESTMAGE(1552, 436, MinionClass.MAGE, "Adept", "Forest"),
HOLYGUARD(1525, 1658, MinionClass.MELEE, "Guard", "Holy Church"),
HOLYMAGE(1527, 1646, MinionClass.MAGE, "Prelate", "Holy Church"),
HUMANARCHER(846, 1654, MinionClass.ARCHER, "Archer", "Human"),
HUMANGUARD(840, 1665, MinionClass.MELEE, "Guard", "Human"),
HUMANMAGE(848, 1655, MinionClass.MAGE, "Adept", "Human"),
IREKEIGUARD(1350, 1659, MinionClass.MELEE, "Guard", "Irekei"),
IREKEIMAGE(1352, 1660, MinionClass.MAGE, "Adept", "Irekei"),
MINOTAURARCHER(1701, 0, MinionClass.ARCHER, "Archer", "Minotaur"),
MINOTAURGUARD(1700, 1673, MinionClass.MELEE, "Guard", "Minotaur"),
NORTHMANGUARD(1250, 1669, MinionClass.MELEE, "Guard", "Northman"),
NORTHMANMAGE(1252, 1650, MinionClass.MAGE, "Runecaster", "Northman"),
SHADEGUARD(1450, 1662, MinionClass.MELEE, "Guard", "Shade"),
SHADEMAGE(1452, 1664, MinionClass.MAGE, "Adept", "Shade"),
TEMPLARGUARD(841, 1564, MinionClass.MELEE, "Marksman", "Templar"),
TEMPLEGUARD(1575, 1652, MinionClass.MELEE, "Guard", "Temple"),
TEMPLEMAGE(1577, 1656, MinionClass.MAGE, "Confessor", "Temple"),
UNDEADGUARD(980100, 1674, MinionClass.MELEE, "Guard", "Undead"),
UNDEADMAGE(980102, 1675, MinionClass.MAGE, "Adept", "Undead"),
WEREWOLFGUARD(980104, 0, MinionClass.MELEE, "Guard", "Werewolf"),
WEREBEARGUARD(980103, 0, MinionClass.MELEE, "Guard", "Werebear");
public static HashMap<Integer, MinionType> ContractToMinionMap = new HashMap<>();
private final int captainContractID;
private final int equipSetID;
private final MinionClass minionClass;
private final String name;
private final String race;
public static HashMap<Integer,MinionType> ContractToMinionMap = new HashMap<>();
MinionType(int captainContractID, int equipSetID, MinionClass minionClass, String name, String race) {
this.captainContractID = captainContractID;
@ -2673,24 +2665,12 @@ public class Enum { @@ -2673,24 +2665,12 @@ public class Enum {
}
public static void InitializeMinions(){
public static void InitializeMinions() {
for (MinionType minionType :MinionType.values())
for (MinionType minionType : MinionType.values())
ContractToMinionMap.put(minionType.captainContractID, minionType);
}
public int getCaptainContractID() {
return captainContractID;
}
public int getEquipSetID() {
return equipSetID;
}
public MinionClass getMinionClass() {
return minionClass;
}
public String getName() {
return name;
}
@ -2701,7 +2681,7 @@ public class Enum { @@ -2701,7 +2681,7 @@ public class Enum {
}
public enum GridObjectType{
public enum GridObjectType {
STATIC,
DYNAMIC;
}
@ -2715,17 +2695,17 @@ public class Enum { @@ -2715,17 +2695,17 @@ public class Enum {
ACCEPTTAX(7),
CONFIRMPROTECT(8);
private final int type;
public static HashMap<Integer, SupportMsgType> typeLookup = new HashMap<>();
private final int type;
SupportMsgType(int messageType) {
this.type = messageType;
}
public static void InitializeSupportMsgType(){
public static void InitializeSupportMsgType() {
for (SupportMsgType supportMsgType :SupportMsgType.values())
for (SupportMsgType supportMsgType : SupportMsgType.values())
typeLookup.put(supportMsgType.type, supportMsgType);
}
}
@ -2763,9 +2743,9 @@ public class Enum { @@ -2763,9 +2743,9 @@ public class Enum {
this.itemID = itemID;
}
public static void InitializeResourceTypes(){
public static void InitializeResourceTypes() {
for (ResourceType resourceType :ResourceType.values())
for (ResourceType resourceType : ResourceType.values())
resourceLookup.put(resourceType.itemID, resourceType);
}
}

Loading…
Cancel
Save