forked from MagicBane/Server
Merge branch 'magicbox1.5' of http://repo.magicbane.com/MagicBane/Server into magicbox1.5
This commit is contained in:
+241
-245
@@ -9,6 +9,7 @@
|
||||
package engine;
|
||||
|
||||
import ch.claude_martin.enumbitset.EnumBitSetHelper;
|
||||
import engine.gameManager.ConfigManager;
|
||||
import engine.gameManager.PowersManager;
|
||||
import engine.gameManager.ZoneManager;
|
||||
import engine.math.Vector2f;
|
||||
@@ -99,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<>();
|
||||
@@ -143,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()) {
|
||||
@@ -162,6 +155,14 @@ public class Enum {
|
||||
}
|
||||
}
|
||||
|
||||
public int getRuneID() {
|
||||
return this.runeID;
|
||||
}
|
||||
|
||||
public float getScaleHeight() {
|
||||
return this.scaleHeight;
|
||||
}
|
||||
|
||||
public MonsterType getMonsterType() {
|
||||
return monsterType;
|
||||
}
|
||||
@@ -217,11 +218,6 @@ public class Enum {
|
||||
return runCombat;
|
||||
}
|
||||
|
||||
public float getSwim() {
|
||||
return swim;
|
||||
}
|
||||
|
||||
|
||||
public float getFlyRun() {
|
||||
return flyRun;
|
||||
}
|
||||
@@ -256,10 +252,6 @@ public class Enum {
|
||||
this.listType = listType;
|
||||
}
|
||||
|
||||
public int getListType() {
|
||||
return this.listType;
|
||||
}
|
||||
|
||||
public static FriendListType getListTypeByID(int listType) {
|
||||
|
||||
FriendListType outType = null;
|
||||
@@ -270,6 +262,7 @@ public class Enum {
|
||||
}
|
||||
return outType;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum DispatchChannel {
|
||||
@@ -334,10 +327,6 @@ public class Enum {
|
||||
this.meshID = meshID;
|
||||
}
|
||||
|
||||
public int getMeshID() {
|
||||
return meshID;
|
||||
}
|
||||
|
||||
public static CharterType getCharterTypeByID(int charterID) {
|
||||
CharterType outType = null;
|
||||
|
||||
@@ -347,6 +336,10 @@ public class Enum {
|
||||
}
|
||||
return outType;
|
||||
}
|
||||
|
||||
public int getMeshID() {
|
||||
return meshID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -424,21 +417,6 @@ public class Enum {
|
||||
this.zoneUUID = uuid;
|
||||
}
|
||||
|
||||
public int getZoneUUID() {
|
||||
return this.zoneUUID;
|
||||
}
|
||||
|
||||
public Vector3fImmutable getLocation() {
|
||||
|
||||
Zone ruinZone;
|
||||
Vector3fImmutable spawnLocation;
|
||||
|
||||
ruinZone = ZoneManager.getZoneByUUID(this.zoneUUID);
|
||||
spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc(), 30);
|
||||
|
||||
return spawnLocation;
|
||||
}
|
||||
|
||||
public static Ruins getRandomRuin() {
|
||||
|
||||
Ruins ruins;
|
||||
@@ -449,6 +427,32 @@ public class Enum {
|
||||
return ruins;
|
||||
}
|
||||
|
||||
public Vector3fImmutable getLocation() {
|
||||
|
||||
Zone ruinZone;
|
||||
Vector3fImmutable spawnLocation;
|
||||
|
||||
// Send to SDR if so configured
|
||||
|
||||
if (ConfigManager.MB_USE_RUINS.getValue().equalsIgnoreCase("true")) {
|
||||
ruinZone = ZoneManager.getZoneByUUID(this.zoneUUID);
|
||||
spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc(), 30);
|
||||
} else {
|
||||
ruinZone = ZoneManager.getZoneByName("sea dog's rest");
|
||||
|
||||
// 14001 does not have a banestone to bind at
|
||||
|
||||
if (ruinZone.getLoadNum() == 14001)
|
||||
spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc(), 30);
|
||||
else
|
||||
spawnLocation = Vector3fImmutable.getRandomPointOnCircle(ruinZone.getLoc()
|
||||
.add(new Vector3fImmutable(-196.016f, 2.812f, 203.621f)), 30);
|
||||
}
|
||||
|
||||
|
||||
return spawnLocation;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum Guards {
|
||||
@@ -562,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;
|
||||
@@ -630,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;
|
||||
@@ -662,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 {
|
||||
@@ -755,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;
|
||||
}
|
||||
@@ -923,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;
|
||||
@@ -939,7 +945,7 @@ public class Enum {
|
||||
}
|
||||
}
|
||||
|
||||
public enum EffectSourceType{
|
||||
public enum EffectSourceType {
|
||||
None,
|
||||
AttackSpeedBuff,
|
||||
Bleeding,
|
||||
@@ -998,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;
|
||||
}
|
||||
@@ -1120,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;
|
||||
@@ -1206,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,
|
||||
@@ -1355,26 +1363,6 @@ public class Enum {
|
||||
this.reqLvl = reqLvl;
|
||||
}
|
||||
|
||||
public long getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public int getReqLvl() {
|
||||
return this.reqLvl;
|
||||
}
|
||||
|
||||
public void setFlag(long flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public int getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(int token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public static CharacterSkills GetCharacterSkillByToken(int token) {
|
||||
for (CharacterSkills skill : CharacterSkills.values()) {
|
||||
if (skill.token == token)
|
||||
@@ -1384,6 +1372,26 @@ public class Enum {
|
||||
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;
|
||||
}
|
||||
|
||||
public void setToken(int token) {
|
||||
this.token = token;
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
@@ -1440,7 +1448,8 @@ public class Enum {
|
||||
Warrior(SexType.NONE),
|
||||
Wizard(SexType.NONE),
|
||||
Nightstalker(SexType.NONE),
|
||||
Necromancer(SexType.NONE),;
|
||||
Necromancer(SexType.NONE),
|
||||
;
|
||||
|
||||
private SexType sexRestriction;
|
||||
|
||||
@@ -1566,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),
|
||||
@@ -1604,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;
|
||||
|
||||
@@ -1618,7 +1627,7 @@ public class Enum {
|
||||
|
||||
}
|
||||
|
||||
public enum UpdateType{
|
||||
public enum UpdateType {
|
||||
ALL,
|
||||
MOVEMENT,
|
||||
REGEN,
|
||||
@@ -1627,7 +1636,7 @@ public class Enum {
|
||||
MOVEMENTSTATE;
|
||||
}
|
||||
|
||||
public enum ServerType{
|
||||
public enum ServerType {
|
||||
WORLDSERVER,
|
||||
LOGINSERVER,
|
||||
NONE;
|
||||
@@ -2133,7 +2142,7 @@ public class Enum {
|
||||
}
|
||||
}
|
||||
|
||||
public enum PowerFailCondition{
|
||||
public enum PowerFailCondition {
|
||||
|
||||
Attack,
|
||||
AttackSwing,
|
||||
@@ -2149,7 +2158,7 @@ public class Enum {
|
||||
UnEquip;
|
||||
}
|
||||
|
||||
public enum PowerSubType{
|
||||
public enum PowerSubType {
|
||||
Amount,
|
||||
Ramp,
|
||||
UseAddFormula,
|
||||
@@ -2281,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"},
|
||||
@@ -2291,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"},
|
||||
@@ -2300,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"},
|
||||
@@ -2311,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"},
|
||||
@@ -2322,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"},
|
||||
@@ -2349,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"},
|
||||
@@ -2358,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"},
|
||||
@@ -2368,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"},
|
||||
@@ -2379,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"},
|
||||
@@ -2398,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"},
|
||||
@@ -2408,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"},
|
||||
@@ -2418,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"},
|
||||
@@ -2428,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"},
|
||||
@@ -2454,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"},
|
||||
@@ -2463,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"},
|
||||
@@ -2476,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) {
|
||||
@@ -2517,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
|
||||
@@ -2595,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 {
|
||||
@@ -2604,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;
|
||||
@@ -2657,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;
|
||||
}
|
||||
@@ -2685,7 +2681,7 @@ public class Enum {
|
||||
|
||||
}
|
||||
|
||||
public enum GridObjectType{
|
||||
public enum GridObjectType {
|
||||
STATIC,
|
||||
DYNAMIC;
|
||||
}
|
||||
@@ -2699,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);
|
||||
}
|
||||
}
|
||||
@@ -2747,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,10 +47,15 @@ public class MobileFSMManager {
|
||||
};
|
||||
|
||||
alive = true;
|
||||
|
||||
//assign the AI varibales base don difficulty scaling from config file:
|
||||
float difficulty = Float.parseFloat(ConfigManager.MB_MOB_DIFFICULTY.getValue());
|
||||
AI_BASE_AGGRO_RANGE = (int)(100 * difficulty); // range at which aggressive mobs will attack you
|
||||
AI_POWER_DIVISOR = (int)(20 * (1.5f-difficulty)); //duration between mob casts
|
||||
|
||||
float difficulty = Float.parseFloat(ConfigManager.MB_AI_AGGRO_RANGE.getValue());
|
||||
AI_BASE_AGGRO_RANGE = (int) (100 * difficulty); // range at which aggressive mobs will attack you
|
||||
|
||||
difficulty = Float.parseFloat(ConfigManager.MB_AI_CAST_FREQUENCY.getValue());
|
||||
AI_POWER_DIVISOR = (int) (20 * (1.5f - difficulty)); //duration between mob casts
|
||||
|
||||
Thread t = new Thread(worker, "MobileFSMManager");
|
||||
t.start();
|
||||
}
|
||||
|
||||
@@ -61,6 +61,11 @@ public enum ConfigManager {
|
||||
MB_WORLD_MAINTENANCE,
|
||||
MB_WORLD_GREETING,
|
||||
MB_WORLD_KEYCLONE_MAX,
|
||||
MB_USE_RUINS,
|
||||
|
||||
// Mobile AI modifiers
|
||||
MB_AI_CAST_FREQUENCY,
|
||||
MB_AI_AGGRO_RANGE,
|
||||
|
||||
//drop rates
|
||||
MB_NORMAL_EXP_RATE,
|
||||
@@ -86,9 +91,7 @@ public enum ConfigManager {
|
||||
MB_MAGICBOT_FORTOFIX,
|
||||
MB_MAGICBOT_RECRUIT,
|
||||
MB_MAGICBOT_MAGICBOX,
|
||||
MB_MAGICBOT_ADMINLOG,
|
||||
|
||||
MB_MOB_DIFFICULTY;//0.1(easy) - 1.0(hard)
|
||||
MB_MAGICBOT_ADMINLOG;
|
||||
|
||||
// Map to hold our config pulled in from the environment
|
||||
// We also use the config to point to the current message pump
|
||||
|
||||
@@ -103,7 +103,6 @@ public enum ZoneManager {
|
||||
|
||||
ZoneManager.zonesByID.put(zoneID, zone);
|
||||
|
||||
if (zone != null)
|
||||
ZoneManager.zonesByUUID.put(zone.getObjectUUID(), zone);
|
||||
|
||||
ZoneManager.zonesByName.put(zone.getName().toLowerCase(), zone);
|
||||
@@ -144,6 +143,10 @@ public enum ZoneManager {
|
||||
return ZoneManager.zonesByID.get(zoneID);
|
||||
}
|
||||
|
||||
public static Zone getZoneByName(final String zoneName) {
|
||||
return ZoneManager.zonesByName.get(zoneName);
|
||||
}
|
||||
|
||||
public static final Collection<Zone> getAllZones() {
|
||||
return ZoneManager.zonesByUUID.values();
|
||||
}
|
||||
|
||||
@@ -879,14 +879,11 @@ public class PlayerCharacter extends AbstractCharacter {
|
||||
|
||||
//handle rented room binds.
|
||||
|
||||
|
||||
if (bindBuilding == null){
|
||||
bindLocation = Enum.Ruins.getRandomRuin().getLocation();
|
||||
return bindLocation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bindLocation = BuildingManager.GetBindLocationForBuilding(bindBuilding);
|
||||
|
||||
if (bindLocation == null)
|
||||
|
||||
Reference in New Issue
Block a user