Drop of char_templates, class_list and lvlupgain SQL tables.
This commit is contained in:
@@ -48,10 +48,8 @@ import org.l2jmobius.gameserver.datatables.OfflineTradeTable;
|
||||
import org.l2jmobius.gameserver.datatables.SchemeBufferTable;
|
||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.CharNameTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.CharTemplateTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.HelperBuffTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.LevelUpData;
|
||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.PetDataTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.SkillSpellbookTable;
|
||||
@@ -70,6 +68,7 @@ import org.l2jmobius.gameserver.datatables.xml.FishData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.HennaData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.ManorSeedData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.MapRegionData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.StaticObjectData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.SummonItemData;
|
||||
@@ -216,10 +215,17 @@ public class GameServer
|
||||
ExperienceData.getInstance();
|
||||
DuelManager.getInstance();
|
||||
|
||||
Util.printSection("Players");
|
||||
PlayerTemplateData.getInstance();
|
||||
if (Config.ENABLE_CLASS_DAMAGES)
|
||||
{
|
||||
ClassDamageManager.loadConfig();
|
||||
}
|
||||
ClanTable.getInstance();
|
||||
if (Config.ENABLE_COMMUNITY_BOARD)
|
||||
{
|
||||
ForumsBBSManager.getInstance().initRoot();
|
||||
}
|
||||
|
||||
Util.printSection("Skills");
|
||||
if (!SkillTable.getInstance().isInitialized())
|
||||
@@ -231,6 +237,10 @@ public class GameServer
|
||||
SkillSpellbookTable.getInstance();
|
||||
NobleSkillTable.getInstance();
|
||||
HeroSkillTable.getInstance();
|
||||
if (!HelperBuffTable.getInstance().isInitialized())
|
||||
{
|
||||
throw new Exception("Could not initialize the Helper Buff Table.");
|
||||
}
|
||||
LOGGER.info("Skills: All skills loaded.");
|
||||
|
||||
Util.printSection("Items");
|
||||
@@ -238,6 +248,7 @@ public class GameServer
|
||||
ArmorSetData.getInstance();
|
||||
ExtractableItemData.getInstance();
|
||||
SummonItemData.getInstance();
|
||||
HennaData.getInstance();
|
||||
if (Config.ALLOWFISHING)
|
||||
{
|
||||
FishData.getInstance();
|
||||
@@ -252,22 +263,6 @@ public class GameServer
|
||||
throw new Exception("Could not initialize the npc table");
|
||||
}
|
||||
|
||||
Util.printSection("Characters");
|
||||
if (Config.ENABLE_COMMUNITY_BOARD)
|
||||
{
|
||||
ForumsBBSManager.getInstance().initRoot();
|
||||
}
|
||||
|
||||
ClanTable.getInstance();
|
||||
CharTemplateTable.getInstance();
|
||||
LevelUpData.getInstance();
|
||||
HennaData.getInstance();
|
||||
|
||||
if (!HelperBuffTable.getInstance().isInitialized())
|
||||
{
|
||||
throw new Exception("Could not initialize the Helper Buff Table");
|
||||
}
|
||||
|
||||
Util.printSection("Geodata");
|
||||
GeoEngine.getInstance();
|
||||
|
||||
|
@@ -1,279 +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.datatables.sql;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.PlayerTemplate;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
|
||||
/**
|
||||
* @version $Revision: 1.6.2.1.2.10 $ $Date: 2005/03/29 14:00:54 $
|
||||
*/
|
||||
public class CharTemplateTable
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(CharTemplateTable.class.getName());
|
||||
|
||||
private static final String[] CHAR_CLASSES =
|
||||
{
|
||||
"Human Fighter",
|
||||
"Warrior",
|
||||
"Gladiator",
|
||||
"Warlord",
|
||||
"Human Knight",
|
||||
"Paladin",
|
||||
"Dark Avenger",
|
||||
"Rogue",
|
||||
"Treasure Hunter",
|
||||
"Hawkeye",
|
||||
"Human Mystic",
|
||||
"Human Wizard",
|
||||
"Sorceror",
|
||||
"Necromancer",
|
||||
"Warlock",
|
||||
"Cleric",
|
||||
"Bishop",
|
||||
"Prophet",
|
||||
"Elven Fighter",
|
||||
"Elven Knight",
|
||||
"Temple Knight",
|
||||
"Swordsinger",
|
||||
"Elven Scout",
|
||||
"Plainswalker",
|
||||
"Silver Ranger",
|
||||
"Elven Mystic",
|
||||
"Elven Wizard",
|
||||
"Spellsinger",
|
||||
"Elemental Summoner",
|
||||
"Elven Oracle",
|
||||
"Elven Elder",
|
||||
"Dark Fighter",
|
||||
"Palus Knight",
|
||||
"Shillien Knight",
|
||||
"Bladedancer",
|
||||
"Assassin",
|
||||
"Abyss Walker",
|
||||
"Phantom Ranger",
|
||||
"Dark Elven Mystic",
|
||||
"Dark Elven Wizard",
|
||||
"Spellhowler",
|
||||
"Phantom Summoner",
|
||||
"Shillien Oracle",
|
||||
"Shillien Elder",
|
||||
"Orc Fighter",
|
||||
"Orc Raider",
|
||||
"Destroyer",
|
||||
"Orc Monk",
|
||||
"Tyrant",
|
||||
"Orc Mystic",
|
||||
"Orc Shaman",
|
||||
"Overlord",
|
||||
"Warcryer",
|
||||
"Dwarven Fighter",
|
||||
"Dwarven Scavenger",
|
||||
"Bounty Hunter",
|
||||
"Dwarven Artisan",
|
||||
"Warsmith",
|
||||
"dummyEntry1",
|
||||
"dummyEntry2",
|
||||
"dummyEntry3",
|
||||
"dummyEntry4",
|
||||
"dummyEntry5",
|
||||
"dummyEntry6",
|
||||
"dummyEntry7",
|
||||
"dummyEntry8",
|
||||
"dummyEntry9",
|
||||
"dummyEntry10",
|
||||
"dummyEntry11",
|
||||
"dummyEntry12",
|
||||
"dummyEntry13",
|
||||
"dummyEntry14",
|
||||
"dummyEntry15",
|
||||
"dummyEntry16",
|
||||
"dummyEntry17",
|
||||
"dummyEntry18",
|
||||
"dummyEntry19",
|
||||
"dummyEntry20",
|
||||
"dummyEntry21",
|
||||
"dummyEntry22",
|
||||
"dummyEntry23",
|
||||
"dummyEntry24",
|
||||
"dummyEntry25",
|
||||
"dummyEntry26",
|
||||
"dummyEntry27",
|
||||
"dummyEntry28",
|
||||
"dummyEntry29",
|
||||
"dummyEntry30",
|
||||
"Duelist",
|
||||
"DreadNought",
|
||||
"Phoenix Knight",
|
||||
"Hell Knight",
|
||||
"Sagittarius",
|
||||
"Adventurer",
|
||||
"Archmage",
|
||||
"Soultaker",
|
||||
"Arcana Lord",
|
||||
"Cardinal",
|
||||
"Hierophant",
|
||||
"Eva Templar",
|
||||
"Sword Muse",
|
||||
"Wind Rider",
|
||||
"Moonlight Sentinel",
|
||||
"Mystic Muse",
|
||||
"Elemental Master",
|
||||
"Eva's Saint",
|
||||
"Shillien Templar",
|
||||
"Spectral Dancer",
|
||||
"Ghost Hunter",
|
||||
"Ghost Sentinel",
|
||||
"Storm Screamer",
|
||||
"Spectral Master",
|
||||
"Shillien Saint",
|
||||
"Titan",
|
||||
"Grand Khauatari",
|
||||
"Dominator",
|
||||
"Doomcryer",
|
||||
"Fortune Seeker",
|
||||
"Maestro"
|
||||
};
|
||||
|
||||
private final Map<Integer, PlayerTemplate> _templates;
|
||||
|
||||
private CharTemplateTable()
|
||||
{
|
||||
_templates = new HashMap<>();
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final PreparedStatement statement = con.prepareStatement("SELECT * FROM class_list, char_templates, lvlupgain WHERE class_list.id = char_templates.classId AND class_list.id = lvlupgain.classId ORDER BY class_list.id");
|
||||
final ResultSet rset = statement.executeQuery();
|
||||
|
||||
while (rset.next())
|
||||
{
|
||||
final StatSet set = new StatSet();
|
||||
set.set("classId", rset.getInt("id"));
|
||||
set.set("className", rset.getString("className"));
|
||||
set.set("raceId", rset.getInt("raceId"));
|
||||
set.set("baseSTR", rset.getInt("STR"));
|
||||
set.set("baseCON", rset.getInt("CON"));
|
||||
set.set("baseDEX", rset.getInt("DEX"));
|
||||
set.set("baseINT", rset.getInt("_INT"));
|
||||
set.set("baseWIT", rset.getInt("WIT"));
|
||||
set.set("baseMEN", rset.getInt("MEN"));
|
||||
set.set("baseHpMax", rset.getFloat("defaultHpBase"));
|
||||
set.set("lvlHpAdd", rset.getFloat("defaultHpAdd"));
|
||||
set.set("lvlHpMod", rset.getFloat("defaultHpMod"));
|
||||
set.set("baseMpMax", rset.getFloat("defaultMpBase"));
|
||||
set.set("baseCpMax", rset.getFloat("defaultCpBase"));
|
||||
set.set("lvlCpAdd", rset.getFloat("defaultCpAdd"));
|
||||
set.set("lvlCpMod", rset.getFloat("defaultCpMod"));
|
||||
set.set("lvlMpAdd", rset.getFloat("defaultMpAdd"));
|
||||
set.set("lvlMpMod", rset.getFloat("defaultMpMod"));
|
||||
set.set("baseHpReg", 1.5);
|
||||
set.set("baseMpReg", 0.9);
|
||||
set.set("basePAtk", rset.getInt("p_atk"));
|
||||
set.set("basePDef", /* classId.isMage()? 77 : 129 */rset.getInt("p_def"));
|
||||
set.set("baseMAtk", rset.getInt("m_atk"));
|
||||
set.set("baseMDef", rset.getInt("char_templates.m_def"));
|
||||
set.set("classBaseLevel", rset.getInt("class_lvl"));
|
||||
set.set("basePAtkSpd", rset.getInt("p_spd"));
|
||||
set.set("baseMAtkSpd", /* classId.isMage()? 166 : 333 */rset.getInt("char_templates.m_spd"));
|
||||
set.set("baseCritRate", rset.getInt("char_templates.critical") / 10);
|
||||
set.set("baseRunSpd", rset.getInt("move_spd"));
|
||||
set.set("baseWalkSpd", 0);
|
||||
set.set("baseShldDef", 0);
|
||||
set.set("baseShldRate", 0);
|
||||
set.set("baseAtkRange", 40);
|
||||
|
||||
set.set("spawnX", rset.getInt("x"));
|
||||
set.set("spawnY", rset.getInt("y"));
|
||||
set.set("spawnZ", rset.getInt("z"));
|
||||
|
||||
PlayerTemplate ct;
|
||||
|
||||
set.set("collision_radius", rset.getDouble("m_col_r"));
|
||||
set.set("collision_height", rset.getDouble("m_col_h"));
|
||||
ct = new PlayerTemplate(set);
|
||||
// 5 items must go here
|
||||
for (int x = 1; x < 6; x++)
|
||||
{
|
||||
if (rset.getInt("items" + x) != 0)
|
||||
{
|
||||
ct.addItem(rset.getInt("items" + x));
|
||||
}
|
||||
}
|
||||
_templates.put(ct.getClassId().getId(), ct);
|
||||
}
|
||||
|
||||
statement.close();
|
||||
rset.close();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
LOGGER.warning("error while loading char templates " + e.getMessage());
|
||||
}
|
||||
|
||||
LOGGER.info("CharTemplateTable: Loaded " + _templates.size() + " Character Templates.");
|
||||
}
|
||||
|
||||
public PlayerTemplate getTemplate(ClassId classId)
|
||||
{
|
||||
return getTemplate(classId.getId());
|
||||
}
|
||||
|
||||
public PlayerTemplate getTemplate(int classId)
|
||||
{
|
||||
return _templates.get(classId);
|
||||
}
|
||||
|
||||
public static final String getClassNameById(int classId)
|
||||
{
|
||||
return CHAR_CLASSES[classId];
|
||||
}
|
||||
|
||||
public static final int getClassIdByName(String className)
|
||||
{
|
||||
int currId = 1;
|
||||
for (String name : CHAR_CLASSES)
|
||||
{
|
||||
if (name.equalsIgnoreCase(className))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
currId++;
|
||||
}
|
||||
return currId;
|
||||
}
|
||||
|
||||
public static CharTemplateTable getInstance()
|
||||
{
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final CharTemplateTable INSTANCE = new CharTemplateTable();
|
||||
}
|
||||
}
|
@@ -125,7 +125,7 @@ public class HelperBuffTable
|
||||
helperBuff.add(template);
|
||||
}
|
||||
|
||||
LOGGER.info("Helper Buff Table: Loaded " + helperBuff.size() + " templates");
|
||||
LOGGER.info("HelperBuffTable: Loaded " + helperBuff.size() + " templates.");
|
||||
}
|
||||
|
||||
public boolean isInitialized()
|
||||
|
@@ -1,114 +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.datatables.sql;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.model.LvlupData;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
|
||||
/**
|
||||
* @author NightMarez
|
||||
* @version $Revision: 1.3.2.4.2.3 $ $Date: 2005/03/27 15:29:18 $
|
||||
*/
|
||||
public class LevelUpData
|
||||
{
|
||||
private static final String SELECT_ALL = "SELECT classid, defaulthpbase, defaulthpadd, defaulthpmod, defaultcpbase, defaultcpadd, defaultcpmod, defaultmpbase, defaultmpadd, defaultmpmod, class_lvl FROM lvlupgain";
|
||||
private static final String CLASS_LVL = "class_lvl";
|
||||
private static final String MP_MOD = "defaultmpmod";
|
||||
private static final String MP_ADD = "defaultmpadd";
|
||||
private static final String MP_BASE = "defaultmpbase";
|
||||
private static final String HP_MOD = "defaulthpmod";
|
||||
private static final String HP_ADD = "defaulthpadd";
|
||||
private static final String HP_BASE = "defaulthpbase";
|
||||
private static final String CP_MOD = "defaultcpmod";
|
||||
private static final String CP_ADD = "defaultcpadd";
|
||||
private static final String CP_BASE = "defaultcpbase";
|
||||
private static final String CLASS_ID = "classid";
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(LevelUpData.class.getName());
|
||||
|
||||
private final Map<Integer, LvlupData> _lvlTable;
|
||||
|
||||
private LevelUpData()
|
||||
{
|
||||
_lvlTable = new HashMap<>();
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final PreparedStatement statement = con.prepareStatement(SELECT_ALL);
|
||||
final ResultSet rset = statement.executeQuery();
|
||||
LvlupData lvlDat;
|
||||
|
||||
while (rset.next())
|
||||
{
|
||||
lvlDat = new LvlupData();
|
||||
lvlDat.setClassid(rset.getInt(CLASS_ID));
|
||||
lvlDat.setClassLvl(rset.getInt(CLASS_LVL));
|
||||
lvlDat.setClassHpBase(rset.getFloat(HP_BASE));
|
||||
lvlDat.setClassHpAdd(rset.getFloat(HP_ADD));
|
||||
lvlDat.setClassHpModifier(rset.getFloat(HP_MOD));
|
||||
lvlDat.setClassCpBase(rset.getFloat(CP_BASE));
|
||||
lvlDat.setClassCpAdd(rset.getFloat(CP_ADD));
|
||||
lvlDat.setClassCpModifier(rset.getFloat(CP_MOD));
|
||||
lvlDat.setClassMpBase(rset.getFloat(MP_BASE));
|
||||
lvlDat.setClassMpAdd(rset.getFloat(MP_ADD));
|
||||
lvlDat.setClassMpModifier(rset.getFloat(MP_MOD));
|
||||
|
||||
_lvlTable.put(lvlDat.getClassid(), lvlDat);
|
||||
}
|
||||
|
||||
statement.close();
|
||||
rset.close();
|
||||
|
||||
LOGGER.info("LevelUpData: Loaded " + _lvlTable.size() + " Character Level Up Templates.");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning("Error while creating Lvl up data table " + e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param classId
|
||||
* @return
|
||||
*/
|
||||
public LvlupData getTemplate(int classId)
|
||||
{
|
||||
return _lvlTable.get(classId);
|
||||
}
|
||||
|
||||
public LvlupData getTemplate(ClassId classId)
|
||||
{
|
||||
return _lvlTable.get(classId.getId());
|
||||
}
|
||||
|
||||
public static LevelUpData getInstance()
|
||||
{
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final LevelUpData INSTANCE = new LevelUpData();
|
||||
}
|
||||
}
|
@@ -30,11 +30,13 @@ import java.util.logging.Logger;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import org.l2jmobius.gameserver.datatables.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.model.EnchantSkillLearn;
|
||||
import org.l2jmobius.gameserver.model.PledgeSkillLearn;
|
||||
import org.l2jmobius.gameserver.model.Skill;
|
||||
import org.l2jmobius.gameserver.model.SkillLearn;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.PlayerTemplate;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
import org.l2jmobius.gameserver.model.skills.holders.ISkillsHolder;
|
||||
import org.l2jmobius.gameserver.model.skills.holders.PlayerSkillHolder;
|
||||
@@ -47,42 +49,36 @@ public class SkillTreeTable
|
||||
private static final Logger LOGGER = Logger.getLogger(SkillTreeTable.class.getName());
|
||||
|
||||
private Map<ClassId, Map<Integer, SkillLearn>> _skillTrees;
|
||||
private List<SkillLearn> _fishingSkillTrees; // all common skills (teached by Fisherman)
|
||||
private List<SkillLearn> _expandDwarfCraftSkillTrees; // list of special skill for dwarf (expand dwarf craft) learned by class teacher
|
||||
private List<PledgeSkillLearn> _pledgeSkillTrees; // pledge skill list
|
||||
private List<EnchantSkillLearn> _enchantSkillTrees; // enchant skill list
|
||||
private List<SkillLearn> _fishingSkillTrees;
|
||||
private List<SkillLearn> _expandDwarfCraftSkillTrees;
|
||||
private List<PledgeSkillLearn> _pledgeSkillTrees;
|
||||
private List<EnchantSkillLearn> _enchantSkillTrees;
|
||||
|
||||
private SkillTreeTable()
|
||||
{
|
||||
int classId = 0;
|
||||
int count = 0;
|
||||
ClassId classId = null;
|
||||
ClassId parentClassId;
|
||||
Map<Integer, SkillLearn> map;
|
||||
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
for (PlayerTemplate playerTemplate : PlayerTemplateData.getInstance().getAllTemplates())
|
||||
{
|
||||
final PreparedStatement statement = con.prepareStatement("SELECT * FROM class_list ORDER BY id");
|
||||
final ResultSet classlist = statement.executeQuery();
|
||||
|
||||
Map<Integer, SkillLearn> map;
|
||||
int parentClassId;
|
||||
SkillLearn skillLearn;
|
||||
|
||||
while (classlist.next())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
map = new HashMap<>();
|
||||
parentClassId = classlist.getInt("parent_id");
|
||||
classId = classlist.getInt("id");
|
||||
final PreparedStatement statement2 = con.prepareStatement("SELECT class_id, skill_id, level, name, sp, min_level FROM skill_trees where class_id=? ORDER BY skill_id, level");
|
||||
statement2.setInt(1, classId);
|
||||
final ResultSet skilltree = statement2.executeQuery();
|
||||
classId = playerTemplate.getClassId();
|
||||
parentClassId = classId.getParent();
|
||||
|
||||
if (parentClassId != -1)
|
||||
final PreparedStatement statement = con.prepareStatement("SELECT class_id, skill_id, level, name, sp, min_level FROM skill_trees where class_id=? ORDER BY skill_id, level");
|
||||
statement.setInt(1, classId.getId());
|
||||
final ResultSet skilltree = statement.executeQuery();
|
||||
|
||||
if (parentClassId != null)
|
||||
{
|
||||
final Map<Integer, SkillLearn> parentMap = getSkillTrees().get(ClassId.getClassId(parentClassId));
|
||||
map.putAll(parentMap);
|
||||
map.putAll(getSkillTrees().get(parentClassId));
|
||||
}
|
||||
|
||||
int prevSkillId = -1;
|
||||
|
||||
while (skilltree.next())
|
||||
{
|
||||
final int id = skilltree.getInt("skill_id");
|
||||
@@ -96,24 +92,22 @@ public class SkillTreeTable
|
||||
prevSkillId = id;
|
||||
}
|
||||
|
||||
skillLearn = new SkillLearn(id, lvl, minLvl, name, cost, 0, 0);
|
||||
map.put(SkillTable.getSkillHashCode(id, lvl), skillLearn);
|
||||
map.put(SkillTable.getSkillHashCode(id, lvl), new SkillLearn(id, lvl, minLvl, name, cost, 0, 0));
|
||||
}
|
||||
|
||||
getSkillTrees().put(ClassId.getClassId(classId), map);
|
||||
skilltree.close();
|
||||
statement2.close();
|
||||
|
||||
getSkillTrees().put(classId, map);
|
||||
count += map.size();
|
||||
// LOGGER.info("SkillTreeTable: skill tree for class " + classId + " has " + map.size() + " skills.");
|
||||
|
||||
skilltree.close();
|
||||
statement.close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (classId != null)
|
||||
{
|
||||
LOGGER.warning("Error while creating skill tree (Class ID " + classId.getId() + "): " + e);
|
||||
}
|
||||
}
|
||||
|
||||
classlist.close();
|
||||
statement.close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.warning("Error while creating skill tree (Class ID " + classId + "): " + e);
|
||||
}
|
||||
|
||||
LOGGER.info("SkillTreeTable: Loaded " + count + " skills.");
|
||||
|
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
* 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.datatables.xml;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import org.l2jmobius.commons.util.IXmlReader;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.PlayerTemplate;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class PlayerTemplateData implements IXmlReader
|
||||
{
|
||||
private final Map<Integer, PlayerTemplate> _templates = new HashMap<>();
|
||||
|
||||
protected PlayerTemplateData()
|
||||
{
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
_templates.clear();
|
||||
parseDatapackFile("data/stats/playerTemplates.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _templates.size() + " player templates.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseDocument(Document doc, File f)
|
||||
{
|
||||
// StatsSet used to feed informations. Cleaned on every entry.
|
||||
final StatSet set = new StatSet();
|
||||
|
||||
// First element is never read.
|
||||
final Node n = doc.getFirstChild();
|
||||
|
||||
for (Node node = n.getFirstChild(); node != null; node = node.getNextSibling())
|
||||
{
|
||||
if (!"class".equalsIgnoreCase(node.getNodeName()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Parse and feed content.
|
||||
final NamedNodeMap attrs = node.getAttributes();
|
||||
for (int i = 0; i < attrs.getLength(); i++)
|
||||
{
|
||||
final Node attr = attrs.item(i);
|
||||
set.set(attr.getNodeName(), attr.getNodeValue());
|
||||
}
|
||||
|
||||
set.set("baseHpReg", 1.5);
|
||||
set.set("baseMpReg", 0.9);
|
||||
set.set("baseWalkSpd", 0);
|
||||
set.set("baseShldDef", 0);
|
||||
set.set("baseShldRate", 0);
|
||||
set.set("baseAtkRange", 40);
|
||||
set.set("baseCritRate", set.getInt("baseCritRate") / 10);
|
||||
|
||||
final PlayerTemplate template = new PlayerTemplate(set);
|
||||
_templates.put(template.getClassId().getId(), template);
|
||||
}
|
||||
}
|
||||
|
||||
public Collection<PlayerTemplate> getAllTemplates()
|
||||
{
|
||||
return _templates.values();
|
||||
}
|
||||
|
||||
public PlayerTemplate getTemplate(int classId)
|
||||
{
|
||||
return _templates.get(classId);
|
||||
}
|
||||
|
||||
public PlayerTemplate getTemplate(ClassId classId)
|
||||
{
|
||||
return _templates.get(classId.getId());
|
||||
}
|
||||
|
||||
public String getClassNameById(int classId)
|
||||
{
|
||||
return _templates.get(classId).getClassName();
|
||||
}
|
||||
|
||||
public int getClassIdByName(String className)
|
||||
{
|
||||
for (PlayerTemplate template : _templates.values())
|
||||
{
|
||||
if (template.getClassName().equalsIgnoreCase(className))
|
||||
{
|
||||
return template.getClassId().getId();
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static PlayerTemplateData getInstance()
|
||||
{
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final PlayerTemplateData INSTANCE = new PlayerTemplateData();
|
||||
}
|
||||
}
|
@@ -99,7 +99,7 @@ public class DocumentEngine
|
||||
count++;
|
||||
}
|
||||
}
|
||||
LOGGER.info("SkillsEngine: Loaded " + count + " Skill templates from XML files.");
|
||||
LOGGER.info("SkillsEngine: Loaded " + count + " skill templates.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -26,7 +26,7 @@ import java.util.Properties;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.datatables.sql.CharTemplateTable;
|
||||
import org.l2jmobius.gameserver.datatables.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
|
||||
/**
|
||||
@@ -46,13 +46,12 @@ public class ClassDamageManager
|
||||
|
||||
public static void loadConfig()
|
||||
{
|
||||
final String SCRIPT = Config.CLASS_DAMAGE_CONFIG_FILE;
|
||||
InputStream is = null;
|
||||
File file = null;
|
||||
try
|
||||
{
|
||||
final Properties scriptSetting = new Properties();
|
||||
file = new File(SCRIPT);
|
||||
file = new File(Config.CLASS_DAMAGE_CONFIG_FILE);
|
||||
is = new FileInputStream(file);
|
||||
scriptSetting.load(is);
|
||||
|
||||
@@ -69,8 +68,7 @@ public class ClassDamageManager
|
||||
}
|
||||
|
||||
final String type = classAndType[1];
|
||||
|
||||
final Integer classId = CharTemplateTable.getClassIdByName(className) - 1;
|
||||
final Integer classId = PlayerTemplateData.getInstance().getClassIdByName(className) - 1;
|
||||
|
||||
ID_TO_NAME.put(classId, className);
|
||||
NAME_TO_ID.put(className, classId);
|
||||
@@ -93,7 +91,7 @@ public class ClassDamageManager
|
||||
}
|
||||
}
|
||||
|
||||
LOGGER.info("Loaded " + ID_TO_NAME.size() + " classes Damages configurations");
|
||||
LOGGER.info("Loaded " + ID_TO_NAME.size() + " class damage configurations.");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@@ -19,7 +19,7 @@ package org.l2jmobius.gameserver.model.actor.instance;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.CharTemplateTable;
|
||||
import org.l2jmobius.gameserver.datatables.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
@@ -130,7 +130,7 @@ public class ClassMasterInstance extends FolkInstance
|
||||
{
|
||||
if (child.childOf(classId) && (child.level() == jobLevel))
|
||||
{
|
||||
sb.append("<br><a action=\"bypass -h npc_" + getObjectId() + "_change_class " + child.getId() + "\"> " + CharTemplateTable.getClassNameById(child.getId()) + "</a>");
|
||||
sb.append("<br><a action=\"bypass -h npc_" + getObjectId() + "_change_class " + child.getId() + "\"> " + PlayerTemplateData.getInstance().getClassNameById(child.getId()) + "</a>");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ public class ClassMasterInstance extends FolkInstance
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append("<html><title>Class Manager</title><body><center><img src=L2Font-e.replay_logo-e width=258 height=60><br><br><br><img src=L2UI_CH3.herotower_deco width=256 height=32><br><br>");
|
||||
sb.append("You have now become a <font color=\"LEVEL\">" + CharTemplateTable.getClassNameById(player.getClassId().getId()) + "</font>.");
|
||||
sb.append("You have now become a <font color=\"LEVEL\">" + PlayerTemplateData.getInstance().getClassNameById(player.getClassId().getId()) + "</font>.");
|
||||
sb.append("<br><img src=L2UI_CH3.herotower_deco width=256 height=32></center></body></html>");
|
||||
|
||||
html.setHtml(sb.toString());
|
||||
@@ -400,7 +400,7 @@ public class ClassMasterInstance extends FolkInstance
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append("<html><title>Class Manager</title><body><center><img src=L2Font-e.replay_logo-e width=258 height=60><br><br><br><img src=L2UI_CH3.herotower_deco width=256 height=32><br><br>");
|
||||
sb.append("You have now become a <font color=\"LEVEL\">" + CharTemplateTable.getClassNameById(player.getClassId().getId()) + "</font>.");
|
||||
sb.append("You have now become a <font color=\"LEVEL\">" + PlayerTemplateData.getInstance().getClassNameById(player.getClassId().getId()) + "</font>.");
|
||||
sb.append("<br><img src=L2UI_CH3.herotower_deco width=256 height=32></center></body></html>");
|
||||
|
||||
html.setHtml(sb.toString());
|
||||
@@ -509,24 +509,24 @@ public class ClassMasterInstance extends FolkInstance
|
||||
sb.append("<table width=200>");
|
||||
sb.append("<tr><td><center>GM Class Master:</center></td></tr>");
|
||||
sb.append("<tr><td><br></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 1\">Advance to " + CharTemplateTable.getClassNameById(1) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 4\">Advance to " + CharTemplateTable.getClassNameById(4) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 7\">Advance to " + CharTemplateTable.getClassNameById(7) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 11\">Advance to " + CharTemplateTable.getClassNameById(11) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 15\">Advance to " + CharTemplateTable.getClassNameById(15) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 19\">Advance to " + CharTemplateTable.getClassNameById(19) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 22\">Advance to " + CharTemplateTable.getClassNameById(22) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 26\">Advance to " + CharTemplateTable.getClassNameById(26) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 29\">Advance to " + CharTemplateTable.getClassNameById(29) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 32\">Advance to " + CharTemplateTable.getClassNameById(32) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 35\">Advance to " + CharTemplateTable.getClassNameById(35) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 39\">Advance to " + CharTemplateTable.getClassNameById(39) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 42\">Advance to " + CharTemplateTable.getClassNameById(42) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 45\">Advance to " + CharTemplateTable.getClassNameById(45) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 47\">Advance to " + CharTemplateTable.getClassNameById(47) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 50\">Advance to " + CharTemplateTable.getClassNameById(50) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 54\">Advance to " + CharTemplateTable.getClassNameById(54) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 56\">Advance to " + CharTemplateTable.getClassNameById(56) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 1\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(1) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 4\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(4) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 7\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(7) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 11\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(11) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 15\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(15) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 19\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(19) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 22\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(22) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 26\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(26) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 29\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(29) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 32\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(32) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 35\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(35) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 39\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(39) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 42\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(42) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 45\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(45) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 47\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(47) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 50\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(50) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 54\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(54) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 56\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(56) + "</a></td></tr>");
|
||||
sb.append("</table>");
|
||||
sb.append("</body>");
|
||||
sb.append("</html>");
|
||||
@@ -547,37 +547,37 @@ public class ClassMasterInstance extends FolkInstance
|
||||
sb.append("<table width=200>");
|
||||
sb.append("<tr><td><center>GM Class Master:</center></td></tr>");
|
||||
sb.append("<tr><td><br></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 2\">Advance to " + CharTemplateTable.getClassNameById(2) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 3\">Advance to " + CharTemplateTable.getClassNameById(3) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 5\">Advance to " + CharTemplateTable.getClassNameById(5) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 6\">Advance to " + CharTemplateTable.getClassNameById(6) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 8\">Advance to " + CharTemplateTable.getClassNameById(8) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 9\">Advance to " + CharTemplateTable.getClassNameById(9) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 12\">Advance to " + CharTemplateTable.getClassNameById(12) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 13\">Advance to " + CharTemplateTable.getClassNameById(13) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 14\">Advance to " + CharTemplateTable.getClassNameById(14) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 16\">Advance to " + CharTemplateTable.getClassNameById(16) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 17\">Advance to " + CharTemplateTable.getClassNameById(17) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 20\">Advance to " + CharTemplateTable.getClassNameById(20) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 21\">Advance to " + CharTemplateTable.getClassNameById(21) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 23\">Advance to " + CharTemplateTable.getClassNameById(23) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 24\">Advance to " + CharTemplateTable.getClassNameById(24) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 27\">Advance to " + CharTemplateTable.getClassNameById(27) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 28\">Advance to " + CharTemplateTable.getClassNameById(28) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 30\">Advance to " + CharTemplateTable.getClassNameById(30) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 33\">Advance to " + CharTemplateTable.getClassNameById(33) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 34\">Advance to " + CharTemplateTable.getClassNameById(34) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 36\">Advance to " + CharTemplateTable.getClassNameById(36) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 37\">Advance to " + CharTemplateTable.getClassNameById(37) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 40\">Advance to " + CharTemplateTable.getClassNameById(40) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 41\">Advance to " + CharTemplateTable.getClassNameById(41) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 43\">Advance to " + CharTemplateTable.getClassNameById(43) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 46\">Advance to " + CharTemplateTable.getClassNameById(46) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 48\">Advance to " + CharTemplateTable.getClassNameById(48) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 51\">Advance to " + CharTemplateTable.getClassNameById(51) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 52\">Advance to " + CharTemplateTable.getClassNameById(52) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 55\">Advance to " + CharTemplateTable.getClassNameById(55) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 57\">Advance to " + CharTemplateTable.getClassNameById(57) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 2\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(2) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 3\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(3) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 5\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(5) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 6\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(6) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 8\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(8) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 9\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(9) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 12\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(12) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 13\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(13) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 14\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(14) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 16\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(16) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 17\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(17) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 20\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(20) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 21\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(21) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 23\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(23) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 24\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(24) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 27\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(27) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 28\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(28) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 30\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(30) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 33\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(33) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 34\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(34) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 36\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(36) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 37\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(37) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 40\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(40) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 41\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(41) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 43\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(43) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 46\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(46) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 48\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(48) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 51\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(51) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 52\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(52) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 55\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(55) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 57\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(57) + "</a></td></tr>");
|
||||
sb.append("</table>");
|
||||
sb.append("</body>");
|
||||
sb.append("</html>");
|
||||
@@ -598,37 +598,37 @@ public class ClassMasterInstance extends FolkInstance
|
||||
sb.append("<table width=200>");
|
||||
sb.append("<tr><td><center>GM Class Master:</center></td></tr>");
|
||||
sb.append("<tr><td><br></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 88\">Advance to " + CharTemplateTable.getClassNameById(88) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 89\">Advance to " + CharTemplateTable.getClassNameById(89) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 90\">Advance to " + CharTemplateTable.getClassNameById(90) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 91\">Advance to " + CharTemplateTable.getClassNameById(91) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 92\">Advance to " + CharTemplateTable.getClassNameById(92) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 93\">Advance to " + CharTemplateTable.getClassNameById(93) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 94\">Advance to " + CharTemplateTable.getClassNameById(94) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 95\">Advance to " + CharTemplateTable.getClassNameById(95) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 96\">Advance to " + CharTemplateTable.getClassNameById(96) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 97\">Advance to " + CharTemplateTable.getClassNameById(97) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 98\">Advance to " + CharTemplateTable.getClassNameById(98) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 99\">Advance to " + CharTemplateTable.getClassNameById(99) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 100\">Advance to " + CharTemplateTable.getClassNameById(100) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 101\">Advance to " + CharTemplateTable.getClassNameById(101) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 102\">Advance to " + CharTemplateTable.getClassNameById(102) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 103\">Advance to " + CharTemplateTable.getClassNameById(103) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 104\">Advance to " + CharTemplateTable.getClassNameById(104) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 105\">Advance to " + CharTemplateTable.getClassNameById(105) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 106\">Advance to " + CharTemplateTable.getClassNameById(106) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 107\">Advance to " + CharTemplateTable.getClassNameById(107) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 108\">Advance to " + CharTemplateTable.getClassNameById(108) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 109\">Advance to " + CharTemplateTable.getClassNameById(109) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 110\">Advance to " + CharTemplateTable.getClassNameById(110) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 111\">Advance to " + CharTemplateTable.getClassNameById(111) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 112\">Advance to " + CharTemplateTable.getClassNameById(112) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 113\">Advance to " + CharTemplateTable.getClassNameById(113) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 114\">Advance to " + CharTemplateTable.getClassNameById(114) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 115\">Advance to " + CharTemplateTable.getClassNameById(115) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 116\">Advance to " + CharTemplateTable.getClassNameById(116) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 117\">Advance to " + CharTemplateTable.getClassNameById(117) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 118\">Advance to " + CharTemplateTable.getClassNameById(118) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 88\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(88) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 89\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(89) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 90\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(90) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 91\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(91) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 92\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(92) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 93\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(93) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 94\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(94) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 95\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(95) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 96\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(96) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 97\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(97) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 98\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(98) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 99\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(99) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 100\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(100) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 101\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(101) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 102\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(102) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 103\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(103) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 104\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(104) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 105\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(105) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 106\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(106) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 107\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(107) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 108\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(108) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 109\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(109) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 110\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(110) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 111\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(111) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 112\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(112) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 113\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(113) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 114\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(114) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 115\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(115) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 116\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(116) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 117\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(117) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 118\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(118) + "</a></td></tr>");
|
||||
sb.append("</table>");
|
||||
sb.append("</body>");
|
||||
sb.append("</html>");
|
||||
@@ -649,15 +649,15 @@ public class ClassMasterInstance extends FolkInstance
|
||||
sb.append("<table width=200>");
|
||||
sb.append("<tr><td><center>GM Class Master:</center></td></tr>");
|
||||
sb.append("<tr><td><br></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 0\">Advance to " + CharTemplateTable.getClassNameById(0) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 10\">Advance to " + CharTemplateTable.getClassNameById(10) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 18\">Advance to " + CharTemplateTable.getClassNameById(18) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 25\">Advance to " + CharTemplateTable.getClassNameById(25) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 31\">Advance to " + CharTemplateTable.getClassNameById(31) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 38\">Advance to " + CharTemplateTable.getClassNameById(38) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 44\">Advance to " + CharTemplateTable.getClassNameById(44) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 49\">Advance to " + CharTemplateTable.getClassNameById(49) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 53\">Advance to " + CharTemplateTable.getClassNameById(53) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 0\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(0) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 10\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(10) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 18\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(18) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 25\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(25) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 31\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(31) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 38\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(38) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 44\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(44) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 49\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(49) + "</a></td></tr>");
|
||||
sb.append("<tr><td><a action=\"bypass -h npc_" + getObjectId() + "_change_class 53\">Advance to " + PlayerTemplateData.getInstance().getClassNameById(53) + "</a></td></tr>");
|
||||
sb.append("</table>");
|
||||
sb.append("</body>");
|
||||
sb.append("</html>");
|
||||
|
@@ -56,7 +56,6 @@ import org.l2jmobius.gameserver.datatables.HeroSkillTable;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.datatables.NobleSkillTable;
|
||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.CharTemplateTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.ClanTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.SkillTreeTable;
|
||||
@@ -65,6 +64,7 @@ import org.l2jmobius.gameserver.datatables.xml.ExperienceData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.FishData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.HennaData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.MapRegionData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.ZoneData;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
@@ -1016,7 +1016,7 @@ public class PlayerInstance extends Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a PlayerInstance from the characters table of the database and add it in _allObjects of the L2world (call restore method).<BR>
|
||||
* Retrieve a PlayerInstance from the characters table of the database and add it in _allObjects of the World (call restore method).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
@@ -1067,7 +1067,7 @@ public class PlayerInstance extends Playable
|
||||
getKnownList(); // init knownlist
|
||||
getStat(); // init stats
|
||||
getStatus(); // init status
|
||||
super.initCharStatusUpdateValues();
|
||||
initCharStatusUpdateValues();
|
||||
initPcStatusUpdateValues();
|
||||
|
||||
_accountName = accountName;
|
||||
@@ -1153,7 +1153,7 @@ public class PlayerInstance extends Playable
|
||||
*/
|
||||
public PlayerTemplate getBaseTemplate()
|
||||
{
|
||||
return CharTemplateTable.getInstance().getTemplate(_baseClass);
|
||||
return PlayerTemplateData.getInstance().getTemplate(_baseClass);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1172,7 +1172,7 @@ public class PlayerInstance extends Playable
|
||||
*/
|
||||
public void setTemplate(ClassId newclass)
|
||||
{
|
||||
super.setTemplate(CharTemplateTable.getInstance().getTemplate(newclass));
|
||||
super.setTemplate(PlayerTemplateData.getInstance().getTemplate(newclass));
|
||||
}
|
||||
|
||||
public void setTimerToAttack(long time)
|
||||
@@ -3116,7 +3116,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
return getTemplate().getRace();
|
||||
}
|
||||
return CharTemplateTable.getInstance().getTemplate(_baseClass).getRace();
|
||||
return PlayerTemplateData.getInstance().getTemplate(_baseClass).getRace();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -8505,7 +8505,7 @@ public class PlayerInstance extends Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve a PlayerInstance from the characters table of the database and add it in _allObjects of the L2world.<BR>
|
||||
* Retrieve a PlayerInstance from the characters table of the database and add it in _allObjects of the World.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
@@ -8534,7 +8534,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
final int activeClassId = rset.getInt("classid");
|
||||
final boolean female = rset.getInt("sex") != 0;
|
||||
final PlayerTemplate template = CharTemplateTable.getInstance().getTemplate(activeClassId);
|
||||
final PlayerTemplate template = PlayerTemplateData.getInstance().getTemplate(activeClassId);
|
||||
final PlayerAppearance app = new PlayerAppearance(rset.getByte("face"), rset.getByte("hairColor"), rset.getByte("hairStyle"), female);
|
||||
|
||||
player = new PlayerInstance(objectId, template, rset.getString("account_name"), app);
|
||||
@@ -12784,8 +12784,7 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
_activeClass = classId;
|
||||
|
||||
final PlayerTemplate t = CharTemplateTable.getInstance().getTemplate(classId);
|
||||
|
||||
final PlayerTemplate t = PlayerTemplateData.getInstance().getTemplate(classId);
|
||||
if (t == null)
|
||||
{
|
||||
LOGGER.warning("Missing template for classId: " + classId);
|
||||
|
@@ -20,9 +20,9 @@ import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
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.datatables.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
@@ -287,11 +287,11 @@ public class VillageMasterInstance extends FolkInstance
|
||||
content.append("Which class would you like to switch to?<br>");
|
||||
if (baseClassId == player.getActiveClass())
|
||||
{
|
||||
content.append(CharTemplateTable.getClassNameById(baseClassId) + " <font color=\"LEVEL\">(Base Class)</font><br><br>");
|
||||
content.append(PlayerTemplateData.getInstance().getClassNameById(baseClassId) + " <font color=\"LEVEL\">(Base Class)</font><br><br>");
|
||||
}
|
||||
else
|
||||
{
|
||||
content.append("<a action=\"bypass -h npc_" + getObjectId() + "_Subclass 5 0\">" + CharTemplateTable.getClassNameById(baseClassId) + "</a> <font color=\"LEVEL\">(Base Class)</font><br><br>");
|
||||
content.append("<a action=\"bypass -h npc_" + getObjectId() + "_Subclass 5 0\">" + PlayerTemplateData.getInstance().getClassNameById(baseClassId) + "</a> <font color=\"LEVEL\">(Base Class)</font><br><br>");
|
||||
}
|
||||
for (Iterator<SubClass> subList = iterSubClasses(player); subList.hasNext();)
|
||||
{
|
||||
@@ -299,11 +299,11 @@ public class VillageMasterInstance extends FolkInstance
|
||||
final int subClassId = subClass.getClassId();
|
||||
if (subClassId == player.getActiveClass())
|
||||
{
|
||||
content.append(CharTemplateTable.getClassNameById(subClassId) + "<br>");
|
||||
content.append(PlayerTemplateData.getInstance().getClassNameById(subClassId) + "<br>");
|
||||
}
|
||||
else
|
||||
{
|
||||
content.append("<a action=\"bypass -h npc_" + getObjectId() + "_Subclass 5 " + subClass.getClassIndex() + "\">" + CharTemplateTable.getClassNameById(subClassId) + "</a><br>");
|
||||
content.append("<a action=\"bypass -h npc_" + getObjectId() + "_Subclass 5 " + subClass.getClassIndex() + "\">" + PlayerTemplateData.getInstance().getClassNameById(subClassId) + "</a><br>");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -317,7 +317,7 @@ public class VillageMasterInstance extends FolkInstance
|
||||
{
|
||||
final SubClass subClass = subList.next();
|
||||
content.append("Sub-class " + classIndex + "<br1>");
|
||||
content.append("<a action=\"bypass -h npc_" + getObjectId() + "_Subclass 6 " + subClass.getClassIndex() + "\">" + CharTemplateTable.getClassNameById(subClass.getClassId()) + "</a><br>");
|
||||
content.append("<a action=\"bypass -h npc_" + getObjectId() + "_Subclass 6 " + subClass.getClassIndex() + "\">" + PlayerTemplateData.getInstance().getClassNameById(subClass.getClassId()) + "</a><br>");
|
||||
classIndex++;
|
||||
}
|
||||
content.append("<br>If you change a sub class, you'll start at level 40 after the 2nd class transfer.");
|
||||
@@ -394,7 +394,7 @@ public class VillageMasterInstance extends FolkInstance
|
||||
}
|
||||
if (allowAddition)
|
||||
{
|
||||
final String className = CharTemplateTable.getClassNameById(paramOne);
|
||||
final String className = PlayerTemplateData.getInstance().getClassNameById(paramOne);
|
||||
if (!player.addSubClass(paramOne, player.getTotalSubClasses() + 1))
|
||||
{
|
||||
player.sendMessage("The sub class could not be added.");
|
||||
@@ -448,7 +448,7 @@ public class VillageMasterInstance extends FolkInstance
|
||||
return;
|
||||
}
|
||||
player.setActiveClass(paramOne);
|
||||
content.append("Change Subclass:<br>Your active sub class is now a <font color=\"LEVEL\">" + CharTemplateTable.getClassNameById(player.getActiveClass()) + "</font>.");
|
||||
content.append("Change Subclass:<br>Your active sub class is now a <font color=\"LEVEL\">" + PlayerTemplateData.getInstance().getClassNameById(player.getActiveClass()) + "</font>.");
|
||||
player.sendPacket(SystemMessageId.SUBCLASS_TRANSFER_COMPLETED); // Transfer completed.
|
||||
// check player skills
|
||||
// Player skills are already checked during setActiveClass
|
||||
@@ -506,7 +506,7 @@ public class VillageMasterInstance extends FolkInstance
|
||||
if (player.modifySubClass(paramOne, paramTwo))
|
||||
{
|
||||
player.setActiveClass(paramOne);
|
||||
content.append("Change Subclass:<br>Your sub class has been changed to <font color=\"LEVEL\">" + CharTemplateTable.getClassNameById(paramTwo) + "</font>.");
|
||||
content.append("Change Subclass:<br>Your sub class has been changed to <font color=\"LEVEL\">" + PlayerTemplateData.getInstance().getClassNameById(paramTwo) + "</font>.");
|
||||
player.sendPacket(SystemMessageId.ADD_NEW_SUBCLASS); // Subclass added.
|
||||
// check player skills
|
||||
// Player skills are already checked during setActiveClass
|
||||
|
@@ -161,8 +161,8 @@ public class CreatureTemplate
|
||||
_baseHpConsumeRate = set.getInt("baseHpConsumeRate", 0);
|
||||
|
||||
// Geometry
|
||||
_collisionRadius = set.getInt("collision_radius");
|
||||
_collisionHeight = set.getInt("collision_height");
|
||||
_collisionRadius = (int) set.getFloat("collision_radius"); // TODO: Support float.
|
||||
_collisionHeight = (int) set.getFloat("collision_height"); // TODO: Support float.
|
||||
}
|
||||
|
||||
public int getBaseSTR()
|
||||
|
@@ -19,80 +19,58 @@ package org.l2jmobius.gameserver.model.actor.templates;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.Race;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
|
||||
/**
|
||||
* @author mkizub
|
||||
*/
|
||||
public class PlayerTemplate extends CreatureTemplate
|
||||
{
|
||||
/** The Class object of the PlayerInstance */
|
||||
private final Race _race;
|
||||
private final ClassId _classId;
|
||||
|
||||
private final int _currentCollisionRadius;
|
||||
private final int _currentCollisionHeight;
|
||||
private final String _className;
|
||||
|
||||
private final int _classBaseLevel;
|
||||
private final float _levelHpAdd;
|
||||
private final float _levelHpMod;
|
||||
private final float _levelCpAdd;
|
||||
private final float _levelCpMod;
|
||||
private final float _levelMpAdd;
|
||||
private final float _levelMpMod;
|
||||
private final int _spawnX;
|
||||
private final int _spawnY;
|
||||
private final int _spawnZ;
|
||||
|
||||
private final int _classBaseLevel;
|
||||
private final float _lvlHpAdd;
|
||||
private final float _lvlHpMod;
|
||||
private final float _lvlCpAdd;
|
||||
private final float _lvlCpMod;
|
||||
private final float _lvlMpAdd;
|
||||
private final float _lvlMpMod;
|
||||
|
||||
private final List<Item> _items = new ArrayList<>();
|
||||
private final List<ItemHolder> _items = new ArrayList<>();
|
||||
|
||||
public PlayerTemplate(StatSet set)
|
||||
{
|
||||
super(set);
|
||||
_classId = ClassId.getClassId(set.getInt("classId"));
|
||||
_race = Race.values()[set.getInt("raceId")];
|
||||
_className = set.getString("className");
|
||||
_currentCollisionRadius = set.getInt("collision_radius");
|
||||
_currentCollisionHeight = set.getInt("collision_height");
|
||||
|
||||
_classId = ClassId.getClassId(set.getInt("id"));
|
||||
_race = Enum.valueOf(Race.class, set.getString("race"));
|
||||
_className = set.getString("name");
|
||||
_spawnX = set.getInt("spawnX");
|
||||
_spawnY = set.getInt("spawnY");
|
||||
_spawnZ = set.getInt("spawnZ");
|
||||
|
||||
_classBaseLevel = set.getInt("classBaseLevel");
|
||||
_lvlHpAdd = set.getFloat("lvlHpAdd");
|
||||
_lvlHpMod = set.getFloat("lvlHpMod");
|
||||
_lvlCpAdd = set.getFloat("lvlCpAdd");
|
||||
_lvlCpMod = set.getFloat("lvlCpMod");
|
||||
_lvlMpAdd = set.getFloat("lvlMpAdd");
|
||||
_lvlMpMod = set.getFloat("lvlMpMod");
|
||||
}
|
||||
|
||||
/**
|
||||
* add starter equipment
|
||||
* @param itemId
|
||||
*/
|
||||
public void addItem(int itemId)
|
||||
{
|
||||
final Item item = ItemTable.getInstance().getTemplate(itemId);
|
||||
if (item != null)
|
||||
_classBaseLevel = set.getInt("baseLevel");
|
||||
_levelHpAdd = set.getFloat("levelHpAdd");
|
||||
_levelHpMod = set.getFloat("levelHpMod");
|
||||
_levelCpAdd = set.getFloat("levelCpAdd");
|
||||
_levelCpMod = set.getFloat("levelCpMod");
|
||||
_levelMpAdd = set.getFloat("levelMpAdd");
|
||||
_levelMpMod = set.getFloat("levelMpMod");
|
||||
String[] item;
|
||||
for (String split : set.getString("items").split(";"))
|
||||
{
|
||||
_items.add(item);
|
||||
item = split.split(",");
|
||||
_items.add(new ItemHolder(Integer.parseInt(item[0]), Integer.parseInt(item[1])));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return itemIds of all the starter equipment
|
||||
*/
|
||||
public Item[] getItems()
|
||||
public List<ItemHolder> getItems()
|
||||
{
|
||||
return _items.toArray(new Item[_items.size()]);
|
||||
return _items;
|
||||
}
|
||||
|
||||
public Race getRace()
|
||||
@@ -105,18 +83,6 @@ public class PlayerTemplate extends CreatureTemplate
|
||||
return _classId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCollisionRadius()
|
||||
{
|
||||
return _currentCollisionRadius;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCollisionHeight()
|
||||
{
|
||||
return _currentCollisionHeight;
|
||||
}
|
||||
|
||||
public String getClassName()
|
||||
{
|
||||
return _className;
|
||||
@@ -142,34 +108,34 @@ public class PlayerTemplate extends CreatureTemplate
|
||||
return _classBaseLevel;
|
||||
}
|
||||
|
||||
public float getLvlHpAdd()
|
||||
public float getLevelHpAdd()
|
||||
{
|
||||
return _lvlHpAdd;
|
||||
return _levelHpAdd;
|
||||
}
|
||||
|
||||
public float getLvlHpMod()
|
||||
public float getLevelHpMod()
|
||||
{
|
||||
return _lvlHpMod;
|
||||
return _levelHpMod;
|
||||
}
|
||||
|
||||
public float getLvlCpAdd()
|
||||
public float getLevelCpAdd()
|
||||
{
|
||||
return _lvlCpAdd;
|
||||
return _levelCpAdd;
|
||||
}
|
||||
|
||||
public float getLvlCpMod()
|
||||
public float getLevelCpMod()
|
||||
{
|
||||
return _lvlCpMod;
|
||||
return _levelCpMod;
|
||||
}
|
||||
|
||||
public float getLvlMpAdd()
|
||||
public float getLevelMpAdd()
|
||||
{
|
||||
return _lvlMpAdd;
|
||||
return _levelMpAdd;
|
||||
}
|
||||
|
||||
public float getLvlMpMod()
|
||||
public float getLevelMpMod()
|
||||
{
|
||||
return _lvlMpMod;
|
||||
return _levelMpMod;
|
||||
}
|
||||
|
||||
public int getBaseFallSafeHeight(boolean female)
|
||||
|
@@ -714,9 +714,9 @@ public class Formulas
|
||||
{
|
||||
final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate();
|
||||
final int lvl = env.player.getLevel() - t.getClassBaseLevel();
|
||||
final double hpmod = t.getLvlHpMod() * lvl;
|
||||
final double hpmax = (t.getLvlHpAdd() + hpmod) * lvl;
|
||||
final double hpmin = (t.getLvlHpAdd() * lvl) + hpmod;
|
||||
final double hpmod = t.getLevelHpMod() * lvl;
|
||||
final double hpmax = (t.getLevelHpAdd() + hpmod) * lvl;
|
||||
final double hpmin = (t.getLevelHpAdd() * lvl) + hpmod;
|
||||
env.value += (hpmax + hpmin) / 2;
|
||||
}
|
||||
}
|
||||
@@ -761,9 +761,9 @@ public class Formulas
|
||||
{
|
||||
final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate();
|
||||
final int lvl = env.player.getLevel() - t.getClassBaseLevel();
|
||||
final double cpmod = t.getLvlCpMod() * lvl;
|
||||
final double cpmax = (t.getLvlCpAdd() + cpmod) * lvl;
|
||||
final double cpmin = (t.getLvlCpAdd() * lvl) + cpmod;
|
||||
final double cpmod = t.getLevelCpMod() * lvl;
|
||||
final double cpmax = (t.getLevelCpAdd() + cpmod) * lvl;
|
||||
final double cpmin = (t.getLevelCpAdd() * lvl) + cpmod;
|
||||
env.value += (cpmax + cpmin) / 2;
|
||||
}
|
||||
}
|
||||
@@ -808,9 +808,9 @@ public class Formulas
|
||||
{
|
||||
final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate();
|
||||
final int lvl = env.player.getLevel() - t.getClassBaseLevel();
|
||||
final double mpmod = t.getLvlMpMod() * lvl;
|
||||
final double mpmax = (t.getLvlMpAdd() + mpmod) * lvl;
|
||||
final double mpmin = (t.getLvlMpAdd() * lvl) + mpmod;
|
||||
final double mpmod = t.getLevelMpMod() * lvl;
|
||||
final double mpmax = (t.getLevelMpAdd() + mpmod) * lvl;
|
||||
final double mpmin = (t.getLevelMpAdd() * lvl) + mpmod;
|
||||
env.value += (mpmax + mpmin) / 2;
|
||||
}
|
||||
}
|
||||
|
@@ -26,9 +26,9 @@ import org.l2jmobius.gameserver.GameServer;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.CharNameTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.CharTemplateTable;
|
||||
import org.l2jmobius.gameserver.datatables.sql.SkillTreeTable;
|
||||
import org.l2jmobius.gameserver.datatables.xml.ExperienceData;
|
||||
import org.l2jmobius.gameserver.datatables.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.instancemanager.QuestManager;
|
||||
import org.l2jmobius.gameserver.model.ShortCut;
|
||||
@@ -36,6 +36,7 @@ import org.l2jmobius.gameserver.model.SkillLearn;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.PlayerTemplate;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
@@ -115,7 +116,7 @@ public class CharacterCreate extends GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(_classId);
|
||||
template = PlayerTemplateData.getInstance().getTemplate(_classId);
|
||||
if ((template == null) || (template.getClassBaseLevel() > 1))
|
||||
{
|
||||
sendPacket(new CharCreateFail(CharCreateFail.REASON_CREATION_FAILED));
|
||||
@@ -249,9 +250,9 @@ public class CharacterCreate extends GameClientPacket
|
||||
newChar.registerShortCut(new ShortCut(3, 0, 3, 5, -1)); // Take
|
||||
newChar.registerShortCut(new ShortCut(10, 0, 3, 0, -1)); // Sit
|
||||
|
||||
for (Item item : template.getItems())
|
||||
for (ItemHolder item : template.getItems())
|
||||
{
|
||||
final ItemInstance itemInstance = newChar.getInventory().addItem("Init", item.getItemId(), 1, newChar, null);
|
||||
final ItemInstance itemInstance = newChar.getInventory().addItem("Init", item.getId(), (int) item.getCount(), newChar, null);
|
||||
if (itemInstance.getItemId() == 5588)
|
||||
{
|
||||
newChar.registerShortCut(new ShortCut(11, 0, 1, itemInstance.getObjectId(), -1)); // Tutorial Book shortcut
|
||||
|
@@ -68,7 +68,6 @@ public class CharacterSelected extends GameClientPacket
|
||||
{
|
||||
// Load up character from disk
|
||||
final PlayerInstance cha = getClient().loadCharFromDisk(_charSlot);
|
||||
|
||||
if (cha == null)
|
||||
{
|
||||
LOGGER.warning(getType() + ": Character could not be loaded (slot:" + _charSlot + ")");
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.clientpackets;
|
||||
|
||||
import org.l2jmobius.gameserver.datatables.sql.CharTemplateTable;
|
||||
import org.l2jmobius.gameserver.datatables.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.PlayerTemplate;
|
||||
import org.l2jmobius.gameserver.model.base.ClassId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.CharTemplates;
|
||||
@@ -33,34 +33,34 @@ public class NewCharacter extends GameClientPacket
|
||||
{
|
||||
final CharTemplates ct = new CharTemplates();
|
||||
|
||||
PlayerTemplate template = CharTemplateTable.getInstance().getTemplate(0);
|
||||
PlayerTemplate template = PlayerTemplateData.getInstance().getTemplate(0);
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.FIGHTER); // Human Fighter
|
||||
template = PlayerTemplateData.getInstance().getTemplate(ClassId.FIGHTER); // Human Fighter
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.MAGE); // Human Mage
|
||||
template = PlayerTemplateData.getInstance().getTemplate(ClassId.MAGE); // Human Mage
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.ELVEN_FIGHTER); // Elf Fighter
|
||||
template = PlayerTemplateData.getInstance().getTemplate(ClassId.ELVEN_FIGHTER); // Elf Fighter
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.ELVEN_MAGE); // Elf Mage
|
||||
template = PlayerTemplateData.getInstance().getTemplate(ClassId.ELVEN_MAGE); // Elf Mage
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.DARK_FIGHTER); // DE Fighter
|
||||
template = PlayerTemplateData.getInstance().getTemplate(ClassId.DARK_FIGHTER); // DE Fighter
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.DARK_MAGE); // DE Mage
|
||||
template = PlayerTemplateData.getInstance().getTemplate(ClassId.DARK_MAGE); // DE Mage
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.ORC_FIGHTER); // Orc Fighter
|
||||
template = PlayerTemplateData.getInstance().getTemplate(ClassId.ORC_FIGHTER); // Orc Fighter
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.ORC_MAGE); // Orc Mage
|
||||
template = PlayerTemplateData.getInstance().getTemplate(ClassId.ORC_MAGE); // Orc Mage
|
||||
ct.addChar(template);
|
||||
|
||||
template = CharTemplateTable.getInstance().getTemplate(ClassId.DWARVEN_FIGHTER); // Dwarf Fighter
|
||||
template = PlayerTemplateData.getInstance().getTemplate(ClassId.DWARVEN_FIGHTER); // Dwarf Fighter
|
||||
ct.addChar(template);
|
||||
|
||||
// Finally
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.gameserver.datatables.sql.CharTemplateTable;
|
||||
import org.l2jmobius.gameserver.datatables.xml.PlayerTemplateData;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
|
||||
public class CustomNpcInfo extends GameServerPacket
|
||||
@@ -76,8 +76,8 @@ public class CustomNpcInfo extends GameServerPacket
|
||||
writeD(_activeChar.getRunSpeed());
|
||||
writeF(_activeChar.getStat().getMovementSpeedMultiplier());
|
||||
writeF(_activeChar.getStat().getAttackSpeedMultiplier());
|
||||
writeF(CharTemplateTable.getInstance().getTemplate(_activeChar.getCustomNpcInstance().getClassId()).getCollisionRadius());
|
||||
writeF(CharTemplateTable.getInstance().getTemplate(_activeChar.getCustomNpcInstance().getClassId()).getCollisionHeight());
|
||||
writeF(PlayerTemplateData.getInstance().getTemplate(_activeChar.getCustomNpcInstance().getClassId()).getCollisionRadius());
|
||||
writeF(PlayerTemplateData.getInstance().getTemplate(_activeChar.getCustomNpcInstance().getClassId()).getCollisionHeight());
|
||||
writeD(_activeChar.getCustomNpcInstance().getHairStyle());
|
||||
writeD(_activeChar.getCustomNpcInstance().getHairColor());
|
||||
writeD(_activeChar.getCustomNpcInstance().getFace());
|
||||
|
Reference in New Issue
Block a user