Removed L2 prefix from template classes.
This commit is contained in:
parent
c73f815e44
commit
0876c15543
@ -48,7 +48,7 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.TeleportToLocation;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class AdminCommands extends Thread
|
||||
{
|
||||
@ -969,7 +969,7 @@ public class AdminCommands extends Thread
|
||||
PlayerInstance activeChar = client.getActiveChar();
|
||||
PlayerInstance targetPlayer = World.getInstance().getPlayer(CharName);
|
||||
int monsterTemplate = Integer.parseInt(monsterId);
|
||||
L2Npc template1 = NpcTable.getInstance().getTemplate(monsterTemplate);
|
||||
Npc template1 = NpcTable.getInstance().getTemplate(monsterTemplate);
|
||||
if (template1 == null)
|
||||
{
|
||||
return;
|
||||
|
@ -41,7 +41,7 @@ import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.PacketHandler;
|
||||
import org.l2jmobius.gameserver.templates.L2Item;
|
||||
import org.l2jmobius.gameserver.templates.Item;
|
||||
import org.l2jmobius.loginserver.LoginController;
|
||||
|
||||
public class ClientThread extends Thread
|
||||
@ -511,7 +511,7 @@ public class ClientThread extends Thread
|
||||
ItemInstance item = new ItemInstance();
|
||||
item.setObjectId(Integer.parseInt(st.nextToken()));
|
||||
int itemId = Integer.parseInt(st.nextToken());
|
||||
L2Item itemTemp = ItemTable.getInstance().getTemplate(itemId);
|
||||
Item itemTemp = ItemTable.getInstance().getTemplate(itemId);
|
||||
item.setItem(itemTemp);
|
||||
st.nextToken();
|
||||
item.setCount(Integer.parseInt(st.nextToken()));
|
||||
@ -588,7 +588,7 @@ public class ClientThread extends Thread
|
||||
ItemInstance item = new ItemInstance();
|
||||
item.setObjectId(Integer.parseInt(st.nextToken()));
|
||||
int itemId = Integer.parseInt(st.nextToken());
|
||||
L2Item itemTemp = ItemTable.getInstance().getTemplate(itemId);
|
||||
Item itemTemp = ItemTable.getInstance().getTemplate(itemId);
|
||||
item.setItem(itemTemp);
|
||||
st.nextToken();
|
||||
item.setCount(Integer.parseInt(st.nextToken()));
|
||||
|
@ -26,13 +26,13 @@ import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.gameserver.templates.L2CharTemplate;
|
||||
import org.l2jmobius.gameserver.templates.CharTemplate;
|
||||
|
||||
public class CharTemplateTable
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(CharTemplateTable.class.getName());
|
||||
private static CharTemplateTable _instance;
|
||||
private final Map<Integer, L2CharTemplate> _templates = new HashMap<>();
|
||||
private final Map<Integer, CharTemplate> _templates = new HashMap<>();
|
||||
|
||||
public static CharTemplateTable getInstance()
|
||||
{
|
||||
@ -58,7 +58,7 @@ public class CharTemplateTable
|
||||
{
|
||||
continue;
|
||||
}
|
||||
L2CharTemplate ct = new L2CharTemplate();
|
||||
CharTemplate ct = new CharTemplate();
|
||||
StringTokenizer st = new StringTokenizer(line, ";");
|
||||
ct.setClassId(Integer.parseInt(st.nextToken()));
|
||||
ct.setClassName(st.nextToken());
|
||||
@ -114,13 +114,13 @@ public class CharTemplateTable
|
||||
}
|
||||
}
|
||||
|
||||
public L2CharTemplate getTemplate(int classId)
|
||||
public CharTemplate getTemplate(int classId)
|
||||
{
|
||||
return _templates.get(classId);
|
||||
}
|
||||
|
||||
public L2CharTemplate[] getAllTemplates()
|
||||
public CharTemplate[] getAllTemplates()
|
||||
{
|
||||
return _templates.values().toArray(new L2CharTemplate[_templates.size()]);
|
||||
return _templates.values().toArray(new CharTemplate[_templates.size()]);
|
||||
}
|
||||
}
|
||||
|
@ -29,10 +29,10 @@ import java.util.logging.Logger;
|
||||
import org.l2jmobius.gameserver.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.templates.L2Armor;
|
||||
import org.l2jmobius.gameserver.templates.L2EtcItem;
|
||||
import org.l2jmobius.gameserver.templates.L2Item;
|
||||
import org.l2jmobius.gameserver.templates.L2Weapon;
|
||||
import org.l2jmobius.gameserver.templates.Armor;
|
||||
import org.l2jmobius.gameserver.templates.EtcItem;
|
||||
import org.l2jmobius.gameserver.templates.Item;
|
||||
import org.l2jmobius.gameserver.templates.Weapon;
|
||||
|
||||
public class ItemTable
|
||||
{
|
||||
@ -121,10 +121,10 @@ public class ItemTable
|
||||
_slots.put("lrhand", 16384);
|
||||
_slots.put("fullarmor", 32768);
|
||||
}
|
||||
private L2Item[] _allTemplates;
|
||||
private HashMap<Integer, L2Item> _etcItems;
|
||||
private HashMap<Integer, L2Item> _armors;
|
||||
private HashMap<Integer, L2Item> _weapons;
|
||||
private Item[] _allTemplates;
|
||||
private HashMap<Integer, Item> _etcItems;
|
||||
private HashMap<Integer, Item> _armors;
|
||||
private HashMap<Integer, Item> _weapons;
|
||||
private boolean _initialized = true;
|
||||
private static ItemTable _instance;
|
||||
|
||||
@ -172,13 +172,13 @@ public class ItemTable
|
||||
fixEtcItems(_etcItems);
|
||||
}
|
||||
|
||||
private void fixEtcItems(HashMap<Integer, L2Item> items)
|
||||
private void fixEtcItems(HashMap<Integer, Item> items)
|
||||
{
|
||||
Iterator<Integer> iter = items.keySet().iterator();
|
||||
while (iter.hasNext())
|
||||
{
|
||||
Integer key = iter.next();
|
||||
L2EtcItem item = (L2EtcItem) items.get(key);
|
||||
EtcItem item = (EtcItem) items.get(key);
|
||||
if ((item.getWeight() == 0) && (item.getEtcItemType() != 7) && !item.getName().startsWith("world_map") && !item.getName().startsWith("crystal_"))
|
||||
{
|
||||
item.setType2(3);
|
||||
@ -206,11 +206,11 @@ public class ItemTable
|
||||
}
|
||||
}
|
||||
|
||||
private HashMap<Integer, L2Item> parseFile(File dataFile, int type)
|
||||
private HashMap<Integer, Item> parseFile(File dataFile, int type)
|
||||
{
|
||||
HashMap<Integer, L2Item> result = new HashMap<>();
|
||||
HashMap<Integer, Item> result = new HashMap<>();
|
||||
LineNumberReader lnr = null;
|
||||
L2Item temp = null;
|
||||
Item temp = null;
|
||||
try
|
||||
{
|
||||
lnr = new LineNumberReader(new BufferedReader(new FileReader(dataFile)));
|
||||
@ -258,9 +258,9 @@ public class ItemTable
|
||||
return result;
|
||||
}
|
||||
|
||||
private L2EtcItem parseEtcLine(String line)
|
||||
private EtcItem parseEtcLine(String line)
|
||||
{
|
||||
L2EtcItem result = new L2EtcItem();
|
||||
EtcItem result = new EtcItem();
|
||||
try
|
||||
{
|
||||
StringTokenizer st = new StringTokenizer(line, ";");
|
||||
@ -340,9 +340,9 @@ public class ItemTable
|
||||
return result;
|
||||
}
|
||||
|
||||
private L2Armor parseArmorLine(String line)
|
||||
private Armor parseArmorLine(String line)
|
||||
{
|
||||
L2Armor result = new L2Armor();
|
||||
Armor result = new Armor();
|
||||
try
|
||||
{
|
||||
StringTokenizer st = new StringTokenizer(line, ";");
|
||||
@ -383,9 +383,9 @@ public class ItemTable
|
||||
return result;
|
||||
}
|
||||
|
||||
private L2Weapon parseWeaponLine(String line)
|
||||
private Weapon parseWeaponLine(String line)
|
||||
{
|
||||
L2Weapon result = new L2Weapon();
|
||||
Weapon result = new Weapon();
|
||||
try
|
||||
{
|
||||
StringTokenizer st = new StringTokenizer(line, ";");
|
||||
@ -444,7 +444,7 @@ public class ItemTable
|
||||
|
||||
private void buildFastLookupTable()
|
||||
{
|
||||
L2Item item;
|
||||
Item item;
|
||||
Integer id;
|
||||
int highestId = 0;
|
||||
Iterator<Integer> iter = _armors.keySet().iterator();
|
||||
@ -481,7 +481,7 @@ public class ItemTable
|
||||
highestId = item.getItemId();
|
||||
}
|
||||
_log.fine("Highest item id used: " + highestId);
|
||||
_allTemplates = new L2Item[highestId + 1];
|
||||
_allTemplates = new Item[highestId + 1];
|
||||
iter = _armors.keySet().iterator();
|
||||
while (iter.hasNext())
|
||||
{
|
||||
@ -502,7 +502,7 @@ public class ItemTable
|
||||
}
|
||||
}
|
||||
|
||||
public L2Item getTemplate(int id)
|
||||
public Item getTemplate(int id)
|
||||
{
|
||||
return _allTemplates[id];
|
||||
}
|
||||
@ -521,7 +521,7 @@ public class ItemTable
|
||||
{
|
||||
ItemInstance temp = new ItemInstance();
|
||||
temp.setObjectId(0);
|
||||
L2Item item = null;
|
||||
Item item = null;
|
||||
try
|
||||
{
|
||||
item = getTemplate(itemId);
|
||||
|
@ -28,13 +28,13 @@ import java.util.StringTokenizer;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.gameserver.model.DropData;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class NpcTable
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(NpcTable.class.getName());
|
||||
private static NpcTable _instance;
|
||||
private final Map<Integer, L2Npc> _npcs = new HashMap<>();
|
||||
private final Map<Integer, Npc> _npcs = new HashMap<>();
|
||||
private boolean _initialized = true;
|
||||
|
||||
public static NpcTable getInstance()
|
||||
@ -71,7 +71,7 @@ public class NpcTable
|
||||
{
|
||||
continue;
|
||||
}
|
||||
L2Npc npc = parseList(line);
|
||||
Npc npc = parseList(line);
|
||||
_npcs.put(npc.getNpcId(), npc);
|
||||
}
|
||||
lnr.close();
|
||||
@ -89,10 +89,10 @@ public class NpcTable
|
||||
}
|
||||
}
|
||||
|
||||
private L2Npc parseList(String line)
|
||||
private Npc parseList(String line)
|
||||
{
|
||||
StringTokenizer st = new StringTokenizer(line, ";");
|
||||
L2Npc npc = new L2Npc();
|
||||
Npc npc = new Npc();
|
||||
int id = Integer.parseInt(st.nextToken());
|
||||
if (id > 1000000)
|
||||
{
|
||||
@ -144,7 +144,7 @@ public class NpcTable
|
||||
{
|
||||
StringTokenizer st = new StringTokenizer(line, ";");
|
||||
int id = Integer.parseInt(st.nextToken());
|
||||
L2Npc npcDat = _npcs.get(id);
|
||||
Npc npcDat = _npcs.get(id);
|
||||
if (npcDat == null)
|
||||
{
|
||||
_log.warning("Missing npc template id:" + id);
|
||||
@ -214,7 +214,7 @@ public class NpcTable
|
||||
{
|
||||
StringTokenizer st = new StringTokenizer(line, ";");
|
||||
int mobId = Integer.parseInt(st.nextToken());
|
||||
L2Npc npc = _npcs.get(mobId);
|
||||
Npc npc = _npcs.get(mobId);
|
||||
if (npc == null)
|
||||
{
|
||||
_log.warning("Could not add drop data for npcid:" + mobId);
|
||||
@ -229,7 +229,7 @@ public class NpcTable
|
||||
npc.addDropData(dropDat);
|
||||
}
|
||||
|
||||
public L2Npc getTemplate(int id)
|
||||
public Npc getTemplate(int id)
|
||||
{
|
||||
return _npcs.get(id);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import java.io.LineNumberReader;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.gameserver.templates.L2Item;
|
||||
import org.l2jmobius.gameserver.templates.Item;
|
||||
|
||||
public class PriceListTable
|
||||
{
|
||||
@ -64,7 +64,7 @@ public class PriceListTable
|
||||
StringTokenizer st = new StringTokenizer(line, ";");
|
||||
int itemId = Integer.parseInt(st.nextToken().toString());
|
||||
int price = Integer.parseInt(st.nextToken().toString());
|
||||
L2Item temp = ItemTable.getInstance().getTemplate(itemId);
|
||||
Item temp = ItemTable.getInstance().getTemplate(itemId);
|
||||
temp.setItemId(itemId);
|
||||
temp.setReferencePrice(price);
|
||||
++i;
|
||||
|
@ -28,7 +28,7 @@ import java.util.StringTokenizer;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.gameserver.model.Spawn;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class SpawnTable
|
||||
{
|
||||
@ -96,7 +96,7 @@ public class SpawnTable
|
||||
String location = st.nextToken();
|
||||
int count = Integer.parseInt(st.nextToken());
|
||||
int npcId = Integer.parseInt(st.nextToken());
|
||||
L2Npc template1 = NpcTable.getInstance().getTemplate(npcId);
|
||||
Npc template1 = NpcTable.getInstance().getTemplate(npcId);
|
||||
if (template1 == null)
|
||||
{
|
||||
_log.warning("Monster data for id:" + npcId + " missing in npc.csv");
|
||||
|
@ -32,7 +32,7 @@ import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUser;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class PetSummon implements IItemHandler
|
||||
{
|
||||
@ -81,7 +81,7 @@ public class PetSummon implements IItemHandler
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
L2Npc petTemplate = NpcTable.getInstance().getTemplate(npcId);
|
||||
Npc petTemplate = NpcTable.getInstance().getTemplate(npcId);
|
||||
PetInstance newpet = new PetInstance(petTemplate);
|
||||
newpet.setTitle(activeChar.getName());
|
||||
newpet.setControlItemId(item.getObjectId());
|
||||
|
@ -23,7 +23,7 @@ import org.l2jmobius.gameserver.model.actor.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUser;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.templates.L2Weapon;
|
||||
import org.l2jmobius.gameserver.templates.Weapon;
|
||||
|
||||
public class SoulShots implements IItemHandler
|
||||
{
|
||||
@ -45,7 +45,7 @@ public class SoulShots implements IItemHandler
|
||||
return 0;
|
||||
}
|
||||
int SoulshotId = item.getItemId();
|
||||
L2Weapon weapon = activeChar.getActiveWeapon();
|
||||
Weapon weapon = activeChar.getActiveWeapon();
|
||||
if (weapon == null)
|
||||
{
|
||||
activeChar.sendPacket(new SystemMessage(339));
|
||||
|
@ -25,8 +25,8 @@ import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.gameserver.data.ItemTable;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.templates.L2Item;
|
||||
import org.l2jmobius.gameserver.templates.L2Weapon;
|
||||
import org.l2jmobius.gameserver.templates.Item;
|
||||
import org.l2jmobius.gameserver.templates.Weapon;
|
||||
|
||||
public class Inventory
|
||||
{
|
||||
@ -256,7 +256,7 @@ public class Inventory
|
||||
}
|
||||
setPaperdollItem(7, item);
|
||||
setPaperdollItem(14, item);
|
||||
if ((((L2Weapon) item.getItem()).getWeaponType() != 5) || ((arrow = findArrowForBow(item.getItem())) == null))
|
||||
if ((((Weapon) item.getItem()).getWeaponType() != 5) || ((arrow = findArrowForBow(item.getItem())) == null))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -578,7 +578,7 @@ public class Inventory
|
||||
return _totalWeight;
|
||||
}
|
||||
|
||||
public ItemInstance findArrowForBow(L2Item bow)
|
||||
public ItemInstance findArrowForBow(Item bow)
|
||||
{
|
||||
int arrowsId = 0;
|
||||
switch (bow.getCrystalType())
|
||||
|
@ -25,13 +25,13 @@ import java.util.logging.Logger;
|
||||
import org.l2jmobius.gameserver.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
import org.l2jmobius.util.Rnd;
|
||||
|
||||
public class Spawn
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(Spawn.class.getName());
|
||||
private final L2Npc _template;
|
||||
private final Npc _template;
|
||||
private int _id;
|
||||
private String _location;
|
||||
private int _maximumCount;
|
||||
@ -48,7 +48,7 @@ public class Spawn
|
||||
private static Timer _spawnTimer = new Timer(true);
|
||||
private final Constructor<?> _constructor;
|
||||
|
||||
public Spawn(L2Npc mobTemplate) throws SecurityException, ClassNotFoundException
|
||||
public Spawn(Npc mobTemplate) throws SecurityException, ClassNotFoundException
|
||||
{
|
||||
_template = mobTemplate;
|
||||
String implementationName = _template.getType();
|
||||
|
@ -38,8 +38,8 @@ import org.l2jmobius.gameserver.model.actor.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.DropItem;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.L2Weapon;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
import org.l2jmobius.gameserver.templates.Weapon;
|
||||
import org.l2jmobius.util.Rnd;
|
||||
|
||||
public class Attackable extends NpcInstance
|
||||
@ -53,11 +53,11 @@ public class Attackable extends NpcInstance
|
||||
private static Timer _aiTimer = new Timer(true);
|
||||
private static Timer _attackTimer = new Timer(true);
|
||||
private final Map<WorldObject, Integer> _aggroList = new HashMap<>();
|
||||
private L2Weapon _dummyWeapon;
|
||||
private Weapon _dummyWeapon;
|
||||
private boolean _sweepActive;
|
||||
private boolean _killedAlready = false;
|
||||
|
||||
public Attackable(L2Npc template)
|
||||
public Attackable(Npc template)
|
||||
{
|
||||
super(template);
|
||||
}
|
||||
@ -363,7 +363,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
@Override
|
||||
public L2Weapon getActiveWeapon()
|
||||
public Weapon getActiveWeapon()
|
||||
{
|
||||
return _dummyWeapon;
|
||||
}
|
||||
@ -372,7 +372,7 @@ public class Attackable extends NpcInstance
|
||||
public void setPhysicalAttack(int physicalAttack)
|
||||
{
|
||||
super.setPhysicalAttack(physicalAttack);
|
||||
_dummyWeapon = new L2Weapon();
|
||||
_dummyWeapon = new Weapon();
|
||||
_dummyWeapon.setPDamage(physicalAttack);
|
||||
int randDmg = getLevel();
|
||||
_dummyWeapon.setRandomDamage(randDmg);
|
||||
|
@ -45,7 +45,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StopMove;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.templates.L2Weapon;
|
||||
import org.l2jmobius.gameserver.templates.Weapon;
|
||||
import org.l2jmobius.util.Rnd;
|
||||
|
||||
public abstract class Creature extends WorldObject
|
||||
@ -1138,7 +1138,7 @@ public abstract class Creature extends WorldObject
|
||||
}
|
||||
if ((getCurrentState() == 5) && !_currentlyAttacking)
|
||||
{
|
||||
L2Weapon weaponItem = getActiveWeapon();
|
||||
Weapon weaponItem = getActiveWeapon();
|
||||
if (weaponItem == null)
|
||||
{
|
||||
setInCombat(false);
|
||||
@ -1232,7 +1232,7 @@ public abstract class Creature extends WorldObject
|
||||
{
|
||||
}
|
||||
|
||||
public abstract L2Weapon getActiveWeapon();
|
||||
public abstract Weapon getActiveWeapon();
|
||||
|
||||
protected void onHitTimer(Creature target, int damage, boolean crit, boolean miss, boolean soulshot)
|
||||
{
|
||||
@ -1382,7 +1382,7 @@ public abstract class Creature extends WorldObject
|
||||
return _effectiveSpeed;
|
||||
}
|
||||
|
||||
public int calculateAttackSpeed(L2Weapon weaponItem)
|
||||
public int calculateAttackSpeed(Weapon weaponItem)
|
||||
{
|
||||
int atkspd = weaponItem.getAttackSpeed();
|
||||
if (atkspd == 0)
|
||||
@ -1394,7 +1394,7 @@ public abstract class Creature extends WorldObject
|
||||
return atkspd;
|
||||
}
|
||||
|
||||
public int calculateHitSpeed(L2Weapon weaponItem, int hit)
|
||||
public int calculateHitSpeed(Weapon weaponItem, int hit)
|
||||
{
|
||||
int hitspd = weaponItem.getAttackSpeed();
|
||||
if (hitspd == 0)
|
||||
|
@ -25,13 +25,13 @@ import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SetToLocation;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class ClassMasterInstance extends NpcInstance
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(ClassMasterInstance.class.getName());
|
||||
|
||||
public ClassMasterInstance(L2Npc template)
|
||||
public ClassMasterInstance(Npc template)
|
||||
{
|
||||
super(template);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SetToLocation;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class GuardInstance extends Attackable
|
||||
{
|
||||
@ -35,7 +35,7 @@ public class GuardInstance extends Attackable
|
||||
private int _homeZ;
|
||||
private boolean _hasHome;
|
||||
|
||||
public GuardInstance(L2Npc template)
|
||||
public GuardInstance(Npc template)
|
||||
{
|
||||
super(template);
|
||||
setCurrentState((byte) 0);
|
||||
|
@ -18,14 +18,14 @@
|
||||
package org.l2jmobius.gameserver.model.actor.instance;
|
||||
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.templates.L2EtcItem;
|
||||
import org.l2jmobius.gameserver.templates.L2Item;
|
||||
import org.l2jmobius.gameserver.templates.EtcItem;
|
||||
import org.l2jmobius.gameserver.templates.Item;
|
||||
|
||||
public class ItemInstance extends WorldObject
|
||||
{
|
||||
private int _count = 1;
|
||||
private int _itemId;
|
||||
private L2Item _item;
|
||||
private Item _item;
|
||||
private int _equippedSlot = -1;
|
||||
private int _price;
|
||||
private int _enchantLevel;
|
||||
@ -47,7 +47,7 @@ public class ItemInstance extends WorldObject
|
||||
|
||||
public boolean isEquipable()
|
||||
{
|
||||
return (_item.getBodyPart() != 0) && !(_item instanceof L2EtcItem);
|
||||
return (_item.getBodyPart() != 0) && !(_item instanceof EtcItem);
|
||||
}
|
||||
|
||||
public boolean isEquipped()
|
||||
@ -65,12 +65,12 @@ public class ItemInstance extends WorldObject
|
||||
return _equippedSlot;
|
||||
}
|
||||
|
||||
public L2Item getItem()
|
||||
public Item getItem()
|
||||
{
|
||||
return _item;
|
||||
}
|
||||
|
||||
public void setItem(L2Item item)
|
||||
public void setItem(Item item)
|
||||
{
|
||||
_item = item;
|
||||
_itemId = item.getItemId();
|
||||
|
@ -24,13 +24,13 @@ import org.l2jmobius.gameserver.model.TradeList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.BuyList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SellList;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class MerchantInstance extends NpcInstance
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(MerchantInstance.class.getName());
|
||||
|
||||
public MerchantInstance(L2Npc template)
|
||||
public MerchantInstance(Npc template)
|
||||
{
|
||||
super(template);
|
||||
}
|
||||
|
@ -20,11 +20,11 @@ package org.l2jmobius.gameserver.model.actor.instance;
|
||||
import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class MonsterInstance extends Attackable
|
||||
{
|
||||
public MonsterInstance(L2Npc template)
|
||||
public MonsterInstance(Npc template)
|
||||
{
|
||||
super(template);
|
||||
// this.setMoveRadius(2000);
|
||||
|
@ -33,14 +33,14 @@ import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SetToLocation;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.L2Weapon;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
import org.l2jmobius.gameserver.templates.Weapon;
|
||||
|
||||
public class NpcInstance extends Creature
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(NpcInstance.class.getName());
|
||||
private static final int INTERACTION_DISTANCE = 150;
|
||||
private final L2Npc _npcTemplate;
|
||||
private final Npc _npcTemplate;
|
||||
private boolean _attackable;
|
||||
private int _rightHandItem;
|
||||
private int _leftHandItem;
|
||||
@ -52,7 +52,7 @@ public class NpcInstance extends Creature
|
||||
private static Timer _decayTimer = new Timer(true);
|
||||
private Spawn _spawn;
|
||||
|
||||
public NpcInstance(L2Npc template)
|
||||
public NpcInstance(Npc template)
|
||||
{
|
||||
_npcTemplate = template;
|
||||
setCollisionHeight(template.getHeight());
|
||||
@ -81,7 +81,7 @@ public class NpcInstance extends Creature
|
||||
_aggressive = aggressive;
|
||||
}
|
||||
|
||||
public L2Npc getNpcTemplate()
|
||||
public Npc getNpcTemplate()
|
||||
{
|
||||
return _npcTemplate;
|
||||
}
|
||||
@ -212,7 +212,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
@Override
|
||||
public L2Weapon getActiveWeapon()
|
||||
public Weapon getActiveWeapon()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -44,8 +44,8 @@ import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StopMove;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.L2Weapon;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
import org.l2jmobius.gameserver.templates.Weapon;
|
||||
|
||||
public class PetInstance extends Creature
|
||||
{
|
||||
@ -59,8 +59,8 @@ public class PetInstance extends Creature
|
||||
private PlayerInstance _owner;
|
||||
private int _karma = 0;
|
||||
private final Inventory _inventory = new Inventory();
|
||||
private L2Weapon _dummyWeapon;
|
||||
private final L2Npc _template;
|
||||
private Weapon _dummyWeapon;
|
||||
private final Npc _template;
|
||||
private int _attackRange = 36;
|
||||
private boolean _follow = true;
|
||||
private Creature.DecayTask _decayTask;
|
||||
@ -70,7 +70,7 @@ public class PetInstance extends Creature
|
||||
private int _lastLevel;
|
||||
private byte updateKnownCounter = 0;
|
||||
|
||||
public PetInstance(L2Npc template)
|
||||
public PetInstance(Npc template)
|
||||
{
|
||||
setCollisionHeight(template.getHeight());
|
||||
setCollisionRadius(template.getRadius());
|
||||
@ -320,7 +320,7 @@ public class PetInstance extends Creature
|
||||
}
|
||||
|
||||
@Override
|
||||
public L2Weapon getActiveWeapon()
|
||||
public Weapon getActiveWeapon()
|
||||
{
|
||||
return _dummyWeapon;
|
||||
}
|
||||
@ -333,7 +333,7 @@ public class PetInstance extends Creature
|
||||
physicalAttack = 100;
|
||||
}
|
||||
super.setPhysicalAttack(physicalAttack);
|
||||
_dummyWeapon = new L2Weapon();
|
||||
_dummyWeapon = new Weapon();
|
||||
_dummyWeapon.setPDamage(physicalAttack);
|
||||
_dummyWeapon.setRandomDamage(getLevel());
|
||||
}
|
||||
|
@ -77,10 +77,10 @@ import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.StopMove;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||
import org.l2jmobius.gameserver.templates.L2Armor;
|
||||
import org.l2jmobius.gameserver.templates.L2CharTemplate;
|
||||
import org.l2jmobius.gameserver.templates.L2Item;
|
||||
import org.l2jmobius.gameserver.templates.L2Weapon;
|
||||
import org.l2jmobius.gameserver.templates.Armor;
|
||||
import org.l2jmobius.gameserver.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.templates.Item;
|
||||
import org.l2jmobius.gameserver.templates.Weapon;
|
||||
|
||||
public class PlayerInstance extends Creature
|
||||
{
|
||||
@ -129,7 +129,7 @@ public class PlayerInstance extends Creature
|
||||
private boolean _isGm = false;
|
||||
private PlayerInstance _currentTransactionRequester;
|
||||
private ItemInstance _arrowItem;
|
||||
private L2Weapon _fistsWeaponItem;
|
||||
private Weapon _fistsWeaponItem;
|
||||
private long _uptime;
|
||||
public byte updateKnownCounter = 0;
|
||||
private Creature _interactTarget;
|
||||
@ -275,63 +275,63 @@ public class PlayerInstance extends Creature
|
||||
_skill = skill;
|
||||
}
|
||||
|
||||
public void setFistsWeaponItem(L2Weapon weaponItem)
|
||||
public void setFistsWeaponItem(Weapon weaponItem)
|
||||
{
|
||||
_fistsWeaponItem = weaponItem;
|
||||
}
|
||||
|
||||
public L2Weapon getFistsWeaponItem()
|
||||
public Weapon getFistsWeaponItem()
|
||||
{
|
||||
return _fistsWeaponItem;
|
||||
}
|
||||
|
||||
public L2Weapon findFistsWeaponItem(int classId)
|
||||
public Weapon findFistsWeaponItem(int classId)
|
||||
{
|
||||
L2Weapon weaponItem = null;
|
||||
Weapon weaponItem = null;
|
||||
if ((classId >= 0) && (classId <= 9))
|
||||
{
|
||||
L2Item temp = ItemTable.getInstance().getTemplate(246);
|
||||
weaponItem = (L2Weapon) temp;
|
||||
Item temp = ItemTable.getInstance().getTemplate(246);
|
||||
weaponItem = (Weapon) temp;
|
||||
}
|
||||
else if ((classId >= 10) && (classId <= 17))
|
||||
{
|
||||
L2Item temp = ItemTable.getInstance().getTemplate(251);
|
||||
weaponItem = (L2Weapon) temp;
|
||||
Item temp = ItemTable.getInstance().getTemplate(251);
|
||||
weaponItem = (Weapon) temp;
|
||||
}
|
||||
else if ((classId >= 18) && (classId <= 24))
|
||||
{
|
||||
L2Item temp = ItemTable.getInstance().getTemplate(244);
|
||||
weaponItem = (L2Weapon) temp;
|
||||
Item temp = ItemTable.getInstance().getTemplate(244);
|
||||
weaponItem = (Weapon) temp;
|
||||
}
|
||||
else if ((classId >= 25) && (classId <= 30))
|
||||
{
|
||||
L2Item temp = ItemTable.getInstance().getTemplate(249);
|
||||
weaponItem = (L2Weapon) temp;
|
||||
Item temp = ItemTable.getInstance().getTemplate(249);
|
||||
weaponItem = (Weapon) temp;
|
||||
}
|
||||
else if ((classId >= 31) && (classId <= 37))
|
||||
{
|
||||
L2Item temp = ItemTable.getInstance().getTemplate(245);
|
||||
weaponItem = (L2Weapon) temp;
|
||||
Item temp = ItemTable.getInstance().getTemplate(245);
|
||||
weaponItem = (Weapon) temp;
|
||||
}
|
||||
else if ((classId >= 38) && (classId <= 43))
|
||||
{
|
||||
L2Item temp = ItemTable.getInstance().getTemplate(250);
|
||||
weaponItem = (L2Weapon) temp;
|
||||
Item temp = ItemTable.getInstance().getTemplate(250);
|
||||
weaponItem = (Weapon) temp;
|
||||
}
|
||||
else if ((classId >= 44) && (classId <= 48))
|
||||
{
|
||||
L2Item temp = ItemTable.getInstance().getTemplate(248);
|
||||
weaponItem = (L2Weapon) temp;
|
||||
Item temp = ItemTable.getInstance().getTemplate(248);
|
||||
weaponItem = (Weapon) temp;
|
||||
}
|
||||
else if ((classId >= 49) && (classId <= 52))
|
||||
{
|
||||
L2Item temp = ItemTable.getInstance().getTemplate(252);
|
||||
weaponItem = (L2Weapon) temp;
|
||||
Item temp = ItemTable.getInstance().getTemplate(252);
|
||||
weaponItem = (Weapon) temp;
|
||||
}
|
||||
else if ((classId >= 53) && (classId <= 57))
|
||||
{
|
||||
L2Item temp = ItemTable.getInstance().getTemplate(247);
|
||||
weaponItem = (L2Weapon) temp;
|
||||
Item temp = ItemTable.getInstance().getTemplate(247);
|
||||
weaponItem = (Weapon) temp;
|
||||
}
|
||||
return weaponItem;
|
||||
}
|
||||
@ -772,14 +772,14 @@ public class PlayerInstance extends Creature
|
||||
}
|
||||
|
||||
@Override
|
||||
public L2Weapon getActiveWeapon()
|
||||
public Weapon getActiveWeapon()
|
||||
{
|
||||
ItemInstance weapon = getInventory().getPaperdollItem(7);
|
||||
if (weapon == null)
|
||||
{
|
||||
return getFistsWeaponItem();
|
||||
}
|
||||
return (L2Weapon) weapon.getItem();
|
||||
return (Weapon) weapon.getItem();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -966,7 +966,7 @@ public class PlayerInstance extends Creature
|
||||
@Override
|
||||
public int getAttackRange()
|
||||
{
|
||||
L2Weapon weapon = getActiveWeapon();
|
||||
Weapon weapon = getActiveWeapon();
|
||||
if ((weapon != null) && (weapon.getWeaponType() == 5))
|
||||
{
|
||||
return 500;
|
||||
@ -1037,7 +1037,7 @@ public class PlayerInstance extends Creature
|
||||
{
|
||||
_log.warning("Missing STR modifier for classId: " + getClassId());
|
||||
}
|
||||
L2CharTemplate template = CharTemplateTable.getInstance().getTemplate(getClassId());
|
||||
CharTemplate template = CharTemplateTable.getInstance().getTemplate(getClassId());
|
||||
double weapondmg = 1.0;
|
||||
if (template != null)
|
||||
{
|
||||
@ -1047,7 +1047,7 @@ public class PlayerInstance extends Creature
|
||||
{
|
||||
_log.warning("Missing template for classId: " + getClassId());
|
||||
}
|
||||
L2Weapon weapon = getActiveWeapon();
|
||||
Weapon weapon = getActiveWeapon();
|
||||
if (weapon != null)
|
||||
{
|
||||
weapondmg += weapon.getPDamage();
|
||||
@ -1059,9 +1059,9 @@ public class PlayerInstance extends Creature
|
||||
|
||||
public void updatePDef()
|
||||
{
|
||||
L2Armor armorPiece;
|
||||
Armor armorPiece;
|
||||
double lvlmod = (89.0 + getLevel()) / 100.0;
|
||||
L2CharTemplate template = CharTemplateTable.getInstance().getTemplate(getClassId());
|
||||
CharTemplate template = CharTemplateTable.getInstance().getTemplate(getClassId());
|
||||
double totalItemDef = 40.0;
|
||||
if (template != null)
|
||||
{
|
||||
@ -1074,37 +1074,37 @@ public class PlayerInstance extends Creature
|
||||
ItemInstance dummy = getInventory().getPaperdollItem(13);
|
||||
if (dummy != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getPDef();
|
||||
}
|
||||
if ((dummy = getInventory().getPaperdollItem(10)) != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getPDef();
|
||||
}
|
||||
if ((dummy = getInventory().getPaperdollItem(12)) != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getPDef();
|
||||
}
|
||||
if ((dummy = getInventory().getPaperdollItem(9)) != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getPDef();
|
||||
}
|
||||
if ((dummy = getInventory().getPaperdollItem(6)) != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getPDef();
|
||||
}
|
||||
if ((dummy = getInventory().getPaperdollItem(11)) != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getPDef();
|
||||
}
|
||||
if ((dummy = getInventory().getPaperdollItem(0)) != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getPDef();
|
||||
}
|
||||
double pDef = totalItemDef * lvlmod;
|
||||
@ -1127,7 +1127,7 @@ public class PlayerInstance extends Creature
|
||||
_log.warning("Missing INT modifier for classId: " + getClassId());
|
||||
}
|
||||
double intmod = Math.sqrt(imod);
|
||||
L2CharTemplate template = CharTemplateTable.getInstance().getTemplate(getClassId());
|
||||
CharTemplate template = CharTemplateTable.getInstance().getTemplate(getClassId());
|
||||
double weapondmg = 1.0;
|
||||
if (template != null)
|
||||
{
|
||||
@ -1137,7 +1137,7 @@ public class PlayerInstance extends Creature
|
||||
{
|
||||
_log.warning("Missing template for classId: " + getClassId());
|
||||
}
|
||||
L2Weapon weapon = getActiveWeapon();
|
||||
Weapon weapon = getActiveWeapon();
|
||||
if (weapon != null)
|
||||
{
|
||||
weapondmg += weapon.getMDamage();
|
||||
@ -1149,7 +1149,7 @@ public class PlayerInstance extends Creature
|
||||
|
||||
public void updateMDef()
|
||||
{
|
||||
L2Armor armorPiece;
|
||||
Armor armorPiece;
|
||||
double lvlBonus = (89.0 + getLevel()) / 100.0;
|
||||
StatModifiers modifier = CharStatsTable.getInstance().getTemplate(getClassId());
|
||||
double MENbonus = 1.0;
|
||||
@ -1161,7 +1161,7 @@ public class PlayerInstance extends Creature
|
||||
{
|
||||
_log.warning("Missing MEN modifier for classId: " + getClassId());
|
||||
}
|
||||
L2CharTemplate template = CharTemplateTable.getInstance().getTemplate(getClassId());
|
||||
CharTemplate template = CharTemplateTable.getInstance().getTemplate(getClassId());
|
||||
double totalItemDef = 40.0;
|
||||
if (template != null)
|
||||
{
|
||||
@ -1174,27 +1174,27 @@ public class PlayerInstance extends Creature
|
||||
ItemInstance dummy = getInventory().getPaperdollItem(1);
|
||||
if (dummy != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getMDef();
|
||||
}
|
||||
if ((dummy = getInventory().getPaperdollItem(4)) != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getMDef();
|
||||
}
|
||||
if ((dummy = getInventory().getPaperdollItem(3)) != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getMDef();
|
||||
}
|
||||
if ((dummy = getInventory().getPaperdollItem(2)) != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getMDef();
|
||||
}
|
||||
if ((dummy = getInventory().getPaperdollItem(5)) != null)
|
||||
{
|
||||
armorPiece = (L2Armor) dummy.getItem();
|
||||
armorPiece = (Armor) dummy.getItem();
|
||||
totalItemDef += armorPiece.getMDef();
|
||||
}
|
||||
double mDef = totalItemDef * lvlBonus * MENbonus;
|
||||
@ -1387,7 +1387,7 @@ public class PlayerInstance extends Creature
|
||||
@Override
|
||||
protected boolean isUsingDualWeapon()
|
||||
{
|
||||
L2Weapon weaponItem = getActiveWeapon();
|
||||
Weapon weaponItem = getActiveWeapon();
|
||||
if (weaponItem.getWeaponType() == 9)
|
||||
{
|
||||
return true;
|
||||
|
@ -24,13 +24,13 @@ import org.l2jmobius.gameserver.model.TeleportLocation;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.TeleportToLocation;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class TeleporterInstance extends NpcInstance
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(TeleporterInstance.class.getName());
|
||||
|
||||
public TeleporterInstance(L2Npc template)
|
||||
public TeleporterInstance(Npc template)
|
||||
{
|
||||
super(template);
|
||||
}
|
||||
|
@ -23,13 +23,13 @@ import org.l2jmobius.gameserver.data.SkillTreeTable;
|
||||
import org.l2jmobius.gameserver.model.SkillLearn;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.AquireSkillList;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class TrainerInstance extends NpcInstance
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(TrainerInstance.class.getName());
|
||||
|
||||
public TrainerInstance(L2Npc template)
|
||||
public TrainerInstance(Npc template)
|
||||
{
|
||||
super(template);
|
||||
}
|
||||
|
@ -24,13 +24,13 @@ import org.l2jmobius.gameserver.model.Clan;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.PledgeShowInfoUpdate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class VillageMasterInstance extends NpcInstance
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(VillageMasterInstance.class.getName());
|
||||
|
||||
public VillageMasterInstance(L2Npc template)
|
||||
public VillageMasterInstance(Npc template)
|
||||
{
|
||||
super(template);
|
||||
}
|
||||
|
@ -24,13 +24,13 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.WareHouseDepositList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.WareHouseWithdrawalList;
|
||||
import org.l2jmobius.gameserver.templates.L2Npc;
|
||||
import org.l2jmobius.gameserver.templates.Npc;
|
||||
|
||||
public class WarehouseInstance extends NpcInstance
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(WarehouseInstance.class.getName());
|
||||
|
||||
public WarehouseInstance(L2Npc template)
|
||||
public WarehouseInstance(Npc template)
|
||||
{
|
||||
super(template);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.CharCreateFail;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.CharCreateOk;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.CharSelectInfo;
|
||||
import org.l2jmobius.gameserver.templates.L2CharTemplate;
|
||||
import org.l2jmobius.gameserver.templates.CharTemplate;
|
||||
|
||||
public class CharacterCreate extends ClientBasePacket
|
||||
{
|
||||
@ -100,7 +100,7 @@ public class CharacterCreate extends ClientBasePacket
|
||||
_log.fine("Character init start");
|
||||
newChar.setObjectId(IdFactory.getInstance().getNextId());
|
||||
World.getInstance().storeObject(newChar);
|
||||
L2CharTemplate template = CharTemplateTable.getInstance().getTemplate(newChar.getClassId());
|
||||
CharTemplate template = CharTemplateTable.getInstance().getTemplate(newChar.getClassId());
|
||||
newChar.setAccuracy(template.getAcc());
|
||||
newChar.setCon(template.getCon());
|
||||
newChar.setCriticalHit(template.getCrit());
|
||||
|
@ -22,7 +22,7 @@ import java.io.IOException;
|
||||
import org.l2jmobius.gameserver.ClientThread;
|
||||
import org.l2jmobius.gameserver.data.CharTemplateTable;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.CharTemplates;
|
||||
import org.l2jmobius.gameserver.templates.L2CharTemplate;
|
||||
import org.l2jmobius.gameserver.templates.CharTemplate;
|
||||
|
||||
public class NewCharacter extends ClientBasePacket
|
||||
{
|
||||
@ -32,7 +32,7 @@ public class NewCharacter extends ClientBasePacket
|
||||
{
|
||||
super(rawPacket);
|
||||
CharTemplates ct = new CharTemplates();
|
||||
L2CharTemplate template = CharTemplateTable.getInstance().getTemplate(0);
|
||||
CharTemplate template = CharTemplateTable.getInstance().getTemplate(0);
|
||||
ct.addChar(template);
|
||||
template = CharTemplateTable.getInstance().getTemplate(0);
|
||||
ct.addChar(template);
|
||||
|
@ -27,7 +27,7 @@ import java.util.StringTokenizer;
|
||||
import org.l2jmobius.gameserver.data.ItemTable;
|
||||
import org.l2jmobius.gameserver.model.CharSelectInfoPackage;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.templates.L2Item;
|
||||
import org.l2jmobius.gameserver.templates.Item;
|
||||
|
||||
public class CharSelectInfo extends ServerBasePacket
|
||||
{
|
||||
@ -161,7 +161,7 @@ public class CharSelectInfo extends ServerBasePacket
|
||||
ItemInstance item = new ItemInstance();
|
||||
item.setObjectId(Integer.parseInt(st.nextToken()));
|
||||
int itemId = Integer.parseInt(st.nextToken());
|
||||
L2Item itemTemp = ItemTable.getInstance().getTemplate(itemId);
|
||||
Item itemTemp = ItemTable.getInstance().getTemplate(itemId);
|
||||
item.setItem(itemTemp);
|
||||
st.nextToken();
|
||||
item.setCount(Integer.parseInt(st.nextToken()));
|
||||
|
@ -19,14 +19,14 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import org.l2jmobius.gameserver.templates.L2CharTemplate;
|
||||
import org.l2jmobius.gameserver.templates.CharTemplate;
|
||||
|
||||
public class CharTemplates extends ServerBasePacket
|
||||
{
|
||||
private static final String _S__23_CHARTEMPLATES = "[S] 23 CharTemplates";
|
||||
private final Vector<L2CharTemplate> _chars = new Vector<>();
|
||||
private final Vector<CharTemplate> _chars = new Vector<>();
|
||||
|
||||
public void addChar(L2CharTemplate template)
|
||||
public void addChar(CharTemplate template)
|
||||
{
|
||||
_chars.add(template);
|
||||
}
|
||||
@ -38,7 +38,7 @@ public class CharTemplates extends ServerBasePacket
|
||||
writeD(_chars.size());
|
||||
for (int i = 0; i < _chars.size(); ++i)
|
||||
{
|
||||
L2CharTemplate temp = _chars.get(i);
|
||||
CharTemplate temp = _chars.get(i);
|
||||
writeD(temp.getRaceId());
|
||||
writeD(temp.getClassId());
|
||||
writeD(70);
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.templates;
|
||||
|
||||
public class L2Armor extends L2Item
|
||||
public class Armor extends Item
|
||||
{
|
||||
public static final int ARMORTYPE_NONE = 1;
|
||||
public static final int ARMORTYPE_LIGHT = 2;
|
@ -20,7 +20,7 @@ package org.l2jmobius.gameserver.templates;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class L2CharTemplate
|
||||
public class CharTemplate
|
||||
{
|
||||
private int _classId;
|
||||
private String _className;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.templates;
|
||||
|
||||
public class L2EtcItem extends L2Item
|
||||
public class EtcItem extends Item
|
||||
{
|
||||
public static final int TYPE_ARROW = 0;
|
||||
public static final int TYPE_MATERIAL = 1;
|
@ -19,7 +19,7 @@ package org.l2jmobius.gameserver.templates;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public abstract class L2Item implements Serializable
|
||||
public abstract class Item implements Serializable
|
||||
{
|
||||
public static final int TYPE1_WEAPON_RING_EARRING_NECKLACE = 0;
|
||||
public static final int TYPE1_SHIELD_ARMOR = 1;
|
@ -22,7 +22,7 @@ import java.util.List;
|
||||
|
||||
import org.l2jmobius.gameserver.model.DropData;
|
||||
|
||||
public class L2Npc
|
||||
public class Npc
|
||||
{
|
||||
private int _npcId;
|
||||
private String _type;
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
package org.l2jmobius.gameserver.templates;
|
||||
|
||||
public class L2Weapon extends L2Item
|
||||
public class Weapon extends Item
|
||||
{
|
||||
public static final int WEAPON_TYPE_NONE = 1;
|
||||
public static final int WEAPON_TYPE_SWORD = 2;
|
Loading…
Reference in New Issue
Block a user