Addition of Assassin character creation configuration.
Contributed by Copyleft.
This commit is contained in:
@@ -12,4 +12,5 @@ AllowDwarf = True
|
|||||||
AllowKamael = True
|
AllowKamael = True
|
||||||
AllowDeathKnight = True
|
AllowDeathKnight = True
|
||||||
AllowSylph = True
|
AllowSylph = True
|
||||||
AllowVanguard = True
|
AllowVanguard = True
|
||||||
|
AllowAssassin = True
|
@@ -1280,6 +1280,7 @@ public class Config
|
|||||||
public static boolean ALLOW_DEATH_KNIGHT;
|
public static boolean ALLOW_DEATH_KNIGHT;
|
||||||
public static boolean ALLOW_SYLPH;
|
public static boolean ALLOW_SYLPH;
|
||||||
public static boolean ALLOW_VANGUARD;
|
public static boolean ALLOW_VANGUARD;
|
||||||
|
public static boolean ALLOW_ASSASSIN;
|
||||||
public static boolean AUTO_POTIONS_ENABLED;
|
public static boolean AUTO_POTIONS_ENABLED;
|
||||||
public static boolean AUTO_POTIONS_IN_OLYMPIAD;
|
public static boolean AUTO_POTIONS_IN_OLYMPIAD;
|
||||||
public static int AUTO_POTION_MIN_LEVEL;
|
public static int AUTO_POTION_MIN_LEVEL;
|
||||||
@@ -2768,7 +2769,8 @@ public class Config
|
|||||||
ALLOW_DEATH_KNIGHT = allowedPlayerRacesConfig.getBoolean("AllowDeathKnight", true);
|
ALLOW_DEATH_KNIGHT = allowedPlayerRacesConfig.getBoolean("AllowDeathKnight", true);
|
||||||
ALLOW_SYLPH = allowedPlayerRacesConfig.getBoolean("AllowSylph", true);
|
ALLOW_SYLPH = allowedPlayerRacesConfig.getBoolean("AllowSylph", true);
|
||||||
ALLOW_VANGUARD = allowedPlayerRacesConfig.getBoolean("AllowVanguard", true);
|
ALLOW_VANGUARD = allowedPlayerRacesConfig.getBoolean("AllowVanguard", true);
|
||||||
|
ALLOW_ASSASSIN = allowedPlayerRacesConfig.getBoolean("AllowAssassin", true);
|
||||||
|
|
||||||
// Load AutoPotions config file (if exists)
|
// Load AutoPotions config file (if exists)
|
||||||
final PropertiesParser autoPotionsConfig = new PropertiesParser(CUSTOM_AUTO_POTIONS_CONFIG_FILE);
|
final PropertiesParser autoPotionsConfig = new PropertiesParser(CUSTOM_AUTO_POTIONS_CONFIG_FILE);
|
||||||
AUTO_POTIONS_ENABLED = autoPotionsConfig.getBoolean("AutoPotionsEnabled", false);
|
AUTO_POTIONS_ENABLED = autoPotionsConfig.getBoolean("AutoPotionsEnabled", false);
|
||||||
|
@@ -276,6 +276,12 @@ public class CharacterCreate extends ClientPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Config.ALLOW_ASSASSIN && CategoryData.getInstance().isInCategory(CategoryType.ASSASSIN_ALL_CLASS, _classId))
|
||||||
|
{
|
||||||
|
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
newChar = Player.create(template, client.getAccountName(), _name, new PlayerAppearance(_face, _hairColor, _hairStyle, _isFemale));
|
newChar = Player.create(template, client.getAccountName(), _name, new PlayerAppearance(_face, _hairColor, _hairStyle, _isFemale));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -12,4 +12,5 @@ AllowDwarf = True
|
|||||||
AllowKamael = True
|
AllowKamael = True
|
||||||
AllowDeathKnight = True
|
AllowDeathKnight = True
|
||||||
AllowSylph = True
|
AllowSylph = True
|
||||||
AllowVanguard = True
|
AllowVanguard = True
|
||||||
|
AllowAssassin = True
|
@@ -1276,6 +1276,7 @@ public class Config
|
|||||||
public static boolean ALLOW_DEATH_KNIGHT;
|
public static boolean ALLOW_DEATH_KNIGHT;
|
||||||
public static boolean ALLOW_SYLPH;
|
public static boolean ALLOW_SYLPH;
|
||||||
public static boolean ALLOW_VANGUARD;
|
public static boolean ALLOW_VANGUARD;
|
||||||
|
public static boolean ALLOW_ASSASSIN;
|
||||||
public static boolean AUTO_POTIONS_ENABLED;
|
public static boolean AUTO_POTIONS_ENABLED;
|
||||||
public static boolean AUTO_POTIONS_IN_OLYMPIAD;
|
public static boolean AUTO_POTIONS_IN_OLYMPIAD;
|
||||||
public static int AUTO_POTION_MIN_LEVEL;
|
public static int AUTO_POTION_MIN_LEVEL;
|
||||||
@@ -2760,7 +2761,8 @@ public class Config
|
|||||||
ALLOW_DEATH_KNIGHT = allowedPlayerRacesConfig.getBoolean("AllowDeathKnight", true);
|
ALLOW_DEATH_KNIGHT = allowedPlayerRacesConfig.getBoolean("AllowDeathKnight", true);
|
||||||
ALLOW_SYLPH = allowedPlayerRacesConfig.getBoolean("AllowSylph", true);
|
ALLOW_SYLPH = allowedPlayerRacesConfig.getBoolean("AllowSylph", true);
|
||||||
ALLOW_VANGUARD = allowedPlayerRacesConfig.getBoolean("AllowVanguard", true);
|
ALLOW_VANGUARD = allowedPlayerRacesConfig.getBoolean("AllowVanguard", true);
|
||||||
|
ALLOW_ASSASSIN = allowedPlayerRacesConfig.getBoolean("AllowAssassin", true);
|
||||||
|
|
||||||
// Load AutoPotions config file (if exists)
|
// Load AutoPotions config file (if exists)
|
||||||
final PropertiesParser autoPotionsConfig = new PropertiesParser(CUSTOM_AUTO_POTIONS_CONFIG_FILE);
|
final PropertiesParser autoPotionsConfig = new PropertiesParser(CUSTOM_AUTO_POTIONS_CONFIG_FILE);
|
||||||
AUTO_POTIONS_ENABLED = autoPotionsConfig.getBoolean("AutoPotionsEnabled", false);
|
AUTO_POTIONS_ENABLED = autoPotionsConfig.getBoolean("AutoPotionsEnabled", false);
|
||||||
|
@@ -276,6 +276,12 @@ public class CharacterCreate extends ClientPacket
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Config.ALLOW_ASSASSIN && CategoryData.getInstance().isInCategory(CategoryType.ASSASSIN_ALL_CLASS, _classId))
|
||||||
|
{
|
||||||
|
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
newChar = Player.create(template, client.getAccountName(), _name, new PlayerAppearance(_face, _hairColor, _hairStyle, _isFemale));
|
newChar = Player.create(template, client.getAccountName(), _name, new PlayerAppearance(_face, _hairColor, _hairStyle, _isFemale));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user