CharTemplate should be named CreatureTemplate.
This commit is contained in:
parent
86f8ed7f11
commit
fbab81de50
@ -32,7 +32,7 @@ import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
import org.l2jmobius.gameserver.model.VehiclePathPoint;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.ShuttleInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
import org.l2jmobius.gameserver.model.shuttle.ShuttleDataHolder;
|
||||
import org.l2jmobius.gameserver.model.shuttle.ShuttleEngine;
|
||||
import org.l2jmobius.gameserver.model.shuttle.ShuttleStop;
|
||||
@ -164,7 +164,7 @@ public final class ShuttleData implements IXmlReader
|
||||
{
|
||||
for (ShuttleDataHolder data : _shuttles.values())
|
||||
{
|
||||
final ShuttleInstance shuttle = new ShuttleInstance(new CharTemplate(new StatsSet()));
|
||||
final ShuttleInstance shuttle = new ShuttleInstance(new CreatureTemplate(new StatsSet()));
|
||||
shuttle.setData(data);
|
||||
shuttle.setHeading(data.getLocation().getHeading());
|
||||
shuttle.setLocationInvisible(data.getLocation());
|
||||
|
@ -29,7 +29,7 @@ import org.w3c.dom.Node;
|
||||
import org.l2jmobius.commons.util.IXmlReader;
|
||||
import org.l2jmobius.gameserver.model.StatsSet;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.StaticObjectInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
|
||||
/**
|
||||
* This class loads and holds all static object data.
|
||||
@ -88,7 +88,7 @@ public final class StaticObjectData implements IXmlReader
|
||||
*/
|
||||
private void addObject(StatsSet set)
|
||||
{
|
||||
final StaticObjectInstance obj = new StaticObjectInstance(new CharTemplate(new StatsSet()), set.getInt("id"));
|
||||
final StaticObjectInstance obj = new StaticObjectInstance(new CreatureTemplate(new StatsSet()), set.getInt("id"));
|
||||
obj.setType(set.getInt("type", 0));
|
||||
obj.setName(set.getString("name"));
|
||||
obj.setMap(set.getString("texture", "none"), set.getInt("map_x", 0), set.getInt("map_y", 0));
|
||||
|
@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.model.VehiclePathPoint;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.AirShipInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.ControllableAirShipInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExAirShipTeleportList;
|
||||
|
||||
public class AirShipManager
|
||||
@ -44,7 +44,7 @@ public class AirShipManager
|
||||
private static final String ADD_DB = "INSERT INTO airships (owner_id,fuel) VALUES (?,?)";
|
||||
private static final String UPDATE_DB = "UPDATE airships SET fuel=? WHERE owner_id=?";
|
||||
|
||||
private CharTemplate _airShipTemplate = null;
|
||||
private CreatureTemplate _airShipTemplate = null;
|
||||
private final Map<Integer, StatsSet> _airShipsInfo = new HashMap<>();
|
||||
private final Map<Integer, AirShipInstance> _airShips = new HashMap<>();
|
||||
private final Map<Integer, AirShipTeleportList> _teleports = new HashMap<>();
|
||||
@ -94,7 +94,7 @@ public class AirShipManager
|
||||
npcDat.set("baseMpReg", 3.e-3f);
|
||||
npcDat.set("basePDef", 100);
|
||||
npcDat.set("baseMDef", 100);
|
||||
_airShipTemplate = new CharTemplate(npcDat);
|
||||
_airShipTemplate = new CreatureTemplate(npcDat);
|
||||
|
||||
load();
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import org.l2jmobius.gameserver.model.VehiclePathPoint;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.BoatInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
public class BoatManager
|
||||
@ -100,7 +100,7 @@ public class BoatManager
|
||||
npcDat.set("baseMpReg", 3.e-3f);
|
||||
npcDat.set("basePDef", 100);
|
||||
npcDat.set("baseMDef", 100);
|
||||
final CharTemplate template = new CharTemplate(npcDat);
|
||||
final CreatureTemplate template = new CreatureTemplate(npcDat);
|
||||
final BoatInstance boat = new BoatInstance(template);
|
||||
_boats.put(boat.getObjectId(), boat);
|
||||
boat.setHeading(heading);
|
||||
|
@ -87,7 +87,7 @@ import org.l2jmobius.gameserver.model.actor.instance.TrapInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.stat.CreatureStat;
|
||||
import org.l2jmobius.gameserver.model.actor.status.CreatureStatus;
|
||||
import org.l2jmobius.gameserver.model.actor.tasks.creature.NotifyAITask;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.transform.Transform;
|
||||
import org.l2jmobius.gameserver.model.clan.Clan;
|
||||
import org.l2jmobius.gameserver.model.effects.EffectFlag;
|
||||
@ -198,7 +198,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
|
||||
private CreatureStat _stat;
|
||||
private CreatureStatus _status;
|
||||
private CharTemplate _template; // The link on the CreatureTemplate object containing generic and static properties of this Creature type (ex : Max HP, Speed...)
|
||||
private CreatureTemplate _template; // The link on the CreatureTemplate object containing generic and static properties of this Creature type (ex : Max HP, Speed...)
|
||||
private String _title;
|
||||
|
||||
public static final double MAX_HP_BAR_PX = 352.0;
|
||||
@ -288,7 +288,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* Creates a creature.
|
||||
* @param template the creature template
|
||||
*/
|
||||
public Creature(CharTemplate template)
|
||||
public Creature(CreatureTemplate template)
|
||||
{
|
||||
this(IdFactory.getInstance().getNextId(), template);
|
||||
}
|
||||
@ -311,7 +311,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @param template The CreatureTemplate to apply to the object
|
||||
*/
|
||||
public Creature(int objectId, CharTemplate template)
|
||||
public Creature(int objectId, CreatureTemplate template)
|
||||
{
|
||||
super(objectId);
|
||||
if (template == null)
|
||||
@ -2226,7 +2226,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
_status = value;
|
||||
}
|
||||
|
||||
public CharTemplate getTemplate()
|
||||
public CreatureTemplate getTemplate()
|
||||
{
|
||||
return _template;
|
||||
}
|
||||
@ -2240,7 +2240,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
||||
* When a new instance of Creature is spawned, server just create a link between the instance and the template This link is stored in <B>_template</B>.
|
||||
* @param template
|
||||
*/
|
||||
protected final void setTemplate(CharTemplate template)
|
||||
protected final void setTemplate(CreatureTemplate template)
|
||||
{
|
||||
_template = template;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import org.l2jmobius.gameserver.model.WorldObject;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.stat.PlayableStat;
|
||||
import org.l2jmobius.gameserver.model.actor.status.PlayableStatus;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
import org.l2jmobius.gameserver.model.clan.Clan;
|
||||
import org.l2jmobius.gameserver.model.clan.ClanWar;
|
||||
import org.l2jmobius.gameserver.model.effects.EffectFlag;
|
||||
@ -59,14 +59,14 @@ public abstract class Playable extends Creature
|
||||
* @param objectId the object id
|
||||
* @param template The CreatureTemplate to apply to the Playable
|
||||
*/
|
||||
public Playable(int objectId, CharTemplate template)
|
||||
public Playable(int objectId, CreatureTemplate template)
|
||||
{
|
||||
super(objectId, template);
|
||||
setInstanceType(InstanceType.Playable);
|
||||
setIsInvul(false);
|
||||
}
|
||||
|
||||
public Playable(CharTemplate template)
|
||||
public Playable(CreatureTemplate template)
|
||||
{
|
||||
super(template);
|
||||
setInstanceType(InstanceType.Playable);
|
||||
|
@ -33,7 +33,7 @@ import org.l2jmobius.gameserver.model.VehiclePathPoint;
|
||||
import org.l2jmobius.gameserver.model.World;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.stat.VehicleStat;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.items.Weapon;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
@ -56,7 +56,7 @@ public abstract class Vehicle extends Creature
|
||||
protected VehiclePathPoint[] _currentPath = null;
|
||||
protected int _runState = 0;
|
||||
|
||||
public Vehicle(CharTemplate template)
|
||||
public Vehicle(CreatureTemplate template)
|
||||
{
|
||||
super(template);
|
||||
setInstanceType(InstanceType.Vehicle);
|
||||
|
@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.enums.InstanceType;
|
||||
import org.l2jmobius.gameserver.instancemanager.AirShipManager;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.actor.Vehicle;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExAirShipInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExGetOffAirShip;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExGetOnAirShip;
|
||||
@ -34,7 +34,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ExStopMoveAirShip;
|
||||
*/
|
||||
public class AirShipInstance extends Vehicle
|
||||
{
|
||||
public AirShipInstance(CharTemplate template)
|
||||
public AirShipInstance(CreatureTemplate template)
|
||||
{
|
||||
super(template);
|
||||
setInstanceType(InstanceType.AirShipInstance);
|
||||
|
@ -22,7 +22,7 @@ import org.l2jmobius.gameserver.ai.BoatAI;
|
||||
import org.l2jmobius.gameserver.enums.InstanceType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.actor.Vehicle;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.VehicleDeparture;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.VehicleInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.VehicleStarted;
|
||||
@ -34,7 +34,7 @@ public class BoatInstance extends Vehicle
|
||||
{
|
||||
protected static final Logger LOGGER_BOAT = Logger.getLogger(BoatInstance.class.getName());
|
||||
|
||||
public BoatInstance(CharTemplate template)
|
||||
public BoatInstance(CreatureTemplate template)
|
||||
{
|
||||
super(template);
|
||||
setInstanceType(InstanceType.BoatInstance);
|
||||
|
@ -22,7 +22,7 @@ import org.l2jmobius.commons.concurrent.ThreadPool;
|
||||
import org.l2jmobius.gameserver.enums.InstanceType;
|
||||
import org.l2jmobius.gameserver.idfactory.IdFactory;
|
||||
import org.l2jmobius.gameserver.model.actor.stat.ControllableAirShipStat;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
import org.l2jmobius.gameserver.model.skills.AbnormalType;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.DeleteObject;
|
||||
@ -43,7 +43,7 @@ public class ControllableAirShipInstance extends AirShipInstance
|
||||
private Future<?> _consumeFuelTask;
|
||||
private Future<?> _checkTask;
|
||||
|
||||
public ControllableAirShipInstance(CharTemplate template, int ownerId)
|
||||
public ControllableAirShipInstance(CreatureTemplate template, int ownerId)
|
||||
{
|
||||
super(template);
|
||||
setInstanceType(InstanceType.ControllableAirShipInstance);
|
||||
|
@ -23,7 +23,7 @@ import org.l2jmobius.gameserver.ai.ShuttleAI;
|
||||
import org.l2jmobius.gameserver.enums.InstanceType;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.actor.Vehicle;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
import org.l2jmobius.gameserver.model.shuttle.ShuttleDataHolder;
|
||||
import org.l2jmobius.gameserver.model.shuttle.ShuttleStop;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.shuttle.ExShuttleGetOff;
|
||||
@ -37,7 +37,7 @@ public class ShuttleInstance extends Vehicle
|
||||
{
|
||||
private ShuttleDataHolder _shuttleData;
|
||||
|
||||
public ShuttleInstance(CharTemplate template)
|
||||
public ShuttleInstance(CreatureTemplate template)
|
||||
{
|
||||
super(template);
|
||||
setInstanceType(InstanceType.ShuttleInstance);
|
||||
|
@ -22,7 +22,7 @@ import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.stat.StaticObjectStat;
|
||||
import org.l2jmobius.gameserver.model.actor.status.StaticObjectStatus;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CharTemplate;
|
||||
import org.l2jmobius.gameserver.model.actor.templates.CreatureTemplate;
|
||||
import org.l2jmobius.gameserver.model.items.Weapon;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
@ -63,7 +63,7 @@ public final class StaticObjectInstance extends Creature
|
||||
* @param template
|
||||
* @param staticId
|
||||
*/
|
||||
public StaticObjectInstance(CharTemplate template, int staticId)
|
||||
public StaticObjectInstance(CreatureTemplate template, int staticId)
|
||||
{
|
||||
super(template);
|
||||
setInstanceType(InstanceType.StaticObjectInstance);
|
||||
|
@ -31,7 +31,7 @@ import org.l2jmobius.gameserver.model.stats.Stats;
|
||||
* Character template.
|
||||
* @author Zoey76
|
||||
*/
|
||||
public class CharTemplate extends ListenersContainer
|
||||
public class CreatureTemplate extends ListenersContainer
|
||||
{
|
||||
// BaseStats
|
||||
private WeaponType _baseAttackType;
|
||||
@ -49,7 +49,7 @@ public class CharTemplate extends ListenersContainer
|
||||
/** The creature's race. */
|
||||
private Race _race;
|
||||
|
||||
public CharTemplate(StatsSet set)
|
||||
public CreatureTemplate(StatsSet set)
|
||||
{
|
||||
set(set);
|
||||
}
|
@ -24,7 +24,7 @@ import org.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
* Doors template.
|
||||
* @author JIV
|
||||
*/
|
||||
public class DoorTemplate extends CharTemplate implements IIdentifiable
|
||||
public class DoorTemplate extends CreatureTemplate implements IIdentifiable
|
||||
{
|
||||
private final int _doorId;
|
||||
private final int _nodeX[];
|
||||
|
@ -50,7 +50,7 @@ import org.l2jmobius.gameserver.util.Util;
|
||||
* NPC template.
|
||||
* @author NosBit
|
||||
*/
|
||||
public final class NpcTemplate extends CharTemplate implements IIdentifiable
|
||||
public final class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
||||
{
|
||||
private int _id;
|
||||
private int _displayId;
|
||||
|
@ -30,7 +30,7 @@ import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
/**
|
||||
* @author mkizub, Zoey76
|
||||
*/
|
||||
public class PlayerTemplate extends CharTemplate
|
||||
public class PlayerTemplate extends CreatureTemplate
|
||||
{
|
||||
private final ClassId _classId;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user