Addition of Death Knight at Allowed Player Races configuration.
This commit is contained in:
parent
629cfae635
commit
715a62acb1
@ -11,3 +11,4 @@ AllowOrc = True
|
||||
AllowDwarf = True
|
||||
AllowKamael = True
|
||||
AllowErtheia = True
|
||||
AllowDeathKnight = True
|
||||
|
@ -1263,6 +1263,7 @@ public class Config
|
||||
public static boolean ALLOW_DWARF;
|
||||
public static boolean ALLOW_KAMAEL;
|
||||
public static boolean ALLOW_ERTHEIA;
|
||||
public static boolean ALLOW_DEATH_KNIGHT;
|
||||
public static boolean AUTO_POTIONS_ENABLED;
|
||||
public static boolean AUTO_POTIONS_IN_OLYMPIAD;
|
||||
public static int AUTO_POTION_MIN_LEVEL;
|
||||
@ -2650,6 +2651,7 @@ public class Config
|
||||
ALLOW_DWARF = allowedPlayerRacesConfig.getBoolean("AllowDwarf", true);
|
||||
ALLOW_KAMAEL = allowedPlayerRacesConfig.getBoolean("AllowKamael", true);
|
||||
ALLOW_ERTHEIA = allowedPlayerRacesConfig.getBoolean("AllowErtheia", true);
|
||||
ALLOW_DEATH_KNIGHT = allowedPlayerRacesConfig.getBoolean("AllowDeathKnight", true);
|
||||
|
||||
// Load AutoPotions config file (if exists)
|
||||
final PropertiesParser autoPotionsConfig = new PropertiesParser(CUSTOM_AUTO_POTIONS_CONFIG_FILE);
|
||||
|
@ -22,12 +22,14 @@ import java.util.logging.Logger;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.data.sql.CharNameTable;
|
||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||
import org.l2jmobius.gameserver.data.xml.FakePlayerData;
|
||||
import org.l2jmobius.gameserver.data.xml.InitialEquipmentData;
|
||||
import org.l2jmobius.gameserver.data.xml.InitialShortcutData;
|
||||
import org.l2jmobius.gameserver.data.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.SkillLearn;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
@ -239,6 +241,13 @@ public class CharacterCreate implements IClientIncomingPacket
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Config.ALLOW_DEATH_KNIGHT && CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, _classId))
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
|
||||
newChar = Player.create(template, client.getAccountName(), _name, new PlayerAppearance(_face, _hairColor, _hairStyle, _sex != 0));
|
||||
}
|
||||
|
||||
|
@ -10,4 +10,4 @@ AllowDarkElf = True
|
||||
AllowOrc = True
|
||||
AllowDwarf = True
|
||||
AllowKamael = True
|
||||
AllowErtheia = True
|
||||
AllowDeathKnight = True
|
@ -1214,7 +1214,7 @@ public class Config
|
||||
public static boolean ALLOW_ORC;
|
||||
public static boolean ALLOW_DWARF;
|
||||
public static boolean ALLOW_KAMAEL;
|
||||
public static boolean ALLOW_ERTHEIA;
|
||||
public static boolean ALLOW_DEATH_KNIGHT;
|
||||
public static boolean AUTO_POTIONS_ENABLED;
|
||||
public static boolean AUTO_POTIONS_IN_OLYMPIAD;
|
||||
public static int AUTO_POTION_MIN_LEVEL;
|
||||
@ -2580,7 +2580,7 @@ public class Config
|
||||
ALLOW_ORC = allowedPlayerRacesConfig.getBoolean("AllowOrc", true);
|
||||
ALLOW_DWARF = allowedPlayerRacesConfig.getBoolean("AllowDwarf", true);
|
||||
ALLOW_KAMAEL = allowedPlayerRacesConfig.getBoolean("AllowKamael", true);
|
||||
ALLOW_ERTHEIA = allowedPlayerRacesConfig.getBoolean("AllowErtheia", true);
|
||||
ALLOW_DEATH_KNIGHT = allowedPlayerRacesConfig.getBoolean("AllowDeathKnight", true);
|
||||
|
||||
// Load AutoPotions config file (if exists)
|
||||
final PropertiesParser autoPotionsConfig = new PropertiesParser(CUSTOM_AUTO_POTIONS_CONFIG_FILE);
|
||||
|
@ -22,12 +22,14 @@ import java.util.logging.Logger;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.data.sql.CharNameTable;
|
||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||
import org.l2jmobius.gameserver.data.xml.FakePlayerData;
|
||||
import org.l2jmobius.gameserver.data.xml.InitialEquipmentData;
|
||||
import org.l2jmobius.gameserver.data.xml.InitialShortcutData;
|
||||
import org.l2jmobius.gameserver.data.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ClassId;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.SkillLearn;
|
||||
@ -229,16 +231,14 @@ public class CharacterCreate implements IClientIncomingPacket
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ERTHEIA:
|
||||
{
|
||||
if (!Config.ALLOW_ERTHEIA)
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Config.ALLOW_DEATH_KNIGHT && CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, _classId))
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
|
||||
newChar = Player.create(template, client.getAccountName(), _name, new PlayerAppearance(_face, _hairColor, _hairStyle, _sex != 0));
|
||||
}
|
||||
|
||||
|
@ -10,5 +10,5 @@ AllowDarkElf = True
|
||||
AllowOrc = True
|
||||
AllowDwarf = True
|
||||
AllowKamael = True
|
||||
AllowErtheia = True
|
||||
AllowSylph = True
|
||||
AllowDeathKnight = True
|
||||
AllowSylph = True
|
@ -1222,7 +1222,7 @@ public class Config
|
||||
public static boolean ALLOW_ORC;
|
||||
public static boolean ALLOW_DWARF;
|
||||
public static boolean ALLOW_KAMAEL;
|
||||
public static boolean ALLOW_ERTHEIA;
|
||||
public static boolean ALLOW_DEATH_KNIGHT;
|
||||
public static boolean ALLOW_SYLPH;
|
||||
public static boolean AUTO_POTIONS_ENABLED;
|
||||
public static boolean AUTO_POTIONS_IN_OLYMPIAD;
|
||||
@ -2681,7 +2681,7 @@ public class Config
|
||||
ALLOW_ORC = allowedPlayerRacesConfig.getBoolean("AllowOrc", true);
|
||||
ALLOW_DWARF = allowedPlayerRacesConfig.getBoolean("AllowDwarf", true);
|
||||
ALLOW_KAMAEL = allowedPlayerRacesConfig.getBoolean("AllowKamael", true);
|
||||
ALLOW_ERTHEIA = allowedPlayerRacesConfig.getBoolean("AllowErtheia", true);
|
||||
ALLOW_DEATH_KNIGHT = allowedPlayerRacesConfig.getBoolean("AllowDeathKnight", true);
|
||||
ALLOW_SYLPH = allowedPlayerRacesConfig.getBoolean("AllowSylph", true);
|
||||
|
||||
// Load AutoPotions config file (if exists)
|
||||
|
@ -22,12 +22,14 @@ import java.util.logging.Logger;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.data.sql.CharNameTable;
|
||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||
import org.l2jmobius.gameserver.data.xml.FakePlayerData;
|
||||
import org.l2jmobius.gameserver.data.xml.InitialEquipmentData;
|
||||
import org.l2jmobius.gameserver.data.xml.InitialShortcutData;
|
||||
import org.l2jmobius.gameserver.data.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ClassId;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.SkillLearn;
|
||||
@ -229,15 +231,6 @@ public class CharacterCreate implements IClientIncomingPacket
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ERTHEIA:
|
||||
{
|
||||
if (!Config.ALLOW_ERTHEIA)
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SYLPH:
|
||||
{
|
||||
if (!Config.ALLOW_SYLPH)
|
||||
@ -248,6 +241,13 @@ public class CharacterCreate implements IClientIncomingPacket
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Config.ALLOW_DEATH_KNIGHT && CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, _classId))
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
|
||||
newChar = Player.create(template, client.getAccountName(), _name, new PlayerAppearance(_face, _hairColor, _hairStyle, _sex != 0));
|
||||
}
|
||||
|
||||
|
@ -10,5 +10,5 @@ AllowDarkElf = True
|
||||
AllowOrc = True
|
||||
AllowDwarf = True
|
||||
AllowKamael = True
|
||||
AllowErtheia = True
|
||||
AllowSylph = True
|
||||
AllowDeathKnight = True
|
||||
AllowSylph = True
|
@ -1243,7 +1243,7 @@ public class Config
|
||||
public static boolean ALLOW_ORC;
|
||||
public static boolean ALLOW_DWARF;
|
||||
public static boolean ALLOW_KAMAEL;
|
||||
public static boolean ALLOW_ERTHEIA;
|
||||
public static boolean ALLOW_DEATH_KNIGHT;
|
||||
public static boolean ALLOW_SYLPH;
|
||||
public static boolean AUTO_POTIONS_ENABLED;
|
||||
public static boolean AUTO_POTIONS_IN_OLYMPIAD;
|
||||
@ -2723,7 +2723,7 @@ public class Config
|
||||
ALLOW_ORC = allowedPlayerRacesConfig.getBoolean("AllowOrc", true);
|
||||
ALLOW_DWARF = allowedPlayerRacesConfig.getBoolean("AllowDwarf", true);
|
||||
ALLOW_KAMAEL = allowedPlayerRacesConfig.getBoolean("AllowKamael", true);
|
||||
ALLOW_ERTHEIA = allowedPlayerRacesConfig.getBoolean("AllowErtheia", true);
|
||||
ALLOW_DEATH_KNIGHT = allowedPlayerRacesConfig.getBoolean("AllowDeathKnight", true);
|
||||
ALLOW_SYLPH = allowedPlayerRacesConfig.getBoolean("AllowSylph", true);
|
||||
|
||||
// Load AutoPotions config file (if exists)
|
||||
|
@ -22,12 +22,14 @@ import java.util.logging.Logger;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.data.sql.CharNameTable;
|
||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||
import org.l2jmobius.gameserver.data.xml.FakePlayerData;
|
||||
import org.l2jmobius.gameserver.data.xml.InitialEquipmentData;
|
||||
import org.l2jmobius.gameserver.data.xml.InitialShortcutData;
|
||||
import org.l2jmobius.gameserver.data.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||
import org.l2jmobius.gameserver.data.xml.SkillTreeData;
|
||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||
import org.l2jmobius.gameserver.enums.ClassId;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.SkillLearn;
|
||||
@ -229,15 +231,6 @@ public class CharacterCreate implements IClientIncomingPacket
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ERTHEIA:
|
||||
{
|
||||
if (!Config.ALLOW_ERTHEIA)
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SYLPH:
|
||||
{
|
||||
if (!Config.ALLOW_SYLPH)
|
||||
@ -248,6 +241,13 @@ public class CharacterCreate implements IClientIncomingPacket
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Config.ALLOW_DEATH_KNIGHT && CategoryData.getInstance().isInCategory(CategoryType.DEATH_KNIGHT_ALL_CLASS, _classId))
|
||||
{
|
||||
client.sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
return;
|
||||
}
|
||||
|
||||
newChar = Player.create(template, client.getAccountName(), _name, new PlayerAppearance(_face, _hairColor, _hairStyle, _sex != 0));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user