|
|
|
@ -3,6 +3,7 @@ package engine.gameManager;
@@ -3,6 +3,7 @@ package engine.gameManager;
|
|
|
|
|
import engine.Enum; |
|
|
|
|
import engine.math.Vector3fImmutable; |
|
|
|
|
import engine.objects.Guild; |
|
|
|
|
import engine.objects.Mine; |
|
|
|
|
import engine.objects.PlayerCharacter; |
|
|
|
|
import engine.objects.Regions; |
|
|
|
|
|
|
|
|
@ -20,7 +21,6 @@ public class LoreMineManager {
@@ -20,7 +21,6 @@ public class LoreMineManager {
|
|
|
|
|
//THIEVES
|
|
|
|
|
//SCOURGE
|
|
|
|
|
//UNHOLY
|
|
|
|
|
|
|
|
|
|
public static final Map<Enum.GuildType, List<String>> GUILD_RACES = new HashMap<>(); |
|
|
|
|
public static final Map<Enum.GuildType, List<String>> GUILD_CLASSES = new HashMap<>(); |
|
|
|
|
public static final Map<Enum.GuildType, Boolean> GUILD_GENDER_RESTRICTION = new HashMap<>(); |
|
|
|
@ -79,10 +79,22 @@ public class LoreMineManager {
@@ -79,10 +79,22 @@ public class LoreMineManager {
|
|
|
|
|
GUILD_CLASSES.put(Enum.GuildType.UNHOLY, Arrays.asList("Assassin", "Channeler", "Necromancer", "Priest", "Scout", "Thief", "Warlock", "Warrior", "Wizard")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void AuditPlayer(PlayerCharacter pc){ |
|
|
|
|
public static void AuditPlayer(PlayerCharacter pc, Mine mine){ |
|
|
|
|
Guild nation = pc.guild.getNation(); |
|
|
|
|
int charterID = nation.getCharter(); |
|
|
|
|
if(!validForCharter(pc,charterID)){ |
|
|
|
|
|
|
|
|
|
if(mine.chosen_charters == null){ |
|
|
|
|
mine.chosen_charters = new HashMap<>(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Enum.GuildType guildType; |
|
|
|
|
if (mine.chosen_charters.containsKey(nation)) { |
|
|
|
|
guildType = mine.chosen_charters.get(nation); |
|
|
|
|
}else{ |
|
|
|
|
guildType = Enum.GuildType.getGuildTypeFromInt(pc.guild.getCharter()); |
|
|
|
|
mine.chosen_charters.put(nation,guildType); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(!validForCharter(pc,guildType)){ |
|
|
|
|
//bounce out to SDR
|
|
|
|
|
Vector3fImmutable bounceLoc = Vector3fImmutable.getRandomPointOnCircle(ZoneManager.getZoneByUUID(656).getLoc(),30f); |
|
|
|
|
pc.setLoc(bounceLoc); |
|
|
|
@ -91,10 +103,9 @@ public class LoreMineManager {
@@ -91,10 +103,9 @@ public class LoreMineManager {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static boolean validForCharter(PlayerCharacter pc, int charterID) { |
|
|
|
|
public static boolean validForCharter(PlayerCharacter pc, Enum.GuildType guildType) { |
|
|
|
|
if(pc.getPromotionClass() == null) |
|
|
|
|
return false; |
|
|
|
|
Enum.GuildType guildType = Enum.GuildType.getGuildTypeFromInt(charterID); |
|
|
|
|
|
|
|
|
|
// Define the races and classes for each GuildType
|
|
|
|
|
|
|
|
|
|