Updated ClassId and Race to match newer branches.
This commit is contained in:
@@ -244,9 +244,7 @@ public class CharTemplateTable
|
||||
|
||||
public PlayerTemplate getTemplate(int classId)
|
||||
{
|
||||
final int key = classId;
|
||||
|
||||
return _templates.get(key);
|
||||
return _templates.get(classId);
|
||||
}
|
||||
|
||||
public static final String getClassNameById(int classId)
|
||||
|
@@ -270,7 +270,7 @@ public class SkillTreeTable
|
||||
}
|
||||
|
||||
// since expertise comes at same level for all classes we use paladin for now
|
||||
final Map<Integer, SkillLearn> learnMap = getSkillTrees().get(ClassId.paladin);
|
||||
final Map<Integer, SkillLearn> learnMap = getSkillTrees().get(ClassId.PALADIN);
|
||||
|
||||
final int skillHashCode = SkillTable.getSkillHashCode(239, grade);
|
||||
|
||||
|
@@ -32,11 +32,11 @@ import org.w3c.dom.Node;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.Skill.SkillType;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.base.Race;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.Weapon;
|
||||
import org.l2jmobius.gameserver.model.items.type.ArmorType;
|
||||
|
@@ -1,26 +1,30 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.base;
|
||||
|
||||
public enum Race
|
||||
{
|
||||
human,
|
||||
elf,
|
||||
darkelf,
|
||||
orc,
|
||||
dwarf
|
||||
}
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.enums;
|
||||
|
||||
/**
|
||||
* Creature races enumerated.
|
||||
* @author Zealar
|
||||
*/
|
||||
public enum Race
|
||||
{
|
||||
HUMAN,
|
||||
ELF,
|
||||
DARK_ELF,
|
||||
ORC,
|
||||
DWARF;
|
||||
}
|
@@ -498,7 +498,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
if (valid && (player.getClassId().getId() != classidval))
|
||||
{
|
||||
player.setClassId(classidval);
|
||||
final ClassId classId = ClassId.getClassIdByOrdinal(classidval);
|
||||
final ClassId classId = ClassId.getClassId(classidval);
|
||||
if (!player.isSubClassActive())
|
||||
{
|
||||
player.setBaseClass(classId);
|
||||
|
@@ -87,17 +87,17 @@ public class ClassMasterInstance extends FolkInstance
|
||||
ClassLevel lvl = PlayerClass.values()[classId.getId()].getLevel();
|
||||
switch (lvl)
|
||||
{
|
||||
case First:
|
||||
case FIRST:
|
||||
{
|
||||
jobLevel = 1;
|
||||
break;
|
||||
}
|
||||
case Second:
|
||||
case SECOND:
|
||||
{
|
||||
jobLevel = 2;
|
||||
break;
|
||||
}
|
||||
case Third:
|
||||
case THIRD:
|
||||
{
|
||||
jobLevel = 3;
|
||||
break;
|
||||
@@ -272,17 +272,17 @@ public class ClassMasterInstance extends FolkInstance
|
||||
}
|
||||
switch (lvlnow)
|
||||
{
|
||||
case First:
|
||||
case FIRST:
|
||||
{
|
||||
jobLevel = 1;
|
||||
break;
|
||||
}
|
||||
case Second:
|
||||
case SECOND:
|
||||
{
|
||||
jobLevel = 2;
|
||||
break;
|
||||
}
|
||||
case Third:
|
||||
case THIRD:
|
||||
{
|
||||
jobLevel = 3;
|
||||
break;
|
||||
@@ -301,17 +301,17 @@ public class ClassMasterInstance extends FolkInstance
|
||||
ClassLevel lvlnext = PlayerClass.values()[val].getLevel();
|
||||
switch (lvlnext)
|
||||
{
|
||||
case First:
|
||||
case FIRST:
|
||||
{
|
||||
newJobLevel = 1;
|
||||
break;
|
||||
}
|
||||
case Second:
|
||||
case SECOND:
|
||||
{
|
||||
newJobLevel = 2;
|
||||
break;
|
||||
}
|
||||
case Third:
|
||||
case THIRD:
|
||||
{
|
||||
newJobLevel = 3;
|
||||
break;
|
||||
@@ -689,7 +689,7 @@ public class ClassMasterInstance extends FolkInstance
|
||||
}
|
||||
else
|
||||
{
|
||||
ClassId classId = ClassId.getClassIdByOrdinal(player.getActiveClass());
|
||||
ClassId classId = ClassId.getClassId(player.getActiveClass());
|
||||
|
||||
if (classId.getParent() != null)
|
||||
{
|
||||
|
@@ -17,9 +17,9 @@
|
||||
package org.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.instancemanager.CustomNpcInstanceManager;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
import org.l2jmobius.gameserver.model.base.Race;
|
||||
import org.l2jmobius.gameserver.model.items.type.WeaponType;
|
||||
|
||||
/**
|
||||
@@ -372,7 +372,7 @@ public class CustomNpcInstance
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (_classId.getRace() == Race.human)
|
||||
else if (_classId.getRace() == Race.HUMAN)
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
@@ -65,6 +65,7 @@ import org.l2jmobius.gameserver.datatables.sql.SkillTreeTable;
|
||||
import org.l2jmobius.gameserver.datatables.xml.AdminData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.ExperienceData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||
import org.l2jmobius.gameserver.handler.ItemHandler;
|
||||
@@ -127,7 +128,6 @@ import org.l2jmobius.gameserver.model.actor.templates.PlayerTemplate;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
import org.l2jmobius.gameserver.model.base.ClassLevel;
|
||||
import org.l2jmobius.gameserver.model.base.PlayerClass;
|
||||
import org.l2jmobius.gameserver.model.base.Race;
|
||||
import org.l2jmobius.gameserver.model.base.SubClass;
|
||||
import org.l2jmobius.gameserver.model.clan.Clan;
|
||||
import org.l2jmobius.gameserver.model.clan.ClanMember;
|
||||
@@ -2972,7 +2972,7 @@ public class PlayerInstance extends Playable
|
||||
*/
|
||||
public void setClassId(int Id)
|
||||
{
|
||||
if ((getLvlJoinedAcademy() != 0) && (_clan != null) && (PlayerClass.values()[Id].getLevel() == ClassLevel.Third))
|
||||
if ((getLvlJoinedAcademy() != 0) && (_clan != null) && (PlayerClass.values()[Id].getLevel() == ClassLevel.THIRD))
|
||||
{
|
||||
if (getLvlJoinedAcademy() <= 16)
|
||||
{
|
||||
@@ -3170,7 +3170,7 @@ public class PlayerInstance extends Playable
|
||||
}
|
||||
|
||||
// Active skill dwarven craft
|
||||
if ((getSkillLevel(1321) < 1) && (getRace() == Race.dwarf))
|
||||
if ((getSkillLevel(1321) < 1) && (getRace() == Race.DWARF))
|
||||
{
|
||||
Skill skill = SkillTable.getInstance().getInfo(1321, 1);
|
||||
addSkill(skill, !restore);
|
||||
@@ -3313,9 +3313,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
return getTemplate().race;
|
||||
}
|
||||
|
||||
final PlayerTemplate charTemp = CharTemplateTable.getInstance().getTemplate(_baseClass);
|
||||
return charTemp.race;
|
||||
return CharTemplateTable.getInstance().getTemplate(_baseClass).race;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -15811,7 +15809,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
ivlim = Config.INVENTORY_MAXIMUM_GM;
|
||||
}
|
||||
else if (getRace() == Race.dwarf)
|
||||
else if (getRace() == Race.DWARF)
|
||||
{
|
||||
ivlim = Config.INVENTORY_MAXIMUM_DWARF;
|
||||
}
|
||||
@@ -15831,7 +15829,7 @@ public class PlayerInstance extends Playable
|
||||
public int GetWareHouseLimit()
|
||||
{
|
||||
int whlim;
|
||||
if (getRace() == Race.dwarf)
|
||||
if (getRace() == Race.DWARF)
|
||||
{
|
||||
whlim = Config.WAREHOUSE_SLOTS_DWARF;
|
||||
}
|
||||
@@ -15851,7 +15849,7 @@ public class PlayerInstance extends Playable
|
||||
public int GetPrivateSellStoreLimit()
|
||||
{
|
||||
int pslim;
|
||||
if (getRace() == Race.dwarf)
|
||||
if (getRace() == Race.DWARF)
|
||||
{
|
||||
pslim = Config.MAX_PVTSTORE_SLOTS_DWARF;
|
||||
}
|
||||
@@ -15872,7 +15870,7 @@ public class PlayerInstance extends Playable
|
||||
public int GetPrivateBuyStoreLimit()
|
||||
{
|
||||
int pblim;
|
||||
if (getRace() == Race.dwarf)
|
||||
if (getRace() == Race.DWARF)
|
||||
{
|
||||
pblim = Config.MAX_PVTSTORE_SLOTS_DWARF;
|
||||
}
|
||||
|
@@ -23,6 +23,7 @@ import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.datatables.sql.CharTemplateTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.SkillTreeTable;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortSiegeManager;
|
||||
@@ -32,7 +33,6 @@ import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
import org.l2jmobius.gameserver.model.base.ClassType;
|
||||
import org.l2jmobius.gameserver.model.base.PlayerClass;
|
||||
import org.l2jmobius.gameserver.model.base.PlayerRace;
|
||||
import org.l2jmobius.gameserver.model.base.SubClass;
|
||||
import org.l2jmobius.gameserver.model.clan.Clan;
|
||||
import org.l2jmobius.gameserver.model.clan.Clan.SubPledge;
|
||||
@@ -959,7 +959,7 @@ public class VillageMasterInstance extends FolkInstance
|
||||
charClassId = player.getClassId().getParent().ordinal();
|
||||
}
|
||||
|
||||
final PlayerRace npcRace = getVillageMasterRace();
|
||||
final Race npcRace = getVillageMasterRace();
|
||||
final ClassType npcTeachType = getVillageMasterTeachType();
|
||||
|
||||
PlayerClass currClass = PlayerClass.values()[charClassId];
|
||||
@@ -998,19 +998,19 @@ public class VillageMasterInstance extends FolkInstance
|
||||
}
|
||||
}
|
||||
|
||||
if ((npcRace == PlayerRace.Human) || (npcRace == PlayerRace.LightElf))
|
||||
if ((npcRace == Race.HUMAN) || (npcRace == Race.ELF))
|
||||
{
|
||||
// If the master is human or light elf, ensure that fighter-type masters only teach fighter classes, and priest-type masters only teach priest classes etc.
|
||||
if (!availSub.isOfType(npcTeachType))
|
||||
{
|
||||
availSubs.remove(availSub);
|
||||
}
|
||||
else if (!availSub.isOfRace(PlayerRace.Human) && !availSub.isOfRace(PlayerRace.LightElf))
|
||||
else if (!availSub.isOfRace(Race.HUMAN) && !availSub.isOfRace(Race.ELF))
|
||||
{
|
||||
availSubs.remove(availSub);
|
||||
}
|
||||
}
|
||||
else if ((npcRace != PlayerRace.Human) && (npcRace != PlayerRace.LightElf) && !availSub.isOfRace(npcRace)) // If the master is not human and not light elf, then remove any classes not of the same race as the master.
|
||||
else if ((npcRace != Race.HUMAN) && (npcRace != Race.ELF) && !availSub.isOfRace(npcRace)) // If the master is not human and not light elf, then remove any classes not of the same race as the master.
|
||||
{
|
||||
availSubs.remove(availSub);
|
||||
}
|
||||
@@ -1095,31 +1095,31 @@ public class VillageMasterInstance extends FolkInstance
|
||||
* Gets the village master race.
|
||||
* @return the village master race
|
||||
*/
|
||||
private final PlayerRace getVillageMasterRace()
|
||||
private final Race getVillageMasterRace()
|
||||
{
|
||||
final String npcClass = getTemplate().getStatsSet().getString("jClass").toLowerCase();
|
||||
|
||||
if (npcClass.contains("human"))
|
||||
{
|
||||
return PlayerRace.Human;
|
||||
return Race.HUMAN;
|
||||
}
|
||||
|
||||
if (npcClass.contains("darkelf"))
|
||||
{
|
||||
return PlayerRace.DarkElf;
|
||||
return Race.DARK_ELF;
|
||||
}
|
||||
|
||||
if (npcClass.contains("elf"))
|
||||
{
|
||||
return PlayerRace.LightElf;
|
||||
return Race.ELF;
|
||||
}
|
||||
|
||||
if (npcClass.contains("orc"))
|
||||
{
|
||||
return PlayerRace.Orc;
|
||||
return Race.ORC;
|
||||
}
|
||||
|
||||
return PlayerRace.Dwarf;
|
||||
return Race.DWARF;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -177,21 +177,21 @@ public class PlayerStat extends PlayableStat
|
||||
|
||||
if (Config.ALLOW_CLASS_MASTERS && Config.ALLOW_REMOTE_CLASS_MASTERS)
|
||||
{
|
||||
final ClassMasterInstance master_instance = ClassMasterInstance.getInstance();
|
||||
final ClassMasterInstance masterInstance = ClassMasterInstance.getInstance();
|
||||
|
||||
if (master_instance != null)
|
||||
if (masterInstance != null)
|
||||
{
|
||||
|
||||
final ClassLevel lvlnow = PlayerClass.values()[getActiveChar().getClassId().getId()].getLevel();
|
||||
if ((getLevel() >= 20) && (lvlnow == ClassLevel.First))
|
||||
final ClassLevel curLevel = PlayerClass.values()[getActiveChar().getClassId().getId()].getLevel();
|
||||
if ((getLevel() >= 20) && (curLevel == ClassLevel.FIRST))
|
||||
{
|
||||
ClassMasterInstance.getInstance().onAction(getActiveChar());
|
||||
}
|
||||
else if ((getLevel() >= 40) && (lvlnow == ClassLevel.Second))
|
||||
else if ((getLevel() >= 40) && (curLevel == ClassLevel.SECOND))
|
||||
{
|
||||
ClassMasterInstance.getInstance().onAction(getActiveChar());
|
||||
}
|
||||
else if ((getLevel() >= 76) && (lvlnow == ClassLevel.Third))
|
||||
else if ((getLevel() >= 76) && (curLevel == ClassLevel.THIRD))
|
||||
{
|
||||
ClassMasterInstance.getInstance().onAction(getActiveChar());
|
||||
}
|
||||
|
@@ -20,9 +20,9 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.datatables.xml.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
import org.l2jmobius.gameserver.model.base.Race;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
|
||||
/**
|
||||
@@ -113,19 +113,19 @@ public class PlayerTemplate extends CreatureTemplate
|
||||
|
||||
public int getBaseFallSafeHeight(boolean female)
|
||||
{
|
||||
if ((classId.getRace() == Race.darkelf) || (classId.getRace() == Race.elf))
|
||||
if ((classId.getRace() == Race.DARK_ELF) || (classId.getRace() == Race.ELF))
|
||||
{
|
||||
return classId.isMage() ? (female ? 330 : 300) : female ? 380 : 350;
|
||||
}
|
||||
else if (classId.getRace() == Race.dwarf)
|
||||
else if (classId.getRace() == Race.DWARF)
|
||||
{
|
||||
return female ? 200 : 180;
|
||||
}
|
||||
else if (classId.getRace() == Race.human)
|
||||
else if (classId.getRace() == Race.HUMAN)
|
||||
{
|
||||
return classId.isMage() ? (female ? 220 : 200) : female ? 270 : 250;
|
||||
}
|
||||
else if (classId.getRace() == Race.orc)
|
||||
else if (classId.getRace() == Race.ORC)
|
||||
{
|
||||
return classId.isMage() ? (female ? 280 : 250) : female ? 220 : 200;
|
||||
}
|
||||
|
@@ -16,165 +16,223 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.base;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
|
||||
/**
|
||||
* This class defines all classes (ex : human fighter, darkFighter...) that a player can chose.<BR>
|
||||
* <BR>
|
||||
* Data :<BR>
|
||||
* <BR>
|
||||
* This class defines all classes (ex : human fighter, darkFighter...) that a player can chose.<br>
|
||||
* Data:
|
||||
* <ul>
|
||||
* <li>id : The Identifier of the class</li>
|
||||
* <li>isMage : True if the class is a mage class</li>
|
||||
* <li>race : The race of this class</li>
|
||||
* <li>parent : The parent ClassId or null if this class is the root</li><BR>
|
||||
* <BR>
|
||||
* <li>parent : The parent ClassId or null if this class is the root</li>
|
||||
* </ul>
|
||||
* @version $Revision: 1.4.4.4 $ $Date: 2005/03/27 15:29:33 $
|
||||
*/
|
||||
public enum ClassId
|
||||
{
|
||||
fighter(0x00, false, Race.human, null),
|
||||
warrior(0x01, false, Race.human, fighter),
|
||||
gladiator(0x02, false, Race.human, warrior),
|
||||
warlord(0x03, false, Race.human, warrior),
|
||||
knight(0x04, false, Race.human, fighter),
|
||||
paladin(0x05, false, Race.human, knight),
|
||||
darkAvenger(0x06, false, Race.human, knight),
|
||||
rogue(0x07, false, Race.human, fighter),
|
||||
treasureHunter(0x08, false, Race.human, rogue),
|
||||
hawkeye(0x09, false, Race.human, rogue),
|
||||
mage(0x0a, true, Race.human, null),
|
||||
wizard(0x0b, true, Race.human, mage),
|
||||
sorceror(0x0c, true, Race.human, wizard),
|
||||
necromancer(0x0d, true, Race.human, wizard),
|
||||
warlock(0x0e, true, Race.human, wizard),
|
||||
cleric(0x0f, true, Race.human, mage),
|
||||
bishop(0x10, true, Race.human, cleric),
|
||||
prophet(0x11, true, Race.human, cleric),
|
||||
elvenFighter(0x12, false, Race.elf, null),
|
||||
elvenKnight(0x13, false, Race.elf, elvenFighter),
|
||||
templeKnight(0x14, false, Race.elf, elvenKnight),
|
||||
swordSinger(0x15, false, Race.elf, elvenKnight),
|
||||
elvenScout(0x16, false, Race.elf, elvenFighter),
|
||||
plainsWalker(0x17, false, Race.elf, elvenScout),
|
||||
silverRanger(0x18, false, Race.elf, elvenScout),
|
||||
elvenMage(0x19, true, Race.elf, null),
|
||||
elvenWizard(0x1a, true, Race.elf, elvenMage),
|
||||
spellsinger(0x1b, true, Race.elf, elvenWizard),
|
||||
elementalSummoner(0x1c, true, Race.elf, elvenWizard),
|
||||
oracle(0x1d, true, Race.elf, elvenMage),
|
||||
elder(0x1e, true, Race.elf, oracle),
|
||||
darkFighter(0x1f, false, Race.darkelf, null),
|
||||
palusKnight(0x20, false, Race.darkelf, darkFighter),
|
||||
shillienKnight(0x21, false, Race.darkelf, palusKnight),
|
||||
bladedancer(0x22, false, Race.darkelf, palusKnight),
|
||||
assassin(0x23, false, Race.darkelf, darkFighter),
|
||||
abyssWalker(0x24, false, Race.darkelf, assassin),
|
||||
phantomRanger(0x25, false, Race.darkelf, assassin),
|
||||
darkMage(0x26, true, Race.darkelf, null),
|
||||
darkWizard(0x27, true, Race.darkelf, darkMage),
|
||||
spellhowler(0x28, true, Race.darkelf, darkWizard),
|
||||
phantomSummoner(0x29, true, Race.darkelf, darkWizard),
|
||||
shillienOracle(0x2a, true, Race.darkelf, darkMage),
|
||||
shillenElder(0x2b, true, Race.darkelf, shillienOracle),
|
||||
orcFighter(0x2c, false, Race.orc, null),
|
||||
orcRaider(0x2d, false, Race.orc, orcFighter),
|
||||
destroyer(0x2e, false, Race.orc, orcRaider),
|
||||
orcMonk(0x2f, false, Race.orc, orcFighter),
|
||||
tyrant(0x30, false, Race.orc, orcMonk),
|
||||
orcMage(0x31, false, Race.orc, null),
|
||||
orcShaman(0x32, true, Race.orc, orcMage),
|
||||
overlord(0x33, true, Race.orc, orcShaman),
|
||||
warcryer(0x34, true, Race.orc, orcShaman),
|
||||
dwarvenFighter(0x35, false, Race.dwarf, null),
|
||||
scavenger(0x36, false, Race.dwarf, dwarvenFighter),
|
||||
bountyHunter(0x37, false, Race.dwarf, scavenger),
|
||||
artisan(0x38, false, Race.dwarf, dwarvenFighter),
|
||||
warsmith(0x39, false, Race.dwarf, artisan),
|
||||
dummyEntry1(58, false, null, null),
|
||||
dummyEntry2(59, false, null, null),
|
||||
dummyEntry3(60, false, null, null),
|
||||
dummyEntry4(61, false, null, null),
|
||||
dummyEntry5(62, false, null, null),
|
||||
dummyEntry6(63, false, null, null),
|
||||
dummyEntry7(64, false, null, null),
|
||||
dummyEntry8(65, false, null, null),
|
||||
dummyEntry9(66, false, null, null),
|
||||
dummyEntry10(67, false, null, null),
|
||||
dummyEntry11(68, false, null, null),
|
||||
dummyEntry12(69, false, null, null),
|
||||
dummyEntry13(70, false, null, null),
|
||||
dummyEntry14(71, false, null, null),
|
||||
dummyEntry15(72, false, null, null),
|
||||
dummyEntry16(73, false, null, null),
|
||||
dummyEntry17(74, false, null, null),
|
||||
dummyEntry18(75, false, null, null),
|
||||
dummyEntry19(76, false, null, null),
|
||||
dummyEntry20(77, false, null, null),
|
||||
dummyEntry21(78, false, null, null),
|
||||
dummyEntry22(79, false, null, null),
|
||||
dummyEntry23(80, false, null, null),
|
||||
dummyEntry24(81, false, null, null),
|
||||
dummyEntry25(82, false, null, null),
|
||||
dummyEntry26(83, false, null, null),
|
||||
dummyEntry27(84, false, null, null),
|
||||
dummyEntry28(85, false, null, null),
|
||||
dummyEntry29(86, false, null, null),
|
||||
dummyEntry30(87, false, null, null),
|
||||
duelist(0x58, false, Race.human, gladiator),
|
||||
dreadnought(0x59, false, Race.human, warlord),
|
||||
phoenixKnight(0x5a, false, Race.human, paladin),
|
||||
hellKnight(0x5b, false, Race.human, darkAvenger),
|
||||
sagittarius(0x5c, false, Race.human, hawkeye),
|
||||
adventurer(0x5d, false, Race.human, treasureHunter),
|
||||
archmage(0x5e, true, Race.human, sorceror),
|
||||
soultaker(0x5f, true, Race.human, necromancer),
|
||||
arcanaLord(0x60, true, Race.human, warlock),
|
||||
cardinal(0x61, true, Race.human, bishop),
|
||||
hierophant(0x62, true, Race.human, prophet),
|
||||
evaTemplar(0x63, false, Race.elf, templeKnight),
|
||||
swordMuse(0x64, false, Race.elf, swordSinger),
|
||||
windRider(0x65, false, Race.elf, plainsWalker),
|
||||
moonlightSentinel(0x66, false, Race.elf, silverRanger),
|
||||
mysticMuse(0x67, true, Race.elf, spellsinger),
|
||||
elementalMaster(0x68, true, Race.elf, elementalSummoner),
|
||||
evaSaint(0x69, true, Race.elf, elder),
|
||||
shillienTemplar(0x6a, false, Race.darkelf, shillienKnight),
|
||||
spectralDancer(0x6b, false, Race.darkelf, bladedancer),
|
||||
ghostHunter(0x6c, false, Race.darkelf, abyssWalker),
|
||||
ghostSentinel(0x6d, false, Race.darkelf, phantomRanger),
|
||||
stormScreamer(0x6e, true, Race.darkelf, spellhowler),
|
||||
spectralMaster(0x6f, true, Race.darkelf, phantomSummoner),
|
||||
shillienSaint(0x70, true, Race.darkelf, shillenElder),
|
||||
titan(0x71, false, Race.orc, destroyer),
|
||||
grandKhauatari(0x72, false, Race.orc, tyrant),
|
||||
dominator(0x73, true, Race.orc, overlord),
|
||||
doomcryer(0x74, true, Race.orc, warcryer),
|
||||
fortuneSeeker(0x75, false, Race.dwarf, bountyHunter),
|
||||
maestro(0x76, false, Race.dwarf, warsmith);
|
||||
FIGHTER(0, false, Race.HUMAN, null),
|
||||
|
||||
WARRIOR(1, false, Race.HUMAN, FIGHTER),
|
||||
GLADIATOR(2, false, Race.HUMAN, WARRIOR),
|
||||
WARLORD(3, false, Race.HUMAN, WARRIOR),
|
||||
KNIGHT(4, false, Race.HUMAN, FIGHTER),
|
||||
PALADIN(5, false, Race.HUMAN, KNIGHT),
|
||||
DARK_AVENGER(6, false, Race.HUMAN, KNIGHT),
|
||||
ROGUE(7, false, Race.HUMAN, FIGHTER),
|
||||
TREASURE_HUNTER(8, false, Race.HUMAN, ROGUE),
|
||||
HAWKEYE(9, false, Race.HUMAN, ROGUE),
|
||||
|
||||
MAGE(10, true, Race.HUMAN, null),
|
||||
WIZARD(11, true, Race.HUMAN, MAGE),
|
||||
SORCERER(12, true, Race.HUMAN, WIZARD),
|
||||
NECROMANCER(13, true, Race.HUMAN, WIZARD),
|
||||
WARLOCK(14, true, true, Race.HUMAN, WIZARD),
|
||||
CLERIC(15, true, Race.HUMAN, MAGE),
|
||||
BISHOP(16, true, Race.HUMAN, CLERIC),
|
||||
PROPHET(17, true, Race.HUMAN, CLERIC),
|
||||
|
||||
ELVEN_FIGHTER(18, false, Race.ELF, null),
|
||||
ELVEN_KNIGHT(19, false, Race.ELF, ELVEN_FIGHTER),
|
||||
TEMPLE_KNIGHT(20, false, Race.ELF, ELVEN_KNIGHT),
|
||||
SWORDSINGER(21, false, Race.ELF, ELVEN_KNIGHT),
|
||||
ELVEN_SCOUT(22, false, Race.ELF, ELVEN_FIGHTER),
|
||||
PLAINS_WALKER(23, false, Race.ELF, ELVEN_SCOUT),
|
||||
SILVER_RANGER(24, false, Race.ELF, ELVEN_SCOUT),
|
||||
|
||||
ELVEN_MAGE(25, true, Race.ELF, null),
|
||||
ELVEN_WIZARD(26, true, Race.ELF, ELVEN_MAGE),
|
||||
SPELLSINGER(27, true, Race.ELF, ELVEN_WIZARD),
|
||||
ELEMENTAL_SUMMONER(28, true, true, Race.ELF, ELVEN_WIZARD),
|
||||
ORACLE(29, true, Race.ELF, ELVEN_MAGE),
|
||||
ELDER(30, true, Race.ELF, ORACLE),
|
||||
|
||||
DARK_FIGHTER(31, false, Race.DARK_ELF, null),
|
||||
PALUS_KNIGHT(32, false, Race.DARK_ELF, DARK_FIGHTER),
|
||||
SHILLIEN_KNIGHT(33, false, Race.DARK_ELF, PALUS_KNIGHT),
|
||||
BLADEDANCER(34, false, Race.DARK_ELF, PALUS_KNIGHT),
|
||||
ASSASSIN(35, false, Race.DARK_ELF, DARK_FIGHTER),
|
||||
ABYSS_WALKER(36, false, Race.DARK_ELF, ASSASSIN),
|
||||
PHANTOM_RANGER(37, false, Race.DARK_ELF, ASSASSIN),
|
||||
|
||||
DARK_MAGE(38, true, Race.DARK_ELF, null),
|
||||
DARK_WIZARD(39, true, Race.DARK_ELF, DARK_MAGE),
|
||||
SPELLHOWLER(40, true, Race.DARK_ELF, DARK_WIZARD),
|
||||
PHANTOM_SUMMONER(41, true, true, Race.DARK_ELF, DARK_WIZARD),
|
||||
SHILLIEN_ORACLE(42, true, Race.DARK_ELF, DARK_MAGE),
|
||||
SHILLIEN_ELDER(43, true, Race.DARK_ELF, SHILLIEN_ORACLE),
|
||||
|
||||
ORC_FIGHTER(44, false, Race.ORC, null),
|
||||
ORC_RAIDER(45, false, Race.ORC, ORC_FIGHTER),
|
||||
DESTROYER(46, false, Race.ORC, ORC_RAIDER),
|
||||
ORC_MONK(47, false, Race.ORC, ORC_FIGHTER),
|
||||
TYRANT(48, false, Race.ORC, ORC_MONK),
|
||||
|
||||
ORC_MAGE(49, true, Race.ORC, null),
|
||||
ORC_SHAMAN(50, true, Race.ORC, ORC_MAGE),
|
||||
OVERLORD(51, true, Race.ORC, ORC_SHAMAN),
|
||||
WARCRYER(52, true, Race.ORC, ORC_SHAMAN),
|
||||
|
||||
DWARVEN_FIGHTER(53, false, Race.DWARF, null),
|
||||
SCAVENGER(54, false, Race.DWARF, DWARVEN_FIGHTER),
|
||||
BOUNTY_HUNTER(55, false, Race.DWARF, SCAVENGER),
|
||||
ARTISAN(56, false, Race.DWARF, DWARVEN_FIGHTER),
|
||||
WARSMITH(57, false, Race.DWARF, ARTISAN),
|
||||
|
||||
DUMMY_ENTRY_1(58, false, null, null),
|
||||
DUMMY_ENTRY_2(59, false, null, null),
|
||||
DUMMY_ENTRY_3(60, false, null, null),
|
||||
DUMMY_ENTRY_4(61, false, null, null),
|
||||
DUMMY_ENTRY_5(62, false, null, null),
|
||||
DUMMY_ENTRY_6(63, false, null, null),
|
||||
DUMMY_ENTRY_7(64, false, null, null),
|
||||
DUMMY_ENTRY_8(65, false, null, null),
|
||||
DUMMY_ENTRY_9(66, false, null, null),
|
||||
DUMMY_ENTRY_10(67, false, null, null),
|
||||
DUMMY_ENTRY_11(68, false, null, null),
|
||||
DUMMY_ENTRY_12(69, false, null, null),
|
||||
DUMMY_ENTRY_13(70, false, null, null),
|
||||
DUMMY_ENTRY_14(71, false, null, null),
|
||||
DUMMY_ENTRY_15(72, false, null, null),
|
||||
DUMMY_ENTRY_16(73, false, null, null),
|
||||
DUMMY_ENTRY_17(74, false, null, null),
|
||||
DUMMY_ENTRY_18(75, false, null, null),
|
||||
DUMMY_ENTRY_19(76, false, null, null),
|
||||
DUMMY_ENTRY_20(77, false, null, null),
|
||||
DUMMY_ENTRY_21(78, false, null, null),
|
||||
DUMMY_ENTRY_22(79, false, null, null),
|
||||
DUMMY_ENTRY_23(80, false, null, null),
|
||||
DUMMY_ENTRY_24(81, false, null, null),
|
||||
DUMMY_ENTRY_25(82, false, null, null),
|
||||
DUMMY_ENTRY_26(83, false, null, null),
|
||||
DUMMY_ENTRY_27(84, false, null, null),
|
||||
DUMMY_ENTRY_28(85, false, null, null),
|
||||
DUMMY_ENTRY_29(86, false, null, null),
|
||||
DUMMY_ENTRY_30(87, false, null, null),
|
||||
|
||||
DUELIST(88, false, Race.HUMAN, GLADIATOR),
|
||||
DREADNOUGHT(89, false, Race.HUMAN, WARLORD),
|
||||
PHOENIX_KNIGHT(90, false, Race.HUMAN, PALADIN),
|
||||
HELL_KNIGHT(91, false, Race.HUMAN, DARK_AVENGER),
|
||||
SAGITTARIUS(92, false, Race.HUMAN, HAWKEYE),
|
||||
ADVENTURER(93, false, Race.HUMAN, TREASURE_HUNTER),
|
||||
ARCHMAGE(94, true, Race.HUMAN, SORCERER),
|
||||
SOULTAKER(95, true, Race.HUMAN, NECROMANCER),
|
||||
ARCANA_LORD(96, true, true, Race.HUMAN, WARLOCK),
|
||||
CARDINAL(97, true, Race.HUMAN, BISHOP),
|
||||
HIEROPHANT(98, true, Race.HUMAN, PROPHET),
|
||||
|
||||
EVA_TEMPLAR(99, false, Race.ELF, TEMPLE_KNIGHT),
|
||||
SWORD_MUSE(100, false, Race.ELF, SWORDSINGER),
|
||||
WIND_RIDER(101, false, Race.ELF, PLAINS_WALKER),
|
||||
MOONLIGHT_SENTINEL(102, false, Race.ELF, SILVER_RANGER),
|
||||
MYSTIC_MUSE(103, true, Race.ELF, SPELLSINGER),
|
||||
ELEMENTAL_MASTER(104, true, true, Race.ELF, ELEMENTAL_SUMMONER),
|
||||
EVA_SAINT(105, true, Race.ELF, ELDER),
|
||||
|
||||
SHILLIEN_TEMPLAR(106, false, Race.DARK_ELF, SHILLIEN_KNIGHT),
|
||||
SPECTRAL_DANCER(107, false, Race.DARK_ELF, BLADEDANCER),
|
||||
GHOST_HUNTER(108, false, Race.DARK_ELF, ABYSS_WALKER),
|
||||
GHOST_SENTINEL(109, false, Race.DARK_ELF, PHANTOM_RANGER),
|
||||
STORM_SCREAMER(110, true, Race.DARK_ELF, SPELLHOWLER),
|
||||
SPECTRAL_MASTER(111, true, true, Race.DARK_ELF, PHANTOM_SUMMONER),
|
||||
SHILLIEN_SAINT(112, true, Race.DARK_ELF, SHILLIEN_ELDER),
|
||||
|
||||
TITAN(113, false, Race.ORC, DESTROYER),
|
||||
GRAND_KHAVATARI(114, false, Race.ORC, TYRANT),
|
||||
DOMINATOR(115, true, Race.ORC, OVERLORD),
|
||||
DOOMCRYER(116, true, Race.ORC, WARCRYER),
|
||||
|
||||
FORTUNE_SEEKER(117, false, Race.DWARF, BOUNTY_HUNTER),
|
||||
MAESTRO(118, false, Race.DWARF, WARSMITH);
|
||||
|
||||
/** The Identifier of the Class */
|
||||
private final int _id;
|
||||
|
||||
/** True if the class is a mage class */
|
||||
private final boolean _isMage;
|
||||
|
||||
/** True if the class is a summoner class */
|
||||
private final boolean _isSummoner;
|
||||
|
||||
/** The Race object of the class */
|
||||
private final Race _race;
|
||||
|
||||
/** The parent ClassId or null if this class is a root */
|
||||
private final ClassId _parent;
|
||||
|
||||
/** List of available Class for next transfer **/
|
||||
private final Set<ClassId> _nextClassIds = new HashSet<>(1);
|
||||
|
||||
/**
|
||||
* Constructor of ClassId.<BR>
|
||||
* <BR>
|
||||
* @param pId the id
|
||||
* @param pIsMage the is mage
|
||||
* @param pRace the race
|
||||
* @param pParent the parent
|
||||
* Class constructor.
|
||||
* @param pId the class Id.
|
||||
* @param pIsMage {code true} if the class is mage class.
|
||||
* @param race the race related to the class.
|
||||
* @param pParent the parent class Id.
|
||||
*/
|
||||
private ClassId(int pId, boolean pIsMage, Race pRace, ClassId pParent)
|
||||
private ClassId(int pId, boolean pIsMage, Race race, ClassId pParent)
|
||||
{
|
||||
_id = pId;
|
||||
_isMage = pIsMage;
|
||||
_race = pRace;
|
||||
_isSummoner = false;
|
||||
_race = race;
|
||||
_parent = pParent;
|
||||
|
||||
if (_parent != null)
|
||||
{
|
||||
_parent.addNextClassId(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Identifier of the Class.<BR>
|
||||
* <BR>
|
||||
* @return the id
|
||||
* Class constructor.
|
||||
* @param pId the class Id.
|
||||
* @param pIsMage {code true} if the class is mage class.
|
||||
* @param pIsSummoner {code true} if the class is summoner class.
|
||||
* @param race the race related to the class.
|
||||
* @param pParent the parent class Id.
|
||||
*/
|
||||
private ClassId(int pId, boolean pIsMage, boolean pIsSummoner, Race race, ClassId pParent)
|
||||
{
|
||||
_id = pId;
|
||||
_isMage = pIsMage;
|
||||
_isSummoner = pIsSummoner;
|
||||
_race = race;
|
||||
_parent = pParent;
|
||||
|
||||
if (_parent != null)
|
||||
{
|
||||
_parent.addNextClassId(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ID of the class.
|
||||
* @return the ID of the class
|
||||
*/
|
||||
public int getId()
|
||||
{
|
||||
@@ -182,9 +240,7 @@ public enum ClassId
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the class is a mage class.<BR>
|
||||
* <BR>
|
||||
* @return true, if is mage
|
||||
* @return {code true} if the class is a mage class.
|
||||
*/
|
||||
public boolean isMage()
|
||||
{
|
||||
@@ -192,9 +248,15 @@ public enum ClassId
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Race object of the class.<BR>
|
||||
* <BR>
|
||||
* @return the race
|
||||
* @return {code true} if the class is a summoner class.
|
||||
*/
|
||||
public boolean isSummoner()
|
||||
{
|
||||
return _isSummoner;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Race object of the class.
|
||||
*/
|
||||
public Race getRace()
|
||||
{
|
||||
@@ -202,10 +264,8 @@ public enum ClassId
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if this Class is a child of the selected ClassId.<BR>
|
||||
* <BR>
|
||||
* @param cid The parent ClassId to check
|
||||
* @return true, if successful
|
||||
* @param cid the parent ClassId to check.
|
||||
* @return {code true} if this Class is a child of the selected ClassId.
|
||||
*/
|
||||
public boolean childOf(ClassId cid)
|
||||
{
|
||||
@@ -223,10 +283,8 @@ public enum ClassId
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if this Class is equal to the selected ClassId or a child of the selected ClassId.<BR>
|
||||
* <BR>
|
||||
* @param cid The parent ClassId to check
|
||||
* @return true, if successful
|
||||
* @param cid the parent ClassId to check.
|
||||
* @return {code true} if this Class is equal to the selected ClassId or a child of the selected ClassId.
|
||||
*/
|
||||
public boolean equalsOrChildOf(ClassId cid)
|
||||
{
|
||||
@@ -234,9 +292,7 @@ public enum ClassId
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the child level of this Class (0=root, 1=child leve 1...).<BR>
|
||||
* <BR>
|
||||
* @return the int
|
||||
* @return the child level of this Class (0=root, 1=child leve 1...)
|
||||
*/
|
||||
public int level()
|
||||
{
|
||||
@@ -249,26 +305,44 @@ public enum ClassId
|
||||
}
|
||||
|
||||
/**
|
||||
* Return its parent ClassId<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* @return the parent
|
||||
* @return its parent Class Id
|
||||
*/
|
||||
public ClassId getParent()
|
||||
{
|
||||
return _parent;
|
||||
}
|
||||
|
||||
public static ClassId getClassIdByOrdinal(int id)
|
||||
public ClassId getRootClassId()
|
||||
{
|
||||
for (ClassId current : values())
|
||||
if (_parent != null)
|
||||
{
|
||||
if (current._id == id)
|
||||
{
|
||||
return current;
|
||||
}
|
||||
return _parent.getRootClassId();
|
||||
}
|
||||
|
||||
return null;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list of possible class transfer for this class
|
||||
*/
|
||||
public Set<ClassId> getNextClassIds()
|
||||
{
|
||||
return _nextClassIds;
|
||||
}
|
||||
|
||||
public static ClassId getClassId(int cId)
|
||||
{
|
||||
try
|
||||
{
|
||||
return ClassId.values()[cId];
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private final void addNextClassId(ClassId cId)
|
||||
{
|
||||
_nextClassIds.add(cId);
|
||||
}
|
||||
}
|
||||
|
@@ -16,10 +16,13 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.base;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.2 $ $Date: 2004/06/27 08:12:59 $
|
||||
*/
|
||||
public enum ClassLevel
|
||||
{
|
||||
First,
|
||||
Second,
|
||||
Third,
|
||||
Fourth
|
||||
FIRST,
|
||||
SECOND,
|
||||
THIRD,
|
||||
FOURTH
|
||||
}
|
||||
|
@@ -16,89 +16,88 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.base;
|
||||
|
||||
import static org.l2jmobius.gameserver.model.base.ClassLevel.First;
|
||||
import static org.l2jmobius.gameserver.model.base.ClassLevel.Fourth;
|
||||
import static org.l2jmobius.gameserver.model.base.ClassLevel.Second;
|
||||
import static org.l2jmobius.gameserver.model.base.ClassLevel.Third;
|
||||
import static org.l2jmobius.gameserver.model.base.ClassLevel.FIRST;
|
||||
import static org.l2jmobius.gameserver.model.base.ClassLevel.FOURTH;
|
||||
import static org.l2jmobius.gameserver.model.base.ClassLevel.SECOND;
|
||||
import static org.l2jmobius.gameserver.model.base.ClassLevel.THIRD;
|
||||
import static org.l2jmobius.gameserver.model.base.ClassType.Fighter;
|
||||
import static org.l2jmobius.gameserver.model.base.ClassType.Mystic;
|
||||
import static org.l2jmobius.gameserver.model.base.ClassType.Priest;
|
||||
import static org.l2jmobius.gameserver.model.base.PlayerRace.DarkElf;
|
||||
import static org.l2jmobius.gameserver.model.base.PlayerRace.Dwarf;
|
||||
import static org.l2jmobius.gameserver.model.base.PlayerRace.Human;
|
||||
import static org.l2jmobius.gameserver.model.base.PlayerRace.LightElf;
|
||||
import static org.l2jmobius.gameserver.model.base.PlayerRace.Orc;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
/**
|
||||
* @author luisantonioa
|
||||
*/
|
||||
public enum PlayerClass
|
||||
{
|
||||
HumanFighter(Human, Fighter, First),
|
||||
Warrior(Human, Fighter, Second),
|
||||
Gladiator(Human, Fighter, Third),
|
||||
Warlord(Human, Fighter, Third),
|
||||
HumanKnight(Human, Fighter, Second),
|
||||
Paladin(Human, Fighter, Third),
|
||||
DarkAvenger(Human, Fighter, Third),
|
||||
Rogue(Human, Fighter, Second),
|
||||
TreasureHunter(Human, Fighter, Third),
|
||||
Hawkeye(Human, Fighter, Third),
|
||||
HumanMystic(Human, Mystic, First),
|
||||
HumanWizard(Human, Mystic, Second),
|
||||
Sorceror(Human, Mystic, Third),
|
||||
Necromancer(Human, Mystic, Third),
|
||||
Warlock(Human, Mystic, Third),
|
||||
Cleric(Human, Priest, Second),
|
||||
Bishop(Human, Priest, Third),
|
||||
Prophet(Human, Priest, Third),
|
||||
HumanFighter(Race.HUMAN, Fighter, FIRST),
|
||||
Warrior(Race.HUMAN, Fighter, SECOND),
|
||||
Gladiator(Race.HUMAN, Fighter, THIRD),
|
||||
Warlord(Race.HUMAN, Fighter, THIRD),
|
||||
HumanKnight(Race.HUMAN, Fighter, SECOND),
|
||||
Paladin(Race.HUMAN, Fighter, THIRD),
|
||||
DarkAvenger(Race.HUMAN, Fighter, THIRD),
|
||||
Rogue(Race.HUMAN, Fighter, SECOND),
|
||||
TreasureHunter(Race.HUMAN, Fighter, THIRD),
|
||||
Hawkeye(Race.HUMAN, Fighter, THIRD),
|
||||
HumanMystic(Race.HUMAN, Mystic, FIRST),
|
||||
HumanWizard(Race.HUMAN, Mystic, SECOND),
|
||||
Sorceror(Race.HUMAN, Mystic, THIRD),
|
||||
Necromancer(Race.HUMAN, Mystic, THIRD),
|
||||
Warlock(Race.HUMAN, Mystic, THIRD),
|
||||
Cleric(Race.HUMAN, Priest, SECOND),
|
||||
Bishop(Race.HUMAN, Priest, THIRD),
|
||||
Prophet(Race.HUMAN, Priest, THIRD),
|
||||
|
||||
ElvenFighter(LightElf, Fighter, First),
|
||||
ElvenKnight(LightElf, Fighter, Second),
|
||||
TempleKnight(LightElf, Fighter, Third),
|
||||
Swordsinger(LightElf, Fighter, Third),
|
||||
ElvenScout(LightElf, Fighter, Second),
|
||||
Plainswalker(LightElf, Fighter, Third),
|
||||
SilverRanger(LightElf, Fighter, Third),
|
||||
ElvenMystic(LightElf, Mystic, First),
|
||||
ElvenWizard(LightElf, Mystic, Second),
|
||||
Spellsinger(LightElf, Mystic, Third),
|
||||
ElementalSummoner(LightElf, Mystic, Third),
|
||||
ElvenOracle(LightElf, Priest, Second),
|
||||
ElvenElder(LightElf, Priest, Third),
|
||||
ElvenFighter(Race.ELF, Fighter, FIRST),
|
||||
ElvenKnight(Race.ELF, Fighter, SECOND),
|
||||
TempleKnight(Race.ELF, Fighter, THIRD),
|
||||
Swordsinger(Race.ELF, Fighter, THIRD),
|
||||
ElvenScout(Race.ELF, Fighter, SECOND),
|
||||
Plainswalker(Race.ELF, Fighter, THIRD),
|
||||
SilverRanger(Race.ELF, Fighter, THIRD),
|
||||
ElvenMystic(Race.ELF, Mystic, FIRST),
|
||||
ElvenWizard(Race.ELF, Mystic, SECOND),
|
||||
Spellsinger(Race.ELF, Mystic, THIRD),
|
||||
ElementalSummoner(Race.ELF, Mystic, THIRD),
|
||||
ElvenOracle(Race.ELF, Priest, SECOND),
|
||||
ElvenElder(Race.ELF, Priest, THIRD),
|
||||
|
||||
DarkElvenFighter(DarkElf, Fighter, First),
|
||||
PalusKnight(DarkElf, Fighter, Second),
|
||||
ShillienKnight(DarkElf, Fighter, Third),
|
||||
Bladedancer(DarkElf, Fighter, Third),
|
||||
Assassin(DarkElf, Fighter, Second),
|
||||
AbyssWalker(DarkElf, Fighter, Third),
|
||||
PhantomRanger(DarkElf, Fighter, Third),
|
||||
DarkElvenMystic(DarkElf, Mystic, First),
|
||||
DarkElvenWizard(DarkElf, Mystic, Second),
|
||||
Spellhowler(DarkElf, Mystic, Third),
|
||||
PhantomSummoner(DarkElf, Mystic, Third),
|
||||
ShillienOracle(DarkElf, Priest, Second),
|
||||
ShillienElder(DarkElf, Priest, Third),
|
||||
DarkElvenFighter(Race.DARK_ELF, Fighter, FIRST),
|
||||
PalusKnight(Race.DARK_ELF, Fighter, SECOND),
|
||||
ShillienKnight(Race.DARK_ELF, Fighter, THIRD),
|
||||
Bladedancer(Race.DARK_ELF, Fighter, THIRD),
|
||||
Assassin(Race.DARK_ELF, Fighter, SECOND),
|
||||
AbyssWalker(Race.DARK_ELF, Fighter, THIRD),
|
||||
PhantomRanger(Race.DARK_ELF, Fighter, THIRD),
|
||||
DarkElvenMystic(Race.DARK_ELF, Mystic, FIRST),
|
||||
DarkElvenWizard(Race.DARK_ELF, Mystic, SECOND),
|
||||
Spellhowler(Race.DARK_ELF, Mystic, THIRD),
|
||||
PhantomSummoner(Race.DARK_ELF, Mystic, THIRD),
|
||||
ShillienOracle(Race.DARK_ELF, Priest, SECOND),
|
||||
ShillienElder(Race.DARK_ELF, Priest, THIRD),
|
||||
|
||||
OrcFighter(Orc, Fighter, First),
|
||||
OrcRaider(Orc, Fighter, Second),
|
||||
Destroyer(Orc, Fighter, Third),
|
||||
OrcMonk(Orc, Fighter, Second),
|
||||
Tyrant(Orc, Fighter, Third),
|
||||
OrcMystic(Orc, Mystic, First),
|
||||
OrcShaman(Orc, Mystic, Second),
|
||||
Overlord(Orc, Mystic, Third),
|
||||
Warcryer(Orc, Mystic, Third),
|
||||
OrcFighter(Race.ORC, Fighter, FIRST),
|
||||
OrcRaider(Race.ORC, Fighter, SECOND),
|
||||
Destroyer(Race.ORC, Fighter, THIRD),
|
||||
OrcMonk(Race.ORC, Fighter, SECOND),
|
||||
Tyrant(Race.ORC, Fighter, THIRD),
|
||||
OrcMystic(Race.ORC, Mystic, FIRST),
|
||||
OrcShaman(Race.ORC, Mystic, SECOND),
|
||||
Overlord(Race.ORC, Mystic, THIRD),
|
||||
Warcryer(Race.ORC, Mystic, THIRD),
|
||||
|
||||
DwarvenFighter(Dwarf, Fighter, First),
|
||||
DwarvenScavenger(Dwarf, Fighter, Second),
|
||||
BountyHunter(Dwarf, Fighter, Third),
|
||||
DwarvenArtisan(Dwarf, Fighter, Second),
|
||||
Warsmith(Dwarf, Fighter, Third),
|
||||
DwarvenFighter(Race.DWARF, Fighter, FIRST),
|
||||
DwarvenScavenger(Race.DWARF, Fighter, SECOND),
|
||||
BountyHunter(Race.DWARF, Fighter, THIRD),
|
||||
DwarvenArtisan(Race.DWARF, Fighter, SECOND),
|
||||
Warsmith(Race.DWARF, Fighter, THIRD),
|
||||
|
||||
dummyEntry1(null, null, null),
|
||||
dummyEntry2(null, null, null),
|
||||
@@ -130,44 +129,46 @@ public enum PlayerClass
|
||||
dummyEntry28(null, null, null),
|
||||
dummyEntry29(null, null, null),
|
||||
dummyEntry30(null, null, null),
|
||||
/*
|
||||
* (3rd classes)
|
||||
*/
|
||||
duelist(Race.HUMAN, Fighter, FOURTH),
|
||||
dreadnought(Race.HUMAN, Fighter, FOURTH),
|
||||
phoenixKnight(Race.HUMAN, Fighter, FOURTH),
|
||||
hellKnight(Race.HUMAN, Fighter, FOURTH),
|
||||
sagittarius(Race.HUMAN, Fighter, FOURTH),
|
||||
adventurer(Race.HUMAN, Fighter, FOURTH),
|
||||
archmage(Race.HUMAN, Mystic, FOURTH),
|
||||
soultaker(Race.HUMAN, Mystic, FOURTH),
|
||||
arcanaLord(Race.HUMAN, Mystic, FOURTH),
|
||||
cardinal(Race.HUMAN, Priest, FOURTH),
|
||||
hierophant(Race.HUMAN, Priest, FOURTH),
|
||||
|
||||
duelist(Human, Fighter, Fourth),
|
||||
dreadnought(Human, Fighter, Fourth),
|
||||
phoenixKnight(Human, Fighter, Fourth),
|
||||
hellKnight(Human, Fighter, Fourth),
|
||||
sagittarius(Human, Fighter, Fourth),
|
||||
adventurer(Human, Fighter, Fourth),
|
||||
archmage(Human, Mystic, Fourth),
|
||||
soultaker(Human, Mystic, Fourth),
|
||||
arcanaLord(Human, Mystic, Fourth),
|
||||
cardinal(Human, Mystic, Fourth),
|
||||
hierophant(Human, Mystic, Fourth),
|
||||
evaTemplar(Race.ELF, Fighter, FOURTH),
|
||||
swordMuse(Race.ELF, Fighter, FOURTH),
|
||||
windRider(Race.ELF, Fighter, FOURTH),
|
||||
moonlightSentinel(Race.ELF, Fighter, FOURTH),
|
||||
mysticMuse(Race.ELF, Mystic, FOURTH),
|
||||
elementalMaster(Race.ELF, Mystic, FOURTH),
|
||||
evaSaint(Race.ELF, Priest, FOURTH),
|
||||
|
||||
evaTemplar(LightElf, Fighter, Fourth),
|
||||
swordMuse(LightElf, Fighter, Fourth),
|
||||
windRider(LightElf, Fighter, Fourth),
|
||||
moonlightSentinel(LightElf, Fighter, Fourth),
|
||||
mysticMuse(LightElf, Mystic, Fourth),
|
||||
elementalMaster(LightElf, Mystic, Fourth),
|
||||
evaSaint(LightElf, Mystic, Fourth),
|
||||
shillienTemplar(Race.DARK_ELF, Fighter, FOURTH),
|
||||
spectralDancer(Race.DARK_ELF, Fighter, FOURTH),
|
||||
ghostHunter(Race.DARK_ELF, Fighter, FOURTH),
|
||||
ghostSentinel(Race.DARK_ELF, Fighter, FOURTH),
|
||||
stormScreamer(Race.DARK_ELF, Mystic, FOURTH),
|
||||
spectralMaster(Race.DARK_ELF, Mystic, FOURTH),
|
||||
shillienSaint(Race.DARK_ELF, Priest, FOURTH),
|
||||
|
||||
shillienTemplar(DarkElf, Fighter, Fourth),
|
||||
spectralDancer(DarkElf, Fighter, Fourth),
|
||||
ghostHunter(DarkElf, Fighter, Fourth),
|
||||
ghostSentinel(DarkElf, Fighter, Fourth),
|
||||
stormScreamer(DarkElf, Mystic, Fourth),
|
||||
spectralMaster(DarkElf, Mystic, Fourth),
|
||||
shillienSaint(DarkElf, Mystic, Fourth),
|
||||
titan(Race.ORC, Fighter, FOURTH),
|
||||
grandKhavatari(Race.ORC, Fighter, FOURTH),
|
||||
dominator(Race.ORC, Mystic, FOURTH),
|
||||
doomcryer(Race.ORC, Mystic, FOURTH),
|
||||
|
||||
titan(Orc, Fighter, Fourth),
|
||||
grandKhauatari(Orc, Fighter, Fourth),
|
||||
dominator(Orc, Mystic, Fourth),
|
||||
doomcryer(Orc, Mystic, Fourth),
|
||||
fortuneSeeker(Race.DWARF, Fighter, FOURTH),
|
||||
maestro(Race.DWARF, Fighter, FOURTH);
|
||||
|
||||
fortuneSeeker(Dwarf, Fighter, Fourth),
|
||||
maestro(Dwarf, Fighter, Fourth);
|
||||
|
||||
private PlayerRace _race;
|
||||
private Race _race;
|
||||
private ClassLevel _level;
|
||||
private ClassType _type;
|
||||
|
||||
@@ -184,7 +185,7 @@ public enum PlayerClass
|
||||
|
||||
static
|
||||
{
|
||||
Set<PlayerClass> subclasses = getSet(null, Third);
|
||||
final Set<PlayerClass> subclasses = getSet(null, THIRD);
|
||||
subclasses.removeAll(neverSubclassed);
|
||||
|
||||
mainSubclassSet = subclasses;
|
||||
@@ -211,9 +212,9 @@ public enum PlayerClass
|
||||
subclassSetMap.put(Spellhowler, subclasseSet5);
|
||||
}
|
||||
|
||||
PlayerClass(PlayerRace pRace, ClassType pType, ClassLevel pLevel)
|
||||
PlayerClass(Race race, ClassType pType, ClassLevel pLevel)
|
||||
{
|
||||
_race = pRace;
|
||||
_race = race;
|
||||
_level = pLevel;
|
||||
_type = pType;
|
||||
}
|
||||
@@ -222,7 +223,7 @@ public enum PlayerClass
|
||||
{
|
||||
Set<PlayerClass> subclasses = null;
|
||||
|
||||
if (_level == Third)
|
||||
if (_level == THIRD)
|
||||
{
|
||||
subclasses = EnumSet.copyOf(mainSubclassSet);
|
||||
|
||||
@@ -231,19 +232,19 @@ public enum PlayerClass
|
||||
|
||||
switch (player.getRace())
|
||||
{
|
||||
case elf:
|
||||
case ELF:
|
||||
{
|
||||
subclasses.removeAll(getSet(DarkElf, Third));
|
||||
subclasses.removeAll(getSet(Race.DARK_ELF, THIRD));
|
||||
break;
|
||||
}
|
||||
case darkelf:
|
||||
case DARK_ELF:
|
||||
{
|
||||
subclasses.removeAll(getSet(LightElf, Third));
|
||||
subclasses.removeAll(getSet(Race.ELF, THIRD));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Set<PlayerClass> unavailableClasses = subclassSetMap.get(this);
|
||||
final Set<PlayerClass> unavailableClasses = subclassSetMap.get(this);
|
||||
|
||||
if (unavailableClasses != null)
|
||||
{
|
||||
@@ -254,7 +255,7 @@ public enum PlayerClass
|
||||
return subclasses;
|
||||
}
|
||||
|
||||
public static final EnumSet<PlayerClass> getSet(PlayerRace race, ClassLevel level)
|
||||
public static EnumSet<PlayerClass> getSet(Race race, ClassLevel level)
|
||||
{
|
||||
final EnumSet<PlayerClass> allOf = EnumSet.noneOf(PlayerClass.class);
|
||||
|
||||
@@ -268,11 +269,10 @@ public enum PlayerClass
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return allOf;
|
||||
}
|
||||
|
||||
public boolean isOfRace(PlayerRace pRace)
|
||||
public boolean isOfRace(Race pRace)
|
||||
{
|
||||
return _race == pRace;
|
||||
}
|
||||
|
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.base;
|
||||
|
||||
public enum PlayerRace
|
||||
{
|
||||
Human,
|
||||
LightElf,
|
||||
DarkElf,
|
||||
Orc,
|
||||
Dwarf
|
||||
}
|
@@ -1439,7 +1439,7 @@ public class DM implements EventTask
|
||||
}
|
||||
}
|
||||
|
||||
if (!Config.DM_ALLOW_HEALER_CLASSES && ((eventPlayer.getClassId() == ClassId.cardinal) || (eventPlayer.getClassId() == ClassId.evaSaint) || (eventPlayer.getClassId() == ClassId.shillienSaint)))
|
||||
if (!Config.DM_ALLOW_HEALER_CLASSES && ((eventPlayer.getClassId() == ClassId.CARDINAL) || (eventPlayer.getClassId() == ClassId.EVA_SAINT) || (eventPlayer.getClassId() == ClassId.SHILLIEN_SAINT)))
|
||||
{
|
||||
eventPlayer.sendMessage("You cant join with Healer Class!");
|
||||
return false;
|
||||
|
@@ -29,10 +29,10 @@ import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.SpawnTable;
|
||||
import org.l2jmobius.gameserver.datatables.xml.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.model.PlayerInventory;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.model.base.Race;
|
||||
import org.l2jmobius.gameserver.model.entity.Announcements;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
||||
@@ -830,7 +830,7 @@ public class VIP
|
||||
else
|
||||
{
|
||||
replyMSG.append("You want to participate in the event?<br><br>");
|
||||
if ((eventPlayer.getRace() == Race.human) && (_team == 1))
|
||||
if ((eventPlayer.getRace() == Race.HUMAN) && (_team == 1))
|
||||
{
|
||||
replyMSG.append("It seems you are on the VIP race! Be prepared to protect the VIP when it is decided<br1>");
|
||||
replyMSG.append("The VIP will be decided on when the event starts. It's completely random.<br>");
|
||||
@@ -838,7 +838,7 @@ public class VIP
|
||||
replyMSG.append("<button value=\"Join\" action=\"bypass -h npc_" + objectId + "_vip_joinVIPTeam\" width=50 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
|
||||
replyMSG.append("</center>");
|
||||
}
|
||||
else if ((eventPlayer.getRace() == Race.elf) && (_team == 2))
|
||||
else if ((eventPlayer.getRace() == Race.ELF) && (_team == 2))
|
||||
{
|
||||
replyMSG.append("It seems you are on the VIP race! Be prepared to protect the VIP when it is decided<br1>");
|
||||
replyMSG.append("The VIP will be decided on when the event starts. It's completely random.<br>");
|
||||
@@ -846,7 +846,7 @@ public class VIP
|
||||
replyMSG.append("<button value=\"Join\" action=\"bypass -h npc_" + objectId + "_vip_joinVIPTeam\" width=50 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
|
||||
replyMSG.append("</center>");
|
||||
}
|
||||
else if ((eventPlayer.getRace() == Race.darkelf) && (_team == 3))
|
||||
else if ((eventPlayer.getRace() == Race.DARK_ELF) && (_team == 3))
|
||||
{
|
||||
replyMSG.append("It seems you are on the VIP race! Be prepared to protect the VIP when it is decided<br1>");
|
||||
replyMSG.append("The VIP will be decided on when the event starts. It's completely random.<br>");
|
||||
@@ -854,7 +854,7 @@ public class VIP
|
||||
replyMSG.append("<button value=\"Join\" action=\"bypass -h npc_" + objectId + "_vip_joinVIPTeam\" width=50 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
|
||||
replyMSG.append("</center>");
|
||||
}
|
||||
else if ((eventPlayer.getRace() == Race.orc) && (_team == 4))
|
||||
else if ((eventPlayer.getRace() == Race.ORC) && (_team == 4))
|
||||
{
|
||||
replyMSG.append("It seems you are on the VIP race! Be prepared to protect the VIP when it is decided<br1>");
|
||||
replyMSG.append("The VIP will be decided on when the event starts. It's completely random.<br>");
|
||||
@@ -862,7 +862,7 @@ public class VIP
|
||||
replyMSG.append("<button value=\"Join\" action=\"bypass -h npc_" + objectId + "_vip_joinVIPTeam\" width=50 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
|
||||
replyMSG.append("</center>");
|
||||
}
|
||||
else if ((eventPlayer.getRace() == Race.dwarf) && (_team == 5))
|
||||
else if ((eventPlayer.getRace() == Race.DWARF) && (_team == 5))
|
||||
{
|
||||
replyMSG.append("It seems you are on the VIP race! Be prepared to protect the VIP when it is decided<br1>");
|
||||
replyMSG.append("The VIP will be decided on when the event starts. It's completely random.<br>");
|
||||
|
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.skills.conditions;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.base.Race;
|
||||
import org.l2jmobius.gameserver.model.skills.Env;
|
||||
|
||||
/**
|
||||
|
@@ -16,9 +16,9 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.model.zone.type;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.base.Race;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
@@ -45,7 +45,7 @@ public class MotherTreeZone extends ZoneType
|
||||
{
|
||||
for (PlayerInstance member : player.getParty().getPartyMembers())
|
||||
{
|
||||
if (member.getRace() != Race.elf)
|
||||
if (member.getRace() != Race.ELF)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@@ -481,15 +481,15 @@ public class EnterWorld extends GameClientPacket
|
||||
{
|
||||
final ClassLevel lvlnow = PlayerClass.values()[player.getClassId().getId()].getLevel();
|
||||
|
||||
if ((player.getLevel() >= 20) && (lvlnow == ClassLevel.First))
|
||||
if ((player.getLevel() >= 20) && (lvlnow == ClassLevel.FIRST))
|
||||
{
|
||||
ClassMasterInstance.getInstance().onAction(player);
|
||||
}
|
||||
else if ((player.getLevel() >= 40) && (lvlnow == ClassLevel.Second))
|
||||
else if ((player.getLevel() >= 40) && (lvlnow == ClassLevel.SECOND))
|
||||
{
|
||||
ClassMasterInstance.getInstance().onAction(player);
|
||||
}
|
||||
else if ((player.getLevel() >= 76) && (lvlnow == ClassLevel.Third))
|
||||
else if ((player.getLevel() >= 76) && (lvlnow == ClassLevel.THIRD))
|
||||
{
|
||||
ClassMasterInstance.getInstance().onAction(player);
|
||||
}
|
||||
|
@@ -36,31 +36,31 @@ public class NewCharacter extends GameClientPacket
|
||||
PlayerTemplate template = CharTemplateTable.getInstance().getTemplate(0);
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.fighter); // Human Fighter
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.FIGHTER); // Human Fighter
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.mage); // Human Mage
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.MAGE); // Human Mage
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.elvenFighter); // Elf Fighter
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.ELVEN_FIGHTER); // Elf Fighter
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.elvenMage); // Elf Mage
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.ELVEN_MAGE); // Elf Mage
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.darkFighter); // DE Fighter
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.DARK_FIGHTER); // DE Fighter
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.darkMage); // DE Mage
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.DARK_MAGE); // DE Mage
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.orcFighter); // Orc Fighter
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.ORC_FIGHTER); // Orc Fighter
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.orcMage); // Orc Mage
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.ORC_MAGE); // Orc Mage
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.dwarvenFighter); // Dwarf Fighter
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.DWARVEN_FIGHTER); // Dwarf Fighter
|
||||
ct.addChar(template);
|
||||
|
||||
// Finally
|
||||
|
@@ -20,10 +20,10 @@ import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.model.Inventory;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.base.Race;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.WeaponType;
|
||||
@@ -612,7 +612,7 @@ public class RequestEnchantItem extends GameClientPacket
|
||||
|
||||
int rndValue = Rnd.get(100);
|
||||
|
||||
if (Config.ENABLE_DWARF_ENCHANT_BONUS && (player.getRace() == Race.dwarf))
|
||||
if (Config.ENABLE_DWARF_ENCHANT_BONUS && (player.getRace() == Race.DWARF))
|
||||
{
|
||||
if (player.getLevel() >= Config.DWARF_ENCHANT_MIN_LEVEL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user