|
@@ -36,95 +36,83 @@ import com.l2jserver.gameserver.model.quest.Quest.QuestEventType;
|
|
import com.l2jserver.gameserver.templates.StatsSet;
|
|
import com.l2jserver.gameserver.templates.StatsSet;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * This cl contains all generic data of a L2Spawn object.<BR><BR>
|
|
|
|
- *
|
|
|
|
- * <B><U> Data</U> :</B><BR><BR>
|
|
|
|
- * <li>npcId, type, name, sex</li>
|
|
|
|
- * <li>rewardExp, rewardSp</li>
|
|
|
|
- * <li>aggroRange, factionId, factionRange</li>
|
|
|
|
- * <li>rhand, lhand</li>
|
|
|
|
- * <li>isUndead</li>
|
|
|
|
- * <li>_drops</li>
|
|
|
|
- * <li>_minions</li>
|
|
|
|
- * <li>_teachInfo</li>
|
|
|
|
- * <li>_skills</li>
|
|
|
|
- * <li>_questsStart</li><BR><BR>
|
|
|
|
- *
|
|
|
|
- * @version $Revision: 1.1.2.4 $ $Date: 2005/04/02 15:57:51 $
|
|
|
|
|
|
+ * @author Zoey76
|
|
*/
|
|
*/
|
|
public final class L2NpcTemplate extends L2CharTemplate
|
|
public final class L2NpcTemplate extends L2CharTemplate
|
|
{
|
|
{
|
|
- protected static final Logger _log = Logger.getLogger(Quest.class.getName());
|
|
|
|
-
|
|
|
|
- public final int npcId;
|
|
|
|
- public final int idTemplate;
|
|
|
|
- public final String type;
|
|
|
|
- public final String name;
|
|
|
|
- public final boolean serverSideName;
|
|
|
|
- public final String title;
|
|
|
|
- public final boolean serverSideTitle;
|
|
|
|
- public final String sex;
|
|
|
|
- public final byte level;
|
|
|
|
- public final int rewardExp;
|
|
|
|
- public final int rewardSp;
|
|
|
|
- public final int aggroRange;
|
|
|
|
- public final int rhand;
|
|
|
|
- public final int lhand;
|
|
|
|
- public final int enchantEffect;
|
|
|
|
- public Race race;
|
|
|
|
- public final String jClass;
|
|
|
|
- public final int dropherbgroup;
|
|
|
|
- public boolean isQuestMonster; // doesn't include all mobs that are involved in
|
|
|
|
- // quests, just plain quest monsters for preventing champion spawn
|
|
|
|
- public final float baseVitalityDivider;
|
|
|
|
-
|
|
|
|
- //Skill AI
|
|
|
|
- public FastList<L2Skill> _buffskills;
|
|
|
|
- public FastList<L2Skill> _negativeskills;
|
|
|
|
- public FastList<L2Skill> _debuffskills;
|
|
|
|
- public FastList<L2Skill> _atkskills;
|
|
|
|
- public FastList<L2Skill> _rootskills;
|
|
|
|
- public FastList<L2Skill> _stunskills;
|
|
|
|
- public FastList<L2Skill> _sleepskills;
|
|
|
|
- public FastList<L2Skill> _paralyzeskills;
|
|
|
|
- public FastList<L2Skill> _fossilskills;
|
|
|
|
- public FastList<L2Skill> _floatskills;
|
|
|
|
- public FastList<L2Skill> _immobiliseskills;
|
|
|
|
- public FastList<L2Skill> _healskills;
|
|
|
|
- public FastList<L2Skill> _resskills;
|
|
|
|
- public FastList<L2Skill> _dotskills;
|
|
|
|
- public FastList<L2Skill> _cotskills;
|
|
|
|
- public FastList<L2Skill> _universalskills;
|
|
|
|
- public FastList<L2Skill> _manaskills;
|
|
|
|
- public FastList<L2Skill> _Lrangeskills;
|
|
|
|
- public FastList<L2Skill> _Srangeskills;
|
|
|
|
- public FastList<L2Skill> _generalskills;
|
|
|
|
- private FastList<L2Skill> _suicideSkills;
|
|
|
|
-
|
|
|
|
- private boolean _hasbuffskills;
|
|
|
|
- private boolean _hasnegativeskills;
|
|
|
|
- private boolean _hasdebuffskills;
|
|
|
|
- private boolean _hasatkskills;
|
|
|
|
- private boolean _hasrootskills;
|
|
|
|
- private boolean _hasstunskills;
|
|
|
|
- private boolean _hassleepskills;
|
|
|
|
- private boolean _hasparalyzeskills;
|
|
|
|
- private boolean _hasfossilskills;
|
|
|
|
- private boolean _hasfloatskills;
|
|
|
|
- private boolean _hasimmobiliseskills;
|
|
|
|
- private boolean _hashealskills;
|
|
|
|
- private boolean _hasresskills;
|
|
|
|
- private boolean _hasdotskills;
|
|
|
|
- private boolean _hascotskills;
|
|
|
|
- private boolean _hasuniversalskills;
|
|
|
|
- private boolean _hasmanaskills;
|
|
|
|
- private boolean _hasLrangeskills;
|
|
|
|
- private boolean _hasSrangeskills;
|
|
|
|
- private boolean _hasgeneralskills;
|
|
|
|
- private boolean _hasSuicideSkills;
|
|
|
|
|
|
+ private static final Logger _log = Logger.getLogger(L2NpcTemplate.class.getName());
|
|
|
|
+
|
|
|
|
+ private final int _npcId;
|
|
|
|
+ private final int _idTemplate;
|
|
|
|
+ private final String _type;
|
|
|
|
+ private final String _name;
|
|
|
|
+ private final boolean _serverSideName;
|
|
|
|
+ private final String _title;
|
|
|
|
+ private final boolean _serverSideTitle;
|
|
|
|
+ private final String _sex;
|
|
|
|
+ private final byte _level;
|
|
|
|
+ private final int _rewardExp;
|
|
|
|
+ private final int _rewardSp;
|
|
|
|
+ private final int _aggroRange;
|
|
|
|
+ private final int _rHand;
|
|
|
|
+ private final int _lHand;
|
|
|
|
+ private final int _enchantEffect;
|
|
|
|
+
|
|
|
|
+ private Race _race;
|
|
|
|
+ private final String _clientClass;
|
|
|
|
+
|
|
|
|
+ private final int _dropHerbGroup;
|
|
|
|
+ private final boolean _isCustom;
|
|
|
|
+ /**
|
|
|
|
+ * Doesn't include all mobs that are involved in quests, just plain quest monsters for preventing champion spawn.
|
|
|
|
+ */
|
|
|
|
+ private final boolean _isQuestMonster;
|
|
|
|
+ private final float _baseVitalityDivider;
|
|
|
|
+
|
|
|
|
+ // Skill AI
|
|
|
|
+ private final FastList<L2Skill> _buffSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _negativeSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _debuffSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _atkSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _rootSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _stunskills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _sleepSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _paralyzeSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _fossilSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _floatSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _immobilizeSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _healSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _resSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _dotSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _cotSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _universalSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _manaSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _longRangeSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _shortRangeSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _generalSkills = new FastList<>();
|
|
|
|
+ private final FastList<L2Skill> _suicideSkills = new FastList<>();
|
|
|
|
|
|
private L2NpcAIData _AIdataStatic = new L2NpcAIData();
|
|
private L2NpcAIData _AIdataStatic = new L2NpcAIData();
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * The table containing all Item that can be dropped by L2NpcInstance using this L2NpcTemplate
|
|
|
|
+ */
|
|
|
|
+ private final FastList<L2DropCategory> _categories = new FastList<>();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * The table containing all Minions that must be spawn with the L2NpcInstance using this L2NpcTemplate
|
|
|
|
+ */
|
|
|
|
+ private final List<L2MinionData> _minions = new FastList<>();
|
|
|
|
+
|
|
|
|
+ private final List<ClassId> _teachInfo = new FastList<>();
|
|
|
|
+
|
|
|
|
+ private final TIntObjectHashMap<L2Skill> _skills = new TIntObjectHashMap<>();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Contains a list of quests for each event type (questStart, questAttack, questKill, etc).
|
|
|
|
+ */
|
|
|
|
+ private final Map<QuestEventType, Quest[]> _questEvents = new FastMap<>();
|
|
|
|
+
|
|
public static enum AIType
|
|
public static enum AIType
|
|
{
|
|
{
|
|
FIGHTER,
|
|
FIGHTER,
|
|
@@ -165,158 +153,289 @@ public final class L2NpcTemplate extends L2CharTemplate
|
|
NONE
|
|
NONE
|
|
}
|
|
}
|
|
|
|
|
|
- //private final StatsSet _npcStatsSet;
|
|
|
|
-
|
|
|
|
- /** The table containing all Item that can be dropped by L2NpcInstance using this L2NpcTemplate*/
|
|
|
|
- private FastList<L2DropCategory> _categories = null;
|
|
|
|
-
|
|
|
|
- /** The table containing all Minions that must be spawn with the L2NpcInstance using this L2NpcTemplate*/
|
|
|
|
- private List<L2MinionData> _minions = null;
|
|
|
|
|
|
+ public static boolean isAssignableTo(Class<?> sub, Class<?> clazz)
|
|
|
|
+ {
|
|
|
|
+ // If clazz represents an interface
|
|
|
|
+ if (clazz.isInterface())
|
|
|
|
+ {
|
|
|
|
+ // check if obj implements the clazz interface
|
|
|
|
+ Class<?>[] interfaces = sub.getInterfaces();
|
|
|
|
+ for (Class<?> interface1 : interfaces)
|
|
|
|
+ {
|
|
|
|
+ if (clazz.getName().equals(interface1.getName()))
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ do
|
|
|
|
+ {
|
|
|
|
+ if (sub.getName().equals(clazz.getName()))
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ sub = sub.getSuperclass();
|
|
|
|
+ }
|
|
|
|
+ while (sub != null);
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
|
|
- private List<ClassId> _teachInfo;
|
|
|
|
- private TIntObjectHashMap<L2Skill> _skills;
|
|
|
|
- //private Map<Stats, Double> _vulnerabilities;
|
|
|
|
- // contains a list of quests for each event type (questStart, questAttack, questKill, etc)
|
|
|
|
- private Map<Quest.QuestEventType, Quest[]> _questEvents;
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Checks if obj can be assigned to the Class represented by clazz.<br>
|
|
|
|
+ * This is true if, and only if, obj is the same class represented by clazz, or a subclass of it or obj implements the interface represented by clazz.
|
|
|
|
+ * @param obj
|
|
|
|
+ * @param clazz
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public static boolean isAssignableTo(Object obj, Class<?> clazz)
|
|
|
|
+ {
|
|
|
|
+ return L2NpcTemplate.isAssignableTo(obj.getClass(), clazz);
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Constructor of L2Character.<BR><BR>
|
|
|
|
- *
|
|
|
|
|
|
+ * Constructor of L2Character.
|
|
* @param set The StatsSet object to transfer data to the method
|
|
* @param set The StatsSet object to transfer data to the method
|
|
- *
|
|
|
|
*/
|
|
*/
|
|
public L2NpcTemplate(StatsSet set)
|
|
public L2NpcTemplate(StatsSet set)
|
|
{
|
|
{
|
|
super(set);
|
|
super(set);
|
|
- npcId = set.getInteger("npcId");
|
|
|
|
- idTemplate = set.getInteger("idTemplate");
|
|
|
|
- type = set.getString("type");
|
|
|
|
- name = set.getString("name");
|
|
|
|
- serverSideName = set.getBool("serverSideName");
|
|
|
|
- title = set.getString("title");
|
|
|
|
- if (title.equalsIgnoreCase("Quest Monster"))
|
|
|
|
- isQuestMonster = true;
|
|
|
|
- else
|
|
|
|
- isQuestMonster = false;
|
|
|
|
- serverSideTitle = set.getBool("serverSideTitle");
|
|
|
|
- sex = set.getString("sex");
|
|
|
|
- level = set.getByte("level");
|
|
|
|
- rewardExp = set.getInteger("rewardExp");
|
|
|
|
- rewardSp = set.getInteger("rewardSp");
|
|
|
|
- aggroRange = set.getInteger("aggroRange");
|
|
|
|
- rhand = set.getInteger("rhand");
|
|
|
|
- lhand = set.getInteger("lhand");
|
|
|
|
- enchantEffect = set.getInteger("enchant");
|
|
|
|
- race = null;
|
|
|
|
- int herbGroup = set.getInteger("dropHerbGroup");
|
|
|
|
- if (herbGroup > 0 && HerbDropTable.getInstance().getHerbDroplist(herbGroup) == null)
|
|
|
|
|
|
+ _npcId = set.getInteger("npcId");
|
|
|
|
+ _idTemplate = set.getInteger("idTemplate");
|
|
|
|
+ _type = set.getString("type");
|
|
|
|
+ _name = set.getString("name");
|
|
|
|
+ _serverSideName = set.getBool("serverSideName");
|
|
|
|
+ _title = set.getString("title");
|
|
|
|
+ _isQuestMonster = getTitle().equalsIgnoreCase("Quest Monster");
|
|
|
|
+ _serverSideTitle = set.getBool("serverSideTitle");
|
|
|
|
+ _sex = set.getString("sex");
|
|
|
|
+ _level = set.getByte("level");
|
|
|
|
+ _rewardExp = set.getInteger("rewardExp");
|
|
|
|
+ _rewardSp = set.getInteger("rewardSp");
|
|
|
|
+ _aggroRange = set.getInteger("aggroRange");
|
|
|
|
+ _rHand = set.getInteger("rhand");
|
|
|
|
+ _lHand = set.getInteger("lhand");
|
|
|
|
+ _enchantEffect = set.getInteger("enchant");
|
|
|
|
+ _race = null;
|
|
|
|
+ final int herbGroup = set.getInteger("dropHerbGroup");
|
|
|
|
+ if ((herbGroup > 0) && (HerbDropTable.getInstance().getHerbDroplist(herbGroup) == null))
|
|
{
|
|
{
|
|
- _log.warning("Missing Herb Drop Group for npcId: " + npcId);
|
|
|
|
- dropherbgroup = 0;
|
|
|
|
|
|
+ _log.warning("Missing Herb Drop Group for npcId: " + getNpcId());
|
|
|
|
+ _dropHerbGroup = 0;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
- dropherbgroup = herbGroup;
|
|
|
|
|
|
+ {
|
|
|
|
+ _dropHerbGroup = herbGroup;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ _clientClass = set.getString("client_class");
|
|
|
|
|
|
- //_npcStatsSet = set;
|
|
|
|
- _teachInfo = null;
|
|
|
|
- jClass = set.getString("jClass");
|
|
|
|
|
|
+ // TODO: Could be loaded from db.
|
|
|
|
+ _baseVitalityDivider = (getLevel() > 0) && (getRewardExp() > 0) ? (getBaseHpMax() * 9 * getLevel() * getLevel()) / (100 * getRewardExp()) : 0;
|
|
|
|
|
|
- // can be loaded from db
|
|
|
|
- baseVitalityDivider = level > 0 && rewardExp > 0 ? getBaseHpMax() * 9 * level * level /(100 * rewardExp) : 0;
|
|
|
|
|
|
+ _isCustom = _npcId != _idTemplate;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addTeachInfo(ClassId classId)
|
|
|
|
|
|
+ public void addAtkSkill(L2Skill skill)
|
|
{
|
|
{
|
|
- if (_teachInfo == null)
|
|
|
|
- _teachInfo = new FastList<ClassId>();
|
|
|
|
- _teachInfo.add(classId);
|
|
|
|
|
|
+ _atkSkills.add(skill);
|
|
}
|
|
}
|
|
|
|
|
|
- public ClassId[] getTeachInfo()
|
|
|
|
|
|
+ public void addBuffSkill(L2Skill skill)
|
|
{
|
|
{
|
|
- if (_teachInfo == null)
|
|
|
|
- return null;
|
|
|
|
- return _teachInfo.toArray(new ClassId[_teachInfo.size()]);
|
|
|
|
|
|
+ _buffSkills.add(skill);
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean canTeach(ClassId classId)
|
|
|
|
|
|
+ public void addCOTSkill(L2Skill skill)
|
|
{
|
|
{
|
|
- if (_teachInfo == null)
|
|
|
|
- return false;
|
|
|
|
-
|
|
|
|
- // If the player is on a third class, fetch the class teacher
|
|
|
|
- // information for its parent class.
|
|
|
|
- if (classId.level() == 3)
|
|
|
|
- return _teachInfo.contains(classId.getParent());
|
|
|
|
-
|
|
|
|
- return _teachInfo.contains(classId);
|
|
|
|
|
|
+ _cotSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addDebuffSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _debuffSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addDOTSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _dotSkills.add(skill);
|
|
}
|
|
}
|
|
|
|
|
|
- // add a drop to a given category. If the category does not exist, create it.
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Add a drop to a given category.<br>
|
|
|
|
+ * If the category does not exist, create it.
|
|
|
|
+ * @param drop
|
|
|
|
+ * @param categoryType
|
|
|
|
+ */
|
|
public void addDropData(L2DropData drop, int categoryType)
|
|
public void addDropData(L2DropData drop, int categoryType)
|
|
{
|
|
{
|
|
if (drop.isQuestDrop())
|
|
if (drop.isQuestDrop())
|
|
{
|
|
{
|
|
- // if (_questDrops == null)
|
|
|
|
- // _questDrops = new FastList<L2DropData>(0);
|
|
|
|
- // _questDrops.add(drop);
|
|
|
|
|
|
+ // if (_questDrops == null)
|
|
|
|
+ // _questDrops = new FastList<L2DropData>(0);
|
|
|
|
+ // _questDrops.add(drop);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- if (_categories == null)
|
|
|
|
- _categories = new FastList<L2DropCategory>();
|
|
|
|
- // if the category doesn't already exist, create it first
|
|
|
|
|
|
+ // If the category doesn't already exist, create it first
|
|
synchronized (_categories)
|
|
synchronized (_categories)
|
|
{
|
|
{
|
|
boolean catExists = false;
|
|
boolean catExists = false;
|
|
for (L2DropCategory cat : _categories)
|
|
for (L2DropCategory cat : _categories)
|
|
- // if the category exists, add the drop to this category.
|
|
|
|
|
|
+ {
|
|
|
|
+ // If the category exists, add the drop to this category.
|
|
if (cat.getCategoryType() == categoryType)
|
|
if (cat.getCategoryType() == categoryType)
|
|
{
|
|
{
|
|
- cat.addDropData(drop, type.equalsIgnoreCase("L2RaidBoss") || type.equalsIgnoreCase("L2GrandBoss"));
|
|
|
|
|
|
+ cat.addDropData(drop, isType("L2RaidBoss") || isType("L2GrandBoss"));
|
|
catExists = true;
|
|
catExists = true;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- // if the category doesn't exit, create it and add the drop
|
|
|
|
|
|
+ }
|
|
|
|
+ // If the category doesn't exit, create it and add the drop
|
|
if (!catExists)
|
|
if (!catExists)
|
|
{
|
|
{
|
|
- L2DropCategory cat = new L2DropCategory(categoryType);
|
|
|
|
- cat.addDropData(drop, type.equalsIgnoreCase("L2RaidBoss") || type.equalsIgnoreCase("L2GrandBoss"));
|
|
|
|
|
|
+ final L2DropCategory cat = new L2DropCategory(categoryType);
|
|
|
|
+ cat.addDropData(drop, isType("L2RaidBoss") || isType("L2GrandBoss"));
|
|
_categories.add(cat);
|
|
_categories.add(cat);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public void addFloatSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _floatSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addFossilSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _fossilSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addGeneralSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ getGeneralskills().add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addHealSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _healSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addImmobiliseSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _immobilizeSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addManaHealSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _manaSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addNegativeSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _negativeSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addParalyzeSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _paralyzeSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addQuestEvent(Quest.QuestEventType EventType, Quest q)
|
|
|
|
+ {
|
|
|
|
+ if (_questEvents.get(EventType) == null)
|
|
|
|
+ {
|
|
|
|
+ _questEvents.put(EventType, new Quest[]
|
|
|
|
+ {
|
|
|
|
+ q
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ Quest[] _quests = _questEvents.get(EventType);
|
|
|
|
+ int len = _quests.length;
|
|
|
|
+
|
|
|
|
+ // if only one registration per npc is allowed for this event type
|
|
|
|
+ // then only register this NPC if not already registered for the specified event.
|
|
|
|
+ // if a quest allows multiple registrations, then register regardless of count
|
|
|
|
+ // In all cases, check if this new registration is replacing an older copy of the SAME quest
|
|
|
|
+ // Finally, check quest class hierarchy: a parent class should never replace a child class.
|
|
|
|
+ // a child class should always replace a parent class.
|
|
|
|
+ if (!EventType.isMultipleRegistrationAllowed())
|
|
|
|
+ {
|
|
|
|
+ // if it is the same quest (i.e. reload) or the existing is a superclass of the new one, replace the existing.
|
|
|
|
+ if (_quests[0].getName().equals(q.getName()) || L2NpcTemplate.isAssignableTo(q, _quests[0].getClass()))
|
|
|
|
+ {
|
|
|
|
+ _quests[0] = q;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ _log.warning("Quest event not allowed in multiple quests. Skipped addition of Event Type \"" + EventType + "\" for NPC \"" + _name + "\" and quest \"" + q.getName() + "\".");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ // be ready to add a new quest to a new copy of the list, with larger size than previously.
|
|
|
|
+ Quest[] tmp = new Quest[len + 1];
|
|
|
|
+
|
|
|
|
+ // loop through the existing quests and copy them to the new list. While doing so, also
|
|
|
|
+ // check if this new quest happens to be just a replacement for a previously loaded quest.
|
|
|
|
+ // Replace existing if the new quest is the same (reload) or a child of the existing quest.
|
|
|
|
+ // Do nothing if the new quest is a superclass of an existing quest.
|
|
|
|
+ // Add the new quest in the end of the list otherwise.
|
|
|
|
+ for (int i = 0; i < len; i++)
|
|
|
|
+ {
|
|
|
|
+ if (_quests[i].getName().equals(q.getName()) || L2NpcTemplate.isAssignableTo(q, _quests[i].getClass()))
|
|
|
|
+ {
|
|
|
|
+ _quests[i] = q;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ else if (L2NpcTemplate.isAssignableTo(_quests[i], q.getClass()))
|
|
|
|
+ {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ tmp[i] = _quests[i];
|
|
|
|
+ }
|
|
|
|
+ tmp[len] = q;
|
|
|
|
+ _questEvents.put(EventType, tmp);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
public void addRaidData(L2MinionData minion)
|
|
public void addRaidData(L2MinionData minion)
|
|
{
|
|
{
|
|
- if (_minions == null)
|
|
|
|
- _minions = new FastList<L2MinionData>();
|
|
|
|
_minions.add(minion);
|
|
_minions.add(minion);
|
|
}
|
|
}
|
|
|
|
|
|
- /*public void addVulnerability(Stats id, double vuln)
|
|
|
|
|
|
+ public void addRangeSkill(L2Skill skill)
|
|
{
|
|
{
|
|
- if (_vulnerabilities == null)
|
|
|
|
- _vulnerabilities = new FastMap<Stats, Double>();
|
|
|
|
- _vulnerabilities.put(id, new Double(vuln));
|
|
|
|
|
|
+ if ((skill.getCastRange() <= 150) && (skill.getCastRange() > 0))
|
|
|
|
+ {
|
|
|
|
+ _shortRangeSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
+ else if (skill.getCastRange() > 150)
|
|
|
|
+ {
|
|
|
|
+ _longRangeSkills.add(skill);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
- public double getVulnerability(Stats id)
|
|
|
|
|
|
+ public void addResSkill(L2Skill skill)
|
|
{
|
|
{
|
|
- if (_vulnerabilities == null || _vulnerabilities.get(id) == null)
|
|
|
|
- return 1;
|
|
|
|
- return _vulnerabilities.get(id);
|
|
|
|
- }*/
|
|
|
|
|
|
+ _resSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ public void addRootSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _rootSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
|
|
public void addSkill(L2Skill skill)
|
|
public void addSkill(L2Skill skill)
|
|
{
|
|
{
|
|
-
|
|
|
|
- if (_skills == null)
|
|
|
|
- _skills = new TIntObjectHashMap<L2Skill>();
|
|
|
|
-
|
|
|
|
- if(!skill.isPassive())
|
|
|
|
|
|
+ if (!skill.isPassive())
|
|
{
|
|
{
|
|
if (skill.isSuicideAttack())
|
|
if (skill.isSuicideAttack())
|
|
{
|
|
{
|
|
@@ -325,7 +444,7 @@ public final class L2NpcTemplate extends L2CharTemplate
|
|
else
|
|
else
|
|
{
|
|
{
|
|
addGeneralSkill(skill);
|
|
addGeneralSkill(skill);
|
|
- switch(skill.getSkillType())
|
|
|
|
|
|
+ switch (skill.getSkillType())
|
|
{
|
|
{
|
|
case BUFF:
|
|
case BUFF:
|
|
addBuffSkill(skill);
|
|
addBuffSkill(skill);
|
|
@@ -369,11 +488,11 @@ public final class L2NpcTemplate extends L2CharTemplate
|
|
case BLOW:
|
|
case BLOW:
|
|
case DRAIN:
|
|
case DRAIN:
|
|
case CHARGEDAM:
|
|
case CHARGEDAM:
|
|
- case FATAL:
|
|
|
|
|
|
+ case FATAL:
|
|
case DEATHLINK:
|
|
case DEATHLINK:
|
|
case CPDAM:
|
|
case CPDAM:
|
|
case MANADAM:
|
|
case MANADAM:
|
|
- case CPDAMPERCENT:
|
|
|
|
|
|
+ case CPDAMPERCENT:
|
|
addAtkSkill(skill);
|
|
addAtkSkill(skill);
|
|
addUniversalSkill(skill);
|
|
addUniversalSkill(skill);
|
|
addRangeSkill(skill);
|
|
addRangeSkill(skill);
|
|
@@ -395,7 +514,7 @@ public final class L2NpcTemplate extends L2CharTemplate
|
|
addNegativeSkill(skill);
|
|
addNegativeSkill(skill);
|
|
addRangeSkill(skill);
|
|
addRangeSkill(skill);
|
|
break;
|
|
break;
|
|
- default :
|
|
|
|
|
|
+ default:
|
|
addUniversalSkill(skill);
|
|
addUniversalSkill(skill);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -405,43 +524,48 @@ public final class L2NpcTemplate extends L2CharTemplate
|
|
_skills.put(skill.getId(), skill);
|
|
_skills.put(skill.getId(), skill);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public void addSleepSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _sleepSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addStunSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _stunskills.add(skill);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void addSuicideSkill(L2Skill skill)
|
|
|
|
+ {
|
|
|
|
+ _suicideSkills.add(skill);
|
|
|
|
+ }
|
|
|
|
|
|
- /*public double removeVulnerability(Stats id)
|
|
|
|
|
|
+ public void addTeachInfo(ClassId classId)
|
|
{
|
|
{
|
|
- return _vulnerabilities.remove(id);
|
|
|
|
- }*/
|
|
|
|
|
|
+ _teachInfo.add(classId);
|
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
|
- * @return the list of all possible UNCATEGORIZED drops of this L2NpcTemplate.
|
|
|
|
- */
|
|
|
|
- public FastList<L2DropCategory> getDropData()
|
|
|
|
|
|
+ public void addUniversalSkill(L2Skill skill)
|
|
{
|
|
{
|
|
- return _categories;
|
|
|
|
|
|
+ _universalSkills.add(skill);
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * @return the list of all possible item drops of this L2NpcTemplate.<br>
|
|
|
|
- * (ie full drops and part drops, mats, miscellaneous & UNCATEGORIZED)
|
|
|
|
- */
|
|
|
|
- public List<L2DropData> getAllDropData()
|
|
|
|
|
|
+ public boolean canTeach(ClassId classId)
|
|
{
|
|
{
|
|
- if (_categories == null)
|
|
|
|
- return null;
|
|
|
|
- List<L2DropData> lst = new FastList<L2DropData>();
|
|
|
|
- for (L2DropCategory tmp : _categories)
|
|
|
|
|
|
+ // If the player is on a third class, fetch the class teacher
|
|
|
|
+ // information for its parent class.
|
|
|
|
+ if (classId.level() == 3)
|
|
{
|
|
{
|
|
- lst.addAll(tmp.getAllDrops());
|
|
|
|
|
|
+ return _teachInfo.contains(classId.getParent());
|
|
}
|
|
}
|
|
- return lst;
|
|
|
|
|
|
+
|
|
|
|
+ return _teachInfo.contains(classId);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Empty all possible drops of this L2NpcTemplate.<BR><BR>
|
|
|
|
|
|
+ * Empty all possible drops of this L2NpcTemplate.
|
|
*/
|
|
*/
|
|
public synchronized void clearAllDropData()
|
|
public synchronized void clearAllDropData()
|
|
{
|
|
{
|
|
- if (_categories == null)
|
|
|
|
- return;
|
|
|
|
while (!_categories.isEmpty())
|
|
while (!_categories.isEmpty())
|
|
{
|
|
{
|
|
_categories.getFirst().clearAllDrops();
|
|
_categories.getFirst().clearAllDrops();
|
|
@@ -451,556 +575,451 @@ public final class L2NpcTemplate extends L2CharTemplate
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @return the list of all Minions that must be spawn with the L2NpcInstance using this L2NpcTemplate.
|
|
|
|
|
|
+ * @return the aggro range value.
|
|
*/
|
|
*/
|
|
- public List<L2MinionData> getMinionData()
|
|
|
|
|
|
+ public int getAggroRange()
|
|
{
|
|
{
|
|
- return _minions;
|
|
|
|
|
|
+ return _aggroRange;
|
|
}
|
|
}
|
|
|
|
|
|
- public TIntObjectHashMap<L2Skill> getSkills()
|
|
|
|
|
|
+ public L2NpcAIData getAIDataStatic()
|
|
{
|
|
{
|
|
- return _skills;
|
|
|
|
|
|
+ return _AIdataStatic;
|
|
}
|
|
}
|
|
|
|
|
|
- public L2Skill[] getSkillsArray()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the list of all possible item drops of this L2NpcTemplate.<br>
|
|
|
|
+ * (ie full drops and part drops, mats, miscellaneous & UNCATEGORIZED)
|
|
|
|
+ */
|
|
|
|
+ public List<L2DropData> getAllDropData()
|
|
{
|
|
{
|
|
- return _skills.values(new L2Skill[0]);
|
|
|
|
|
|
+ final List<L2DropData> list = new FastList<>();
|
|
|
|
+ for (L2DropCategory tmp : _categories)
|
|
|
|
+ {
|
|
|
|
+ list.addAll(tmp.getAllDrops());
|
|
|
|
+ }
|
|
|
|
+ return list;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addQuestEvent(Quest.QuestEventType EventType, Quest q)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the attack skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getAtkSkills()
|
|
{
|
|
{
|
|
- if (_questEvents == null)
|
|
|
|
- _questEvents = new FastMap<Quest.QuestEventType, Quest[]>();
|
|
|
|
-
|
|
|
|
- if (_questEvents.get(EventType) == null)
|
|
|
|
- {
|
|
|
|
- _questEvents.put(EventType, new Quest[]
|
|
|
|
- {
|
|
|
|
- q
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- Quest[] _quests = _questEvents.get(EventType);
|
|
|
|
- int len = _quests.length;
|
|
|
|
-
|
|
|
|
- // if only one registration per npc is allowed for this event type
|
|
|
|
- // then only register this NPC if not already registered for the specified event.
|
|
|
|
- // if a quest allows multiple registrations, then register regardless of count
|
|
|
|
- // In all cases, check if this new registration is replacing an older copy of the SAME quest
|
|
|
|
- // Finally, check quest class hierarchy: a parent class should never replace a child class.
|
|
|
|
- // a child class should always replace a parent class.
|
|
|
|
- if (!EventType.isMultipleRegistrationAllowed())
|
|
|
|
- {
|
|
|
|
- // if it is the same quest (i.e. reload) or the existing is a superclass of the new one, replace the existing.
|
|
|
|
- if (_quests[0].getName().equals(q.getName()) || L2NpcTemplate.isAssignableTo(q, _quests[0].getClass()))
|
|
|
|
- {
|
|
|
|
- _quests[0] = q;
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- _log.warning("Quest event not allowed in multiple quests. Skipped addition of Event Type \"" + EventType + "\" for NPC \"" + name + "\" and quest \"" + q.getName() + "\".");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- // be ready to add a new quest to a new copy of the list, with larger size than previously.
|
|
|
|
- Quest[] tmp = new Quest[len + 1];
|
|
|
|
-
|
|
|
|
- // loop through the existing quests and copy them to the new list. While doing so, also
|
|
|
|
- // check if this new quest happens to be just a replacement for a previously loaded quest.
|
|
|
|
- // Replace existing if the new quest is the same (reload) or a child of the existing quest.
|
|
|
|
- // Do nothing if the new quest is a superclass of an existing quest.
|
|
|
|
- // Add the new quest in the end of the list otherwise.
|
|
|
|
- for (int i = 0; i < len; i++)
|
|
|
|
- {
|
|
|
|
- if (_quests[i].getName().equals(q.getName()) || L2NpcTemplate.isAssignableTo(q, _quests[i].getClass()))
|
|
|
|
- {
|
|
|
|
- _quests[i] = q;
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- else if (L2NpcTemplate.isAssignableTo(_quests[i], q.getClass()))
|
|
|
|
- {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- tmp[i] = _quests[i];
|
|
|
|
- }
|
|
|
|
- tmp[len] = q;
|
|
|
|
- _questEvents.put(EventType, tmp);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ return _atkSkills;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Checks if obj can be assigned to the Class represented by clazz.<br>
|
|
|
|
- * This is true if, and only if, obj is the same class represented by clazz,
|
|
|
|
- * or a subclass of it or obj implements the interface represented by clazz.
|
|
|
|
- *
|
|
|
|
- *
|
|
|
|
- * @param obj
|
|
|
|
- * @param clazz
|
|
|
|
- * @return
|
|
|
|
|
|
+ * @return the base vitality divider value.
|
|
*/
|
|
*/
|
|
- public static boolean isAssignableTo(Object obj, Class<?> clazz)
|
|
|
|
|
|
+ public float getBaseVitalityDivider()
|
|
{
|
|
{
|
|
- return L2NpcTemplate.isAssignableTo(obj.getClass(), clazz);
|
|
|
|
|
|
+ return _baseVitalityDivider;
|
|
}
|
|
}
|
|
|
|
|
|
- public static boolean isAssignableTo(Class<?> sub, Class<?> clazz)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the buff skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getBuffSkills()
|
|
{
|
|
{
|
|
- // if clazz represents an interface
|
|
|
|
- if (clazz.isInterface())
|
|
|
|
- {
|
|
|
|
- // check if obj implements the clazz interface
|
|
|
|
- Class<?>[] interfaces = sub.getInterfaces();
|
|
|
|
- for (int i = 0; i < interfaces.length; i++)
|
|
|
|
- {
|
|
|
|
- if (clazz.getName().equals(interfaces[i].getName()))
|
|
|
|
- {
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- do
|
|
|
|
- {
|
|
|
|
- if (sub.getName().equals(clazz.getName()))
|
|
|
|
- {
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- sub = sub.getSuperclass();
|
|
|
|
- }
|
|
|
|
- while (sub != null);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public Quest[] getEventQuests(Quest.QuestEventType EventType)
|
|
|
|
- {
|
|
|
|
- if (_questEvents == null)
|
|
|
|
- {
|
|
|
|
- return null;
|
|
|
|
- }
|
|
|
|
- return _questEvents.get(EventType);
|
|
|
|
|
|
+ return _buffSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public void setRace(int raceId)
|
|
|
|
- {
|
|
|
|
- switch (raceId)
|
|
|
|
- {
|
|
|
|
- case 1:
|
|
|
|
- race = L2NpcTemplate.Race.UNDEAD;
|
|
|
|
- break;
|
|
|
|
- case 2:
|
|
|
|
- race = L2NpcTemplate.Race.MAGICCREATURE;
|
|
|
|
- break;
|
|
|
|
- case 3:
|
|
|
|
- race = L2NpcTemplate.Race.BEAST;
|
|
|
|
- break;
|
|
|
|
- case 4:
|
|
|
|
- race = L2NpcTemplate.Race.ANIMAL;
|
|
|
|
- break;
|
|
|
|
- case 5:
|
|
|
|
- race = L2NpcTemplate.Race.PLANT;
|
|
|
|
- break;
|
|
|
|
- case 6:
|
|
|
|
- race = L2NpcTemplate.Race.HUMANOID;
|
|
|
|
- break;
|
|
|
|
- case 7:
|
|
|
|
- race = L2NpcTemplate.Race.SPIRIT;
|
|
|
|
- break;
|
|
|
|
- case 8:
|
|
|
|
- race = L2NpcTemplate.Race.ANGEL;
|
|
|
|
- break;
|
|
|
|
- case 9:
|
|
|
|
- race = L2NpcTemplate.Race.DEMON;
|
|
|
|
- break;
|
|
|
|
- case 10:
|
|
|
|
- race = L2NpcTemplate.Race.DRAGON;
|
|
|
|
- break;
|
|
|
|
- case 11:
|
|
|
|
- race = L2NpcTemplate.Race.GIANT;
|
|
|
|
- break;
|
|
|
|
- case 12:
|
|
|
|
- race = L2NpcTemplate.Race.BUG;
|
|
|
|
- break;
|
|
|
|
- case 13:
|
|
|
|
- race = L2NpcTemplate.Race.FAIRIE;
|
|
|
|
- break;
|
|
|
|
- case 14:
|
|
|
|
- race = L2NpcTemplate.Race.HUMAN;
|
|
|
|
- break;
|
|
|
|
- case 15:
|
|
|
|
- race = L2NpcTemplate.Race.ELVE;
|
|
|
|
- break;
|
|
|
|
- case 16:
|
|
|
|
- race = L2NpcTemplate.Race.DARKELVE;
|
|
|
|
- break;
|
|
|
|
- case 17:
|
|
|
|
- race = L2NpcTemplate.Race.ORC;
|
|
|
|
- break;
|
|
|
|
- case 18:
|
|
|
|
- race = L2NpcTemplate.Race.DWARVE;
|
|
|
|
- break;
|
|
|
|
- case 19:
|
|
|
|
- race = L2NpcTemplate.Race.OTHER;
|
|
|
|
- break;
|
|
|
|
- case 20:
|
|
|
|
- race = L2NpcTemplate.Race.NONLIVING;
|
|
|
|
- break;
|
|
|
|
- case 21:
|
|
|
|
- race = L2NpcTemplate.Race.SIEGEWEAPON;
|
|
|
|
- break;
|
|
|
|
- case 22:
|
|
|
|
- race = L2NpcTemplate.Race.DEFENDINGARMY;
|
|
|
|
- break;
|
|
|
|
- case 23:
|
|
|
|
- race = L2NpcTemplate.Race.MERCENARIE;
|
|
|
|
- break;
|
|
|
|
- case 24:
|
|
|
|
- race = L2NpcTemplate.Race.UNKNOWN;
|
|
|
|
- break;
|
|
|
|
- case 25:
|
|
|
|
- race = L2NpcTemplate.Race.KAMAEL;
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- race = L2NpcTemplate.Race.NONE;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //-----------------------------------------------------------------------
|
|
|
|
- // Npc AI Data
|
|
|
|
- // By ShanSoft
|
|
|
|
- public void setAIData(L2NpcAIData aidata)
|
|
|
|
- {
|
|
|
|
- //_AIdataStatic = new L2NpcAIData(); // not needed to init object and in next line override with other reference. maybe other intention?
|
|
|
|
- _AIdataStatic = aidata;
|
|
|
|
- }
|
|
|
|
- //-----------------------------------------------------------------------
|
|
|
|
-
|
|
|
|
- public L2NpcAIData getAIDataStatic()
|
|
|
|
- {
|
|
|
|
- return _AIdataStatic;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public void addBuffSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the client class (same as texture path).
|
|
|
|
+ */
|
|
|
|
+ public String getClientClass()
|
|
{
|
|
{
|
|
- if (_buffskills == null)
|
|
|
|
- _buffskills = new FastList<L2Skill>();
|
|
|
|
- _buffskills.add(skill);
|
|
|
|
- _hasbuffskills=true;
|
|
|
|
|
|
+ return _clientClass;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addHealSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the cost over time skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getCostOverTimeSkills()
|
|
{
|
|
{
|
|
- if (_healskills == null)
|
|
|
|
- _healskills = new FastList<L2Skill>();
|
|
|
|
- _healskills.add(skill);
|
|
|
|
- _hashealskills=true;
|
|
|
|
|
|
+ return _cotSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addResSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the debuff skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getDebuffSkills()
|
|
{
|
|
{
|
|
- if (_resskills == null)
|
|
|
|
- _resskills = new FastList<L2Skill>();
|
|
|
|
- _resskills.add(skill);
|
|
|
|
- _hasresskills=true;
|
|
|
|
|
|
+ return _debuffSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addAtkSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the list of all possible UNCATEGORIZED drops of this L2NpcTemplate.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2DropCategory> getDropData()
|
|
{
|
|
{
|
|
- if (_atkskills == null)
|
|
|
|
- _atkskills = new FastList<L2Skill>();
|
|
|
|
- _atkskills.add(skill);
|
|
|
|
- _hasatkskills=true;
|
|
|
|
|
|
+ return _categories;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addDebuffSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the drop herb group.
|
|
|
|
+ */
|
|
|
|
+ public int getDropHerbGroup()
|
|
{
|
|
{
|
|
- if (_debuffskills == null)
|
|
|
|
- _debuffskills = new FastList<L2Skill>();
|
|
|
|
- _debuffskills.add(skill);
|
|
|
|
- _hasdebuffskills=true;
|
|
|
|
|
|
+ return _dropHerbGroup;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addRootSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the enchant effect.
|
|
|
|
+ */
|
|
|
|
+ public int getEnchantEffect()
|
|
{
|
|
{
|
|
- if (_rootskills == null)
|
|
|
|
- _rootskills = new FastList<L2Skill>();
|
|
|
|
- _rootskills.add(skill);
|
|
|
|
- _hasrootskills=true;
|
|
|
|
|
|
+ return _enchantEffect;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addSleepSkill(L2Skill skill)
|
|
|
|
|
|
+ public Map<QuestEventType, Quest[]> getEventQuests()
|
|
{
|
|
{
|
|
- if (_sleepskills == null)
|
|
|
|
- _sleepskills = new FastList<L2Skill>();
|
|
|
|
- _sleepskills.add(skill);
|
|
|
|
- _hassleepskills=true;
|
|
|
|
|
|
+ return _questEvents;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addStunSkill(L2Skill skill)
|
|
|
|
|
|
+ public Quest[] getEventQuests(QuestEventType EventType)
|
|
{
|
|
{
|
|
- if (_stunskills == null)
|
|
|
|
- _stunskills = new FastList<L2Skill>();
|
|
|
|
- _stunskills.add(skill);
|
|
|
|
- _hasstunskills=true;
|
|
|
|
|
|
+ return _questEvents.get(EventType);
|
|
}
|
|
}
|
|
|
|
|
|
- public void addParalyzeSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the general skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getGeneralskills()
|
|
{
|
|
{
|
|
- if (_paralyzeskills == null)
|
|
|
|
- _paralyzeskills = new FastList<L2Skill>();
|
|
|
|
- _paralyzeskills.add(skill);
|
|
|
|
- _hasparalyzeskills=true;
|
|
|
|
|
|
+ return _generalSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addFloatSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the heal skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getHealSkills()
|
|
{
|
|
{
|
|
- if (_floatskills == null)
|
|
|
|
- _floatskills = new FastList<L2Skill>();
|
|
|
|
- _floatskills.add(skill);
|
|
|
|
- _hasfloatskills=true;
|
|
|
|
|
|
+ return _healSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addFossilSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the Id template.
|
|
|
|
+ */
|
|
|
|
+ public int getIdTemplate()
|
|
{
|
|
{
|
|
- if (_fossilskills == null)
|
|
|
|
- _fossilskills = new FastList<L2Skill>();
|
|
|
|
- _fossilskills.add(skill);
|
|
|
|
- _hasfossilskills=true;
|
|
|
|
|
|
+ return _idTemplate;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addNegativeSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the immobilize skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getImmobiliseSkills()
|
|
{
|
|
{
|
|
- if (_negativeskills == null)
|
|
|
|
- _negativeskills = new FastList<L2Skill>();
|
|
|
|
- _negativeskills.add(skill);
|
|
|
|
- _hasnegativeskills=true;
|
|
|
|
|
|
+ return _immobilizeSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addImmobiliseSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the left hand item.
|
|
|
|
+ */
|
|
|
|
+ public int getLeftHand()
|
|
{
|
|
{
|
|
- if (_immobiliseskills == null)
|
|
|
|
- _immobiliseskills = new FastList<L2Skill>();
|
|
|
|
- _immobiliseskills.add(skill);
|
|
|
|
- _hasimmobiliseskills=true;
|
|
|
|
|
|
+ return _lHand;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addDOTSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the NPC level.
|
|
|
|
+ */
|
|
|
|
+ public byte getLevel()
|
|
{
|
|
{
|
|
- if (_dotskills == null)
|
|
|
|
- _dotskills = new FastList<L2Skill>();
|
|
|
|
- _dotskills.add(skill);
|
|
|
|
- _hasdotskills=true;
|
|
|
|
|
|
+ return _level;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addUniversalSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the long range skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getLongRangeSkills()
|
|
{
|
|
{
|
|
- if (_universalskills == null)
|
|
|
|
- _universalskills = new FastList<L2Skill>();
|
|
|
|
- _universalskills.add(skill);
|
|
|
|
- _hasuniversalskills=true;
|
|
|
|
|
|
+ return _longRangeSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addCOTSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the list of all Minions that must be spawn with the L2NpcInstance using this L2NpcTemplate.
|
|
|
|
+ */
|
|
|
|
+ public List<L2MinionData> getMinionData()
|
|
{
|
|
{
|
|
- if (_cotskills == null)
|
|
|
|
- _cotskills = new FastList<L2Skill>();
|
|
|
|
- _cotskills.add(skill);
|
|
|
|
- _hascotskills=true;
|
|
|
|
|
|
+ return _minions;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addManaHealSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the NPC name.
|
|
|
|
+ */
|
|
|
|
+ public String getName()
|
|
{
|
|
{
|
|
- if (_manaskills == null)
|
|
|
|
- _manaskills = new FastList<L2Skill>();
|
|
|
|
- _manaskills.add(skill);
|
|
|
|
- _hasmanaskills=true;
|
|
|
|
|
|
+ return _name;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addGeneralSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the negative skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getNegativeSkills()
|
|
{
|
|
{
|
|
- if (_generalskills == null)
|
|
|
|
- _generalskills = new FastList<L2Skill>();
|
|
|
|
- _generalskills.add(skill);
|
|
|
|
- _hasgeneralskills=true;
|
|
|
|
|
|
+ return _negativeSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addSuicideSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the npc Id.
|
|
|
|
+ */
|
|
|
|
+ public int getNpcId()
|
|
{
|
|
{
|
|
- if (_suicideSkills == null)
|
|
|
|
- _suicideSkills = new FastList<L2Skill>();
|
|
|
|
- _suicideSkills.add(skill);
|
|
|
|
-
|
|
|
|
- _hasSuicideSkills = true;
|
|
|
|
|
|
+ return _npcId;
|
|
}
|
|
}
|
|
|
|
|
|
- public void addRangeSkill(L2Skill skill)
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the NPC race.
|
|
|
|
+ */
|
|
|
|
+ public L2NpcTemplate.Race getRace()
|
|
{
|
|
{
|
|
- if (skill.getCastRange() <= 150 && skill.getCastRange() > 0)
|
|
|
|
|
|
+ if (_race == null)
|
|
{
|
|
{
|
|
- if (_Srangeskills == null)
|
|
|
|
- _Srangeskills = new FastList<L2Skill>();
|
|
|
|
- _Srangeskills.add(skill);
|
|
|
|
- _hasSrangeskills=true;
|
|
|
|
|
|
+ _race = L2NpcTemplate.Race.NONE;
|
|
}
|
|
}
|
|
- else if (skill.getCastRange() > 150)
|
|
|
|
- {
|
|
|
|
- if (_Lrangeskills == null)
|
|
|
|
- _Lrangeskills = new FastList<L2Skill>();
|
|
|
|
- _Lrangeskills.add(skill);
|
|
|
|
- _hasLrangeskills=true;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //--------------------------------------------------------------------
|
|
|
|
- public boolean hasBuffSkill()
|
|
|
|
- {
|
|
|
|
- return _hasbuffskills;
|
|
|
|
- }
|
|
|
|
- public boolean hasHealSkill()
|
|
|
|
- {
|
|
|
|
- return _hashealskills;
|
|
|
|
|
|
+ return _race;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasResSkill()
|
|
|
|
- {
|
|
|
|
- return _hasresskills;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public boolean hasAtkSkill()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the resurrection skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getResSkills()
|
|
{
|
|
{
|
|
- return _hasatkskills;
|
|
|
|
|
|
+ return _resSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasDebuffSkill()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the reward Exp.
|
|
|
|
+ */
|
|
|
|
+ public int getRewardExp()
|
|
{
|
|
{
|
|
- return _hasdebuffskills;
|
|
|
|
|
|
+ return _rewardExp;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasRootSkill()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the reward SP.
|
|
|
|
+ */
|
|
|
|
+ public int getRewardSp()
|
|
{
|
|
{
|
|
- return _hasrootskills;
|
|
|
|
|
|
+ return _rewardSp;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasSleepSkill()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the right hand weapon.
|
|
|
|
+ */
|
|
|
|
+ public int getRightHand()
|
|
{
|
|
{
|
|
- return _hassleepskills;
|
|
|
|
|
|
+ return _rHand;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasStunSkill()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the NPC sex.
|
|
|
|
+ */
|
|
|
|
+ public String getSex()
|
|
{
|
|
{
|
|
- return _hasstunskills;
|
|
|
|
|
|
+ return _sex;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasParalyzeSkill()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the short range skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getShortRangeSkills()
|
|
{
|
|
{
|
|
- return _hasparalyzeskills;
|
|
|
|
|
|
+ return _shortRangeSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasFloatSkill()
|
|
|
|
|
|
+ public TIntObjectHashMap<L2Skill> getSkills()
|
|
{
|
|
{
|
|
- return _hasfloatskills;
|
|
|
|
|
|
+ return _skills;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasFossilSkill()
|
|
|
|
|
|
+ public L2Skill[] getSkillsArray()
|
|
{
|
|
{
|
|
- return _hasfossilskills;
|
|
|
|
|
|
+ return _skills.values(new L2Skill[0]);
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasNegativeSkill()
|
|
|
|
|
|
+ public FastList<L2Skill> getSuicideSkills()
|
|
{
|
|
{
|
|
- return _hasnegativeskills;
|
|
|
|
|
|
+ return _suicideSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasImmobiliseSkill()
|
|
|
|
|
|
+ public List<ClassId> getTeachInfo()
|
|
{
|
|
{
|
|
- return _hasimmobiliseskills;
|
|
|
|
|
|
+ return _teachInfo;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasDOTSkill()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the NPC title.
|
|
|
|
+ */
|
|
|
|
+ public String getTitle()
|
|
{
|
|
{
|
|
- return _hasdotskills;
|
|
|
|
|
|
+ return _title;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasUniversalSkill()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the NPC type.
|
|
|
|
+ */
|
|
|
|
+ public String getType()
|
|
{
|
|
{
|
|
- return _hasuniversalskills;
|
|
|
|
|
|
+ return _type;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasCOTSkill()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return the universal skills.
|
|
|
|
+ */
|
|
|
|
+ public FastList<L2Skill> getUniversalSkills()
|
|
{
|
|
{
|
|
- return _hascotskills;
|
|
|
|
|
|
+ return _universalSkills;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasManaHealSkill()
|
|
|
|
- {
|
|
|
|
- return _hasmanaskills;
|
|
|
|
- }
|
|
|
|
- public boolean hasAutoLrangeSkill()
|
|
|
|
- {
|
|
|
|
- return _hasLrangeskills;
|
|
|
|
- }
|
|
|
|
- public boolean hasAutoSrangeSkill()
|
|
|
|
- {
|
|
|
|
- return _hasSrangeskills;
|
|
|
|
- }
|
|
|
|
- public boolean hasSkill()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return {@code true} if the NPC is custom, {@code false} otherwise.
|
|
|
|
+ */
|
|
|
|
+ public boolean isCustom()
|
|
{
|
|
{
|
|
- return _hasgeneralskills;
|
|
|
|
|
|
+ return _isCustom;
|
|
}
|
|
}
|
|
|
|
|
|
- public L2NpcTemplate.Race getRace()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return {@code true} if the NPC is a quest monster, {@code false} otherwise.
|
|
|
|
+ */
|
|
|
|
+ public boolean isQuestMonster()
|
|
{
|
|
{
|
|
- if (race == null)
|
|
|
|
- race = L2NpcTemplate.Race.NONE;
|
|
|
|
-
|
|
|
|
- return race;
|
|
|
|
|
|
+ return _isQuestMonster;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean isCustom()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return {@code true} if the NPC uses server side name, {@code false} otherwise.
|
|
|
|
+ */
|
|
|
|
+ public boolean isServerSideName()
|
|
{
|
|
{
|
|
- return npcId != idTemplate;
|
|
|
|
|
|
+ return _serverSideName;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @return name
|
|
|
|
|
|
+ * @return {@code true} if the NPC uses server side title, {@code false} otherwise.
|
|
*/
|
|
*/
|
|
- public String getName()
|
|
|
|
|
|
+ public boolean isServerSideTitle()
|
|
{
|
|
{
|
|
- return name;
|
|
|
|
|
|
+ return _serverSideTitle;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return {@code true} if the NPC is Christmas Special Tree, {@code false} otherwise.
|
|
|
|
+ */
|
|
public boolean isSpecialTree()
|
|
public boolean isSpecialTree()
|
|
{
|
|
{
|
|
- return npcId == L2XmassTreeInstance.SPECIAL_TREE_ID;
|
|
|
|
|
|
+ return _npcId == L2XmassTreeInstance.SPECIAL_TREE_ID;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean isUndead()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Checks types, ignore case.
|
|
|
|
+ * @param t the type to check.
|
|
|
|
+ * @return {@code true} if the type are the same, {@code false} otherwise.
|
|
|
|
+ */
|
|
|
|
+ public boolean isType(String t)
|
|
{
|
|
{
|
|
- return (race == Race.UNDEAD);
|
|
|
|
|
|
+ return _type.equalsIgnoreCase(t);
|
|
}
|
|
}
|
|
|
|
|
|
- public FastList<L2Skill> getSuicideSkills()
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return {@code true} if the NPC is an undead, {@code false} otherwise.
|
|
|
|
+ */
|
|
|
|
+ public boolean isUndead()
|
|
{
|
|
{
|
|
- return _suicideSkills;
|
|
|
|
|
|
+ return _race == Race.UNDEAD;
|
|
}
|
|
}
|
|
|
|
|
|
- public boolean hasSuicideSkill()
|
|
|
|
|
|
+ public void setAIData(L2NpcAIData AIData)
|
|
{
|
|
{
|
|
- return _hasSuicideSkills;
|
|
|
|
|
|
+ _AIdataStatic = AIData;
|
|
}
|
|
}
|
|
|
|
|
|
- public Map<QuestEventType, Quest[]> getEventQuests()
|
|
|
|
|
|
+ public void setRace(int raceId)
|
|
{
|
|
{
|
|
- if (_questEvents == null)
|
|
|
|
- _questEvents = new FastMap<Quest.QuestEventType, Quest[]>();
|
|
|
|
- return _questEvents;
|
|
|
|
|
|
+ switch (raceId)
|
|
|
|
+ {
|
|
|
|
+ case 1:
|
|
|
|
+ _race = L2NpcTemplate.Race.UNDEAD;
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ _race = L2NpcTemplate.Race.MAGICCREATURE;
|
|
|
|
+ break;
|
|
|
|
+ case 3:
|
|
|
|
+ _race = L2NpcTemplate.Race.BEAST;
|
|
|
|
+ break;
|
|
|
|
+ case 4:
|
|
|
|
+ _race = L2NpcTemplate.Race.ANIMAL;
|
|
|
|
+ break;
|
|
|
|
+ case 5:
|
|
|
|
+ _race = L2NpcTemplate.Race.PLANT;
|
|
|
|
+ break;
|
|
|
|
+ case 6:
|
|
|
|
+ _race = L2NpcTemplate.Race.HUMANOID;
|
|
|
|
+ break;
|
|
|
|
+ case 7:
|
|
|
|
+ _race = L2NpcTemplate.Race.SPIRIT;
|
|
|
|
+ break;
|
|
|
|
+ case 8:
|
|
|
|
+ _race = L2NpcTemplate.Race.ANGEL;
|
|
|
|
+ break;
|
|
|
|
+ case 9:
|
|
|
|
+ _race = L2NpcTemplate.Race.DEMON;
|
|
|
|
+ break;
|
|
|
|
+ case 10:
|
|
|
|
+ _race = L2NpcTemplate.Race.DRAGON;
|
|
|
|
+ break;
|
|
|
|
+ case 11:
|
|
|
|
+ _race = L2NpcTemplate.Race.GIANT;
|
|
|
|
+ break;
|
|
|
|
+ case 12:
|
|
|
|
+ _race = L2NpcTemplate.Race.BUG;
|
|
|
|
+ break;
|
|
|
|
+ case 13:
|
|
|
|
+ _race = L2NpcTemplate.Race.FAIRIE;
|
|
|
|
+ break;
|
|
|
|
+ case 14:
|
|
|
|
+ _race = L2NpcTemplate.Race.HUMAN;
|
|
|
|
+ break;
|
|
|
|
+ case 15:
|
|
|
|
+ _race = L2NpcTemplate.Race.ELVE;
|
|
|
|
+ break;
|
|
|
|
+ case 16:
|
|
|
|
+ _race = L2NpcTemplate.Race.DARKELVE;
|
|
|
|
+ break;
|
|
|
|
+ case 17:
|
|
|
|
+ _race = L2NpcTemplate.Race.ORC;
|
|
|
|
+ break;
|
|
|
|
+ case 18:
|
|
|
|
+ _race = L2NpcTemplate.Race.DWARVE;
|
|
|
|
+ break;
|
|
|
|
+ case 19:
|
|
|
|
+ _race = L2NpcTemplate.Race.OTHER;
|
|
|
|
+ break;
|
|
|
|
+ case 20:
|
|
|
|
+ _race = L2NpcTemplate.Race.NONLIVING;
|
|
|
|
+ break;
|
|
|
|
+ case 21:
|
|
|
|
+ _race = L2NpcTemplate.Race.SIEGEWEAPON;
|
|
|
|
+ break;
|
|
|
|
+ case 22:
|
|
|
|
+ _race = L2NpcTemplate.Race.DEFENDINGARMY;
|
|
|
|
+ break;
|
|
|
|
+ case 23:
|
|
|
|
+ _race = L2NpcTemplate.Race.MERCENARIE;
|
|
|
|
+ break;
|
|
|
|
+ case 24:
|
|
|
|
+ _race = L2NpcTemplate.Race.UNKNOWN;
|
|
|
|
+ break;
|
|
|
|
+ case 25:
|
|
|
|
+ _race = L2NpcTemplate.Race.KAMAEL;
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ _race = L2NpcTemplate.Race.NONE;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|