forked from MagicBane/Server
promote type upgraded to class type.
This commit is contained in:
+50
-53
@@ -1496,13 +1496,10 @@ public class Enum {
|
||||
}
|
||||
|
||||
public enum ClassType {
|
||||
FIGHTER,
|
||||
HEALER,
|
||||
ROGUE,
|
||||
MAGE
|
||||
}
|
||||
|
||||
public enum PromoteType {
|
||||
FIGHTER(SexType.NONE),
|
||||
HEALER(SexType.NONE),
|
||||
ROGUE(SexType.NONE),
|
||||
MAGE(SexType.NONE),
|
||||
Assassin(SexType.NONE),
|
||||
Barbarian(SexType.NONE),
|
||||
Bard(SexType.NONE),
|
||||
@@ -1529,7 +1526,7 @@ public class Enum {
|
||||
|
||||
private final SexType sexRestriction;
|
||||
|
||||
PromoteType(SexType sexRestriction) {
|
||||
ClassType(SexType sexRestriction) {
|
||||
this.sexRestriction = sexRestriction;
|
||||
}
|
||||
|
||||
@@ -2366,7 +2363,7 @@ public class Enum {
|
||||
|
||||
public enum GuildCharterType {
|
||||
NONE("None", new String[][]{{"None"}}, new String[]{"Thearchy", "Common Rule", "Theocracy", "Republic Rule"},
|
||||
EnumSet.noneOf(PromoteType.class),
|
||||
EnumSet.noneOf(ClassType.class),
|
||||
EnumSet.noneOf(MonsterType.class),
|
||||
EnumSet.noneOf(SexType.class)),
|
||||
|
||||
@@ -2380,8 +2377,8 @@ public class Enum {
|
||||
{"Lord Cardinal", "Lady Cardinal"},
|
||||
{"Patriarch", "Matriarch"}},
|
||||
new String[]{"Thearchy", "Common Rule", "Theocracy", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Bard, PromoteType.Channeler, PromoteType.Crusader, PromoteType.Nightstalker,
|
||||
PromoteType.Prelate, PromoteType.Priest, PromoteType.Sentinel, PromoteType.Scout),
|
||||
EnumSet.of(ClassType.Bard, ClassType.Channeler, ClassType.Crusader, ClassType.Nightstalker,
|
||||
ClassType.Prelate, ClassType.Priest, ClassType.Sentinel, ClassType.Scout),
|
||||
EnumSet.of(MonsterType.Aelfborn, MonsterType.Centaur, MonsterType.Elf, MonsterType.HalfGiant,
|
||||
MonsterType.Human),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
@@ -2395,8 +2392,8 @@ public class Enum {
|
||||
{"General"},
|
||||
{"Lord Marshall", "Lady Marshall"}},
|
||||
new String[]{"Autocracy", "Common Rule", "Council Rule", "Militocracy"},
|
||||
EnumSet.of(PromoteType.Bard, PromoteType.Priest, PromoteType.Scout, PromoteType.Warlock,
|
||||
PromoteType.Warrior, PromoteType.Wizard),
|
||||
EnumSet.of(ClassType.Bard, ClassType.Priest, ClassType.Scout, ClassType.Warlock,
|
||||
ClassType.Warrior, ClassType.Wizard),
|
||||
EnumSet.of(MonsterType.Centaur, MonsterType.HalfGiant, MonsterType.Human),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
TEMPLE("Temple of the Cleansing Flame", new String[][]{
|
||||
@@ -2410,8 +2407,8 @@ public class Enum {
|
||||
{"Justiciar"},
|
||||
{"Pontifex", "Pontifectrix"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Protectorship", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Assassin, PromoteType.Bard, PromoteType.Channeler, PromoteType.Confessor,
|
||||
PromoteType.Nightstalker, PromoteType.Priest, PromoteType.Scout, PromoteType.Templar),
|
||||
EnumSet.of(ClassType.Assassin, ClassType.Bard, ClassType.Channeler, ClassType.Confessor,
|
||||
ClassType.Nightstalker, ClassType.Priest, ClassType.Scout, ClassType.Templar),
|
||||
EnumSet.of(MonsterType.HalfGiant, MonsterType.Human),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
BARBARIAN("Barbarian Clan", new String[][]{
|
||||
@@ -2423,8 +2420,8 @@ public class Enum {
|
||||
{"Chieftain"},
|
||||
{"Thane"}},
|
||||
new String[]{"Chiefdom", "Common Rule", "Council Rule", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Barbarian, PromoteType.Bard, PromoteType.Doomsayer, PromoteType.Fury,
|
||||
PromoteType.Priest, PromoteType.Scout, PromoteType.Thief, PromoteType.Warrior),
|
||||
EnumSet.of(ClassType.Barbarian, ClassType.Bard, ClassType.Doomsayer, ClassType.Fury,
|
||||
ClassType.Priest, ClassType.Scout, ClassType.Thief, ClassType.Warrior),
|
||||
EnumSet.of(MonsterType.Aelfborn, MonsterType.HalfGiant, MonsterType.Human, MonsterType.Minotaur),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
RANGER("Ranger's Brotherhood", new String[][]{
|
||||
@@ -2436,8 +2433,8 @@ public class Enum {
|
||||
{"Guardian"},
|
||||
{"Lord Protector", "Lady Protector"}},
|
||||
new String[]{"Despot Rule", "Collectivism", "Council Rule", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Bard, PromoteType.Channeler, PromoteType.Druid, PromoteType.Priest,
|
||||
PromoteType.Ranger, PromoteType.Scout, PromoteType.Warrior),
|
||||
EnumSet.of(ClassType.Bard, ClassType.Channeler, ClassType.Druid, ClassType.Priest,
|
||||
ClassType.Ranger, ClassType.Scout, ClassType.Warrior),
|
||||
EnumSet.of(MonsterType.Aelfborn, MonsterType.Elf, MonsterType.HalfGiant, MonsterType.Human, MonsterType.Shade),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
AMAZON("Amazon Temple", new String[][]{
|
||||
@@ -2448,8 +2445,8 @@ public class Enum {
|
||||
{"Amazon Seneschal", "Majestrix"},
|
||||
{"Amazon Regent", "Imperatrix"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Gynarchy", "Gynocracy"},
|
||||
EnumSet.of(PromoteType.Bard, PromoteType.Druid, PromoteType.Fury, PromoteType.Huntress,
|
||||
PromoteType.Priest, PromoteType.Scout, PromoteType.Warrior, PromoteType.Wizard),
|
||||
EnumSet.of(ClassType.Bard, ClassType.Druid, ClassType.Fury, ClassType.Huntress,
|
||||
ClassType.Priest, ClassType.Scout, ClassType.Warrior, ClassType.Wizard),
|
||||
EnumSet.of(MonsterType.Aelfborn, MonsterType.Elf, MonsterType.HalfGiant, MonsterType.Human),
|
||||
EnumSet.of(SexType.FEMALE)),
|
||||
NOBLE("Noble House", new String[][]{
|
||||
@@ -2463,8 +2460,8 @@ public class Enum {
|
||||
{"King", "Queen"},
|
||||
{"Emperor", "Empress"}},
|
||||
new String[]{"Monarchy", "Common Rule", "Feodality", "Republic"},
|
||||
EnumSet.of(PromoteType.Assassin, PromoteType.Bard, PromoteType.Channeler, PromoteType.Priest,
|
||||
PromoteType.Scout, PromoteType.Thief, PromoteType.Warlock, PromoteType.Warrior, PromoteType.Wizard),
|
||||
EnumSet.of(ClassType.Assassin, ClassType.Bard, ClassType.Channeler, ClassType.Priest,
|
||||
ClassType.Scout, ClassType.Thief, ClassType.Warlock, ClassType.Warrior, ClassType.Wizard),
|
||||
EnumSet.of(MonsterType.Aelfborn, MonsterType.HalfGiant, MonsterType.Human),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
WIZARD("Wizard's Conclave", new String[][]{
|
||||
@@ -2476,8 +2473,8 @@ public class Enum {
|
||||
{"High Magus"},
|
||||
{"Archmagus"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Magocracy"},
|
||||
EnumSet.of(PromoteType.Assassin, PromoteType.Bard, PromoteType.Channeler, PromoteType.Doomsayer,
|
||||
PromoteType.Fury, PromoteType.Necromancer, PromoteType.Priest, PromoteType.Warlock, PromoteType.Wizard),
|
||||
EnumSet.of(ClassType.Assassin, ClassType.Bard, ClassType.Channeler, ClassType.Doomsayer,
|
||||
ClassType.Fury, ClassType.Necromancer, ClassType.Priest, ClassType.Warlock, ClassType.Wizard),
|
||||
EnumSet.of(MonsterType.Aelfborn, MonsterType.Elf, MonsterType.Human, MonsterType.Nephilim, MonsterType.Shade),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
MERCENARY("Mercenary Company", new String[][]{
|
||||
@@ -2490,8 +2487,8 @@ public class Enum {
|
||||
{"High Commander"},
|
||||
{"Warlord"}},
|
||||
new String[]{"Magistrature", "Mob Law", "Council Rule", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Assassin, PromoteType.Bard, PromoteType.Priest, PromoteType.Scout,
|
||||
PromoteType.Thief, PromoteType.Warlock, PromoteType.Warrior),
|
||||
EnumSet.of(ClassType.Assassin, ClassType.Bard, ClassType.Priest, ClassType.Scout,
|
||||
ClassType.Thief, ClassType.Warlock, ClassType.Warrior),
|
||||
EnumSet.of(MonsterType.Aelfborn, MonsterType.Aracoix, MonsterType.HalfGiant, MonsterType.Human, MonsterType.Shade),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
THIEVES("Thieve's Den", new String[][]{
|
||||
@@ -2505,8 +2502,8 @@ public class Enum {
|
||||
{"Grandmaster Thief"},
|
||||
{"Grandfather"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Oligarchy", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Assassin, PromoteType.Barbarian, PromoteType.Bard, PromoteType.Priest,
|
||||
PromoteType.Scout, PromoteType.Thief, PromoteType.Wizard),
|
||||
EnumSet.of(ClassType.Assassin, ClassType.Barbarian, ClassType.Bard, ClassType.Priest,
|
||||
ClassType.Scout, ClassType.Thief, ClassType.Wizard),
|
||||
EnumSet.of(MonsterType.Aelfborn, MonsterType.Aracoix, MonsterType.Elf, MonsterType.Human, MonsterType.Irekei,
|
||||
MonsterType.Nephilim, MonsterType.Shade, MonsterType.Vampire),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
@@ -2518,8 +2515,8 @@ public class Enum {
|
||||
{"Great Thane"},
|
||||
{"High Thane"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Crusader, PromoteType.Prelate, PromoteType.Priest, PromoteType.Sentinel,
|
||||
PromoteType.Warrior),
|
||||
EnumSet.of(ClassType.Crusader, ClassType.Prelate, ClassType.Priest, ClassType.Sentinel,
|
||||
ClassType.Warrior),
|
||||
EnumSet.of(MonsterType.Dwarf),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
HIGHCOURT("High Court", new String[][]{
|
||||
@@ -2533,9 +2530,9 @@ public class Enum {
|
||||
{"Aglaeron"},
|
||||
{"Ellestor", "Elestril"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Assassin, PromoteType.Bard, PromoteType.Channeler, PromoteType.Druid,
|
||||
PromoteType.Necromancer, PromoteType.Priest, PromoteType.Ranger, PromoteType.Scout,
|
||||
PromoteType.Thief, PromoteType.Warrior, PromoteType.Wizard),
|
||||
EnumSet.of(ClassType.Assassin, ClassType.Bard, ClassType.Channeler, ClassType.Druid,
|
||||
ClassType.Necromancer, ClassType.Priest, ClassType.Ranger, ClassType.Scout,
|
||||
ClassType.Thief, ClassType.Warrior, ClassType.Wizard),
|
||||
EnumSet.of(MonsterType.Elf, MonsterType.Minotaur),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
VIRAKT("Virakt", new String[][]{
|
||||
@@ -2548,9 +2545,9 @@ public class Enum {
|
||||
{"Khar'uus"},
|
||||
{"Kryqh'khalin"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Assassin, PromoteType.Bard, PromoteType.Channeler, PromoteType.Fury,
|
||||
PromoteType.Huntress, PromoteType.Nightstalker, PromoteType.Priest, PromoteType.Ranger,
|
||||
PromoteType.Scout, PromoteType.Thief, PromoteType.Warrior, PromoteType.Wizard),
|
||||
EnumSet.of(ClassType.Assassin, ClassType.Bard, ClassType.Channeler, ClassType.Fury,
|
||||
ClassType.Huntress, ClassType.Nightstalker, ClassType.Priest, ClassType.Ranger,
|
||||
ClassType.Scout, ClassType.Thief, ClassType.Warrior, ClassType.Wizard),
|
||||
EnumSet.of(MonsterType.Irekei),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
BRIALIA("Coven of Brialia", new String[][]{ // Unknown Rank names
|
||||
@@ -2563,7 +2560,7 @@ public class Enum {
|
||||
{"Hierophant"},
|
||||
{"Witch King", "Witch Queen"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"},
|
||||
EnumSet.allOf(PromoteType.class),
|
||||
EnumSet.allOf(ClassType.class),
|
||||
EnumSet.allOf(MonsterType.class),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
|
||||
@@ -2577,9 +2574,9 @@ public class Enum {
|
||||
{"Dread Master", "Dread Mistress"},
|
||||
{"Dread Lord", "Dread Lady"}},
|
||||
new String[]{"Despot Rule", "Despot Rule", "Council Rule", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Assassin, PromoteType.Channeler, PromoteType.Necromancer, PromoteType.Priest,
|
||||
PromoteType.Scout, PromoteType.Thief, PromoteType.Warlock, PromoteType.Warrior,
|
||||
PromoteType.Wizard),
|
||||
EnumSet.of(ClassType.Assassin, ClassType.Channeler, ClassType.Necromancer, ClassType.Priest,
|
||||
ClassType.Scout, ClassType.Thief, ClassType.Warlock, ClassType.Warrior,
|
||||
ClassType.Wizard),
|
||||
EnumSet.of(MonsterType.Human, MonsterType.Shade, MonsterType.Vampire),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
SCOURGE("Cult of the Scourge", new String[][]{
|
||||
@@ -2589,8 +2586,8 @@ public class Enum {
|
||||
{"Hand of the Dark"},
|
||||
{"Dark Father", "Dark Mother"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Bard, PromoteType.Channeler, PromoteType.Doomsayer, PromoteType.Priest,
|
||||
PromoteType.Scout, PromoteType.Warrior, PromoteType.Wizard),
|
||||
EnumSet.of(ClassType.Bard, ClassType.Channeler, ClassType.Doomsayer, ClassType.Priest,
|
||||
ClassType.Scout, ClassType.Warrior, ClassType.Wizard),
|
||||
EnumSet.of(MonsterType.Aelfborn, MonsterType.Human, MonsterType.Minotaur, MonsterType.Nephilim),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
PIRATE("Pirate Crew", new String[][]{
|
||||
@@ -2601,7 +2598,7 @@ public class Enum {
|
||||
{"First Mate"},
|
||||
{"Captain"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"},
|
||||
EnumSet.allOf(PromoteType.class),
|
||||
EnumSet.allOf(ClassType.class),
|
||||
EnumSet.allOf(MonsterType.class),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
HERALD("Academy of Heralds", new String[][]{
|
||||
@@ -2614,7 +2611,7 @@ public class Enum {
|
||||
{"Archivist"},
|
||||
{"Loremaster"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"},
|
||||
EnumSet.allOf(PromoteType.class),
|
||||
EnumSet.allOf(ClassType.class),
|
||||
EnumSet.allOf(MonsterType.class),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
CENTAUR("Centaur Cohort", new String[][]{
|
||||
@@ -2627,9 +2624,9 @@ public class Enum {
|
||||
{"Praetorian"},
|
||||
{"Paragon"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Barbarian, PromoteType.Crusader, PromoteType.Druid, PromoteType.Huntress,
|
||||
PromoteType.Prelate, PromoteType.Priest, PromoteType.Ranger, PromoteType.Sentinel,
|
||||
PromoteType.Warrior),
|
||||
EnumSet.of(ClassType.Barbarian, ClassType.Crusader, ClassType.Druid, ClassType.Huntress,
|
||||
ClassType.Prelate, ClassType.Priest, ClassType.Ranger, ClassType.Sentinel,
|
||||
ClassType.Warrior),
|
||||
EnumSet.of(MonsterType.Centaur),
|
||||
EnumSet.allOf(SexType.class)),
|
||||
KHREE("Aracoix Kh'ree", new String[][]{
|
||||
@@ -2644,20 +2641,20 @@ public class Enum {
|
||||
{"Araceos"},
|
||||
{"Hierarch"}},
|
||||
new String[]{"Despot Rule", "Common Rule", "Council Rule", "Republic Rule"},
|
||||
EnumSet.of(PromoteType.Assassin, PromoteType.Barbarian, PromoteType.Bard, PromoteType.Huntress,
|
||||
PromoteType.Priest, PromoteType.Ranger, PromoteType.Scout, PromoteType.Thief,
|
||||
PromoteType.Warlock, PromoteType.Warrior),
|
||||
EnumSet.of(ClassType.Assassin, ClassType.Barbarian, ClassType.Bard, ClassType.Huntress,
|
||||
ClassType.Priest, ClassType.Ranger, ClassType.Scout, ClassType.Thief,
|
||||
ClassType.Warlock, ClassType.Warrior),
|
||||
EnumSet.of(MonsterType.Aracoix),
|
||||
EnumSet.allOf(SexType.class));
|
||||
|
||||
public final EnumSet<PromoteType> requiredClasses;
|
||||
public final EnumSet<ClassType> requiredClasses;
|
||||
public final EnumSet<MonsterType> requiredRaces;
|
||||
public final EnumSet<SexType> sexRequired;
|
||||
private final String name;
|
||||
private final String[][] ranks; //Stored Rank#->Gender(M,F)
|
||||
private final String[] leadershipTypes;
|
||||
|
||||
GuildCharterType(String name, String[][] ranks, String[] leadershipTypes, EnumSet<PromoteType> requiredClasses,
|
||||
GuildCharterType(String name, String[][] ranks, String[] leadershipTypes, EnumSet<ClassType> requiredClasses,
|
||||
EnumSet<MonsterType> requiredRaces, EnumSet<SexType> sexRequired) {
|
||||
this.name = name;
|
||||
this.ranks = ranks;
|
||||
|
||||
@@ -27,7 +27,6 @@ import engine.math.Bounds;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.net.ByteBufferWriter;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
import engine.net.client.msg.UpdateStateMsg;
|
||||
import engine.powers.EffectsBase;
|
||||
import engine.server.MBServerStatics;
|
||||
@@ -126,7 +125,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
public ArrayList<CharacterRune> runes;
|
||||
|
||||
public Enum.MonsterType absRace = null;
|
||||
public Enum.PromoteType absClass = null;
|
||||
public ClassType absClass = null;
|
||||
|
||||
public Enum.SexType absGender = null;
|
||||
|
||||
|
||||
@@ -81,10 +81,10 @@ public class ItemBase {
|
||||
//requirements/restrictions
|
||||
public ArrayList<Enum.MonsterType> restrictedRaces;
|
||||
public ArrayList<Enum.MonsterType> requiredRaces;
|
||||
public ArrayList<Enum.PromoteType> restrictedClasses;
|
||||
public ArrayList<Enum.PromoteType> requiredClasses;
|
||||
public ArrayList<Integer> requiredDiscs;
|
||||
public ArrayList<Integer> restrictedDiscs;
|
||||
public ArrayList<Enum.ClassType> restrictedClasses;
|
||||
public ArrayList<Enum.ClassType> requiredClasses;
|
||||
public ArrayList<Integer> requiredDiscs;
|
||||
public ArrayList<Integer> restrictedDiscs;
|
||||
public Enum.SexType requiredSex;
|
||||
|
||||
/**
|
||||
@@ -998,12 +998,12 @@ public class ItemBase {
|
||||
}
|
||||
if(classesRequired != null){
|
||||
for(String entry : classesRequired.split(";")){
|
||||
requiredClasses.add(Enum.PromoteType.valueOf(entry));
|
||||
requiredClasses.add(Enum.ClassType.valueOf(entry));
|
||||
}
|
||||
}
|
||||
if(classesRestricted != null){
|
||||
for(String entry : classesRestricted.split(";")){
|
||||
restrictedClasses.add(Enum.PromoteType.valueOf(entry));
|
||||
restrictedClasses.add(Enum.ClassType.valueOf(entry));
|
||||
}
|
||||
}
|
||||
if(discsRequired != null){
|
||||
|
||||
@@ -4565,7 +4565,7 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
this.absRace = Enum.MonsterType.valueOf(race);
|
||||
|
||||
if(this.promotionClass != null)
|
||||
this.absClass = Enum.PromoteType.valueOf(this.getPromotionClass().getName());
|
||||
this.absClass = ClassType.valueOf(this.getPromotionClass().getName());
|
||||
|
||||
if(this.isMale())
|
||||
this.absGender = SexType.MALE;
|
||||
|
||||
Reference in New Issue
Block a user