1
0
mirror of https://github.com/Rogiel/l2jserver2 synced 2025-12-11 09:42:54 +00:00

Character broadcast working

Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
2011-05-22 21:32:55 -03:00
parent 49a8513ec5
commit 98feb1ecce
148 changed files with 2309 additions and 597 deletions

View File

@@ -41,6 +41,18 @@ public abstract class ActorTemplate<T extends Actor> extends
* The actor race
*/
protected final Race race;
/**
* The movement speed multiplier
*/
protected double movementSpeedMultiplier = 1.0;
/**
* The attack speed multiplier
*/
protected double attackSpeedMultiplier = 1.0;
protected int maxHp;
/**
* The base attributes instance
*/
@@ -219,6 +231,27 @@ public abstract class ActorTemplate<T extends Actor> extends
return attributes.canCraft();
}
/**
* @return the movementSpeedMultiplier
*/
public double getMovementSpeedMultiplier() {
return movementSpeedMultiplier;
}
/**
* @return the attackSpeedMultiplier
*/
public double getAttackSpeedMultiplier() {
return attackSpeedMultiplier;
}
/**
* @return the max hp
*/
public int getMaxHP() {
return maxHp;
}
/**
* Defines the attributes of an character
*

View File

@@ -43,6 +43,23 @@ public abstract class CharacterTemplate extends ActorTemplate<L2Character> {
FIST;
}
/**
* The collision radius for male instances
*/
protected double maleCollisionRadius = 0;
/**
* The collision height for male instances
*/
protected double maleCollisionHeight = 0;
/**
* The collision radius for female instances
*/
protected double femaleCollisionRadius = 0;
/**
* The collision height for female instances
*/
protected double femaleCollisionHeight = 0;
protected CharacterTemplate(CharacterTemplateID id,
CharacterClass characterClass, Point spawnLocation) {
super(id, characterClass.race);
@@ -52,7 +69,7 @@ public abstract class CharacterTemplate extends ActorTemplate<L2Character> {
@Override
public L2Character createInstance() {
final L2Character character = new L2Character(attributes);
final L2Character character = new L2Character(this.getID(), attributes);
character.setRace(race);
character.setCharacterClass(characterClass);
@@ -74,6 +91,34 @@ public abstract class CharacterTemplate extends ActorTemplate<L2Character> {
public Point getSpawnLocation() {
return spawnLocation;
}
/**
* @return the male collision radius
*/
public double getMaleCollisionRadius() {
return maleCollisionRadius;
}
/**
* @return the male collision height
*/
public double getMaleCollisionHeight() {
return maleCollisionHeight;
}
/**
* @return the female collision radius
*/
public double getFemaleCollisionRadius() {
return femaleCollisionRadius;
}
/**
* @return the female collision height
*/
public double getFemaleCollisionHeight() {
return femaleCollisionHeight;
}
@Override
public CharacterTemplateID getID() {

View File

@@ -71,15 +71,6 @@ public abstract class NPCTemplate extends ActorTemplate<NPC> implements
*/
protected boolean attackable = false;
/**
* The movement speed multiplier
*/
protected double movementSpeedMultiplier = 1.0;
/**
* The attack speed multiplier
*/
protected double attackSpeedMultiplier = 1.0;
/**
* The collision radius
*/
@@ -89,8 +80,6 @@ public abstract class NPCTemplate extends ActorTemplate<NPC> implements
*/
protected double collisionHeight = 0;
protected int maxHp;
protected NPCTemplate(NPCTemplateID id) {
super(id, null);
}
@@ -132,8 +121,8 @@ public abstract class NPCTemplate extends ActorTemplate<NPC> implements
* the action arguments
* @throws L2Exception
*/
protected void talk(NPC npc, L2Character character, Lineage2Connection conn,
String... args) throws L2Exception {
protected void talk(NPC npc, L2Character character,
Lineage2Connection conn, String... args) throws L2Exception {
if (args.length == 0 || (args.length >= 1 && args[0].equals("Chat"))) {
String name = "";
if (args.length == 2)
@@ -192,40 +181,19 @@ public abstract class NPCTemplate extends ActorTemplate<NPC> implements
}
/**
* @return the movementSpeedMultiplier
*/
public double getMovementSpeedMultiplier() {
return movementSpeedMultiplier;
}
/**
* @return the attackSpeedMultiplier
*/
public double getAttackSpeedMultiplier() {
return attackSpeedMultiplier;
}
/**
* @return the collisionRadius
* @return the collision radius
*/
public double getCollisionRadius() {
return collisionRadius;
}
/**
* @return the collisionHeight
* @return the collision height
*/
public double getCollisionHeight() {
return collisionHeight;
}
/**
* @return the maxHp
*/
public int getMaxHP() {
return maxHp;
}
/**
* @return the race
*/

View File

@@ -77,6 +77,15 @@ public class TeleporterNPCTemplate extends NPCTemplate {
public static final Coordinate CAVE_OF_TRIALS = Coordinate.fromXYZ(9340,
-112509, -2536);
public static final Coordinate DARK_FOREST = Coordinate.fromXYZ(-22224,
14168, -3232);
public static final Coordinate SPIDER_NEST = Coordinate.fromXYZ(-61095,
75104, -3352);
public static final Coordinate SWAMPLAND = Coordinate.fromXYZ(-21966,
40544, -3192);
public static final Coordinate NEUTRAL_ZONE = Coordinate.fromXYZ(-10612,
75881, -3592);
@Inject
protected SpawnService spawnService;