From 98feb1ecce7fdffd7db2ca8bc3d5ccdf074722cc Mon Sep 17 00:00:00 2001 From: Rogiel Date: Sun, 22 May 2011 21:32:55 -0300 Subject: [PATCH] Character broadcast working Signed-off-by: Rogiel --- .../actor/character/AbyssWalkerTemplate.java | 12 +- .../actor/character/AdventurerTemplate.java | 12 +- .../actor/character/ArbalesterTemplate.java | 12 +- .../actor/character/ArcanaLordTemplate.java | 13 +- .../actor/character/ArchmageTemplate.java | 12 +- .../actor/character/ArtisanTemplate.java | 12 +- .../actor/character/AssassinTemplate.java | 12 +- .../actor/character/BersekerTemplate.java | 12 +- .../actor/character/BishopTemplate.java | 12 +- .../actor/character/BladedancerTemplate.java | 12 +- .../actor/character/BountyHunterTemplate.java | 13 +- .../actor/character/CardinalTemplate.java | 12 +- .../actor/character/ClericTemplate.java | 12 +- .../actor/character/DarkAvengerTemplate.java | 13 +- .../actor/character/DarkFighterTemplate.java | 12 +- .../actor/character/DarkMysticTemplate.java | 12 +- .../actor/character/DarkWizardTemplate.java | 12 +- .../actor/character/DestroyerTemplate.java | 12 +- .../actor/character/DominatorTemplate.java | 12 +- .../actor/character/DoombringerTemplate.java | 12 +- .../actor/character/DoomcryerTemplate.java | 12 +- .../actor/character/DreadnoughtTemplate.java | 13 +- .../actor/character/DuelistTemplate.java | 12 +- .../character/DwarvenFighterTemplate.java | 13 +- .../actor/character/ElderTemplate.java | 12 +- .../character/ElementalMasterTemplate.java | 13 +- .../character/ElementalSummonerTemplate.java | 13 +- .../actor/character/ElvenFighterTemplate.java | 13 +- .../actor/character/ElvenKnightTemplate.java | 12 +- .../actor/character/ElvenMysticTemplate.java | 12 +- .../actor/character/ElvenScoutTemplate.java | 12 +- .../actor/character/ElvenWizardTemplate.java | 12 +- .../actor/character/EvaSaintTemplate.java | 12 +- .../actor/character/EvaTemplarTemplate.java | 12 +- .../character/FemaleSoldierTemplate.java | 13 +- .../character/FemaleSoulbreakerTemplate.java | 13 +- .../character/FemaleSouldhoundTemplate.java | 13 +- .../character/FortuneSeekerTemplate.java | 13 +- .../actor/character/GhostHunterTemplate.java | 12 +- .../character/GhostSentinelTemplate.java | 13 +- .../actor/character/GladiatorTemplate.java | 12 +- .../character/GrandKhauatariTemplate.java | 13 +- .../actor/character/HawkeyeTemplate.java | 12 +- .../actor/character/HellKnightTemplate.java | 13 +- .../actor/character/HierophantTemplate.java | 12 +- .../actor/character/HumanFighterTemplate.java | 13 +- .../actor/character/HumanMysticTemplate.java | 13 +- .../actor/character/InspectorTemplate.java | 12 +- .../actor/character/JudicatorTemplate.java | 12 +- .../actor/character/KnightTemplate.java | 12 +- .../actor/character/MaestroTemplate.java | 12 +- .../actor/character/MaleSoldierTemplate.java | 13 +- .../character/MaleSoulbreakerTemplate.java | 13 +- .../character/MaleSouldhoundTemplate.java | 13 +- .../character/MoonlightSentinelTemplate.java | 13 +- .../actor/character/MysticMuseTemplate.java | 12 +- .../actor/character/NecromancerTemplate.java | 13 +- .../actor/character/OracleTemplate.java | 12 +- .../actor/character/OrcFighterTemplate.java | 13 +- .../actor/character/OrcMonkTemplate.java | 12 +- .../actor/character/OrcMysticTemplate.java | 12 +- .../actor/character/OrcRaiderTemplate.java | 12 +- .../actor/character/OrcShamanTemplate.java | 12 +- .../actor/character/OverlordTemplate.java | 12 +- .../actor/character/PaladinTemplate.java | 12 +- .../actor/character/PalusKnightTemplate.java | 12 +- .../character/PhantomRangerTemplate.java | 13 +- .../character/PhantomSummonerTemplate.java | 13 +- .../character/PhoenixKnightTemplate.java | 13 +- .../actor/character/PlainsWalkerTemplate.java | 13 +- .../actor/character/ProphetTemplate.java | 12 +- .../actor/character/RogueTemplate.java | 12 +- .../actor/character/SagittariusTemplate.java | 13 +- .../actor/character/ScavengerTemplate.java | 12 +- .../character/ShillieanSaintTemplate.java | 13 +- .../character/ShillienElderTemplate.java | 13 +- .../character/ShillienKnightTemplate.java | 13 +- .../character/ShillienOracleTemplate.java | 13 +- .../character/ShillienTemplarTemplate.java | 13 +- .../actor/character/SilverRangerTemplate.java | 13 +- .../actor/character/SorcerorTemplate.java | 12 +- .../actor/character/SoultakerTemplate.java | 12 +- .../character/SpectralMasterTemplate.java | 13 +- .../character/SpectraldancerTemplate.java | 13 +- .../actor/character/SpellhowlerTemplate.java | 12 +- .../actor/character/SpellsingerTemplate.java | 12 +- .../character/StormScreamerTemplate.java | 13 +- .../actor/character/SwordMuseTemplate.java | 12 +- .../actor/character/SwordSingerTemplate.java | 12 +- .../actor/character/TempleKnightTemplate.java | 13 +- .../actor/character/TitanTemplate.java | 12 +- .../character/TreasureHunterTemplate.java | 13 +- .../actor/character/TricksterTemplate.java | 12 +- .../actor/character/TrooperTemplate.java | 12 +- .../actor/character/TyrantTemplate.java | 12 +- .../actor/character/WarcryerTemplate.java | 12 +- .../actor/character/WarderTemplate.java | 12 +- .../actor/character/WarlockTemplate.java | 12 +- .../actor/character/WarlordTemplate.java | 12 +- .../actor/character/WarriorTemplate.java | 12 +- .../actor/character/WarsmithTemplate.java | 12 +- .../actor/character/WindRiderTemplate.java | 12 +- .../actor/character/WizardTemplate.java | 12 +- .../actor/monster/WolfMonsterTemplate.java | 4 +- .../actor/npc/JasmineGatekeeperTemplate.java | 80 ++++++ src/dao/com/l2jserver/db/dao/NPCDAO.java | 98 +++++++ .../com/l2jserver/db/dao/MySQL5DAOModule.java | 4 + .../db/dao/mysql5/MySQL5CharacterDAO.java | 3 +- .../l2jserver/db/dao/mysql5/MySQL5NPCDAO.java | 264 ++++++++++++++++++ .../java/com/l2jserver/L2JGameServerMain.java | 95 +++---- .../packet/server/ActorMovementPacket.java | 16 +- .../CharacterInformationBroadcastPacket.java | 263 +++++++++++++++++ .../server/CharacterInformationPacket.java | 18 +- .../packet/server/NPCInformationPacket.java | 15 +- .../game/net/packet/server/ObjectRemove.java | 52 ++++ .../com/l2jserver/model/AbstractModel.java | 17 +- src/main/java/com/l2jserver/model/Model.java | 11 + .../java/com/l2jserver/model/game/Spawn.java | 74 ----- .../model/template/ActorTemplate.java | 33 +++ .../model/template/CharacterTemplate.java | 47 +++- .../l2jserver/model/template/NPCTemplate.java | 40 +-- .../template/npc/TeleporterNPCTemplate.java | 9 + .../java/com/l2jserver/model/world/Actor.java | 23 +- .../java/com/l2jserver/model/world/Item.java | 19 +- .../l2jserver/model/world/L2Character.java | 15 +- .../java/com/l2jserver/model/world/NPC.java | 11 +- .../java/com/l2jserver/model/world/Pet.java | 5 + .../com/l2jserver/model/world/Player.java | 6 +- .../model/world/PositionableObject.java | 7 +- .../character/event/CharacterMoveEvent.java | 6 +- .../com/l2jserver/service/ServiceManager.java | 4 + .../service/core/Log4JLoggingService.java | 5 +- .../database/MySQLDatabaseService.java | 4 +- .../game/character/CharacterServiceImpl.java | 109 ++++++-- .../service/game/npc/NPCService.java | 15 + .../service/game/npc/NPCServiceImpl.java | 33 +++ .../game/world/CachedWorldIDService.java | 9 +- .../world/event/FilteredWorldListener.java | 2 +- .../world/event/WorldEventDispatcherImpl.java | 64 +++-- .../game/world/filter/ExcludeFilter.java | 2 +- .../world/filter/impl/KnownListFilter.java | 4 +- .../filter/impl/KnownListUpdateFilter.java | 39 +++ .../world/filter/impl/RangePointFilter.java | 60 ++++ .../util/factory/CollectionFactory.java | 12 + .../world/WorldEventDispatcherImplTest.java | 8 +- .../service/world/WorldServiceImplTest.java | 10 +- .../chartemplate/CharacterTemplateBase.txt | 11 +- .../conversor/npctemplate/NPCTemplateBase.txt | 5 + 148 files changed, 2309 insertions(+), 597 deletions(-) create mode 100644 data/script/template/script/template/actor/npc/JasmineGatekeeperTemplate.java create mode 100644 src/dao/com/l2jserver/db/dao/NPCDAO.java create mode 100644 src/dao/mysql5/com/l2jserver/db/dao/mysql5/MySQL5NPCDAO.java create mode 100644 src/main/java/com/l2jserver/game/net/packet/server/CharacterInformationBroadcastPacket.java create mode 100644 src/main/java/com/l2jserver/game/net/packet/server/ObjectRemove.java delete mode 100644 src/main/java/com/l2jserver/model/game/Spawn.java create mode 100644 src/main/java/com/l2jserver/service/game/world/filter/impl/KnownListUpdateFilter.java create mode 100644 src/main/java/com/l2jserver/service/game/world/filter/impl/RangePointFilter.java diff --git a/data/script/template/script/template/actor/character/AbyssWalkerTemplate.java b/data/script/template/script/template/actor/character/AbyssWalkerTemplate.java index 2d63c79a2..31831be48 100644 --- a/data/script/template/script/template/actor/character/AbyssWalkerTemplate.java +++ b/data/script/template/script/template/actor/character/AbyssWalkerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class AbyssWalkerTemplate extends AssassinTemplate { @Inject - public AbyssWalkerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ABYSS_WALKER.id), CharacterClass.ABYSS_WALKER, Point.fromXYZ(28377, 10916, -4224)); + public AbyssWalkerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ABYSS_WALKER.id), + CharacterClass.ABYSS_WALKER, Point.fromXYZ(28377, 10916, -4224)); // ATTRIBUTES attributes.intelligence = 25; attributes.strength = 41; @@ -46,8 +47,13 @@ public class AbyssWalkerTemplate extends AssassinTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 69000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected AbyssWalkerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/AdventurerTemplate.java b/data/script/template/script/template/actor/character/AdventurerTemplate.java index 976cd97ea..b79782f3f 100644 --- a/data/script/template/script/template/actor/character/AdventurerTemplate.java +++ b/data/script/template/script/template/actor/character/AdventurerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class AdventurerTemplate extends TreasureHunterTemplate { @Inject - public AdventurerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ADVENTURER.id), CharacterClass.ADVENTURER, Point.fromXYZ(-71338, 258271, -3104)); + public AdventurerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ADVENTURER.id), + CharacterClass.ADVENTURER, Point.fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +47,13 @@ public class AdventurerTemplate extends TreasureHunterTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected AdventurerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ArbalesterTemplate.java b/data/script/template/script/template/actor/character/ArbalesterTemplate.java index 6eb04f5b0..b3f531aa1 100644 --- a/data/script/template/script/template/actor/character/ArbalesterTemplate.java +++ b/data/script/template/script/template/actor/character/ArbalesterTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class ArbalesterTemplate extends WarderTemplate { @Inject - public ArbalesterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ARBALESTER.id), CharacterClass.ARBALESTER, Point.fromXYZ(-125533, 38114, 1142)); + public ArbalesterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ARBALESTER.id), + CharacterClass.ARBALESTER, Point.fromXYZ(-125533, 38114, 1142)); // ATTRIBUTES attributes.intelligence = 28; attributes.strength = 39; @@ -46,8 +47,13 @@ public class ArbalesterTemplate extends WarderTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 22.6; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected ArbalesterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ArcanaLordTemplate.java b/data/script/template/script/template/actor/character/ArcanaLordTemplate.java index e572f6b3f..e38da4d95 100644 --- a/data/script/template/script/template/actor/character/ArcanaLordTemplate.java +++ b/data/script/template/script/template/actor/character/ArcanaLordTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class ArcanaLordTemplate extends WarlockTemplate { @Inject - public ArcanaLordTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ARCANA_LORD.id), CharacterClass.ARCANA_LORD, Point.fromXYZ(-90890, 248027, -3570)); + public ArcanaLordTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ARCANA_LORD.id), + CharacterClass.ARCANA_LORD, Point + .fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +48,13 @@ public class ArcanaLordTemplate extends WarlockTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected ArcanaLordTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ArchmageTemplate.java b/data/script/template/script/template/actor/character/ArchmageTemplate.java index 1e88bffe9..48db3a3e9 100644 --- a/data/script/template/script/template/actor/character/ArchmageTemplate.java +++ b/data/script/template/script/template/actor/character/ArchmageTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class ArchmageTemplate extends SorcerorTemplate { @Inject - public ArchmageTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ARCHMAGE.id), CharacterClass.ARCHMAGE, Point.fromXYZ(-90890, 248027, -3570)); + public ArchmageTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ARCHMAGE.id), + CharacterClass.ARCHMAGE, Point.fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +47,13 @@ public class ArchmageTemplate extends SorcerorTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected ArchmageTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ArtisanTemplate.java b/data/script/template/script/template/actor/character/ArtisanTemplate.java index ca6bd8c31..abb101fa6 100644 --- a/data/script/template/script/template/actor/character/ArtisanTemplate.java +++ b/data/script/template/script/template/actor/character/ArtisanTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class ArtisanTemplate extends DwarvenFighterTemplate { @Inject - public ArtisanTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ARTISAN.id), CharacterClass.ARTISAN, Point.fromXYZ(108512, -174026, -400)); + public ArtisanTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ARTISAN.id), + CharacterClass.ARTISAN, Point.fromXYZ(108512, -174026, -400)); // ATTRIBUTES attributes.intelligence = 20; attributes.strength = 39; @@ -46,8 +47,13 @@ public class ArtisanTemplate extends DwarvenFighterTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 83000; attributes.craft = true; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 18.0; + this.femaleCollisionRadius = 5.0; + this.femaleCollisionHeight = 19.0; } - + protected ArtisanTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/AssassinTemplate.java b/data/script/template/script/template/actor/character/AssassinTemplate.java index 3c1509306..8ee64b073 100644 --- a/data/script/template/script/template/actor/character/AssassinTemplate.java +++ b/data/script/template/script/template/actor/character/AssassinTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class AssassinTemplate extends DarkFighterTemplate { @Inject - public AssassinTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ASSASSIN.id), CharacterClass.ASSASSIN, Point.fromXYZ(28377, 10916, -4224)); + public AssassinTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ASSASSIN.id), + CharacterClass.ASSASSIN, Point.fromXYZ(28377, 10916, -4224)); // ATTRIBUTES attributes.intelligence = 25; attributes.strength = 41; @@ -46,8 +47,13 @@ public class AssassinTemplate extends DarkFighterTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 69000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected AssassinTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/BersekerTemplate.java b/data/script/template/script/template/actor/character/BersekerTemplate.java index 998fb75f6..e90967d77 100644 --- a/data/script/template/script/template/actor/character/BersekerTemplate.java +++ b/data/script/template/script/template/actor/character/BersekerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class BersekerTemplate extends TrooperTemplate { @Inject - public BersekerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.BERSEKER.id), CharacterClass.BERSEKER, Point.fromXYZ(-125533, 38114, 1142)); + public BersekerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.BERSEKER.id), + CharacterClass.BERSEKER, Point.fromXYZ(-125533, 38114, 1142)); // ATTRIBUTES attributes.intelligence = 29; attributes.strength = 41; @@ -46,8 +47,13 @@ public class BersekerTemplate extends TrooperTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 25.2; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected BersekerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/BishopTemplate.java b/data/script/template/script/template/actor/character/BishopTemplate.java index 9cc902f66..eaebbe405 100644 --- a/data/script/template/script/template/actor/character/BishopTemplate.java +++ b/data/script/template/script/template/actor/character/BishopTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class BishopTemplate extends ClericTemplate { @Inject - public BishopTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.BISHOP.id), CharacterClass.BISHOP, Point.fromXYZ(-90890, 248027, -3570)); + public BishopTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.BISHOP.id), + CharacterClass.BISHOP, Point.fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +47,13 @@ public class BishopTemplate extends ClericTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected BishopTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/BladedancerTemplate.java b/data/script/template/script/template/actor/character/BladedancerTemplate.java index e0f24caaa..583407e02 100644 --- a/data/script/template/script/template/actor/character/BladedancerTemplate.java +++ b/data/script/template/script/template/actor/character/BladedancerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class BladedancerTemplate extends PalusKnightTemplate { @Inject - public BladedancerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.BLADEDANCER.id), CharacterClass.BLADEDANCER, Point.fromXYZ(28377, 10916, -4224)); + public BladedancerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.BLADEDANCER.id), + CharacterClass.BLADEDANCER, Point.fromXYZ(28377, 10916, -4224)); // ATTRIBUTES attributes.intelligence = 25; attributes.strength = 41; @@ -46,8 +47,13 @@ public class BladedancerTemplate extends PalusKnightTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 69000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected BladedancerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/BountyHunterTemplate.java b/data/script/template/script/template/actor/character/BountyHunterTemplate.java index 978c06cc1..dec737836 100644 --- a/data/script/template/script/template/actor/character/BountyHunterTemplate.java +++ b/data/script/template/script/template/actor/character/BountyHunterTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class BountyHunterTemplate extends ScavengerTemplate { @Inject - public BountyHunterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.BOUNTY_HUNTER.id), CharacterClass.BOUNTY_HUNTER, Point.fromXYZ(108512, -174026, -400)); + public BountyHunterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.BOUNTY_HUNTER.id), + CharacterClass.BOUNTY_HUNTER, Point.fromXYZ(108512, -174026, + -400)); // ATTRIBUTES attributes.intelligence = 20; attributes.strength = 39; @@ -46,8 +48,13 @@ public class BountyHunterTemplate extends ScavengerTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 83000; attributes.craft = true; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 18.0; + this.femaleCollisionRadius = 5.0; + this.femaleCollisionHeight = 19.0; } - + protected BountyHunterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/CardinalTemplate.java b/data/script/template/script/template/actor/character/CardinalTemplate.java index fb010d2e8..77a2921d0 100644 --- a/data/script/template/script/template/actor/character/CardinalTemplate.java +++ b/data/script/template/script/template/actor/character/CardinalTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class CardinalTemplate extends BishopTemplate { @Inject - public CardinalTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.CARDINAL.id), CharacterClass.CARDINAL, Point.fromXYZ(-90890, 248027, -3570)); + public CardinalTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.CARDINAL.id), + CharacterClass.CARDINAL, Point.fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +47,13 @@ public class CardinalTemplate extends BishopTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected CardinalTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ClericTemplate.java b/data/script/template/script/template/actor/character/ClericTemplate.java index 80b8777a8..93e15331e 100644 --- a/data/script/template/script/template/actor/character/ClericTemplate.java +++ b/data/script/template/script/template/actor/character/ClericTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class ClericTemplate extends HumanMysticTemplate { @Inject - public ClericTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.CLERIC.id), CharacterClass.CLERIC, Point.fromXYZ(-90890, 248027, -3570)); + public ClericTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.CLERIC.id), + CharacterClass.CLERIC, Point.fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +47,13 @@ public class ClericTemplate extends HumanMysticTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected ClericTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/DarkAvengerTemplate.java b/data/script/template/script/template/actor/character/DarkAvengerTemplate.java index ac95a5e45..92189bfd6 100644 --- a/data/script/template/script/template/actor/character/DarkAvengerTemplate.java +++ b/data/script/template/script/template/actor/character/DarkAvengerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class DarkAvengerTemplate extends KnightTemplate { @Inject - public DarkAvengerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.DARK_AVENGER.id), CharacterClass.DARK_AVENGER, Point.fromXYZ(-71338, 258271, -3104)); + public DarkAvengerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.DARK_AVENGER.id), + CharacterClass.DARK_AVENGER, Point.fromXYZ(-71338, 258271, + -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +48,13 @@ public class DarkAvengerTemplate extends KnightTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected DarkAvengerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/DarkFighterTemplate.java b/data/script/template/script/template/actor/character/DarkFighterTemplate.java index caef40da3..7d6b941b0 100644 --- a/data/script/template/script/template/actor/character/DarkFighterTemplate.java +++ b/data/script/template/script/template/actor/character/DarkFighterTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class DarkFighterTemplate extends AbstractDarkElfCharacterTemplate { @Inject - public DarkFighterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.DARK_FIGHTER.id), CharacterClass.DARK_FIGHTER, Point.fromXYZ(28377, 10916, -4224)); + public DarkFighterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.DARK_FIGHTER.id), + CharacterClass.DARK_FIGHTER, Point.fromXYZ(28377, 10916, -4224)); // ATTRIBUTES attributes.intelligence = 25; attributes.strength = 41; @@ -46,8 +47,13 @@ public class DarkFighterTemplate extends AbstractDarkElfCharacterTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 69000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected DarkFighterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/DarkMysticTemplate.java b/data/script/template/script/template/actor/character/DarkMysticTemplate.java index 5fb6437f3..629ffe46e 100644 --- a/data/script/template/script/template/actor/character/DarkMysticTemplate.java +++ b/data/script/template/script/template/actor/character/DarkMysticTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class DarkMysticTemplate extends AbstractDarkElfCharacterTemplate { @Inject - public DarkMysticTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.DARK_MYSTIC.id), CharacterClass.DARK_MYSTIC, Point.fromXYZ(28295, 11063, -4224)); + public DarkMysticTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.DARK_MYSTIC.id), + CharacterClass.DARK_MYSTIC, Point.fromXYZ(28295, 11063, -4224)); // ATTRIBUTES attributes.intelligence = 44; attributes.strength = 23; @@ -46,8 +47,13 @@ public class DarkMysticTemplate extends AbstractDarkElfCharacterTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 61000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected DarkMysticTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/DarkWizardTemplate.java b/data/script/template/script/template/actor/character/DarkWizardTemplate.java index a9ad19805..ecb1ecd1a 100644 --- a/data/script/template/script/template/actor/character/DarkWizardTemplate.java +++ b/data/script/template/script/template/actor/character/DarkWizardTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class DarkWizardTemplate extends DarkMysticTemplate { @Inject - public DarkWizardTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.DARK_WIZARD.id), CharacterClass.DARK_WIZARD, Point.fromXYZ(28295, 11063, -4224)); + public DarkWizardTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.DARK_WIZARD.id), + CharacterClass.DARK_WIZARD, Point.fromXYZ(28295, 11063, -4224)); // ATTRIBUTES attributes.intelligence = 44; attributes.strength = 23; @@ -46,8 +47,13 @@ public class DarkWizardTemplate extends DarkMysticTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 61000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected DarkWizardTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/DestroyerTemplate.java b/data/script/template/script/template/actor/character/DestroyerTemplate.java index 13018f434..35bb8c664 100644 --- a/data/script/template/script/template/actor/character/DestroyerTemplate.java +++ b/data/script/template/script/template/actor/character/DestroyerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class DestroyerTemplate extends OrcRaiderTemplate { @Inject - public DestroyerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.DESTROYER.id), CharacterClass.DESTROYER, Point.fromXYZ(-56693, -113610, -690)); + public DestroyerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.DESTROYER.id), + CharacterClass.DESTROYER, Point.fromXYZ(-56693, -113610, -690)); // ATTRIBUTES attributes.intelligence = 18; attributes.strength = 40; @@ -46,8 +47,13 @@ public class DestroyerTemplate extends OrcRaiderTemplate { attributes.moveSpeed = 117; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 11.0; + this.maleCollisionHeight = 28.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 27.0; } - + protected DestroyerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/DominatorTemplate.java b/data/script/template/script/template/actor/character/DominatorTemplate.java index 8c0bff6b0..b6b116820 100644 --- a/data/script/template/script/template/actor/character/DominatorTemplate.java +++ b/data/script/template/script/template/actor/character/DominatorTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class DominatorTemplate extends OverlordTemplate { @Inject - public DominatorTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.DOMINATOR.id), CharacterClass.DOMINATOR, Point.fromXYZ(-56682, -113730, -690)); + public DominatorTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.DOMINATOR.id), + CharacterClass.DOMINATOR, Point.fromXYZ(-56682, -113730, -690)); // ATTRIBUTES attributes.intelligence = 31; attributes.strength = 27; @@ -46,8 +47,13 @@ public class DominatorTemplate extends OverlordTemplate { attributes.moveSpeed = 121; attributes.maxWeigth = 68000; attributes.craft = false; + + this.maleCollisionRadius = 7.0; + this.maleCollisionHeight = 27.5; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 25.5; } - + protected DominatorTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/DoombringerTemplate.java b/data/script/template/script/template/actor/character/DoombringerTemplate.java index 1f681dbaa..ebcf4fe6d 100644 --- a/data/script/template/script/template/actor/character/DoombringerTemplate.java +++ b/data/script/template/script/template/actor/character/DoombringerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class DoombringerTemplate extends BersekerTemplate { @Inject - public DoombringerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.DOOMBRINGER.id), CharacterClass.DOOMBRINGER, Point.fromXYZ(-125533, 38114, 1142)); + public DoombringerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.DOOMBRINGER.id), + CharacterClass.DOOMBRINGER, Point.fromXYZ(-125533, 38114, 1142)); // ATTRIBUTES attributes.intelligence = 29; attributes.strength = 41; @@ -46,8 +47,13 @@ public class DoombringerTemplate extends BersekerTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 25.2; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected DoombringerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/DoomcryerTemplate.java b/data/script/template/script/template/actor/character/DoomcryerTemplate.java index b758fda17..f16636b8a 100644 --- a/data/script/template/script/template/actor/character/DoomcryerTemplate.java +++ b/data/script/template/script/template/actor/character/DoomcryerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class DoomcryerTemplate extends WarcryerTemplate { @Inject - public DoomcryerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.DOOMCRYER.id), CharacterClass.DOOMCRYER, Point.fromXYZ(-56682, -113730, -690)); + public DoomcryerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.DOOMCRYER.id), + CharacterClass.DOOMCRYER, Point.fromXYZ(-56682, -113730, -690)); // ATTRIBUTES attributes.intelligence = 31; attributes.strength = 27; @@ -46,8 +47,13 @@ public class DoomcryerTemplate extends WarcryerTemplate { attributes.moveSpeed = 121; attributes.maxWeigth = 68000; attributes.craft = false; + + this.maleCollisionRadius = 7.0; + this.maleCollisionHeight = 27.5; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 25.5; } - + protected DoomcryerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/DreadnoughtTemplate.java b/data/script/template/script/template/actor/character/DreadnoughtTemplate.java index 43202f886..4d688bede 100644 --- a/data/script/template/script/template/actor/character/DreadnoughtTemplate.java +++ b/data/script/template/script/template/actor/character/DreadnoughtTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class DreadnoughtTemplate extends WarlordTemplate { @Inject - public DreadnoughtTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.DREADNOUGHT.id), CharacterClass.DREADNOUGHT, Point.fromXYZ(-71338, 258271, -3104)); + public DreadnoughtTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.DREADNOUGHT.id), + CharacterClass.DREADNOUGHT, Point + .fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +48,13 @@ public class DreadnoughtTemplate extends WarlordTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected DreadnoughtTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/DuelistTemplate.java b/data/script/template/script/template/actor/character/DuelistTemplate.java index 567a531f5..55afb75a6 100644 --- a/data/script/template/script/template/actor/character/DuelistTemplate.java +++ b/data/script/template/script/template/actor/character/DuelistTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class DuelistTemplate extends GladiatorTemplate { @Inject - public DuelistTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.DUELIST.id), CharacterClass.DUELIST, Point.fromXYZ(-71338, 258271, -3104)); + public DuelistTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.DUELIST.id), + CharacterClass.DUELIST, Point.fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +47,13 @@ public class DuelistTemplate extends GladiatorTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected DuelistTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/DwarvenFighterTemplate.java b/data/script/template/script/template/actor/character/DwarvenFighterTemplate.java index 6a865d67d..e7c90871a 100644 --- a/data/script/template/script/template/actor/character/DwarvenFighterTemplate.java +++ b/data/script/template/script/template/actor/character/DwarvenFighterTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class DwarvenFighterTemplate extends AbstractDwarfCharacterTemplate { @Inject - public DwarvenFighterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.DWARVEN_FIGHTER.id), CharacterClass.DWARVEN_FIGHTER, Point.fromXYZ(108512, -174026, -400)); + public DwarvenFighterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.DWARVEN_FIGHTER.id), + CharacterClass.DWARVEN_FIGHTER, Point.fromXYZ(108512, -174026, + -400)); // ATTRIBUTES attributes.intelligence = 20; attributes.strength = 39; @@ -46,8 +48,13 @@ public class DwarvenFighterTemplate extends AbstractDwarfCharacterTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 83000; attributes.craft = true; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 18.0; + this.femaleCollisionRadius = 5.0; + this.femaleCollisionHeight = 19.0; } - + protected DwarvenFighterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ElderTemplate.java b/data/script/template/script/template/actor/character/ElderTemplate.java index 8b0f580cc..967d3a28c 100644 --- a/data/script/template/script/template/actor/character/ElderTemplate.java +++ b/data/script/template/script/template/actor/character/ElderTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class ElderTemplate extends OracleTemplate { @Inject - public ElderTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ELDER.id), CharacterClass.ELDER, Point.fromXYZ(46182, 41198, -3440)); + public ElderTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ELDER.id), CharacterClass.ELDER, + Point.fromXYZ(46182, 41198, -3440)); // ATTRIBUTES attributes.intelligence = 37; attributes.strength = 21; @@ -46,8 +47,13 @@ public class ElderTemplate extends OracleTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 62400; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected ElderTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ElementalMasterTemplate.java b/data/script/template/script/template/actor/character/ElementalMasterTemplate.java index 91aa58d2d..5252e3bfa 100644 --- a/data/script/template/script/template/actor/character/ElementalMasterTemplate.java +++ b/data/script/template/script/template/actor/character/ElementalMasterTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class ElementalMasterTemplate extends ElementalSummonerTemplate { @Inject - public ElementalMasterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ELEMENTAL_MASTER.id), CharacterClass.ELEMENTAL_MASTER, Point.fromXYZ(46182, 41198, -3440)); + public ElementalMasterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ELEMENTAL_MASTER.id), + CharacterClass.ELEMENTAL_MASTER, Point.fromXYZ(46182, 41198, + -3440)); // ATTRIBUTES attributes.intelligence = 37; attributes.strength = 21; @@ -46,8 +48,13 @@ public class ElementalMasterTemplate extends ElementalSummonerTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 62400; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected ElementalMasterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ElementalSummonerTemplate.java b/data/script/template/script/template/actor/character/ElementalSummonerTemplate.java index eee2d9311..0f390a510 100644 --- a/data/script/template/script/template/actor/character/ElementalSummonerTemplate.java +++ b/data/script/template/script/template/actor/character/ElementalSummonerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class ElementalSummonerTemplate extends ElvenWizardTemplate { @Inject - public ElementalSummonerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ELEMENTAL_SUMMONER.id), CharacterClass.ELEMENTAL_SUMMONER, Point.fromXYZ(46182, 41198, -3440)); + public ElementalSummonerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ELEMENTAL_SUMMONER.id), + CharacterClass.ELEMENTAL_SUMMONER, Point.fromXYZ(46182, 41198, + -3440)); // ATTRIBUTES attributes.intelligence = 37; attributes.strength = 21; @@ -46,8 +48,13 @@ public class ElementalSummonerTemplate extends ElvenWizardTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 62400; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected ElementalSummonerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ElvenFighterTemplate.java b/data/script/template/script/template/actor/character/ElvenFighterTemplate.java index 60d25a76a..a4dff1276 100644 --- a/data/script/template/script/template/actor/character/ElvenFighterTemplate.java +++ b/data/script/template/script/template/actor/character/ElvenFighterTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class ElvenFighterTemplate extends AbstractElfCharacterTemplate { @Inject - public ElvenFighterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ELVEN_FIGHTER.id), CharacterClass.ELVEN_FIGHTER, Point.fromXYZ(45978, 41196, -3440)); + public ElvenFighterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ELVEN_FIGHTER.id), + CharacterClass.ELVEN_FIGHTER, Point + .fromXYZ(45978, 41196, -3440)); // ATTRIBUTES attributes.intelligence = 23; attributes.strength = 36; @@ -46,8 +48,13 @@ public class ElvenFighterTemplate extends AbstractElfCharacterTemplate { attributes.moveSpeed = 125; attributes.maxWeigth = 73000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected ElvenFighterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ElvenKnightTemplate.java b/data/script/template/script/template/actor/character/ElvenKnightTemplate.java index e8c6b700a..f54b11532 100644 --- a/data/script/template/script/template/actor/character/ElvenKnightTemplate.java +++ b/data/script/template/script/template/actor/character/ElvenKnightTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class ElvenKnightTemplate extends ElvenFighterTemplate { @Inject - public ElvenKnightTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ELVEN_KNIGHT.id), CharacterClass.ELVEN_KNIGHT, Point.fromXYZ(45978, 41196, -3440)); + public ElvenKnightTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ELVEN_KNIGHT.id), + CharacterClass.ELVEN_KNIGHT, Point.fromXYZ(45978, 41196, -3440)); // ATTRIBUTES attributes.intelligence = 23; attributes.strength = 36; @@ -46,8 +47,13 @@ public class ElvenKnightTemplate extends ElvenFighterTemplate { attributes.moveSpeed = 125; attributes.maxWeigth = 73000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected ElvenKnightTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ElvenMysticTemplate.java b/data/script/template/script/template/actor/character/ElvenMysticTemplate.java index e6eff9263..453cf5b09 100644 --- a/data/script/template/script/template/actor/character/ElvenMysticTemplate.java +++ b/data/script/template/script/template/actor/character/ElvenMysticTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class ElvenMysticTemplate extends AbstractElfCharacterTemplate { @Inject - public ElvenMysticTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ELVEN_MYSTIC.id), CharacterClass.ELVEN_MYSTIC, Point.fromXYZ(46182, 41198, -3440)); + public ElvenMysticTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ELVEN_MYSTIC.id), + CharacterClass.ELVEN_MYSTIC, Point.fromXYZ(46182, 41198, -3440)); // ATTRIBUTES attributes.intelligence = 37; attributes.strength = 21; @@ -46,8 +47,13 @@ public class ElvenMysticTemplate extends AbstractElfCharacterTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 62400; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected ElvenMysticTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ElvenScoutTemplate.java b/data/script/template/script/template/actor/character/ElvenScoutTemplate.java index e23003ddb..b205298d6 100644 --- a/data/script/template/script/template/actor/character/ElvenScoutTemplate.java +++ b/data/script/template/script/template/actor/character/ElvenScoutTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class ElvenScoutTemplate extends ElvenFighterTemplate { @Inject - public ElvenScoutTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ELVEN_SCOUT.id), CharacterClass.ELVEN_SCOUT, Point.fromXYZ(45978, 41196, -3440)); + public ElvenScoutTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ELVEN_SCOUT.id), + CharacterClass.ELVEN_SCOUT, Point.fromXYZ(45978, 41196, -3440)); // ATTRIBUTES attributes.intelligence = 23; attributes.strength = 36; @@ -46,8 +47,13 @@ public class ElvenScoutTemplate extends ElvenFighterTemplate { attributes.moveSpeed = 125; attributes.maxWeigth = 73000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected ElvenScoutTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ElvenWizardTemplate.java b/data/script/template/script/template/actor/character/ElvenWizardTemplate.java index 1513705f3..56cb62441 100644 --- a/data/script/template/script/template/actor/character/ElvenWizardTemplate.java +++ b/data/script/template/script/template/actor/character/ElvenWizardTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class ElvenWizardTemplate extends ElvenMysticTemplate { @Inject - public ElvenWizardTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ELVEN_WIZARD.id), CharacterClass.ELVEN_WIZARD, Point.fromXYZ(46182, 41198, -3440)); + public ElvenWizardTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ELVEN_WIZARD.id), + CharacterClass.ELVEN_WIZARD, Point.fromXYZ(46182, 41198, -3440)); // ATTRIBUTES attributes.intelligence = 37; attributes.strength = 21; @@ -46,8 +47,13 @@ public class ElvenWizardTemplate extends ElvenMysticTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 62400; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected ElvenWizardTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/EvaSaintTemplate.java b/data/script/template/script/template/actor/character/EvaSaintTemplate.java index b67b43b24..d49eec246 100644 --- a/data/script/template/script/template/actor/character/EvaSaintTemplate.java +++ b/data/script/template/script/template/actor/character/EvaSaintTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class EvaSaintTemplate extends ElderTemplate { @Inject - public EvaSaintTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.EVA_SAINT.id), CharacterClass.EVA_SAINT, Point.fromXYZ(46182, 41198, -3440)); + public EvaSaintTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.EVA_SAINT.id), + CharacterClass.EVA_SAINT, Point.fromXYZ(46182, 41198, -3440)); // ATTRIBUTES attributes.intelligence = 37; attributes.strength = 21; @@ -46,8 +47,13 @@ public class EvaSaintTemplate extends ElderTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 62400; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected EvaSaintTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/EvaTemplarTemplate.java b/data/script/template/script/template/actor/character/EvaTemplarTemplate.java index 7f176ad79..193378b6f 100644 --- a/data/script/template/script/template/actor/character/EvaTemplarTemplate.java +++ b/data/script/template/script/template/actor/character/EvaTemplarTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class EvaTemplarTemplate extends TempleKnightTemplate { @Inject - public EvaTemplarTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.EVA_TEMPLAR.id), CharacterClass.EVA_TEMPLAR, Point.fromXYZ(45978, 41196, -3440)); + public EvaTemplarTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.EVA_TEMPLAR.id), + CharacterClass.EVA_TEMPLAR, Point.fromXYZ(45978, 41196, -3440)); // ATTRIBUTES attributes.intelligence = 23; attributes.strength = 36; @@ -46,8 +47,13 @@ public class EvaTemplarTemplate extends TempleKnightTemplate { attributes.moveSpeed = 125; attributes.maxWeigth = 73000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected EvaTemplarTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/FemaleSoldierTemplate.java b/data/script/template/script/template/actor/character/FemaleSoldierTemplate.java index 7b7f98c62..ca5c1607b 100644 --- a/data/script/template/script/template/actor/character/FemaleSoldierTemplate.java +++ b/data/script/template/script/template/actor/character/FemaleSoldierTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class FemaleSoldierTemplate extends AbstractKamaelCharacterTemplate { @Inject - public FemaleSoldierTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.FEMALE_SOLDIER.id), CharacterClass.FEMALE_SOLDIER, Point.fromXYZ(-125517, 38267, 1176)); + public FemaleSoldierTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.FEMALE_SOLDIER.id), + CharacterClass.FEMALE_SOLDIER, Point.fromXYZ(-125517, 38267, + 1176)); // ATTRIBUTES attributes.intelligence = 28; attributes.strength = 39; @@ -46,8 +48,13 @@ public class FemaleSoldierTemplate extends AbstractKamaelCharacterTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 22.6; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected FemaleSoldierTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/FemaleSoulbreakerTemplate.java b/data/script/template/script/template/actor/character/FemaleSoulbreakerTemplate.java index bddd22aa4..e485b7e45 100644 --- a/data/script/template/script/template/actor/character/FemaleSoulbreakerTemplate.java +++ b/data/script/template/script/template/actor/character/FemaleSoulbreakerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class FemaleSoulbreakerTemplate extends WarderTemplate { @Inject - public FemaleSoulbreakerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.FEMALE_SOULBREAKER.id), CharacterClass.FEMALE_SOULBREAKER, Point.fromXYZ(-125533, 38114, 1142)); + public FemaleSoulbreakerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.FEMALE_SOULBREAKER.id), + CharacterClass.FEMALE_SOULBREAKER, Point.fromXYZ(-125533, + 38114, 1142)); // ATTRIBUTES attributes.intelligence = 28; attributes.strength = 39; @@ -46,8 +48,13 @@ public class FemaleSoulbreakerTemplate extends WarderTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 22.6; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected FemaleSoulbreakerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/FemaleSouldhoundTemplate.java b/data/script/template/script/template/actor/character/FemaleSouldhoundTemplate.java index 77c1c7fb5..7d4c2c58d 100644 --- a/data/script/template/script/template/actor/character/FemaleSouldhoundTemplate.java +++ b/data/script/template/script/template/actor/character/FemaleSouldhoundTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class FemaleSouldhoundTemplate extends FemaleSoulbreakerTemplate { @Inject - public FemaleSouldhoundTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.FEMALE_SOULDHOUND.id), CharacterClass.FEMALE_SOULDHOUND, Point.fromXYZ(-125533, 38114, 1142)); + public FemaleSouldhoundTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.FEMALE_SOULDHOUND.id), + CharacterClass.FEMALE_SOULDHOUND, Point.fromXYZ(-125533, 38114, + 1142)); // ATTRIBUTES attributes.intelligence = 28; attributes.strength = 39; @@ -46,8 +48,13 @@ public class FemaleSouldhoundTemplate extends FemaleSoulbreakerTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 22.6; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected FemaleSouldhoundTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/FortuneSeekerTemplate.java b/data/script/template/script/template/actor/character/FortuneSeekerTemplate.java index ee7bbd0c0..5ccc4d686 100644 --- a/data/script/template/script/template/actor/character/FortuneSeekerTemplate.java +++ b/data/script/template/script/template/actor/character/FortuneSeekerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class FortuneSeekerTemplate extends BountyHunterTemplate { @Inject - public FortuneSeekerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.FORTUNE_SEEKER.id), CharacterClass.FORTUNE_SEEKER, Point.fromXYZ(108512, -174026, -400)); + public FortuneSeekerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.FORTUNE_SEEKER.id), + CharacterClass.FORTUNE_SEEKER, Point.fromXYZ(108512, -174026, + -400)); // ATTRIBUTES attributes.intelligence = 20; attributes.strength = 39; @@ -46,8 +48,13 @@ public class FortuneSeekerTemplate extends BountyHunterTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 83000; attributes.craft = true; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 18.0; + this.femaleCollisionRadius = 5.0; + this.femaleCollisionHeight = 19.0; } - + protected FortuneSeekerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/GhostHunterTemplate.java b/data/script/template/script/template/actor/character/GhostHunterTemplate.java index 778b1a2a3..54cf7c8ba 100644 --- a/data/script/template/script/template/actor/character/GhostHunterTemplate.java +++ b/data/script/template/script/template/actor/character/GhostHunterTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class GhostHunterTemplate extends AbyssWalkerTemplate { @Inject - public GhostHunterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.GHOST_HUNTER.id), CharacterClass.GHOST_HUNTER, Point.fromXYZ(28377, 10916, -4224)); + public GhostHunterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.GHOST_HUNTER.id), + CharacterClass.GHOST_HUNTER, Point.fromXYZ(28377, 10916, -4224)); // ATTRIBUTES attributes.intelligence = 25; attributes.strength = 41; @@ -46,8 +47,13 @@ public class GhostHunterTemplate extends AbyssWalkerTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 69000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected GhostHunterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/GhostSentinelTemplate.java b/data/script/template/script/template/actor/character/GhostSentinelTemplate.java index 558bc8e19..9c992d754 100644 --- a/data/script/template/script/template/actor/character/GhostSentinelTemplate.java +++ b/data/script/template/script/template/actor/character/GhostSentinelTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class GhostSentinelTemplate extends PhantomRangerTemplate { @Inject - public GhostSentinelTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.GHOST_SENTINEL.id), CharacterClass.GHOST_SENTINEL, Point.fromXYZ(28377, 10916, -4224)); + public GhostSentinelTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.GHOST_SENTINEL.id), + CharacterClass.GHOST_SENTINEL, Point.fromXYZ(28377, 10916, + -4224)); // ATTRIBUTES attributes.intelligence = 25; attributes.strength = 41; @@ -46,8 +48,13 @@ public class GhostSentinelTemplate extends PhantomRangerTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 69000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected GhostSentinelTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/GladiatorTemplate.java b/data/script/template/script/template/actor/character/GladiatorTemplate.java index a0f087bd2..1b4f64ac9 100644 --- a/data/script/template/script/template/actor/character/GladiatorTemplate.java +++ b/data/script/template/script/template/actor/character/GladiatorTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class GladiatorTemplate extends WarriorTemplate { @Inject - public GladiatorTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.GLADIATOR.id), CharacterClass.GLADIATOR, Point.fromXYZ(-71338, 258271, -3104)); + public GladiatorTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.GLADIATOR.id), + CharacterClass.GLADIATOR, Point.fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +47,13 @@ public class GladiatorTemplate extends WarriorTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected GladiatorTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/GrandKhauatariTemplate.java b/data/script/template/script/template/actor/character/GrandKhauatariTemplate.java index 254d2bacf..b7323afcf 100644 --- a/data/script/template/script/template/actor/character/GrandKhauatariTemplate.java +++ b/data/script/template/script/template/actor/character/GrandKhauatariTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class GrandKhauatariTemplate extends TyrantTemplate { @Inject - public GrandKhauatariTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.GRAND_KHAUATARI.id), CharacterClass.GRAND_KHAUATARI, Point.fromXYZ(-56693, -113610, -690)); + public GrandKhauatariTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.GRAND_KHAUATARI.id), + CharacterClass.GRAND_KHAUATARI, Point.fromXYZ(-56693, -113610, + -690)); // ATTRIBUTES attributes.intelligence = 18; attributes.strength = 40; @@ -46,8 +48,13 @@ public class GrandKhauatariTemplate extends TyrantTemplate { attributes.moveSpeed = 117; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 11.0; + this.maleCollisionHeight = 28.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 27.0; } - + protected GrandKhauatariTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/HawkeyeTemplate.java b/data/script/template/script/template/actor/character/HawkeyeTemplate.java index 48fe35191..55d93d47d 100644 --- a/data/script/template/script/template/actor/character/HawkeyeTemplate.java +++ b/data/script/template/script/template/actor/character/HawkeyeTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class HawkeyeTemplate extends RogueTemplate { @Inject - public HawkeyeTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.HAWKEYE.id), CharacterClass.HAWKEYE, Point.fromXYZ(-71338, 258271, -3104)); + public HawkeyeTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.HAWKEYE.id), + CharacterClass.HAWKEYE, Point.fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +47,13 @@ public class HawkeyeTemplate extends RogueTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected HawkeyeTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/HellKnightTemplate.java b/data/script/template/script/template/actor/character/HellKnightTemplate.java index 046ef693a..4bc6a0cf7 100644 --- a/data/script/template/script/template/actor/character/HellKnightTemplate.java +++ b/data/script/template/script/template/actor/character/HellKnightTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class HellKnightTemplate extends DarkAvengerTemplate { @Inject - public HellKnightTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.HELL_KNIGHT.id), CharacterClass.HELL_KNIGHT, Point.fromXYZ(-71338, 258271, -3104)); + public HellKnightTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.HELL_KNIGHT.id), + CharacterClass.HELL_KNIGHT, Point + .fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +48,13 @@ public class HellKnightTemplate extends DarkAvengerTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected HellKnightTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/HierophantTemplate.java b/data/script/template/script/template/actor/character/HierophantTemplate.java index 71cf24797..5d7e7944c 100644 --- a/data/script/template/script/template/actor/character/HierophantTemplate.java +++ b/data/script/template/script/template/actor/character/HierophantTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class HierophantTemplate extends ProphetTemplate { @Inject - public HierophantTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.HIEROPHANT.id), CharacterClass.HIEROPHANT, Point.fromXYZ(-90890, 248027, -3570)); + public HierophantTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.HIEROPHANT.id), + CharacterClass.HIEROPHANT, Point.fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +47,13 @@ public class HierophantTemplate extends ProphetTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected HierophantTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/HumanFighterTemplate.java b/data/script/template/script/template/actor/character/HumanFighterTemplate.java index 3a98c1163..e4fab1d56 100644 --- a/data/script/template/script/template/actor/character/HumanFighterTemplate.java +++ b/data/script/template/script/template/actor/character/HumanFighterTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class HumanFighterTemplate extends AbstractHumanCharacterTemplate { @Inject - public HumanFighterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.HUMAN_FIGHTER.id), CharacterClass.HUMAN_FIGHTER, Point.fromXYZ(-71338, 258271, -3104)); + public HumanFighterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.HUMAN_FIGHTER.id), + CharacterClass.HUMAN_FIGHTER, Point.fromXYZ(-71338, 258271, + -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +48,13 @@ public class HumanFighterTemplate extends AbstractHumanCharacterTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected HumanFighterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/HumanMysticTemplate.java b/data/script/template/script/template/actor/character/HumanMysticTemplate.java index f73190cf5..0d3f4757d 100644 --- a/data/script/template/script/template/actor/character/HumanMysticTemplate.java +++ b/data/script/template/script/template/actor/character/HumanMysticTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class HumanMysticTemplate extends AbstractHumanCharacterTemplate { @Inject - public HumanMysticTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.HUMAN_MYSTIC.id), CharacterClass.HUMAN_MYSTIC, Point.fromXYZ(-90890, 248027, -3570)); + public HumanMysticTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.HUMAN_MYSTIC.id), + CharacterClass.HUMAN_MYSTIC, Point.fromXYZ(-90890, 248027, + -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +48,13 @@ public class HumanMysticTemplate extends AbstractHumanCharacterTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected HumanMysticTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/InspectorTemplate.java b/data/script/template/script/template/actor/character/InspectorTemplate.java index da1aae465..0087b9981 100644 --- a/data/script/template/script/template/actor/character/InspectorTemplate.java +++ b/data/script/template/script/template/actor/character/InspectorTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class InspectorTemplate extends WarderTemplate { @Inject - public InspectorTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.INSPECTOR.id), CharacterClass.INSPECTOR, Point.fromXYZ(-125533, 38114, 1142)); + public InspectorTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.INSPECTOR.id), + CharacterClass.INSPECTOR, Point.fromXYZ(-125533, 38114, 1142)); // ATTRIBUTES attributes.intelligence = 28; attributes.strength = 39; @@ -46,8 +47,13 @@ public class InspectorTemplate extends WarderTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 25.2; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected InspectorTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/JudicatorTemplate.java b/data/script/template/script/template/actor/character/JudicatorTemplate.java index c45a2e900..b8d85ab72 100644 --- a/data/script/template/script/template/actor/character/JudicatorTemplate.java +++ b/data/script/template/script/template/actor/character/JudicatorTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class JudicatorTemplate extends InspectorTemplate { @Inject - public JudicatorTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.JUDICATOR.id), CharacterClass.JUDICATOR, Point.fromXYZ(-125533, 38114, 1142)); + public JudicatorTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.JUDICATOR.id), + CharacterClass.JUDICATOR, Point.fromXYZ(-125533, 38114, 1142)); // ATTRIBUTES attributes.intelligence = 28; attributes.strength = 39; @@ -46,8 +47,13 @@ public class JudicatorTemplate extends InspectorTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 25.2; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected JudicatorTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/KnightTemplate.java b/data/script/template/script/template/actor/character/KnightTemplate.java index 7fb955c03..4a783f7c6 100644 --- a/data/script/template/script/template/actor/character/KnightTemplate.java +++ b/data/script/template/script/template/actor/character/KnightTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class KnightTemplate extends HumanFighterTemplate { @Inject - public KnightTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.KNIGHT.id), CharacterClass.KNIGHT, Point.fromXYZ(-71338, 258271, -3104)); + public KnightTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.KNIGHT.id), + CharacterClass.KNIGHT, Point.fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +47,13 @@ public class KnightTemplate extends HumanFighterTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected KnightTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/MaestroTemplate.java b/data/script/template/script/template/actor/character/MaestroTemplate.java index 7e02ba9bd..5fb808b43 100644 --- a/data/script/template/script/template/actor/character/MaestroTemplate.java +++ b/data/script/template/script/template/actor/character/MaestroTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class MaestroTemplate extends WarsmithTemplate { @Inject - public MaestroTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.MAESTRO.id), CharacterClass.MAESTRO, Point.fromXYZ(108512, -174026, -400)); + public MaestroTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.MAESTRO.id), + CharacterClass.MAESTRO, Point.fromXYZ(108512, -174026, -400)); // ATTRIBUTES attributes.intelligence = 20; attributes.strength = 39; @@ -46,8 +47,13 @@ public class MaestroTemplate extends WarsmithTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 83000; attributes.craft = true; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 18.0; + this.femaleCollisionRadius = 5.0; + this.femaleCollisionHeight = 19.0; } - + protected MaestroTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/MaleSoldierTemplate.java b/data/script/template/script/template/actor/character/MaleSoldierTemplate.java index 2278bf7c8..775c8da86 100644 --- a/data/script/template/script/template/actor/character/MaleSoldierTemplate.java +++ b/data/script/template/script/template/actor/character/MaleSoldierTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class MaleSoldierTemplate extends AbstractKamaelCharacterTemplate { @Inject - public MaleSoldierTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.MALE_SOLDIER.id), CharacterClass.MALE_SOLDIER, Point.fromXYZ(-125464, 37776, 1176)); + public MaleSoldierTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.MALE_SOLDIER.id), + CharacterClass.MALE_SOLDIER, Point + .fromXYZ(-125464, 37776, 1176)); // ATTRIBUTES attributes.intelligence = 29; attributes.strength = 41; @@ -46,8 +48,13 @@ public class MaleSoldierTemplate extends AbstractKamaelCharacterTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 25.2; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected MaleSoldierTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/MaleSoulbreakerTemplate.java b/data/script/template/script/template/actor/character/MaleSoulbreakerTemplate.java index 2e71949d1..ecdf07e9f 100644 --- a/data/script/template/script/template/actor/character/MaleSoulbreakerTemplate.java +++ b/data/script/template/script/template/actor/character/MaleSoulbreakerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class MaleSoulbreakerTemplate extends TrooperTemplate { @Inject - public MaleSoulbreakerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.MALE_SOULBREAKER.id), CharacterClass.MALE_SOULBREAKER, Point.fromXYZ(-125533, 38114, 1142)); + public MaleSoulbreakerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.MALE_SOULBREAKER.id), + CharacterClass.MALE_SOULBREAKER, Point.fromXYZ(-125533, 38114, + 1142)); // ATTRIBUTES attributes.intelligence = 29; attributes.strength = 41; @@ -46,8 +48,13 @@ public class MaleSoulbreakerTemplate extends TrooperTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 25.2; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected MaleSoulbreakerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/MaleSouldhoundTemplate.java b/data/script/template/script/template/actor/character/MaleSouldhoundTemplate.java index f78e2ed7f..d7bdde0eb 100644 --- a/data/script/template/script/template/actor/character/MaleSouldhoundTemplate.java +++ b/data/script/template/script/template/actor/character/MaleSouldhoundTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class MaleSouldhoundTemplate extends MaleSoulbreakerTemplate { @Inject - public MaleSouldhoundTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.MALE_SOULDHOUND.id), CharacterClass.MALE_SOULDHOUND, Point.fromXYZ(-125533, 38114, 1142)); + public MaleSouldhoundTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.MALE_SOULDHOUND.id), + CharacterClass.MALE_SOULDHOUND, Point.fromXYZ(-125533, 38114, + 1142)); // ATTRIBUTES attributes.intelligence = 29; attributes.strength = 41; @@ -46,8 +48,13 @@ public class MaleSouldhoundTemplate extends MaleSoulbreakerTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 25.2; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected MaleSouldhoundTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/MoonlightSentinelTemplate.java b/data/script/template/script/template/actor/character/MoonlightSentinelTemplate.java index 624b14b76..1109c4fb8 100644 --- a/data/script/template/script/template/actor/character/MoonlightSentinelTemplate.java +++ b/data/script/template/script/template/actor/character/MoonlightSentinelTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class MoonlightSentinelTemplate extends SilverRangerTemplate { @Inject - public MoonlightSentinelTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.MOONLIGHT_SENTINEL.id), CharacterClass.MOONLIGHT_SENTINEL, Point.fromXYZ(45978, 41196, -3440)); + public MoonlightSentinelTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.MOONLIGHT_SENTINEL.id), + CharacterClass.MOONLIGHT_SENTINEL, Point.fromXYZ(45978, 41196, + -3440)); // ATTRIBUTES attributes.intelligence = 23; attributes.strength = 36; @@ -46,8 +48,13 @@ public class MoonlightSentinelTemplate extends SilverRangerTemplate { attributes.moveSpeed = 125; attributes.maxWeigth = 73000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected MoonlightSentinelTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/MysticMuseTemplate.java b/data/script/template/script/template/actor/character/MysticMuseTemplate.java index 9dcdee281..c1f0da9db 100644 --- a/data/script/template/script/template/actor/character/MysticMuseTemplate.java +++ b/data/script/template/script/template/actor/character/MysticMuseTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class MysticMuseTemplate extends SpellsingerTemplate { @Inject - public MysticMuseTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.MYSTIC_MUSE.id), CharacterClass.MYSTIC_MUSE, Point.fromXYZ(46182, 41198, -3440)); + public MysticMuseTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.MYSTIC_MUSE.id), + CharacterClass.MYSTIC_MUSE, Point.fromXYZ(46182, 41198, -3440)); // ATTRIBUTES attributes.intelligence = 37; attributes.strength = 21; @@ -46,8 +47,13 @@ public class MysticMuseTemplate extends SpellsingerTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 62400; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected MysticMuseTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/NecromancerTemplate.java b/data/script/template/script/template/actor/character/NecromancerTemplate.java index ccbd5db57..a1d090c8b 100644 --- a/data/script/template/script/template/actor/character/NecromancerTemplate.java +++ b/data/script/template/script/template/actor/character/NecromancerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class NecromancerTemplate extends WizardTemplate { @Inject - public NecromancerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.NECROMANCER.id), CharacterClass.NECROMANCER, Point.fromXYZ(-90890, 248027, -3570)); + public NecromancerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.NECROMANCER.id), + CharacterClass.NECROMANCER, Point + .fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +48,13 @@ public class NecromancerTemplate extends WizardTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected NecromancerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/OracleTemplate.java b/data/script/template/script/template/actor/character/OracleTemplate.java index fee970009..878f52f6d 100644 --- a/data/script/template/script/template/actor/character/OracleTemplate.java +++ b/data/script/template/script/template/actor/character/OracleTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class OracleTemplate extends ElvenMysticTemplate { @Inject - public OracleTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ORACLE.id), CharacterClass.ORACLE, Point.fromXYZ(46182, 41198, -3440)); + public OracleTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ORACLE.id), + CharacterClass.ORACLE, Point.fromXYZ(46182, 41198, -3440)); // ATTRIBUTES attributes.intelligence = 37; attributes.strength = 21; @@ -46,8 +47,13 @@ public class OracleTemplate extends ElvenMysticTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 62400; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected OracleTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/OrcFighterTemplate.java b/data/script/template/script/template/actor/character/OrcFighterTemplate.java index 72f136658..d633c03a4 100644 --- a/data/script/template/script/template/actor/character/OrcFighterTemplate.java +++ b/data/script/template/script/template/actor/character/OrcFighterTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class OrcFighterTemplate extends AbstractOrcCharacterTemplate { @Inject - public OrcFighterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ORC_FIGHTER.id), CharacterClass.ORC_FIGHTER, Point.fromXYZ(-56693, -113610, -690)); + public OrcFighterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ORC_FIGHTER.id), + CharacterClass.ORC_FIGHTER, Point + .fromXYZ(-56693, -113610, -690)); // ATTRIBUTES attributes.intelligence = 18; attributes.strength = 40; @@ -46,8 +48,13 @@ public class OrcFighterTemplate extends AbstractOrcCharacterTemplate { attributes.moveSpeed = 117; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 11.0; + this.maleCollisionHeight = 28.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 27.0; } - + protected OrcFighterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/OrcMonkTemplate.java b/data/script/template/script/template/actor/character/OrcMonkTemplate.java index 566283409..55da0b9ed 100644 --- a/data/script/template/script/template/actor/character/OrcMonkTemplate.java +++ b/data/script/template/script/template/actor/character/OrcMonkTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class OrcMonkTemplate extends OrcFighterTemplate { @Inject - public OrcMonkTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ORC_MONK.id), CharacterClass.ORC_MONK, Point.fromXYZ(-56682, -113610, -690)); + public OrcMonkTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ORC_MONK.id), + CharacterClass.ORC_MONK, Point.fromXYZ(-56682, -113610, -690)); // ATTRIBUTES attributes.intelligence = 18; attributes.strength = 40; @@ -46,8 +47,13 @@ public class OrcMonkTemplate extends OrcFighterTemplate { attributes.moveSpeed = 117; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 11.0; + this.maleCollisionHeight = 28.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 27.0; } - + protected OrcMonkTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/OrcMysticTemplate.java b/data/script/template/script/template/actor/character/OrcMysticTemplate.java index 4228dfda5..7dad95b2f 100644 --- a/data/script/template/script/template/actor/character/OrcMysticTemplate.java +++ b/data/script/template/script/template/actor/character/OrcMysticTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class OrcMysticTemplate extends AbstractOrcCharacterTemplate { @Inject - public OrcMysticTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ORC_MYSTIC.id), CharacterClass.ORC_MYSTIC, Point.fromXYZ(-56682, -113730, -690)); + public OrcMysticTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ORC_MYSTIC.id), + CharacterClass.ORC_MYSTIC, Point.fromXYZ(-56682, -113730, -690)); // ATTRIBUTES attributes.intelligence = 31; attributes.strength = 27; @@ -46,8 +47,13 @@ public class OrcMysticTemplate extends AbstractOrcCharacterTemplate { attributes.moveSpeed = 121; attributes.maxWeigth = 68000; attributes.craft = false; + + this.maleCollisionRadius = 7.0; + this.maleCollisionHeight = 27.5; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 25.5; } - + protected OrcMysticTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/OrcRaiderTemplate.java b/data/script/template/script/template/actor/character/OrcRaiderTemplate.java index 68be761bd..698397181 100644 --- a/data/script/template/script/template/actor/character/OrcRaiderTemplate.java +++ b/data/script/template/script/template/actor/character/OrcRaiderTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class OrcRaiderTemplate extends OrcFighterTemplate { @Inject - public OrcRaiderTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ORC_RAIDER.id), CharacterClass.ORC_RAIDER, Point.fromXYZ(-56693, -113610, -690)); + public OrcRaiderTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ORC_RAIDER.id), + CharacterClass.ORC_RAIDER, Point.fromXYZ(-56693, -113610, -690)); // ATTRIBUTES attributes.intelligence = 18; attributes.strength = 40; @@ -46,8 +47,13 @@ public class OrcRaiderTemplate extends OrcFighterTemplate { attributes.moveSpeed = 117; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 11.0; + this.maleCollisionHeight = 28.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 27.0; } - + protected OrcRaiderTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/OrcShamanTemplate.java b/data/script/template/script/template/actor/character/OrcShamanTemplate.java index 16b2f9076..7b080b202 100644 --- a/data/script/template/script/template/actor/character/OrcShamanTemplate.java +++ b/data/script/template/script/template/actor/character/OrcShamanTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class OrcShamanTemplate extends OrcMysticTemplate { @Inject - public OrcShamanTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ORC_SHAMAN.id), CharacterClass.ORC_SHAMAN, Point.fromXYZ(-56682, -113730, -690)); + public OrcShamanTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ORC_SHAMAN.id), + CharacterClass.ORC_SHAMAN, Point.fromXYZ(-56682, -113730, -690)); // ATTRIBUTES attributes.intelligence = 31; attributes.strength = 27; @@ -46,8 +47,13 @@ public class OrcShamanTemplate extends OrcMysticTemplate { attributes.moveSpeed = 121; attributes.maxWeigth = 68000; attributes.craft = false; + + this.maleCollisionRadius = 7.0; + this.maleCollisionHeight = 27.5; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 25.5; } - + protected OrcShamanTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/OverlordTemplate.java b/data/script/template/script/template/actor/character/OverlordTemplate.java index c739900f1..e5a16a7ae 100644 --- a/data/script/template/script/template/actor/character/OverlordTemplate.java +++ b/data/script/template/script/template/actor/character/OverlordTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class OverlordTemplate extends OrcShamanTemplate { @Inject - public OverlordTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.OVERLORD.id), CharacterClass.OVERLORD, Point.fromXYZ(-56682, -113730, -690)); + public OverlordTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.OVERLORD.id), + CharacterClass.OVERLORD, Point.fromXYZ(-56682, -113730, -690)); // ATTRIBUTES attributes.intelligence = 31; attributes.strength = 27; @@ -46,8 +47,13 @@ public class OverlordTemplate extends OrcShamanTemplate { attributes.moveSpeed = 121; attributes.maxWeigth = 68000; attributes.craft = false; + + this.maleCollisionRadius = 7.0; + this.maleCollisionHeight = 27.5; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 25.5; } - + protected OverlordTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/PaladinTemplate.java b/data/script/template/script/template/actor/character/PaladinTemplate.java index cae7b137d..29bd1f436 100644 --- a/data/script/template/script/template/actor/character/PaladinTemplate.java +++ b/data/script/template/script/template/actor/character/PaladinTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class PaladinTemplate extends KnightTemplate { @Inject - public PaladinTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.PALADIN.id), CharacterClass.PALADIN, Point.fromXYZ(-71338, 258271, -3104)); + public PaladinTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.PALADIN.id), + CharacterClass.PALADIN, Point.fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +47,13 @@ public class PaladinTemplate extends KnightTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected PaladinTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/PalusKnightTemplate.java b/data/script/template/script/template/actor/character/PalusKnightTemplate.java index 2a4848fe4..e5d5fe5f9 100644 --- a/data/script/template/script/template/actor/character/PalusKnightTemplate.java +++ b/data/script/template/script/template/actor/character/PalusKnightTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class PalusKnightTemplate extends DarkFighterTemplate { @Inject - public PalusKnightTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.PALUS_KNIGHT.id), CharacterClass.PALUS_KNIGHT, Point.fromXYZ(28377, 10916, -4224)); + public PalusKnightTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.PALUS_KNIGHT.id), + CharacterClass.PALUS_KNIGHT, Point.fromXYZ(28377, 10916, -4224)); // ATTRIBUTES attributes.intelligence = 25; attributes.strength = 41; @@ -46,8 +47,13 @@ public class PalusKnightTemplate extends DarkFighterTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 69000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected PalusKnightTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/PhantomRangerTemplate.java b/data/script/template/script/template/actor/character/PhantomRangerTemplate.java index be16d3187..46c09059d 100644 --- a/data/script/template/script/template/actor/character/PhantomRangerTemplate.java +++ b/data/script/template/script/template/actor/character/PhantomRangerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class PhantomRangerTemplate extends AssassinTemplate { @Inject - public PhantomRangerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.PHANTOM_RANGER.id), CharacterClass.PHANTOM_RANGER, Point.fromXYZ(28377, 10916, -4224)); + public PhantomRangerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.PHANTOM_RANGER.id), + CharacterClass.PHANTOM_RANGER, Point.fromXYZ(28377, 10916, + -4224)); // ATTRIBUTES attributes.intelligence = 25; attributes.strength = 41; @@ -46,8 +48,13 @@ public class PhantomRangerTemplate extends AssassinTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 69000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected PhantomRangerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/PhantomSummonerTemplate.java b/data/script/template/script/template/actor/character/PhantomSummonerTemplate.java index 01a809dab..17e6fde70 100644 --- a/data/script/template/script/template/actor/character/PhantomSummonerTemplate.java +++ b/data/script/template/script/template/actor/character/PhantomSummonerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class PhantomSummonerTemplate extends DarkWizardTemplate { @Inject - public PhantomSummonerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.PHANTOM_SUMMONER.id), CharacterClass.PHANTOM_SUMMONER, Point.fromXYZ(28295, 11063, -4224)); + public PhantomSummonerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.PHANTOM_SUMMONER.id), + CharacterClass.PHANTOM_SUMMONER, Point.fromXYZ(28295, 11063, + -4224)); // ATTRIBUTES attributes.intelligence = 44; attributes.strength = 23; @@ -46,8 +48,13 @@ public class PhantomSummonerTemplate extends DarkWizardTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 61000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected PhantomSummonerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/PhoenixKnightTemplate.java b/data/script/template/script/template/actor/character/PhoenixKnightTemplate.java index 438c58e81..9eec556ee 100644 --- a/data/script/template/script/template/actor/character/PhoenixKnightTemplate.java +++ b/data/script/template/script/template/actor/character/PhoenixKnightTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class PhoenixKnightTemplate extends PaladinTemplate { @Inject - public PhoenixKnightTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.PHOENIX_KNIGHT.id), CharacterClass.PHOENIX_KNIGHT, Point.fromXYZ(-71338, 258271, -3104)); + public PhoenixKnightTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.PHOENIX_KNIGHT.id), + CharacterClass.PHOENIX_KNIGHT, Point.fromXYZ(-71338, 258271, + -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +48,13 @@ public class PhoenixKnightTemplate extends PaladinTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected PhoenixKnightTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/PlainsWalkerTemplate.java b/data/script/template/script/template/actor/character/PlainsWalkerTemplate.java index 328380560..243026090 100644 --- a/data/script/template/script/template/actor/character/PlainsWalkerTemplate.java +++ b/data/script/template/script/template/actor/character/PlainsWalkerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class PlainsWalkerTemplate extends ElvenScoutTemplate { @Inject - public PlainsWalkerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.PLAINS_WALKER.id), CharacterClass.PLAINS_WALKER, Point.fromXYZ(45978, 41196, -3440)); + public PlainsWalkerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.PLAINS_WALKER.id), + CharacterClass.PLAINS_WALKER, Point + .fromXYZ(45978, 41196, -3440)); // ATTRIBUTES attributes.intelligence = 23; attributes.strength = 36; @@ -46,8 +48,13 @@ public class PlainsWalkerTemplate extends ElvenScoutTemplate { attributes.moveSpeed = 125; attributes.maxWeigth = 73000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected PlainsWalkerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ProphetTemplate.java b/data/script/template/script/template/actor/character/ProphetTemplate.java index 4267a098b..2ce56c97a 100644 --- a/data/script/template/script/template/actor/character/ProphetTemplate.java +++ b/data/script/template/script/template/actor/character/ProphetTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class ProphetTemplate extends ClericTemplate { @Inject - public ProphetTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.PROPHET.id), CharacterClass.PROPHET, Point.fromXYZ(-90890, 248027, -3570)); + public ProphetTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.PROPHET.id), + CharacterClass.PROPHET, Point.fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +47,13 @@ public class ProphetTemplate extends ClericTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected ProphetTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/RogueTemplate.java b/data/script/template/script/template/actor/character/RogueTemplate.java index 5421c8b52..0b4cd9e71 100644 --- a/data/script/template/script/template/actor/character/RogueTemplate.java +++ b/data/script/template/script/template/actor/character/RogueTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class RogueTemplate extends HumanFighterTemplate { @Inject - public RogueTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.ROGUE.id), CharacterClass.ROGUE, Point.fromXYZ(-71338, 258271, -3104)); + public RogueTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.ROGUE.id), CharacterClass.ROGUE, + Point.fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +47,13 @@ public class RogueTemplate extends HumanFighterTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected RogueTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/SagittariusTemplate.java b/data/script/template/script/template/actor/character/SagittariusTemplate.java index f694feff4..60c04f136 100644 --- a/data/script/template/script/template/actor/character/SagittariusTemplate.java +++ b/data/script/template/script/template/actor/character/SagittariusTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class SagittariusTemplate extends HawkeyeTemplate { @Inject - public SagittariusTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SAGITTARIUS.id), CharacterClass.SAGITTARIUS, Point.fromXYZ(-71338, 258271, -3104)); + public SagittariusTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SAGITTARIUS.id), + CharacterClass.SAGITTARIUS, Point + .fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +48,13 @@ public class SagittariusTemplate extends HawkeyeTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected SagittariusTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ScavengerTemplate.java b/data/script/template/script/template/actor/character/ScavengerTemplate.java index 963f49e0a..ca9164f17 100644 --- a/data/script/template/script/template/actor/character/ScavengerTemplate.java +++ b/data/script/template/script/template/actor/character/ScavengerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class ScavengerTemplate extends DwarvenFighterTemplate { @Inject - public ScavengerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SCAVENGER.id), CharacterClass.SCAVENGER, Point.fromXYZ(108512, -174026, -400)); + public ScavengerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SCAVENGER.id), + CharacterClass.SCAVENGER, Point.fromXYZ(108512, -174026, -400)); // ATTRIBUTES attributes.intelligence = 20; attributes.strength = 39; @@ -46,8 +47,13 @@ public class ScavengerTemplate extends DwarvenFighterTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 83000; attributes.craft = true; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 18.0; + this.femaleCollisionRadius = 5.0; + this.femaleCollisionHeight = 19.0; } - + protected ScavengerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ShillieanSaintTemplate.java b/data/script/template/script/template/actor/character/ShillieanSaintTemplate.java index f91785bdd..45579457a 100644 --- a/data/script/template/script/template/actor/character/ShillieanSaintTemplate.java +++ b/data/script/template/script/template/actor/character/ShillieanSaintTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class ShillieanSaintTemplate extends ShillienElderTemplate { @Inject - public ShillieanSaintTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SHILLIEAN_SAINT.id), CharacterClass.SHILLIEAN_SAINT, Point.fromXYZ(28295, 11063, -4224)); + public ShillieanSaintTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SHILLIEAN_SAINT.id), + CharacterClass.SHILLIEAN_SAINT, Point.fromXYZ(28295, 11063, + -4224)); // ATTRIBUTES attributes.intelligence = 44; attributes.strength = 23; @@ -46,8 +48,13 @@ public class ShillieanSaintTemplate extends ShillienElderTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 61000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected ShillieanSaintTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ShillienElderTemplate.java b/data/script/template/script/template/actor/character/ShillienElderTemplate.java index 472d10535..1afa66356 100644 --- a/data/script/template/script/template/actor/character/ShillienElderTemplate.java +++ b/data/script/template/script/template/actor/character/ShillienElderTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class ShillienElderTemplate extends ShillienOracleTemplate { @Inject - public ShillienElderTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SHILLIEN_ELDER.id), CharacterClass.SHILLIEN_ELDER, Point.fromXYZ(28295, 11063, -4224)); + public ShillienElderTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SHILLIEN_ELDER.id), + CharacterClass.SHILLIEN_ELDER, Point.fromXYZ(28295, 11063, + -4224)); // ATTRIBUTES attributes.intelligence = 44; attributes.strength = 23; @@ -46,8 +48,13 @@ public class ShillienElderTemplate extends ShillienOracleTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 61000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected ShillienElderTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ShillienKnightTemplate.java b/data/script/template/script/template/actor/character/ShillienKnightTemplate.java index 4a021444a..bdf062a60 100644 --- a/data/script/template/script/template/actor/character/ShillienKnightTemplate.java +++ b/data/script/template/script/template/actor/character/ShillienKnightTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class ShillienKnightTemplate extends PalusKnightTemplate { @Inject - public ShillienKnightTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SHILLIEN_KNIGHT.id), CharacterClass.SHILLIEN_KNIGHT, Point.fromXYZ(28377, 10916, -4224)); + public ShillienKnightTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SHILLIEN_KNIGHT.id), + CharacterClass.SHILLIEN_KNIGHT, Point.fromXYZ(28377, 10916, + -4224)); // ATTRIBUTES attributes.intelligence = 25; attributes.strength = 41; @@ -46,8 +48,13 @@ public class ShillienKnightTemplate extends PalusKnightTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 69000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected ShillienKnightTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ShillienOracleTemplate.java b/data/script/template/script/template/actor/character/ShillienOracleTemplate.java index 4b2bd5f3d..921b1dd65 100644 --- a/data/script/template/script/template/actor/character/ShillienOracleTemplate.java +++ b/data/script/template/script/template/actor/character/ShillienOracleTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class ShillienOracleTemplate extends DarkMysticTemplate { @Inject - public ShillienOracleTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SHILLIEN_ORACLE.id), CharacterClass.SHILLIEN_ORACLE, Point.fromXYZ(28295, 11063, -4224)); + public ShillienOracleTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SHILLIEN_ORACLE.id), + CharacterClass.SHILLIEN_ORACLE, Point.fromXYZ(28295, 11063, + -4224)); // ATTRIBUTES attributes.intelligence = 44; attributes.strength = 23; @@ -46,8 +48,13 @@ public class ShillienOracleTemplate extends DarkMysticTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 61000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected ShillienOracleTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/ShillienTemplarTemplate.java b/data/script/template/script/template/actor/character/ShillienTemplarTemplate.java index c1eb98b34..fd30d5614 100644 --- a/data/script/template/script/template/actor/character/ShillienTemplarTemplate.java +++ b/data/script/template/script/template/actor/character/ShillienTemplarTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class ShillienTemplarTemplate extends ShillienKnightTemplate { @Inject - public ShillienTemplarTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SHILLIEN_TEMPLAR.id), CharacterClass.SHILLIEN_TEMPLAR, Point.fromXYZ(28377, 10916, -4224)); + public ShillienTemplarTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SHILLIEN_TEMPLAR.id), + CharacterClass.SHILLIEN_TEMPLAR, Point.fromXYZ(28377, 10916, + -4224)); // ATTRIBUTES attributes.intelligence = 25; attributes.strength = 41; @@ -46,8 +48,13 @@ public class ShillienTemplarTemplate extends ShillienKnightTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 69000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected ShillienTemplarTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/SilverRangerTemplate.java b/data/script/template/script/template/actor/character/SilverRangerTemplate.java index ebdc67894..8e7ab528f 100644 --- a/data/script/template/script/template/actor/character/SilverRangerTemplate.java +++ b/data/script/template/script/template/actor/character/SilverRangerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class SilverRangerTemplate extends ElvenScoutTemplate { @Inject - public SilverRangerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SILVER_RANGER.id), CharacterClass.SILVER_RANGER, Point.fromXYZ(45978, 41196, -3440)); + public SilverRangerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SILVER_RANGER.id), + CharacterClass.SILVER_RANGER, Point + .fromXYZ(45978, 41196, -3440)); // ATTRIBUTES attributes.intelligence = 23; attributes.strength = 36; @@ -46,8 +48,13 @@ public class SilverRangerTemplate extends ElvenScoutTemplate { attributes.moveSpeed = 125; attributes.maxWeigth = 73000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected SilverRangerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/SorcerorTemplate.java b/data/script/template/script/template/actor/character/SorcerorTemplate.java index 0f1a29c61..13edb0643 100644 --- a/data/script/template/script/template/actor/character/SorcerorTemplate.java +++ b/data/script/template/script/template/actor/character/SorcerorTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class SorcerorTemplate extends WizardTemplate { @Inject - public SorcerorTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SORCEROR.id), CharacterClass.SORCEROR, Point.fromXYZ(-90890, 248027, -3570)); + public SorcerorTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SORCEROR.id), + CharacterClass.SORCEROR, Point.fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +47,13 @@ public class SorcerorTemplate extends WizardTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected SorcerorTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/SoultakerTemplate.java b/data/script/template/script/template/actor/character/SoultakerTemplate.java index 1d44b75f6..7d9640339 100644 --- a/data/script/template/script/template/actor/character/SoultakerTemplate.java +++ b/data/script/template/script/template/actor/character/SoultakerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class SoultakerTemplate extends NecromancerTemplate { @Inject - public SoultakerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SOULTAKER.id), CharacterClass.SOULTAKER, Point.fromXYZ(-90890, 248027, -3570)); + public SoultakerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SOULTAKER.id), + CharacterClass.SOULTAKER, Point.fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +47,13 @@ public class SoultakerTemplate extends NecromancerTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected SoultakerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/SpectralMasterTemplate.java b/data/script/template/script/template/actor/character/SpectralMasterTemplate.java index 887af0e32..6f3f1a5a8 100644 --- a/data/script/template/script/template/actor/character/SpectralMasterTemplate.java +++ b/data/script/template/script/template/actor/character/SpectralMasterTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class SpectralMasterTemplate extends PhantomSummonerTemplate { @Inject - public SpectralMasterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SPECTRAL_MASTER.id), CharacterClass.SPECTRAL_MASTER, Point.fromXYZ(28295, 11063, -4224)); + public SpectralMasterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SPECTRAL_MASTER.id), + CharacterClass.SPECTRAL_MASTER, Point.fromXYZ(28295, 11063, + -4224)); // ATTRIBUTES attributes.intelligence = 44; attributes.strength = 23; @@ -46,8 +48,13 @@ public class SpectralMasterTemplate extends PhantomSummonerTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 61000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected SpectralMasterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/SpectraldancerTemplate.java b/data/script/template/script/template/actor/character/SpectraldancerTemplate.java index 554ed7be2..2ad4fbafa 100644 --- a/data/script/template/script/template/actor/character/SpectraldancerTemplate.java +++ b/data/script/template/script/template/actor/character/SpectraldancerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class SpectraldancerTemplate extends BladedancerTemplate { @Inject - public SpectraldancerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.spectralDancer.id), CharacterClass.spectralDancer, Point.fromXYZ(28377, 10916, -4224)); + public SpectraldancerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.spectralDancer.id), + CharacterClass.spectralDancer, Point.fromXYZ(28377, 10916, + -4224)); // ATTRIBUTES attributes.intelligence = 25; attributes.strength = 41; @@ -46,8 +48,13 @@ public class SpectraldancerTemplate extends BladedancerTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 69000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected SpectraldancerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/SpellhowlerTemplate.java b/data/script/template/script/template/actor/character/SpellhowlerTemplate.java index b7cbf15e0..0ac70ac7c 100644 --- a/data/script/template/script/template/actor/character/SpellhowlerTemplate.java +++ b/data/script/template/script/template/actor/character/SpellhowlerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class SpellhowlerTemplate extends DarkWizardTemplate { @Inject - public SpellhowlerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SPELLHOWLER.id), CharacterClass.SPELLHOWLER, Point.fromXYZ(28295, 11063, -4224)); + public SpellhowlerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SPELLHOWLER.id), + CharacterClass.SPELLHOWLER, Point.fromXYZ(28295, 11063, -4224)); // ATTRIBUTES attributes.intelligence = 44; attributes.strength = 23; @@ -46,8 +47,13 @@ public class SpellhowlerTemplate extends DarkWizardTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 61000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected SpellhowlerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/SpellsingerTemplate.java b/data/script/template/script/template/actor/character/SpellsingerTemplate.java index 60fe5def6..b8d1fecd6 100644 --- a/data/script/template/script/template/actor/character/SpellsingerTemplate.java +++ b/data/script/template/script/template/actor/character/SpellsingerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class SpellsingerTemplate extends ElvenWizardTemplate { @Inject - public SpellsingerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SPELLSINGER.id), CharacterClass.SPELLSINGER, Point.fromXYZ(46182, 41198, -3440)); + public SpellsingerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SPELLSINGER.id), + CharacterClass.SPELLSINGER, Point.fromXYZ(46182, 41198, -3440)); // ATTRIBUTES attributes.intelligence = 37; attributes.strength = 21; @@ -46,8 +47,13 @@ public class SpellsingerTemplate extends ElvenWizardTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 62400; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected SpellsingerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/StormScreamerTemplate.java b/data/script/template/script/template/actor/character/StormScreamerTemplate.java index 7fad2023a..cebbf7bf6 100644 --- a/data/script/template/script/template/actor/character/StormScreamerTemplate.java +++ b/data/script/template/script/template/actor/character/StormScreamerTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class StormScreamerTemplate extends SpellhowlerTemplate { @Inject - public StormScreamerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.STORM_SCREAMER.id), CharacterClass.STORM_SCREAMER, Point.fromXYZ(28295, 11063, -4224)); + public StormScreamerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.STORM_SCREAMER.id), + CharacterClass.STORM_SCREAMER, Point.fromXYZ(28295, 11063, + -4224)); // ATTRIBUTES attributes.intelligence = 44; attributes.strength = 23; @@ -46,8 +48,13 @@ public class StormScreamerTemplate extends SpellhowlerTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 61000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 23.5; } - + protected StormScreamerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/SwordMuseTemplate.java b/data/script/template/script/template/actor/character/SwordMuseTemplate.java index 68b7922ad..706f5304d 100644 --- a/data/script/template/script/template/actor/character/SwordMuseTemplate.java +++ b/data/script/template/script/template/actor/character/SwordMuseTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class SwordMuseTemplate extends SwordSingerTemplate { @Inject - public SwordMuseTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SWORD_MUSE.id), CharacterClass.SWORD_MUSE, Point.fromXYZ(45978, 41196, -3440)); + public SwordMuseTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SWORD_MUSE.id), + CharacterClass.SWORD_MUSE, Point.fromXYZ(45978, 41196, -3440)); // ATTRIBUTES attributes.intelligence = 23; attributes.strength = 36; @@ -46,8 +47,13 @@ public class SwordMuseTemplate extends SwordSingerTemplate { attributes.moveSpeed = 125; attributes.maxWeigth = 73000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected SwordMuseTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/SwordSingerTemplate.java b/data/script/template/script/template/actor/character/SwordSingerTemplate.java index 48e5f803a..6b8426a7e 100644 --- a/data/script/template/script/template/actor/character/SwordSingerTemplate.java +++ b/data/script/template/script/template/actor/character/SwordSingerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class SwordSingerTemplate extends ElvenKnightTemplate { @Inject - public SwordSingerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.SWORD_SINGER.id), CharacterClass.SWORD_SINGER, Point.fromXYZ(45978, 41196, -3440)); + public SwordSingerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.SWORD_SINGER.id), + CharacterClass.SWORD_SINGER, Point.fromXYZ(45978, 41196, -3440)); // ATTRIBUTES attributes.intelligence = 23; attributes.strength = 36; @@ -46,8 +47,13 @@ public class SwordSingerTemplate extends ElvenKnightTemplate { attributes.moveSpeed = 125; attributes.maxWeigth = 73000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected SwordSingerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/TempleKnightTemplate.java b/data/script/template/script/template/actor/character/TempleKnightTemplate.java index 0d168e127..a3f7b0a67 100644 --- a/data/script/template/script/template/actor/character/TempleKnightTemplate.java +++ b/data/script/template/script/template/actor/character/TempleKnightTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class TempleKnightTemplate extends ElvenKnightTemplate { @Inject - public TempleKnightTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.TEMPLE_KNIGHT.id), CharacterClass.TEMPLE_KNIGHT, Point.fromXYZ(45978, 41196, -3440)); + public TempleKnightTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.TEMPLE_KNIGHT.id), + CharacterClass.TEMPLE_KNIGHT, Point + .fromXYZ(45978, 41196, -3440)); // ATTRIBUTES attributes.intelligence = 23; attributes.strength = 36; @@ -46,8 +48,13 @@ public class TempleKnightTemplate extends ElvenKnightTemplate { attributes.moveSpeed = 125; attributes.maxWeigth = 73000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected TempleKnightTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/TitanTemplate.java b/data/script/template/script/template/actor/character/TitanTemplate.java index fab3bc8c7..9b949c6ca 100644 --- a/data/script/template/script/template/actor/character/TitanTemplate.java +++ b/data/script/template/script/template/actor/character/TitanTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class TitanTemplate extends DestroyerTemplate { @Inject - public TitanTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.TITAN.id), CharacterClass.TITAN, Point.fromXYZ(-56693, -113610, -690)); + public TitanTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.TITAN.id), CharacterClass.TITAN, + Point.fromXYZ(-56693, -113610, -690)); // ATTRIBUTES attributes.intelligence = 18; attributes.strength = 40; @@ -46,8 +47,13 @@ public class TitanTemplate extends DestroyerTemplate { attributes.moveSpeed = 117; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 11.0; + this.maleCollisionHeight = 28.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 27.0; } - + protected TitanTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/TreasureHunterTemplate.java b/data/script/template/script/template/actor/character/TreasureHunterTemplate.java index 40fd97928..560f6302a 100644 --- a/data/script/template/script/template/actor/character/TreasureHunterTemplate.java +++ b/data/script/template/script/template/actor/character/TreasureHunterTemplate.java @@ -25,8 +25,10 @@ import com.l2jserver.util.dimensional.Point; public class TreasureHunterTemplate extends RogueTemplate { @Inject - public TreasureHunterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.TREASURE_HUNTER.id), CharacterClass.TREASURE_HUNTER, Point.fromXYZ(-71338, 258271, -3104)); + public TreasureHunterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.TREASURE_HUNTER.id), + CharacterClass.TREASURE_HUNTER, Point.fromXYZ(-71338, 258271, + -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +48,13 @@ public class TreasureHunterTemplate extends RogueTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected TreasureHunterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/TricksterTemplate.java b/data/script/template/script/template/actor/character/TricksterTemplate.java index fd99c9c43..7f7a4f27d 100644 --- a/data/script/template/script/template/actor/character/TricksterTemplate.java +++ b/data/script/template/script/template/actor/character/TricksterTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class TricksterTemplate extends ArbalesterTemplate { @Inject - public TricksterTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.TRICKSTER.id), CharacterClass.TRICKSTER, Point.fromXYZ(-125533, 38114, 1142)); + public TricksterTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.TRICKSTER.id), + CharacterClass.TRICKSTER, Point.fromXYZ(-125533, 38114, 1142)); // ATTRIBUTES attributes.intelligence = 28; attributes.strength = 39; @@ -46,8 +47,13 @@ public class TricksterTemplate extends ArbalesterTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 22.6; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected TricksterTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/TrooperTemplate.java b/data/script/template/script/template/actor/character/TrooperTemplate.java index 7a87bcf44..3ca695a6f 100644 --- a/data/script/template/script/template/actor/character/TrooperTemplate.java +++ b/data/script/template/script/template/actor/character/TrooperTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class TrooperTemplate extends MaleSoldierTemplate { @Inject - public TrooperTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.TROOPER.id), CharacterClass.TROOPER, Point.fromXYZ(-125533, 38114, 1142)); + public TrooperTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.TROOPER.id), + CharacterClass.TROOPER, Point.fromXYZ(-125533, 38114, 1142)); // ATTRIBUTES attributes.intelligence = 29; attributes.strength = 41; @@ -46,8 +47,13 @@ public class TrooperTemplate extends MaleSoldierTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 25.2; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected TrooperTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/TyrantTemplate.java b/data/script/template/script/template/actor/character/TyrantTemplate.java index 268447d3a..c6e9cf5a5 100644 --- a/data/script/template/script/template/actor/character/TyrantTemplate.java +++ b/data/script/template/script/template/actor/character/TyrantTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class TyrantTemplate extends OrcRaiderTemplate { @Inject - public TyrantTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.TYRANT.id), CharacterClass.TYRANT, Point.fromXYZ(-56693, -113610, -690)); + public TyrantTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.TYRANT.id), + CharacterClass.TYRANT, Point.fromXYZ(-56693, -113610, -690)); // ATTRIBUTES attributes.intelligence = 18; attributes.strength = 40; @@ -46,8 +47,13 @@ public class TyrantTemplate extends OrcRaiderTemplate { attributes.moveSpeed = 117; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 11.0; + this.maleCollisionHeight = 28.0; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 27.0; } - + protected TyrantTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/WarcryerTemplate.java b/data/script/template/script/template/actor/character/WarcryerTemplate.java index 365c2e6a6..6d15d0611 100644 --- a/data/script/template/script/template/actor/character/WarcryerTemplate.java +++ b/data/script/template/script/template/actor/character/WarcryerTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class WarcryerTemplate extends OrcShamanTemplate { @Inject - public WarcryerTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.WARCRYER.id), CharacterClass.WARCRYER, Point.fromXYZ(-56682, -113730, -690)); + public WarcryerTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.WARCRYER.id), + CharacterClass.WARCRYER, Point.fromXYZ(-56682, -113730, -690)); // ATTRIBUTES attributes.intelligence = 31; attributes.strength = 27; @@ -46,8 +47,13 @@ public class WarcryerTemplate extends OrcShamanTemplate { attributes.moveSpeed = 121; attributes.maxWeigth = 68000; attributes.craft = false; + + this.maleCollisionRadius = 7.0; + this.maleCollisionHeight = 27.5; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 25.5; } - + protected WarcryerTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/WarderTemplate.java b/data/script/template/script/template/actor/character/WarderTemplate.java index 0337ba459..9afc99a52 100644 --- a/data/script/template/script/template/actor/character/WarderTemplate.java +++ b/data/script/template/script/template/actor/character/WarderTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class WarderTemplate extends FemaleSoldierTemplate { @Inject - public WarderTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.WARDER.id), CharacterClass.WARDER, Point.fromXYZ(-125533, 38114, 1142)); + public WarderTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.WARDER.id), + CharacterClass.WARDER, Point.fromXYZ(-125533, 38114, 1142)); // ATTRIBUTES attributes.intelligence = 28; attributes.strength = 39; @@ -46,8 +47,13 @@ public class WarderTemplate extends FemaleSoldierTemplate { attributes.moveSpeed = 122; attributes.maxWeigth = 87000; attributes.craft = false; + + this.maleCollisionRadius = 8.0; + this.maleCollisionHeight = 22.6; + this.femaleCollisionRadius = 7.0; + this.femaleCollisionHeight = 22.6; } - + protected WarderTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/WarlockTemplate.java b/data/script/template/script/template/actor/character/WarlockTemplate.java index 527bf37d6..42ca3b176 100644 --- a/data/script/template/script/template/actor/character/WarlockTemplate.java +++ b/data/script/template/script/template/actor/character/WarlockTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class WarlockTemplate extends WizardTemplate { @Inject - public WarlockTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.WARLOCK.id), CharacterClass.WARLOCK, Point.fromXYZ(-90890, 248027, -3570)); + public WarlockTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.WARLOCK.id), + CharacterClass.WARLOCK, Point.fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +47,13 @@ public class WarlockTemplate extends WizardTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected WarlockTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/WarlordTemplate.java b/data/script/template/script/template/actor/character/WarlordTemplate.java index 3338f965f..f3f867614 100644 --- a/data/script/template/script/template/actor/character/WarlordTemplate.java +++ b/data/script/template/script/template/actor/character/WarlordTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class WarlordTemplate extends WarriorTemplate { @Inject - public WarlordTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.WARLORD.id), CharacterClass.WARLORD, Point.fromXYZ(-71338, 258271, -3104)); + public WarlordTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.WARLORD.id), + CharacterClass.WARLORD, Point.fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +47,13 @@ public class WarlordTemplate extends WarriorTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected WarlordTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/WarriorTemplate.java b/data/script/template/script/template/actor/character/WarriorTemplate.java index 4024e0504..be7531c05 100644 --- a/data/script/template/script/template/actor/character/WarriorTemplate.java +++ b/data/script/template/script/template/actor/character/WarriorTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class WarriorTemplate extends HumanFighterTemplate { @Inject - public WarriorTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.WARRIOR.id), CharacterClass.WARRIOR, Point.fromXYZ(-71338, 258271, -3104)); + public WarriorTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.WARRIOR.id), + CharacterClass.WARRIOR, Point.fromXYZ(-71338, 258271, -3104)); // ATTRIBUTES attributes.intelligence = 21; attributes.strength = 40; @@ -46,8 +47,13 @@ public class WarriorTemplate extends HumanFighterTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 81900; attributes.craft = false; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 23.0; + this.femaleCollisionRadius = 8.0; + this.femaleCollisionHeight = 23.5; } - + protected WarriorTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/WarsmithTemplate.java b/data/script/template/script/template/actor/character/WarsmithTemplate.java index 5ca565732..1008fb60a 100644 --- a/data/script/template/script/template/actor/character/WarsmithTemplate.java +++ b/data/script/template/script/template/actor/character/WarsmithTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class WarsmithTemplate extends ArtisanTemplate { @Inject - public WarsmithTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.WARSMITH.id), CharacterClass.WARSMITH, Point.fromXYZ(108512, -174026, -400)); + public WarsmithTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.WARSMITH.id), + CharacterClass.WARSMITH, Point.fromXYZ(108512, -174026, -400)); // ATTRIBUTES attributes.intelligence = 20; attributes.strength = 39; @@ -46,8 +47,13 @@ public class WarsmithTemplate extends ArtisanTemplate { attributes.moveSpeed = 115; attributes.maxWeigth = 83000; attributes.craft = true; + + this.maleCollisionRadius = 9.0; + this.maleCollisionHeight = 18.0; + this.femaleCollisionRadius = 5.0; + this.femaleCollisionHeight = 19.0; } - + protected WarsmithTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/WindRiderTemplate.java b/data/script/template/script/template/actor/character/WindRiderTemplate.java index 5afc094a3..250c21a55 100644 --- a/data/script/template/script/template/actor/character/WindRiderTemplate.java +++ b/data/script/template/script/template/actor/character/WindRiderTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class WindRiderTemplate extends PlainsWalkerTemplate { @Inject - public WindRiderTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.WIND_RIDER.id), CharacterClass.WIND_RIDER, Point.fromXYZ(45978, 41196, -3440)); + public WindRiderTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.WIND_RIDER.id), + CharacterClass.WIND_RIDER, Point.fromXYZ(45978, 41196, -3440)); // ATTRIBUTES attributes.intelligence = 23; attributes.strength = 36; @@ -46,8 +47,13 @@ public class WindRiderTemplate extends PlainsWalkerTemplate { attributes.moveSpeed = 125; attributes.maxWeigth = 73000; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 24.0; + this.femaleCollisionRadius = 7.5; + this.femaleCollisionHeight = 23.0; } - + protected WindRiderTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/character/WizardTemplate.java b/data/script/template/script/template/actor/character/WizardTemplate.java index 5aca7fe75..4adbd68ae 100644 --- a/data/script/template/script/template/actor/character/WizardTemplate.java +++ b/data/script/template/script/template/actor/character/WizardTemplate.java @@ -25,8 +25,9 @@ import com.l2jserver.util.dimensional.Point; public class WizardTemplate extends HumanMysticTemplate { @Inject - public WizardTemplate(CharacterTemplateIDProvider factory) { - super(factory.createID(CharacterClass.WIZARD.id), CharacterClass.WIZARD, Point.fromXYZ(-90890, 248027, -3570)); + public WizardTemplate(CharacterTemplateIDProvider provider) { + super(provider.createID(CharacterClass.WIZARD.id), + CharacterClass.WIZARD, Point.fromXYZ(-90890, 248027, -3570)); // ATTRIBUTES attributes.intelligence = 41; attributes.strength = 22; @@ -46,8 +47,13 @@ public class WizardTemplate extends HumanMysticTemplate { attributes.moveSpeed = 120; attributes.maxWeigth = 62500; attributes.craft = false; + + this.maleCollisionRadius = 7.5; + this.maleCollisionHeight = 22.8; + this.femaleCollisionRadius = 6.5; + this.femaleCollisionHeight = 22.5; } - + protected WizardTemplate(CharacterTemplateID id, CharacterClass characterClass, Point spawnLocation) { super(id, characterClass, spawnLocation); diff --git a/data/script/template/script/template/actor/monster/WolfMonsterTemplate.java b/data/script/template/script/template/actor/monster/WolfMonsterTemplate.java index 2c6205749..9318d91d3 100644 --- a/data/script/template/script/template/actor/monster/WolfMonsterTemplate.java +++ b/data/script/template/script/template/actor/monster/WolfMonsterTemplate.java @@ -24,7 +24,7 @@ import com.l2jserver.model.template.npc.MonsterNPCTemplate; * @author Rogiel */ public class WolfMonsterTemplate extends MonsterNPCTemplate { - public static final int ID = 12077; + public static final int ID = 20120; @Inject protected WolfMonsterTemplate(NPCTemplateIDProvider provider) { @@ -36,6 +36,4 @@ public class WolfMonsterTemplate extends MonsterNPCTemplate { this.collisionRadius = 13.00; this.collisionHeight = 9.00; } - - } diff --git a/data/script/template/script/template/actor/npc/JasmineGatekeeperTemplate.java b/data/script/template/script/template/actor/npc/JasmineGatekeeperTemplate.java new file mode 100644 index 000000000..d1700216a --- /dev/null +++ b/data/script/template/script/template/actor/npc/JasmineGatekeeperTemplate.java @@ -0,0 +1,80 @@ +/* + * This file is part of l2jserver . + * + * l2jserver 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. + * + * l2jserver 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 l2jserver. If not, see . + */ +package script.template.actor.npc; + +import com.google.inject.Inject; +import com.l2jserver.model.id.template.provider.NPCTemplateIDProvider; +import com.l2jserver.model.template.npc.TeleporterNPCTemplate; +import com.l2jserver.util.exception.L2Exception; +import com.l2jserver.util.html.markup.HtmlTemplate; +import com.l2jserver.util.html.markup.MarkupTag; + +/** + * @author Rogiel + */ +public class JasmineGatekeeperTemplate extends TeleporterNPCTemplate { + public static final int ID = 30134; + + @Inject + protected JasmineGatekeeperTemplate(NPCTemplateIDProvider provider) { + super(provider.createID(ID)); + this.name = "Jasmine"; + this.title = "Gatekeeper"; + this.attackable = true; + this.maxHp = 200; + + this.collisionRadius = 8.00; + this.collisionHeight = 32.00; + + addLocation("The Town of Gludio", GLUDIO, 10000); + addLocation("The Dwarven Village", DWARVEN_VILLAGE, 22000); + addLocation("Talking Island Village", TALKING_ISLAND_VILLAGE, 24000); + addLocation("The Orc Village", ORC_VILLAGE, 13000); + addLocation("Kamael Village", KAMAEL_VILLAGE, 13000); + addLocation("Dark Forest", DARK_FOREST, 890); + addLocation("Swampland", SWAMPLAND, 1100); + addLocation("Spider Nest", SPIDER_NEST, 3600); + addLocation("Neutral Zone", NEUTRAL_ZONE, 1700); + } + + @Override + protected HtmlTemplate getChat(String name) throws L2Exception { + if (name.equals("")) { + return new HtmlTemplate() { + @Override + protected void build(MarkupTag body) { + body.text("Gatekeeper Jasmine:").br(); + body.text("The Gatekeeper Guild stewards the doors of time and space that connects " + + "a multitude of locations on the continent. "); + body.text("Do you wish to leave this forest and seek your dreams in the wide world beyond? "); + body.text( + "If you wish it, I can send you to an exotic land filled with romance and adventure!") + .br(); + body.addLink("Teleport", "npc_${npcid}_Chat teleport").br(); + body.addLink("Exchange Dimension Diamonds", + "npc_${npcid}_multisell 002").br(); + body.addLink("Noblesse Exclusive Teleport", + "npc_${npcid}_Quest 2000_NoblesseTeleport").br(); + body.addLink("Receive your Birthday Gift!", + "npc_${npcid}_Quest CharacterBirthday").br(); + body.addLink("Quest", "npc_${npcid}_Quest").br(); + } + }; + } + return super.getChat(name); + } +} diff --git a/src/dao/com/l2jserver/db/dao/NPCDAO.java b/src/dao/com/l2jserver/db/dao/NPCDAO.java new file mode 100644 index 000000000..e4314e933 --- /dev/null +++ b/src/dao/com/l2jserver/db/dao/NPCDAO.java @@ -0,0 +1,98 @@ +/* + * This file is part of l2jserver . + * + * l2jserver 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. + * + * l2jserver 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 l2jserver. If not, see . + */ +package com.l2jserver.db.dao; + +import java.util.List; + +import com.l2jserver.model.id.ID; +import com.l2jserver.model.id.object.NPCID; +import com.l2jserver.model.id.template.NPCTemplateID; +import com.l2jserver.model.world.NPC; +import com.l2jserver.service.cache.Cacheable; +import com.l2jserver.service.cache.IgnoreCaching; +import com.l2jserver.service.database.DataAccessObject; + +/** + * The {@link NPCDAO} is can load and save {@link NPC NPC instances}. + * + * @author Rogiel + */ +public interface NPCDAO extends DataAccessObject, Cacheable { + /** + * Load the instance represented by id from the database + * + * @param id + * the id + * @return the instance loaded + */ + NPC load(NPCID id); + + /** + * Load all {@link NPC} instances + * + * @return all NPC instances + */ + List loadAll(); + + /** + * Select an {@link NPC} by its template. + * + * @param name + * the npc template id + * @return the found NPC. Null if does not exists. + */ + List selectByTemplate(NPCTemplateID templateID); + + /** + * Loads an List of all {@link ID}s in the database + * + * @return the list containing all ids + */ + @IgnoreCaching + List listIDs(); + + /** + * Save the instance to the database. If a new database entry was created + * returns true. + * + * @param npc + * the npc + * @return true if created a new entry in database (i.e. insert), false if + * not created (i.e. update) + */ + @IgnoreCaching + boolean save(NPC npc); + + /** + * Save the instance to the database. If a new database entry was created + * returns true. + * + * @param npc + * the npc + */ + @IgnoreCaching + void insert(NPC npc); + + /** + * Updates the instance to the database. + * + * @param npc + * the npc + */ + @IgnoreCaching + void update(NPC npc); +} diff --git a/src/dao/mysql5/com/l2jserver/db/dao/MySQL5DAOModule.java b/src/dao/mysql5/com/l2jserver/db/dao/MySQL5DAOModule.java index b1bde4229..448a74673 100644 --- a/src/dao/mysql5/com/l2jserver/db/dao/MySQL5DAOModule.java +++ b/src/dao/mysql5/com/l2jserver/db/dao/MySQL5DAOModule.java @@ -23,6 +23,7 @@ import com.l2jserver.db.dao.mysql5.MySQL5CharacterDAO; import com.l2jserver.db.dao.mysql5.MySQL5CharacterFriendDAO; import com.l2jserver.db.dao.mysql5.MySQL5ClanDAO; import com.l2jserver.db.dao.mysql5.MySQL5ItemDAO; +import com.l2jserver.db.dao.mysql5.MySQL5NPCDAO; /** * Google Guice {@link Module} for MySQL5 DAOs @@ -36,6 +37,9 @@ public class MySQL5DAOModule extends AbstractModule { Scopes.SINGLETON); bind(CharacterFriendDAO.class).to(MySQL5CharacterFriendDAO.class).in( Scopes.SINGLETON); + + bind(NPCDAO.class).to(MySQL5NPCDAO.class).in(Scopes.SINGLETON); + bind(ItemDAO.class).to(MySQL5ItemDAO.class).in(Scopes.SINGLETON); bind(ClanDAO.class).to(MySQL5ClanDAO.class).in(Scopes.SINGLETON); } diff --git a/src/dao/mysql5/com/l2jserver/db/dao/mysql5/MySQL5CharacterDAO.java b/src/dao/mysql5/com/l2jserver/db/dao/mysql5/MySQL5CharacterDAO.java index f2ca866c3..e1254692d 100644 --- a/src/dao/mysql5/com/l2jserver/db/dao/mysql5/MySQL5CharacterDAO.java +++ b/src/dao/mysql5/com/l2jserver/db/dao/mysql5/MySQL5CharacterDAO.java @@ -132,8 +132,7 @@ public class MySQL5CharacterDAO extends AbstractMySQL5DAO .createID(charClass.id); final CharacterTemplate template = templateId.getTemplate(); - final L2Character character = new L2Character( - template.getBaseAttributes()); + final L2Character character = template.create(); character.setID(id); character.setAccountID(accountIdFactory.createID(rs diff --git a/src/dao/mysql5/com/l2jserver/db/dao/mysql5/MySQL5NPCDAO.java b/src/dao/mysql5/com/l2jserver/db/dao/mysql5/MySQL5NPCDAO.java new file mode 100644 index 000000000..f50d07ad9 --- /dev/null +++ b/src/dao/mysql5/com/l2jserver/db/dao/mysql5/MySQL5NPCDAO.java @@ -0,0 +1,264 @@ +/* + * This file is part of l2jserver . + * + * l2jserver 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. + * + * l2jserver 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 l2jserver. If not, see . + */ +package com.l2jserver.db.dao.mysql5; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; + +import com.google.inject.Inject; +import com.l2jserver.db.dao.CharacterDAO; +import com.l2jserver.db.dao.NPCDAO; +import com.l2jserver.model.id.object.NPCID; +import com.l2jserver.model.id.object.allocator.IDAllocator; +import com.l2jserver.model.id.object.provider.NPCIDProvider; +import com.l2jserver.model.id.template.NPCTemplateID; +import com.l2jserver.model.id.template.provider.NPCTemplateIDProvider; +import com.l2jserver.model.template.NPCTemplate; +import com.l2jserver.model.world.NPC; +import com.l2jserver.service.database.DatabaseService; +import com.l2jserver.service.database.MySQLDatabaseService.CachedMapper; +import com.l2jserver.service.database.MySQLDatabaseService.InsertUpdateQuery; +import com.l2jserver.service.database.MySQLDatabaseService.Mapper; +import com.l2jserver.service.database.MySQLDatabaseService.SelectListQuery; +import com.l2jserver.service.database.MySQLDatabaseService.SelectSingleQuery; +import com.l2jserver.util.dimensional.Point; + +/** + * {@link CharacterDAO} implementation for MySQL5 + * + * @author Rogiel + */ +public class MySQL5NPCDAO extends AbstractMySQL5DAO implements NPCDAO { + /** + * The {@link NPCID} provider + */ + private final NPCIDProvider idProvider; + /** + * The {@link NPCTemplateID} provider + */ + private final NPCTemplateIDProvider templateIdProvider; + + /** + * Character table name + */ + public static final String TABLE = "npc"; + // FIELDS + public static final String NPC_ID = "npc_id"; + public static final String NPC_TEMPLATE_ID = "npc_template_id"; + + public static final String POINT_X = "point_x"; + public static final String POINT_Y = "point_y"; + public static final String POINT_Z = "point_z"; + public static final String POINT_ANGLE = "point_angle"; + + @Inject + public MySQL5NPCDAO(DatabaseService database, + final NPCIDProvider idProvider, + NPCTemplateIDProvider templateIdProvider) { + super(database); + this.idProvider = idProvider; + this.templateIdProvider = templateIdProvider; + } + + /** + * The {@link Mapper} for {@link NPC} + */ + private final Mapper mapper = new CachedMapper(database) { + @Override + protected NPCID createID(ResultSet rs) throws SQLException { + if (rs.getInt(NPC_ID) < IDAllocator.FIRST_ID) + return idProvider.createID(); + return idProvider.createID(rs.getInt(NPC_ID)); + } + + @Override + protected NPC map(NPCID id, ResultSet rs) throws SQLException { + NPCTemplateID templateId = templateIdProvider.createID(rs + .getInt(NPC_TEMPLATE_ID)); + NPCTemplate template = templateId.getTemplate(); + if (template == null) { + // set default npc instance, for now! + // RoxxyGatekeeperTemplate - 30006 + templateId = templateIdProvider.createID(30006); + template = templateId.getTemplate(); + } + + final NPC npc = template.create(); + + npc.setID(id); + npc.setPoint(Point.fromXYZA(rs.getInt(POINT_X), rs.getInt(POINT_Y), + rs.getInt(POINT_Z), rs.getDouble(POINT_ANGLE))); + + return npc; + } + }; + + /** + * The {@link Mapper} for {@link NPCID} + */ + private final Mapper idMapper = new Mapper() { + @Override + public NPCID map(ResultSet rs) throws SQLException { + if (rs.getString(NPC_ID) == null) + return null; + return idProvider.createID(rs.getInt(NPC_ID)); + } + }; + + @Override + public NPC load(final NPCID id) { + return database.query(new SelectSingleQuery() { + @Override + protected String query() { + return "SELECT * FROM `" + TABLE + "` WHERE `" + NPC_ID + + "` = ?"; + } + + @Override + protected void parametize(PreparedStatement st) throws SQLException { + st.setInt(1, id.getID()); + } + + @Override + protected Mapper mapper() { + return mapper; + } + }); + } + + @Override + public List loadAll() { + return database.query(new SelectListQuery() { + @Override + protected String query() { + return "SELECT * FROM `" + TABLE + "`"; + } + + @Override + protected Mapper mapper() { + return mapper; + } + }); + } + + @Override + public List selectByTemplate(final NPCTemplateID template) { + return database.query(new SelectListQuery() { + @Override + protected String query() { + return "SELECT * FROM `" + TABLE + "` WHERE `" + + NPC_TEMPLATE_ID + "` = ?"; + } + + @Override + protected void parametize(PreparedStatement st) throws SQLException { + st.setInt(1, template.getID()); + } + + @Override + protected Mapper mapper() { + return mapper; + } + }); + } + + @Override + public List listIDs() { + return database.query(new SelectListQuery() { + @Override + protected String query() { + return "SELECT `" + NPC_ID + "` FROM `" + TABLE + "`"; + } + + @Override + protected Mapper mapper() { + return idMapper; + } + }); + } + + @Override + public boolean save(NPC npc) { + if (npc.isInDatabase()) { + update(npc); + return false; + } else { + insert(npc); + return true; + } + } + + @Override + public void insert(NPC npc) { + database.query(new InsertUpdateQuery(npc) { + @Override + protected String query() { + return "INSERT INTO `" + TABLE + "` (`" + NPC_ID + "`,`" + + NPC_TEMPLATE_ID + "`,`" + POINT_X + "`,`" + POINT_Y + + "`,`" + POINT_Z + "`,`" + POINT_ANGLE + + "`) VALUES(?,?,?,?,?,?)"; + } + + @Override + protected void parametize(PreparedStatement st, NPC npc) + throws SQLException { + int i = 1; + + st.setInt(i++, npc.getID().getID()); + st.setInt(i++, npc.getTemplateID().getID()); + + st.setInt(i++, npc.getPoint().getX()); + st.setInt(i++, npc.getPoint().getY()); + st.setInt(i++, npc.getPoint().getZ()); + st.setDouble(i++, npc.getPoint().getAngle()); + } + }); + } + + @Override + public void update(NPC npc) { + database.query(new InsertUpdateQuery(npc) { + @Override + protected String query() { + return "UPDATE `" + TABLE + "` SET `" + NPC_ID + "` = ?,`" + + NPC_TEMPLATE_ID + " = ?`,`" + POINT_X + " = ?`,`" + + POINT_Y + "` = ?,`" + POINT_Z + "` = ?,`" + + POINT_ANGLE + "` = ? WHERE " + NPC_ID + "` = ?"; + } + + @Override + protected void parametize(PreparedStatement st, NPC npc) + throws SQLException { + int i = 1; + + // SET + st.setInt(i++, npc.getID().getID()); + st.setInt(i++, npc.getTemplateID().getID()); + + st.setInt(i++, npc.getPoint().getX()); + st.setInt(i++, npc.getPoint().getY()); + st.setInt(i++, npc.getPoint().getZ()); + st.setDouble(i++, npc.getPoint().getAngle()); + + // WHERE + st.setInt(i++, npc.getID().getID()); + } + }); + } +} diff --git a/src/main/java/com/l2jserver/L2JGameServerMain.java b/src/main/java/com/l2jserver/L2JGameServerMain.java index b4826a943..85408b10d 100644 --- a/src/main/java/com/l2jserver/L2JGameServerMain.java +++ b/src/main/java/com/l2jserver/L2JGameServerMain.java @@ -16,27 +16,19 @@ */ package com.l2jserver; -import com.google.inject.Injector; -import com.l2jserver.model.id.object.provider.NPCIDProvider; -import com.l2jserver.model.id.template.NPCTemplateID; -import com.l2jserver.model.id.template.provider.NPCTemplateIDProvider; -import com.l2jserver.model.world.NPC; import com.l2jserver.service.ServiceManager; import com.l2jserver.service.cache.CacheService; import com.l2jserver.service.configuration.ConfigurationService; import com.l2jserver.service.database.DatabaseService; import com.l2jserver.service.game.character.CharacterService; import com.l2jserver.service.game.chat.ChatService; +import com.l2jserver.service.game.npc.NPCService; import com.l2jserver.service.game.pathing.PathingService; import com.l2jserver.service.game.scripting.ScriptingService; -import com.l2jserver.service.game.spawn.AlreadySpawnedServiceException; -import com.l2jserver.service.game.spawn.SpawnPointNotFoundServiceException; -import com.l2jserver.service.game.spawn.SpawnService; import com.l2jserver.service.game.template.TemplateService; import com.l2jserver.service.game.world.WorldIDService; import com.l2jserver.service.network.NetworkService; import com.l2jserver.service.network.keygen.BlowfishKeygenService; -import com.l2jserver.util.dimensional.Point; public class L2JGameServerMain { /** @@ -65,7 +57,10 @@ public class L2JGameServerMain { serviceManager.start(BlowfishKeygenService.class); serviceManager.start(NetworkService.class); - staticSpawn(server.getInjector()); + // spawn + serviceManager.get(NPCService.class).spawnAll(); + + // staticSpawn(server.getInjector()); } catch (Exception e) { System.out.println("GameServer could not be started!"); e.printStackTrace(); @@ -74,44 +69,44 @@ public class L2JGameServerMain { // Thread.sleep(60 * 60 * 1000); } - - /** - * This method does an static spawn for an object - * - * @throws AlreadySpawnedServiceException - * @throws SpawnPointNotFoundServiceException - */ - private static void staticSpawn(Injector injector) - throws SpawnPointNotFoundServiceException, - AlreadySpawnedServiceException { - final NPCTemplateIDProvider templateProvider = injector - .getInstance(NPCTemplateIDProvider.class); - final NPCIDProvider provider = injector - .getInstance(NPCIDProvider.class); - final SpawnService spawnService = injector - .getInstance(SpawnService.class); - - final NPCTemplateID id = templateProvider.createID(12077); - final NPC npc = id.getTemplate().create(); - - npc.setID(provider.createID()); - // close to char spawn - npc.setPoint(Point.fromXYZ(-71301, 258259, -3134)); - - spawnService.spawn(npc, null); - - // close spawn gatekepper - final NPCTemplateID gid = templateProvider.createID(30006); - final NPC gatekeeper = gid.getTemplate().create(); - gatekeeper.setID(provider.createID()); - gatekeeper.setPoint(Point.fromXYZ(-71301, 258559, -3134)); - spawnService.spawn(gatekeeper, null); - - // spawn tamil - orc village - final NPCTemplateID tamilId = templateProvider.createID(30576); - final NPC tamil = tamilId.getTemplate().create(); - tamil.setID(provider.createID()); - tamil.setPoint(Point.fromXYZ(-45264, -112512, -240)); - spawnService.spawn(tamil, null); - } + // + // /** + // * This method does an static spawn for an object + // * + // * @throws AlreadySpawnedServiceException + // * @throws SpawnPointNotFoundServiceException + // */ + // private static void staticSpawn(Injector injector) + // throws SpawnPointNotFoundServiceException, + // AlreadySpawnedServiceException { + // final NPCTemplateIDProvider templateProvider = injector + // .getInstance(NPCTemplateIDProvider.class); + // final NPCIDProvider provider = injector + // .getInstance(NPCIDProvider.class); + // final SpawnService spawnService = injector + // .getInstance(SpawnService.class); + // + // final NPCTemplateID id = templateProvider.createID(12077); + // final NPC npc = id.getTemplate().create(); + // + // npc.setID(provider.createID()); + // // close to char spawn + // npc.setPoint(Point.fromXYZ(-71301, 258259, -3134)); + // + // spawnService.spawn(npc, null); + // + // // close spawn gatekepper + // final NPCTemplateID gid = templateProvider.createID(30006); + // final NPC gatekeeper = gid.getTemplate().create(); + // gatekeeper.setID(provider.createID()); + // gatekeeper.setPoint(Point.fromXYZ(-71301, 258559, -3134)); + // spawnService.spawn(gatekeeper, null); + // + // // spawn tamil - orc village + // final NPCTemplateID tamilId = templateProvider.createID(30576); + // final NPC tamil = tamilId.getTemplate().create(); + // tamil.setID(provider.createID()); + // tamil.setPoint(Point.fromXYZ(-45264, -112512, -240)); + // spawnService.spawn(tamil, null); + // } } diff --git a/src/main/java/com/l2jserver/game/net/packet/server/ActorMovementPacket.java b/src/main/java/com/l2jserver/game/net/packet/server/ActorMovementPacket.java index b43599916..9794c60e0 100644 --- a/src/main/java/com/l2jserver/game/net/packet/server/ActorMovementPacket.java +++ b/src/main/java/com/l2jserver/game/net/packet/server/ActorMovementPacket.java @@ -44,24 +44,24 @@ public class ActorMovementPacket extends AbstractServerPacket { /** * The source target */ - private Coordinate target; + private Coordinate source; - public ActorMovementPacket(Actor actor, Coordinate target) { + public ActorMovementPacket(Actor actor, Coordinate source) { super(OPCODE); this.actor = actor; - this.target = target; + this.source = source; } @Override public void write(Lineage2Connection conn, ChannelBuffer buffer) { buffer.writeInt(actor.getID().getID()); - - // target - buffer.writeInt(target.getX()); - buffer.writeInt(target.getY()); - buffer.writeInt(target.getZ()); // source + buffer.writeInt(source.getX()); + buffer.writeInt(source.getY()); + buffer.writeInt(source.getZ()); + + // target buffer.writeInt(actor.getPoint().getX()); buffer.writeInt(actor.getPoint().getY()); buffer.writeInt(actor.getPoint().getZ()); diff --git a/src/main/java/com/l2jserver/game/net/packet/server/CharacterInformationBroadcastPacket.java b/src/main/java/com/l2jserver/game/net/packet/server/CharacterInformationBroadcastPacket.java new file mode 100644 index 000000000..26894ff3a --- /dev/null +++ b/src/main/java/com/l2jserver/game/net/packet/server/CharacterInformationBroadcastPacket.java @@ -0,0 +1,263 @@ +/* + * This file is part of l2jserver . + * + * l2jserver 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. + * + * l2jserver 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 l2jserver. If not, see . + */ +package com.l2jserver.game.net.packet.server; + +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.BELT; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.CHEST; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.CLOAK; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.DECORATION_1; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.DECORATION_2; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.DECORATION_3; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.DECORATION_4; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.DECORATION_5; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.DECORATION_6; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.FEET; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.GLOVES; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.HAIR1; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.HAIR2; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.HEAD; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.LEFT_BRACELET; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.LEFT_HAND; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.LEGS; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.RIGHT_BRACELET; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.RIGHT_HAND; +import static com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll.UNDERWEAR; + +import org.jboss.netty.buffer.ChannelBuffer; + +import com.l2jserver.game.net.Lineage2Connection; +import com.l2jserver.game.net.packet.AbstractServerPacket; +import com.l2jserver.model.world.Actor.Sex; +import com.l2jserver.model.world.Item; +import com.l2jserver.model.world.L2Character; +import com.l2jserver.model.world.L2Character.CharacterMoveType; +import com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll; +import com.l2jserver.util.BufferUtils; + +/** + * This packet sends to the client an actor information about an actor + * + * @author Rogiel + */ +public class CharacterInformationBroadcastPacket extends AbstractServerPacket { + /** + * The packet OPCODE + */ + public static final int OPCODE = 0x31; + + private final L2Character character; + + public CharacterInformationBroadcastPacket(L2Character character) { + super(OPCODE); + this.character = character; + } + + @Override + public void write(Lineage2Connection conn, ChannelBuffer buffer) { + buffer.writeInt(character.getPoint().getX()); + buffer.writeInt(character.getPoint().getY()); + buffer.writeInt(character.getPoint().getZ()); + buffer.writeInt(0x00); // unk + buffer.writeInt(character.getID().getID()); + BufferUtils.writeString(buffer, character.getName()); + buffer.writeInt(character.getRace().id); + buffer.writeInt(character.getSex().option); + + buffer.writeInt(character.getCharacterClass().id); + + writePaperdollItemID(buffer, character, UNDERWEAR); + // writePaperdollItemID(buffer, character, RIGHT_EAR); + // writePaperdollItemID(buffer, character, LEFT_EAR); + // writePaperdollItemID(buffer, character, NECK); + // writePaperdollItemID(buffer, character, RIGHT_FINGER); + // writePaperdollItemID(buffer, character, LEFT_FINGER); + writePaperdollItemID(buffer, character, HEAD); + writePaperdollItemID(buffer, character, RIGHT_HAND); + writePaperdollItemID(buffer, character, LEFT_HAND); + writePaperdollItemID(buffer, character, GLOVES); + writePaperdollItemID(buffer, character, CHEST); + writePaperdollItemID(buffer, character, LEGS); + writePaperdollItemID(buffer, character, FEET); + writePaperdollItemID(buffer, character, CLOAK); + writePaperdollItemID(buffer, character, RIGHT_HAND); + writePaperdollItemID(buffer, character, HAIR1); + writePaperdollItemID(buffer, character, HAIR2); + writePaperdollItemID(buffer, character, RIGHT_BRACELET); + writePaperdollItemID(buffer, character, LEFT_BRACELET); + writePaperdollItemID(buffer, character, DECORATION_1); + writePaperdollItemID(buffer, character, DECORATION_2); + writePaperdollItemID(buffer, character, DECORATION_3); + writePaperdollItemID(buffer, character, DECORATION_4); + writePaperdollItemID(buffer, character, DECORATION_5); + writePaperdollItemID(buffer, character, DECORATION_6); + writePaperdollItemID(buffer, character, BELT); + + writePaperdollAugumentID(buffer, character, UNDERWEAR); + // writePaperdollAugumentID(buffer, character, RIGHT_EAR); + // writePaperdollAugumentID(buffer, character, LEFT_EAR); + // writePaperdollAugumentID(buffer, character, NECK); + // writePaperdollAugumentID(buffer, character, RIGHT_FINGER); + // writePaperdollAugumentID(buffer, character, LEFT_FINGER); + writePaperdollAugumentID(buffer, character, HEAD); + writePaperdollAugumentID(buffer, character, RIGHT_HAND); + writePaperdollAugumentID(buffer, character, LEFT_HAND); + writePaperdollAugumentID(buffer, character, GLOVES); + writePaperdollAugumentID(buffer, character, CHEST); + writePaperdollAugumentID(buffer, character, LEGS); + writePaperdollAugumentID(buffer, character, FEET); + writePaperdollAugumentID(buffer, character, CLOAK); + writePaperdollAugumentID(buffer, character, RIGHT_HAND); + writePaperdollAugumentID(buffer, character, HAIR1); + writePaperdollAugumentID(buffer, character, HAIR2); + writePaperdollAugumentID(buffer, character, RIGHT_BRACELET); + writePaperdollAugumentID(buffer, character, LEFT_BRACELET); + writePaperdollAugumentID(buffer, character, DECORATION_1); + writePaperdollAugumentID(buffer, character, DECORATION_2); + writePaperdollAugumentID(buffer, character, DECORATION_3); + writePaperdollAugumentID(buffer, character, DECORATION_4); + writePaperdollAugumentID(buffer, character, DECORATION_5); + writePaperdollAugumentID(buffer, character, DECORATION_6); + writePaperdollAugumentID(buffer, character, BELT); + + buffer.writeInt(0x00); // unk + buffer.writeInt(0x01); // unk + // end of t1 new h's + + buffer.writeInt(0x00); // pvp flag + buffer.writeInt(0x00); // karma + + buffer.writeInt(character.getAttributes().getCastSpeed()); + buffer.writeInt(character.getAttributes().getAttackSpeed()); + + buffer.writeInt(0x00); // unk + + buffer.writeInt((int) character.getAttributes().getMoveSpeed()); + buffer.writeInt((int) character.getAttributes().getMoveSpeed()); + buffer.writeInt((int) character.getAttributes().getMoveSpeed()); + buffer.writeInt((int) character.getAttributes().getMoveSpeed()); + buffer.writeInt((int) character.getAttributes().getMoveSpeed()); + buffer.writeInt((int) character.getAttributes().getMoveSpeed()); + buffer.writeInt((int) character.getAttributes().getMoveSpeed()); + buffer.writeInt((int) character.getAttributes().getMoveSpeed()); + + buffer.writeDouble(0x01); // move speed multiplier + buffer.writeDouble(0x01); // attack speed multiplier + + if (character.getSex() == Sex.MALE) { + buffer.writeDouble(character.getTemplate().getMaleCollisionRadius()); + buffer.writeDouble(character.getTemplate().getMaleCollisionHeight()); + } else { + buffer.writeDouble(character.getTemplate() + .getFemaleCollisionRadius()); + buffer.writeDouble(character.getTemplate() + .getFemaleCollisionHeight()); + } + + buffer.writeInt(character.getAppearance().getHairStyle().option); + buffer.writeInt(character.getAppearance().getHairColor().option); + buffer.writeInt(character.getAppearance().getFace().option); + + BufferUtils.writeString(buffer, "TODO"); // TODO title + + // dont send those 4 if using cursed weapon + buffer.writeInt(0); // clan id + buffer.writeInt(0); // crest id + buffer.writeInt(0); // ally id + buffer.writeInt(0); // ally crest id + + buffer.writeByte(0x01); // sitting + buffer.writeByte((character.getMoveType() == CharacterMoveType.RUN ? 0x01 + : 0x00)); + buffer.writeByte(0x00); // is in combat + + buffer.writeByte(0x00); // alike dead + + buffer.writeByte(0x00); // invisible = 1 visible =0 + + // 1-on Strider, 2-on Wyvern, + // 3-on Great Wolf, 0-no mount + buffer.writeByte(0x00); + buffer.writeByte(0x00); // 1 - sellshop + + // writeH(_activeChar.getCubics().size()); + // for (int id : _activeChar.getCubics().keySet()) + // writeH(id); + buffer.writeShort(0x00); // cubics size + + buffer.writeByte(0x00); // in party match room + buffer.writeInt(0x00); // abnormal + buffer.writeByte(0x00); // flying mounted + + // recom have + buffer.writeShort(0x00); // Blue value for name (0 = + // white, 255 = pure blue) + buffer.writeInt(1000000); // mount npc + buffer.writeInt(character.getCharacterClass().id); + buffer.writeInt(0x00); // ? + buffer.writeByte(0x00); // enchant effect + + buffer.writeByte(0x00); // team circle around feet 1= Blue, 2 = red + + buffer.writeInt(0x00); // clan crest large id + buffer.writeByte(0x00); // is noble - Symbol on char menu + // ctrl+I + buffer.writeByte(0x00); // Hero Aura + + // (Cant be undone by setting back to 0) + buffer.writeByte(0x00); // 0x01: Fishing Mode + buffer.writeInt(0x00); // fish x + buffer.writeInt(0x00);// fish y + buffer.writeInt(0x00); // fish z + + buffer.writeInt(character.getAppearance().getNameColor().toInteger()); + + buffer.writeInt((int) character.getPoint().getAngle()); + + buffer.writeInt(0x00); // pledge class + buffer.writeInt(0x00); // pledge type + + buffer.writeInt(character.getAppearance().getTitleColor().toInteger()); + + buffer.writeInt(0x00); // cursed weapon id + + buffer.writeInt(0x00); // clan reputation + + // T1 + buffer.writeInt(0x00); // transformation id + buffer.writeInt(0x00); // agathion id + + // T2 + buffer.writeInt(0x01); // unk + + // T2.3 + buffer.writeInt(0x00); // special effect + } + + private void writePaperdollItemID(ChannelBuffer buffer, + L2Character character, InventoryPaperdoll paperdoll) { + final Item item = character.getInventory().getItem(paperdoll); + int id = 0; + if (item != null) + id = item.getTemplateID().getID(); + buffer.writeInt(id); + } + + private void writePaperdollAugumentID(ChannelBuffer buffer, + L2Character character, InventoryPaperdoll paperdoll) { + buffer.writeInt(0x00); + } +} diff --git a/src/main/java/com/l2jserver/game/net/packet/server/CharacterInformationPacket.java b/src/main/java/com/l2jserver/game/net/packet/server/CharacterInformationPacket.java index ea267148e..a90c3d39f 100644 --- a/src/main/java/com/l2jserver/game/net/packet/server/CharacterInformationPacket.java +++ b/src/main/java/com/l2jserver/game/net/packet/server/CharacterInformationPacket.java @@ -48,6 +48,7 @@ import com.l2jserver.game.net.Lineage2Connection; import com.l2jserver.game.net.packet.AbstractServerPacket; import com.l2jserver.model.world.Item; import com.l2jserver.model.world.L2Character; +import com.l2jserver.model.world.Actor.Sex; import com.l2jserver.model.world.actor.ActorExperience; import com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll; import com.l2jserver.util.BufferUtils; @@ -233,9 +234,16 @@ public class CharacterInformationPacket extends AbstractServerPacket { // writeF(_activeChar.getCollisionRadius()); // writeF(_activeChar.getCollisionHeight()); // } - buffer.writeDouble(9.0); // collision radius - buffer.writeDouble(23.0); // collision heigth - + if (character.getSex() == Sex.MALE) { + buffer.writeDouble(character.getTemplate().getMaleCollisionRadius()); + buffer.writeDouble(character.getTemplate().getMaleCollisionHeight()); + } else { + buffer.writeDouble(character.getTemplate() + .getFemaleCollisionRadius()); + buffer.writeDouble(character.getTemplate() + .getFemaleCollisionHeight()); + } + buffer.writeInt(character.getAppearance().getHairStyle().option); buffer.writeInt(character.getAppearance().getHairColor().option); buffer.writeInt(character.getAppearance().getFace().option); @@ -299,9 +307,7 @@ public class CharacterInformationPacket extends AbstractServerPacket { // new c5 // is running - buffer.writeByte(0x00); // changes the Speed - // display on Status - // Window + buffer.writeByte(character.getMoveType().id); // pledge class buffer.writeInt(0x00); // changes the text above diff --git a/src/main/java/com/l2jserver/game/net/packet/server/NPCInformationPacket.java b/src/main/java/com/l2jserver/game/net/packet/server/NPCInformationPacket.java index cbb1f6bd9..e5203a521 100644 --- a/src/main/java/com/l2jserver/game/net/packet/server/NPCInformationPacket.java +++ b/src/main/java/com/l2jserver/game/net/packet/server/NPCInformationPacket.java @@ -21,12 +21,12 @@ import org.jboss.netty.buffer.ChannelBuffer; import com.l2jserver.game.net.Lineage2Connection; import com.l2jserver.game.net.packet.AbstractServerPacket; import com.l2jserver.model.template.NPCTemplate; +import com.l2jserver.model.world.L2Character; import com.l2jserver.model.world.NPC; import com.l2jserver.util.BufferUtils; /** - * This packet sends to the client an actor information about an actor (except - * players) + * This packet sends to the client an actor information about an actor * * @author Rogiel */ @@ -49,7 +49,12 @@ public class NPCInformationPacket extends AbstractServerPacket { buffer.writeInt(npc.getID().getID()); buffer.writeInt(template.getID().getID() + 1000000); // npctype id - buffer.writeInt((template.isAttackable() ? 0x01 : 0x00)); + if (npc instanceof NPC) { + buffer.writeInt((((NPCTemplate) template).isAttackable() ? 0x01 + : 0x00)); + } else { + buffer.writeInt(0x01); + } buffer.writeInt(npc.getPoint().getX()); buffer.writeInt(npc.getPoint().getY()); buffer.writeInt(npc.getPoint().getZ()); @@ -77,8 +82,8 @@ public class NPCInformationPacket extends AbstractServerPacket { buffer.writeByte(0x00); // is in combat buffer.writeByte(0x00); // is like dead (faking) buffer.writeByte(0x00); // 0=teleported 1=default 2=summoned - BufferUtils.writeString(buffer, template.getName()); - BufferUtils.writeString(buffer, template.getTitle()); + BufferUtils.writeString(buffer, ((NPCTemplate) template).getName()); + BufferUtils.writeString(buffer, ((NPCTemplate) template).getTitle()); buffer.writeInt(0x00); // Title color 0=client default buffer.writeInt(0x00); // pvp flag buffer.writeInt(0x00); // karma diff --git a/src/main/java/com/l2jserver/game/net/packet/server/ObjectRemove.java b/src/main/java/com/l2jserver/game/net/packet/server/ObjectRemove.java new file mode 100644 index 000000000..5f6022867 --- /dev/null +++ b/src/main/java/com/l2jserver/game/net/packet/server/ObjectRemove.java @@ -0,0 +1,52 @@ +/* + * This file is part of l2jserver . + * + * l2jserver 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. + * + * l2jserver 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 l2jserver. If not, see . + */ +package com.l2jserver.game.net.packet.server; + +import org.jboss.netty.buffer.ChannelBuffer; + +import com.l2jserver.game.net.Lineage2Connection; +import com.l2jserver.game.net.packet.AbstractServerPacket; +import com.l2jserver.model.world.PositionableObject; + +/** + * This packet informs the client that an certain object has disappeared from + * his sight or from the world. + * + * @author Rogiel + */ +public class ObjectRemove extends AbstractServerPacket { + /** + * The packet OPCODE + */ + public static final int OPCODE = 0x08; + + /** + * The Object + */ + private final PositionableObject object; + + public ObjectRemove(PositionableObject object) { + super(OPCODE); + this.object = object; + } + + @Override + public void write(Lineage2Connection conn, ChannelBuffer buffer) { + buffer.writeInt(object.getID().getID()); + buffer.writeInt(0x00); + } +} diff --git a/src/main/java/com/l2jserver/model/AbstractModel.java b/src/main/java/com/l2jserver/model/AbstractModel.java index 1d2408775..a4077105c 100644 --- a/src/main/java/com/l2jserver/model/AbstractModel.java +++ b/src/main/java/com/l2jserver/model/AbstractModel.java @@ -24,11 +24,16 @@ import com.l2jserver.model.id.ID; * * @author Rogiel */ -public class AbstractModel> implements Model { +public abstract class AbstractModel> implements Model { /** * The object id */ protected T id; + /** + * The database state. True inidicates that the object is on database, false + * indicates it must be inserted. + */ + protected boolean inDatabase; @Override public T getID() { @@ -65,4 +70,14 @@ public class AbstractModel> implements Model { return false; return true; } + + @Override + public boolean isInDatabase() { + return inDatabase; + } + + @Override + public void setIsInDatabase(boolean state) { + inDatabase = state; + } } diff --git a/src/main/java/com/l2jserver/model/Model.java b/src/main/java/com/l2jserver/model/Model.java index 2b07a1c70..f0d8211b8 100644 --- a/src/main/java/com/l2jserver/model/Model.java +++ b/src/main/java/com/l2jserver/model/Model.java @@ -33,4 +33,15 @@ public interface Model> { * the object ID to set */ void setID(T ID); + + /** + * @return true if object is already inserted in the database + */ + boolean isInDatabase(); + + /** + * @param state + * the database state + */ + void setIsInDatabase(boolean state); } diff --git a/src/main/java/com/l2jserver/model/game/Spawn.java b/src/main/java/com/l2jserver/model/game/Spawn.java deleted file mode 100644 index 66f7ad660..000000000 --- a/src/main/java/com/l2jserver/model/game/Spawn.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of l2jserver . - * - * l2jserver 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. - * - * l2jserver 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 l2jserver. If not, see . - */ -package com.l2jserver.model.game; - -import com.l2jserver.model.id.template.NPCTemplateID; -import com.l2jserver.model.template.NPCTemplate; -import com.l2jserver.util.dimensional.Point; - -/** - * This class represents an spawn instance of a NPC or Monster - * - * @author Rogiel - */ -public class Spawn { - /** - * The NPC template id - */ - private NPCTemplateID npcTemplateID; - /** - * The NPC spawn point - */ - private Point point; - - /** - * @return the npcTemplate ID - */ - public NPCTemplateID getNPCTemplateID() { - return npcTemplateID; - } - - /** - * @return the npcTemplate - */ - public NPCTemplate getNPCTemplate() { - return npcTemplateID.getTemplate(); - } - - /** - * @param npcTemplateID - * the npcTemplate ID to set - */ - public void setNPCTemplateID(NPCTemplateID npcTemplateID) { - this.npcTemplateID = npcTemplateID; - } - - /** - * @return the point - */ - public Point getPoint() { - return point; - } - - /** - * @param point - * the point to set - */ - public void setPoint(Point point) { - this.point = point; - } -} diff --git a/src/main/java/com/l2jserver/model/template/ActorTemplate.java b/src/main/java/com/l2jserver/model/template/ActorTemplate.java index e4ecb67b5..8442908ed 100644 --- a/src/main/java/com/l2jserver/model/template/ActorTemplate.java +++ b/src/main/java/com/l2jserver/model/template/ActorTemplate.java @@ -41,6 +41,18 @@ public abstract class ActorTemplate 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 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 * diff --git a/src/main/java/com/l2jserver/model/template/CharacterTemplate.java b/src/main/java/com/l2jserver/model/template/CharacterTemplate.java index 7964defe5..a04329ade 100644 --- a/src/main/java/com/l2jserver/model/template/CharacterTemplate.java +++ b/src/main/java/com/l2jserver/model/template/CharacterTemplate.java @@ -43,6 +43,23 @@ public abstract class CharacterTemplate extends ActorTemplate { 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 { @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 { 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() { diff --git a/src/main/java/com/l2jserver/model/template/NPCTemplate.java b/src/main/java/com/l2jserver/model/template/NPCTemplate.java index 3a4a5787e..100e2e142 100644 --- a/src/main/java/com/l2jserver/model/template/NPCTemplate.java +++ b/src/main/java/com/l2jserver/model/template/NPCTemplate.java @@ -71,15 +71,6 @@ public abstract class NPCTemplate extends ActorTemplate 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 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 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 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 */ diff --git a/src/main/java/com/l2jserver/model/template/npc/TeleporterNPCTemplate.java b/src/main/java/com/l2jserver/model/template/npc/TeleporterNPCTemplate.java index 85d14229b..d5e7f7ea0 100644 --- a/src/main/java/com/l2jserver/model/template/npc/TeleporterNPCTemplate.java +++ b/src/main/java/com/l2jserver/model/template/npc/TeleporterNPCTemplate.java @@ -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; diff --git a/src/main/java/com/l2jserver/model/world/Actor.java b/src/main/java/com/l2jserver/model/world/Actor.java index c0155beb5..9dcfc1cfb 100644 --- a/src/main/java/com/l2jserver/model/world/Actor.java +++ b/src/main/java/com/l2jserver/model/world/Actor.java @@ -17,9 +17,10 @@ package com.l2jserver.model.world; import com.l2jserver.model.id.object.ActorID; +import com.l2jserver.model.id.template.ActorTemplateID; +import com.l2jserver.model.template.ActorTemplate; import com.l2jserver.model.world.actor.ActorEffects; import com.l2jserver.model.world.actor.ActorSkillContainer; -import com.l2jserver.util.dimensional.Coordinate; import com.l2jserver.util.dimensional.Point; /** @@ -28,6 +29,8 @@ import com.l2jserver.util.dimensional.Point; * @author Rogiel */ public abstract class Actor extends PositionableObject { + protected ActorTemplateID templateID; + /** * The actor race */ @@ -117,6 +120,10 @@ public abstract class Actor extends PositionableObject { */ protected final ActorSkillContainer skills = new ActorSkillContainer(this); + public Actor(ActorTemplateID templateID) { + this.templateID = templateID; + } + public int getHP() { return hp; } @@ -174,6 +181,20 @@ public abstract class Actor extends PositionableObject { return skills; } + /** + * @return the templateID + */ + public ActorTemplateID getTemplateID() { + return templateID; + } + + /** + * @return the template + */ + public ActorTemplate getTemplate() { + return templateID.getTemplate(); + } + @Override public ActorID getID() { return (ActorID) super.getID(); diff --git a/src/main/java/com/l2jserver/model/world/Item.java b/src/main/java/com/l2jserver/model/world/Item.java index f970026c6..5c0808910 100644 --- a/src/main/java/com/l2jserver/model/world/Item.java +++ b/src/main/java/com/l2jserver/model/world/Item.java @@ -21,8 +21,6 @@ import com.l2jserver.model.id.template.ItemTemplateID; import com.l2jserver.model.template.ItemTemplate; import com.l2jserver.model.world.character.CharacterInventory.InventoryLocation; import com.l2jserver.model.world.character.CharacterInventory.InventoryPaperdoll; -import com.l2jserver.util.dimensional.Coordinate; -import com.l2jserver.util.dimensional.Point; /** * This class represents an {@link Item} in the Lineage II World. The item can @@ -37,10 +35,13 @@ import com.l2jserver.util.dimensional.Point; *
  • Equipped by the {@link L2Character character}: location * is {@link InventoryLocation#PAPERDOLL}, paperdoll is not null and * coordinate is null.
  • - *
  • Dropped on the ground: location
  • and paperdoll + *
  • Dropped on the ground: location
  • and paperdoll * are null, coordinate is not null and represents the dropping * location. * + *

    + * Please note that {@link PositionableObject} values are only set if the object + * is dropped on the ground. * * @author Rogiel */ @@ -62,10 +63,6 @@ public class Item extends PositionableObject { * Paperdoll slot for this item */ private InventoryPaperdoll paperdoll; - /** - * Drop coordinate of this item - */ - private Coordinate coordinate; /** * Count of items @@ -144,12 +141,4 @@ public class Item extends PositionableObject { public void setOwnerID(CharacterID ownerID) { this.ownerID = ownerID; } - - public Point getPoint() { - return null; - } - - public void setPoint(Point point) { - - } } diff --git a/src/main/java/com/l2jserver/model/world/L2Character.java b/src/main/java/com/l2jserver/model/world/L2Character.java index a181f218e..bb696f98d 100644 --- a/src/main/java/com/l2jserver/model/world/L2Character.java +++ b/src/main/java/com/l2jserver/model/world/L2Character.java @@ -23,6 +23,7 @@ import com.l2jserver.model.id.object.ActorID; import com.l2jserver.model.id.object.CharacterID; import com.l2jserver.model.id.object.ClanID; import com.l2jserver.model.id.object.PetID; +import com.l2jserver.model.id.template.CharacterTemplateID; import com.l2jserver.model.template.CharacterTemplate; import com.l2jserver.model.world.actor.ActorAttributes; import com.l2jserver.model.world.character.CharacterAppearance; @@ -138,7 +139,9 @@ public class L2Character extends Player { * @param baseAttributes * the base attribute for this character */ - public L2Character(CharacterTemplate.ActorBaseAttributes baseAttributes) { + public L2Character(CharacterTemplateID templateID, + CharacterTemplate.ActorBaseAttributes baseAttributes) { + super(templateID); this.baseAttributes = baseAttributes; this.attributes = new CharacterCalculatedAttributes(this); } @@ -369,6 +372,16 @@ public class L2Character extends Player { return shortcuts; } + @Override + public CharacterTemplateID getTemplateID() { + return (CharacterTemplateID) super.getTemplateID(); + } + + @Override + public CharacterTemplate getTemplate() { + return (CharacterTemplate) super.getTemplate(); + } + @Override public CharacterID getID() { return (CharacterID) super.getID(); diff --git a/src/main/java/com/l2jserver/model/world/NPC.java b/src/main/java/com/l2jserver/model/world/NPC.java index 531734e16..20f485afa 100644 --- a/src/main/java/com/l2jserver/model/world/NPC.java +++ b/src/main/java/com/l2jserver/model/world/NPC.java @@ -30,11 +30,6 @@ import com.l2jserver.service.game.ai.AIScript; * @author Rogiel */ public class NPC extends Actor { - /** - * The NPC template ID - */ - private final NPCTemplateID templateID; - /** * Creates a new instance * @@ -42,21 +37,21 @@ public class NPC extends Actor { * the {@link NPC} {@link TemplateID} */ public NPC(NPCTemplateID templateID) { - this.templateID = templateID; + super(templateID); } /** * @return the NPC template ID */ public NPCTemplateID getTemplateID() { - return templateID; + return (NPCTemplateID) templateID; } /** * @return the NPC template */ public NPCTemplate getTemplate() { - return templateID.getTemplate(); + return (NPCTemplate) templateID.getTemplate(); } @Override diff --git a/src/main/java/com/l2jserver/model/world/Pet.java b/src/main/java/com/l2jserver/model/world/Pet.java index 1844c0586..396f80f96 100644 --- a/src/main/java/com/l2jserver/model/world/Pet.java +++ b/src/main/java/com/l2jserver/model/world/Pet.java @@ -18,6 +18,7 @@ package com.l2jserver.model.world; import com.l2jserver.model.id.object.CharacterID; import com.l2jserver.model.id.object.ItemID; +import com.l2jserver.model.id.template.ActorTemplateID; /** * This class represents an Pet in the Lineage II World @@ -34,6 +35,10 @@ public class Pet extends Player { */ private ItemID itemID; + public Pet(ActorTemplateID templateID) { + super(templateID); + } + /** * @return the owner ID */ diff --git a/src/main/java/com/l2jserver/model/world/Player.java b/src/main/java/com/l2jserver/model/world/Player.java index 58180b511..5bd9d9eb5 100644 --- a/src/main/java/com/l2jserver/model/world/Player.java +++ b/src/main/java/com/l2jserver/model/world/Player.java @@ -16,6 +16,8 @@ */ package com.l2jserver.model.world; +import com.l2jserver.model.id.template.ActorTemplateID; + /** * {@link Player} is any object that can be controlled by the player. The most * common implementation is {@link L2Character}. @@ -23,5 +25,7 @@ package com.l2jserver.model.world; * @author Rogiel */ public abstract class Player extends Actor { - + public Player(ActorTemplateID templateID) { + super(templateID); + } } diff --git a/src/main/java/com/l2jserver/model/world/PositionableObject.java b/src/main/java/com/l2jserver/model/world/PositionableObject.java index 674b2289a..8a0fa4226 100644 --- a/src/main/java/com/l2jserver/model/world/PositionableObject.java +++ b/src/main/java/com/l2jserver/model/world/PositionableObject.java @@ -20,10 +20,15 @@ import com.l2jserver.util.dimensional.Coordinate; import com.l2jserver.util.dimensional.Point; /** - * @author Rogiel + * This is an abstract object that objects that can be placed in world should + * extend. * + * @author Rogiel */ public abstract class PositionableObject extends AbstractObject { + /** + * The point this object is currently in + */ private Point point; /** diff --git a/src/main/java/com/l2jserver/model/world/character/event/CharacterMoveEvent.java b/src/main/java/com/l2jserver/model/world/character/event/CharacterMoveEvent.java index ac5689bf9..32046f041 100644 --- a/src/main/java/com/l2jserver/model/world/character/event/CharacterMoveEvent.java +++ b/src/main/java/com/l2jserver/model/world/character/event/CharacterMoveEvent.java @@ -34,7 +34,7 @@ public class CharacterMoveEvent implements CharacterEvent { */ private final L2Character character; /** - * The new point of the character + * The old point of the character */ private final Point point; @@ -44,7 +44,7 @@ public class CharacterMoveEvent implements CharacterEvent { * @param character * the character * @param point - * the character point + * the character point before moving */ public CharacterMoveEvent(L2Character character, Point point) { this.character = character; @@ -52,7 +52,7 @@ public class CharacterMoveEvent implements CharacterEvent { } /** - * @return the new point + * @return the old point */ public Point getPoint() { return point; diff --git a/src/main/java/com/l2jserver/service/ServiceManager.java b/src/main/java/com/l2jserver/service/ServiceManager.java index 2cb7a6597..66a2be465 100644 --- a/src/main/java/com/l2jserver/service/ServiceManager.java +++ b/src/main/java/com/l2jserver/service/ServiceManager.java @@ -57,6 +57,10 @@ public class ServiceManager { } logger = LoggerFactory.getLogger(ServiceManager.class); } + + public T get(Class serviceClass) { + return injector.getInstance(serviceClass); + } public T start(Class serviceClass) throws ServiceStartException { diff --git a/src/main/java/com/l2jserver/service/core/Log4JLoggingService.java b/src/main/java/com/l2jserver/service/core/Log4JLoggingService.java index 8f5c75f0c..f77799393 100644 --- a/src/main/java/com/l2jserver/service/core/Log4JLoggingService.java +++ b/src/main/java/com/l2jserver/service/core/Log4JLoggingService.java @@ -54,9 +54,10 @@ public class Log4JLoggingService extends AbstractService implements rootLogger.setLevel(Level.WARN); rootLogger.addAppender(new ConsoleAppender(layout, "System.err")); - l2jLogger.setLevel(Level.DEBUG); - scriptLogger.setLevel(Level.DEBUG); + l2jLogger.setLevel(Level.INFO); + scriptLogger.setLevel(Level.INFO); nettyLogger.setLevel(Level.DEBUG); + Logger.getLogger("com.l2jserver.model.id.object.allocator").setLevel(Level.WARN); } @Override diff --git a/src/main/java/com/l2jserver/service/database/MySQLDatabaseService.java b/src/main/java/com/l2jserver/service/database/MySQLDatabaseService.java index 920c0ed51..e5559b3d5 100644 --- a/src/main/java/com/l2jserver/service/database/MySQLDatabaseService.java +++ b/src/main/java/com/l2jserver/service/database/MySQLDatabaseService.java @@ -329,7 +329,9 @@ public class MySQLDatabaseService extends AbstractService implements final List list = CollectionFactory.newList(); final ResultSet rs = st.getResultSet(); while (rs.next()) { - list.add(mapper().map(rs)); + final T obj = mapper().map(rs); + if (obj != null) + list.add(obj); } return list; } diff --git a/src/main/java/com/l2jserver/service/game/character/CharacterServiceImpl.java b/src/main/java/com/l2jserver/service/game/character/CharacterServiceImpl.java index f6f24341f..8149abd29 100644 --- a/src/main/java/com/l2jserver/service/game/character/CharacterServiceImpl.java +++ b/src/main/java/com/l2jserver/service/game/character/CharacterServiceImpl.java @@ -23,6 +23,7 @@ import com.l2jserver.game.net.Lineage2Connection; import com.l2jserver.game.net.SystemMessage; import com.l2jserver.game.net.packet.server.ActorChatMessagePacket; import com.l2jserver.game.net.packet.server.ActorMovementPacket; +import com.l2jserver.game.net.packet.server.CharacterInformationBroadcastPacket; import com.l2jserver.game.net.packet.server.CharacterInformationExtraPacket; import com.l2jserver.game.net.packet.server.CharacterInformationPacket; import com.l2jserver.game.net.packet.server.CharacterInventoryPacket; @@ -30,6 +31,7 @@ import com.l2jserver.game.net.packet.server.CharacterMovementTypePacket; import com.l2jserver.game.net.packet.server.CharacterTargetSelectedPacket; import com.l2jserver.game.net.packet.server.GameGuardQueryPacket; import com.l2jserver.game.net.packet.server.NPCInformationPacket; +import com.l2jserver.game.net.packet.server.ObjectRemove; import com.l2jserver.model.id.object.CharacterID; import com.l2jserver.model.template.NPCTemplate; import com.l2jserver.model.world.Actor; @@ -50,6 +52,7 @@ import com.l2jserver.model.world.character.event.CharacterTargetSelectedEvent; import com.l2jserver.model.world.character.event.CharacterWalkingEvent; import com.l2jserver.model.world.npc.event.NPCSpawnEvent; import com.l2jserver.model.world.player.event.PlayerTeleportedEvent; +import com.l2jserver.model.world.player.event.PlayerTeleportingEvent; import com.l2jserver.service.AbstractService; import com.l2jserver.service.AbstractService.Depends; import com.l2jserver.service.game.chat.ChatChannel; @@ -65,7 +68,9 @@ import com.l2jserver.service.game.world.event.FilteredWorldListener; import com.l2jserver.service.game.world.event.WorldEvent; import com.l2jserver.service.game.world.event.WorldEventDispatcher; import com.l2jserver.service.game.world.event.WorldListener; +import com.l2jserver.service.game.world.filter.impl.IDFilter; import com.l2jserver.service.game.world.filter.impl.KnownListFilter; +import com.l2jserver.service.game.world.filter.impl.KnownListUpdateFilter; import com.l2jserver.service.network.NetworkService; import com.l2jserver.util.dimensional.Coordinate; import com.l2jserver.util.dimensional.Point; @@ -133,7 +138,7 @@ public class CharacterServiceImpl extends AbstractService implements return; itemDao.loadInventory(character); - + character.setOnline(true); // chat listener @@ -158,9 +163,10 @@ public class CharacterServiceImpl extends AbstractService implements // this listener will be filtered so that only interesting events are // dispatched, once a event arrives will be possible to check check if // the given event will be broadcasted or not - // TODO this should not be here, it should be i world service or a newly + // TODO this should not be here, it should be in world service or a + // newly // created broadcast service. - final WorldListener broadcastListener = new FilteredWorldListener( + final WorldListener neighboorListener = new FilteredWorldListener( new KnownListFilter(character)) { @Override protected boolean dispatch(WorldEvent e, PositionableObject object) { @@ -168,29 +174,64 @@ public class CharacterServiceImpl extends AbstractService implements conn.write(new NPCInformationPacket((NPC) object)); } else if (e instanceof CharacterMoveEvent) { final CharacterMoveEvent evt = (CharacterMoveEvent) e; - if (object.equals(character)) - return true; conn.write(new ActorMovementPacket((L2Character) object, evt.getPoint().getCoordinate())); } else if (e instanceof PlayerTeleportedEvent || e instanceof CharacterEnterWorldEvent) { - // TODO this should not be here! - for (final PositionableObject o : worldService - .iterable(new KnownListFilter(character))) { - if (o instanceof NPC) { - conn.write(new NPCInformationPacket((NPC) o)); - } + if (object instanceof NPC) { + conn.write(new NPCInformationPacket((NPC) object)); + } else if (object instanceof L2Character) { + conn.write(new CharacterInformationBroadcastPacket( + (L2Character) object)); } - } else if (e instanceof CharacterWalkingEvent - || e instanceof CharacterRunningEvent) { + } else if (e instanceof PlayerTeleportingEvent + || e instanceof CharacterLeaveWorldEvent) { + // object is not out of sight + conn.write(new ObjectRemove(object)); + } else if (e instanceof CharacterWalkingEvent) { conn.write(new CharacterMovementTypePacket( ((CharacterWalkingEvent) e).getCharacter())); + } else if (e instanceof CharacterRunningEvent) { + conn.write(new CharacterMovementTypePacket( + ((CharacterRunningEvent) e).getCharacter())); } // keep listener alive return true; } }; - eventDispatcher.addListener(broadcastListener); + eventDispatcher.addListener(neighboorListener); + final WorldListener sendPacketListener = new FilteredWorldListener( + new IDFilter(character.getID())) { + @Override + protected boolean dispatch(WorldEvent e, WorldObject object) { + if (e instanceof CharacterMoveEvent) { + final CharacterMoveEvent evt = (CharacterMoveEvent) e; + // process update known list + for (final WorldObject o : worldService + .iterable(new KnownListUpdateFilter(character, evt + .getPoint()))) { + if (o instanceof NPC) { + conn.write(new NPCInformationPacket((NPC) o)); + } else if (o instanceof L2Character) { + conn.write(new CharacterInformationBroadcastPacket( + (L2Character) o)); + } + } + } else if (e instanceof PlayerTeleportedEvent + || e instanceof CharacterEnterWorldEvent) { + broadcast(conn, character); + } else if (e instanceof CharacterWalkingEvent) { + conn.write(new CharacterMovementTypePacket( + ((CharacterWalkingEvent) e).getCharacter())); + } else if (e instanceof CharacterRunningEvent) { + conn.write(new CharacterMovementTypePacket( + ((CharacterRunningEvent) e).getCharacter())); + } + // keep listener alive + return true; + } + }; + eventDispatcher.addListener(sendPacketListener); // leave world event eventDispatcher.addListener(id, new CharacterListener() { @@ -206,7 +247,8 @@ public class CharacterServiceImpl extends AbstractService implements tradeChatListener); // remove broadcast listener - eventDispatcher.removeListener(broadcastListener); + eventDispatcher.removeListener(neighboorListener); + eventDispatcher.removeListener(sendPacketListener); // we can kill this listener now return false; @@ -236,22 +278,29 @@ public class CharacterServiceImpl extends AbstractService implements // we can ignore this one } - // broadcast knownlist -- trashy implementation - // TODO should be moved to world service or a newly created broadcast - // service, whichever fits the purpose - for (final WorldObject o : worldService.iterable(new KnownListFilter( - character))) { - if (o instanceof NPC) { - conn.write(new NPCInformationPacket((NPC) o)); - } - } - - // dispatch enter world event - eventDispatcher.dispatch(new CharacterEnterWorldEvent(character)); + broadcast(conn, character); // spawn the player -- this will also dispatch a spawn event // here the object is registered in the world spawnService.spawn(character, null); + + // dispatch enter world event + eventDispatcher.dispatch(new CharacterEnterWorldEvent(character)); + } + + // broadcast knownlist -- trashy implementation + // TODO should be moved to world service or a newly created broadcast + // service, whichever fits the purpose + private void broadcast(Lineage2Connection conn, L2Character character) { + for (final WorldObject o : worldService.iterable(new KnownListFilter( + character))) { + if (o instanceof NPC) { + conn.write(new NPCInformationPacket((NPC) o)); + } else if (o instanceof L2Character) { + conn.write(new CharacterInformationBroadcastPacket( + (L2Character) o)); + } + } } @Override @@ -303,7 +352,8 @@ public class CharacterServiceImpl extends AbstractService implements @Override public void attack(L2Character character, Actor target) - throws CannotSetTargetServiceException, ActorIsNotAttackableServiceException { + throws CannotSetTargetServiceException, + ActorIsNotAttackableServiceException { Preconditions.checkNotNull(character, "character"); Preconditions.checkNotNull(target, "target"); final CharacterID id = character.getID(); @@ -388,9 +438,10 @@ public class CharacterServiceImpl extends AbstractService implements // ignore while teleporting, for some reason the client sends a // validation just before teleport packet return; + final Point old = character.getPoint(); character.setPoint(point); character.setState(CharacterState.MOVING); - eventDispatcher.dispatch(new CharacterMoveEvent(character, point)); + eventDispatcher.dispatch(new CharacterMoveEvent(character, old)); } @Override diff --git a/src/main/java/com/l2jserver/service/game/npc/NPCService.java b/src/main/java/com/l2jserver/service/game/npc/NPCService.java index 58e60206a..cf66f4661 100644 --- a/src/main/java/com/l2jserver/service/game/npc/NPCService.java +++ b/src/main/java/com/l2jserver/service/game/npc/NPCService.java @@ -16,11 +16,15 @@ */ package com.l2jserver.service.game.npc; +import java.util.List; + import com.l2jserver.game.net.packet.client.CharacterActionPacket.CharacterAction; import com.l2jserver.model.template.NPCTemplate; import com.l2jserver.model.world.L2Character; import com.l2jserver.model.world.NPC; import com.l2jserver.service.Service; +import com.l2jserver.service.game.spawn.AlreadySpawnedServiceException; +import com.l2jserver.service.game.spawn.SpawnPointNotFoundServiceException; /** * This service manages {@link NPC} instances @@ -56,6 +60,17 @@ public interface NPCService extends Service { void action(NPC npc, L2Character character, String... args) throws ActionServiceException; + /** + * Load from database and spawn all {@link NPC NPCs} instances + * + * @throws AlreadySpawnedServiceException + * if one of the NPCs is already spawned + * @throws SpawnPointNotFoundServiceException + * if one of the NPCs does not have an spawn point defined + */ + List spawnAll() throws SpawnPointNotFoundServiceException, + AlreadySpawnedServiceException; + /** * Attacks an given NPC, if possible. * diff --git a/src/main/java/com/l2jserver/service/game/npc/NPCServiceImpl.java b/src/main/java/com/l2jserver/service/game/npc/NPCServiceImpl.java index 4180f6904..8d68093f5 100644 --- a/src/main/java/com/l2jserver/service/game/npc/NPCServiceImpl.java +++ b/src/main/java/com/l2jserver/service/game/npc/NPCServiceImpl.java @@ -16,12 +16,19 @@ */ package com.l2jserver.service.game.npc; +import java.util.List; + import com.google.common.base.Preconditions; +import com.google.inject.Inject; +import com.l2jserver.db.dao.NPCDAO; import com.l2jserver.game.net.packet.client.CharacterActionPacket.CharacterAction; import com.l2jserver.model.template.NPCTemplate; import com.l2jserver.model.world.L2Character; import com.l2jserver.model.world.NPC; import com.l2jserver.service.AbstractService; +import com.l2jserver.service.game.spawn.AlreadySpawnedServiceException; +import com.l2jserver.service.game.spawn.SpawnPointNotFoundServiceException; +import com.l2jserver.service.game.spawn.SpawnService; import com.l2jserver.util.exception.L2Exception; /** @@ -30,6 +37,22 @@ import com.l2jserver.util.exception.L2Exception; * @author Rogiel */ public class NPCServiceImpl extends AbstractService implements NPCService { + /** + * The {@link SpawnService} used to spawn the {@link NPC} instances + */ + private final SpawnService spawnService; + + /** + * The {@link NPCDAO} + */ + private final NPCDAO npcDao; + + @Inject + public NPCServiceImpl(SpawnService spawnService, NPCDAO npcDao) { + this.spawnService = spawnService; + this.npcDao = npcDao; + } + @Override public void action(NPC npc, L2Character character, CharacterAction action) throws ActionServiceException { @@ -61,6 +84,16 @@ public class NPCServiceImpl extends AbstractService implements NPCService { } } + @Override + public List spawnAll() throws SpawnPointNotFoundServiceException, + AlreadySpawnedServiceException { + final List npcs = npcDao.loadAll(); + for (final NPC npc : npcs) { + spawnService.spawn(npc, null); + } + return null; + } + @Override public void attack(NPC npc, L2Character attacker) throws NotAttackableNPCServiceException { diff --git a/src/main/java/com/l2jserver/service/game/world/CachedWorldIDService.java b/src/main/java/com/l2jserver/service/game/world/CachedWorldIDService.java index 28ce43070..182a3e03a 100644 --- a/src/main/java/com/l2jserver/service/game/world/CachedWorldIDService.java +++ b/src/main/java/com/l2jserver/service/game/world/CachedWorldIDService.java @@ -27,6 +27,7 @@ import com.google.common.base.Preconditions; import com.google.inject.Inject; import com.l2jserver.db.dao.CharacterDAO; import com.l2jserver.db.dao.ItemDAO; +import com.l2jserver.db.dao.NPCDAO; import com.l2jserver.model.id.ID; import com.l2jserver.model.id.ObjectID; import com.l2jserver.model.id.object.allocator.IDAllocator; @@ -64,6 +65,10 @@ public class CachedWorldIDService extends AbstractService implements * The {@link ItemDAO} */ private final ItemDAO itemDao; + /** + * The {@link NPCDAO} + */ + private final NPCDAO npcDao; /** * The ID cache @@ -77,11 +82,12 @@ public class CachedWorldIDService extends AbstractService implements @Inject public CachedWorldIDService(CacheService cacheService, - IDAllocator allocator, CharacterDAO characterDao, ItemDAO itemDao) { + IDAllocator allocator, CharacterDAO characterDao, ItemDAO itemDao, NPCDAO npcDao) { this.cacheService = cacheService; this.allocator = allocator; this.characterDao = characterDao; this.itemDao = itemDao; + this.npcDao = npcDao; } @Override @@ -99,6 +105,7 @@ public class CachedWorldIDService extends AbstractService implements public void load() { load(characterDao.listIDs()); load(itemDao.listIDs()); + //load(npcDao.listIDs()); loaded = true; } diff --git a/src/main/java/com/l2jserver/service/game/world/event/FilteredWorldListener.java b/src/main/java/com/l2jserver/service/game/world/event/FilteredWorldListener.java index 29445c384..5ad256a45 100644 --- a/src/main/java/com/l2jserver/service/game/world/event/FilteredWorldListener.java +++ b/src/main/java/com/l2jserver/service/game/world/event/FilteredWorldListener.java @@ -39,7 +39,7 @@ public abstract class FilteredWorldListener implements @SuppressWarnings("unchecked") public boolean dispatch(WorldEvent e) { if (!filter.accept((T) e.getObject())) - return false; + return true; return dispatch(e, (T) e.getObject()); } diff --git a/src/main/java/com/l2jserver/service/game/world/event/WorldEventDispatcherImpl.java b/src/main/java/com/l2jserver/service/game/world/event/WorldEventDispatcherImpl.java index 149e0618f..e42e5a9fb 100644 --- a/src/main/java/com/l2jserver/service/game/world/event/WorldEventDispatcherImpl.java +++ b/src/main/java/com/l2jserver/service/game/world/event/WorldEventDispatcherImpl.java @@ -21,6 +21,7 @@ import java.util.Queue; import java.util.Set; import java.util.Timer; import java.util.TimerTask; +import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; @@ -63,32 +64,35 @@ public class WorldEventDispatcherImpl implements WorldEventDispatcher { /** * The events pending dispatch */ - private Queue events = CollectionFactory - .newConcurrentQueue(); + private Queue events = new ArrayBlockingQueue( + 100 * 1000); public void start() { timer = new Timer(); - timer.scheduleAtFixedRate(new TimerTask() { + final TimerTask task = new TimerTask() { @Override public void run() { - final EventContainer event = events.poll(); - if (event == null) - return; - try { - // set state - event.future.running = true; - event.future.complete = false; + EventContainer event; + while ((event = events.poll()) != null) { + try { + log.debug("Dispatching event {}", event.event); - // dispatch - if (doDispatch(event)) - // the set will update state - event.future.set(event.event); - } catch (Throwable t) { - event.future.setException(t); - log.warn("Exception in WorldEventDispatcher thread", t); + // set state + event.future.running = true; + event.future.complete = false; + + // dispatch + if (doDispatch(event)) + // the set will update state + event.future.set(event.event); + } catch (Throwable t) { + event.future.setException(t); + log.warn("Exception in WorldEventDispatcher thread", t); + } } } - }, 0, 50); + }; + timer.scheduleAtFixedRate(task, 0, 50); } @Override @@ -97,6 +101,9 @@ public class WorldEventDispatcherImpl implements WorldEventDispatcher { log.debug("Queing dispatch for event {}", event); final WorldEventFutureImpl future = new WorldEventFutureImpl(); events.add(new EventContainer(event, future)); + // final WorldEventFutureImpl future = new WorldEventFutureImpl(); + // final EventContainer c = new EventContainer(event, future); + // doDispatch(c); return future; } @@ -107,12 +114,24 @@ public class WorldEventDispatcherImpl implements WorldEventDispatcher { * the event * @return true if dispatch was not canceled */ - public boolean doDispatch(EventContainer event) { - log.debug("Dispatching event {}", event); + public synchronized boolean doDispatch(EventContainer event) { final ObjectID[] objects = event.event.getDispatchableObjects(); for (ObjectID obj : objects) { if (obj == null) continue; + for (final WorldListener listener : globalListeners) { + if (event.future.isCancelled()) + return false; + try { + if (!listener.dispatch(event.event)) + // remove listener if return value is false + globalListeners.remove(listener); + } catch (Throwable t) { + log.warn("Exception in listener", t); + // always remove any listener that throws an exception + globalListeners.remove(listener); + } + } final Set listeners = getListeners(obj); for (final WorldListener listener : listeners) { if (event.future.isCancelled()) @@ -200,10 +219,7 @@ public class WorldEventDispatcherImpl implements WorldEventDispatcher { set = CollectionFactory.newSet(); listeners.put(id, set); } - final Set union = CollectionFactory.newSet(); - union.addAll(set); - union.addAll(globalListeners); - return union; + return set; } public void stop() { diff --git a/src/main/java/com/l2jserver/service/game/world/filter/ExcludeFilter.java b/src/main/java/com/l2jserver/service/game/world/filter/ExcludeFilter.java index 15f620055..8a1536fbc 100644 --- a/src/main/java/com/l2jserver/service/game/world/filter/ExcludeFilter.java +++ b/src/main/java/com/l2jserver/service/game/world/filter/ExcludeFilter.java @@ -60,6 +60,6 @@ public class ExcludeFilter implements @Override public boolean accept(O object) { - return objects.contains(object); + return !objects.contains(object); } } diff --git a/src/main/java/com/l2jserver/service/game/world/filter/impl/KnownListFilter.java b/src/main/java/com/l2jserver/service/game/world/filter/impl/KnownListFilter.java index 6129bb1fc..4c9440ae0 100644 --- a/src/main/java/com/l2jserver/service/game/world/filter/impl/KnownListFilter.java +++ b/src/main/java/com/l2jserver/service/game/world/filter/impl/KnownListFilter.java @@ -19,6 +19,7 @@ package com.l2jserver.service.game.world.filter.impl; import com.l2jserver.model.world.PositionableObject; import com.l2jserver.model.world.WorldObject; import com.l2jserver.service.game.world.filter.AndFilter; +import com.l2jserver.service.game.world.filter.ExcludeFilter; /** * This filter will only accept {@link WorldObject} which are in vision of @@ -32,6 +33,7 @@ public class KnownListFilter extends AndFilter { @SuppressWarnings("unchecked") public KnownListFilter(PositionableObject object) { super(new InstanceFilter(PositionableObject.class), - new RangeFilter(object, KNOWNLIST_RANGE)); + new RangeFilter(object, KNOWNLIST_RANGE), + new ExcludeFilter(object)); } } diff --git a/src/main/java/com/l2jserver/service/game/world/filter/impl/KnownListUpdateFilter.java b/src/main/java/com/l2jserver/service/game/world/filter/impl/KnownListUpdateFilter.java new file mode 100644 index 000000000..9215df940 --- /dev/null +++ b/src/main/java/com/l2jserver/service/game/world/filter/impl/KnownListUpdateFilter.java @@ -0,0 +1,39 @@ +/* + * This file is part of l2jserver . + * + * l2jserver 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. + * + * l2jserver 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 l2jserver. If not, see . + */ +package com.l2jserver.service.game.world.filter.impl; + +import com.l2jserver.model.world.PositionableObject; +import com.l2jserver.model.world.WorldObject; +import com.l2jserver.service.game.world.filter.AndFilter; +import com.l2jserver.service.game.world.filter.NotFilter; +import com.l2jserver.util.dimensional.Point; + +/** + * This filter will only accept {@link WorldObject} which are in vision of + * another object. + * + * @author Rogiel + */ +public class KnownListUpdateFilter extends AndFilter { + public static final int KNOWNLIST_RANGE = 2000; + + @SuppressWarnings("unchecked") + public KnownListUpdateFilter(PositionableObject object, Point old) { + super(new KnownListFilter(object), new NotFilter( + new RangePointFilter(old, KNOWNLIST_RANGE))); + } +} diff --git a/src/main/java/com/l2jserver/service/game/world/filter/impl/RangePointFilter.java b/src/main/java/com/l2jserver/service/game/world/filter/impl/RangePointFilter.java new file mode 100644 index 000000000..7a260bee8 --- /dev/null +++ b/src/main/java/com/l2jserver/service/game/world/filter/impl/RangePointFilter.java @@ -0,0 +1,60 @@ +/* + * This file is part of l2jserver . + * + * l2jserver 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. + * + * l2jserver 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 l2jserver. If not, see . + */ +package com.l2jserver.service.game.world.filter.impl; + +import com.google.common.base.Preconditions; +import com.l2jserver.model.world.PositionableObject; +import com.l2jserver.service.game.world.filter.WorldObjectFilter; +import com.l2jserver.util.dimensional.Point; + +/** + * Filter objects that are in the range of coordinate + * + * @author Rogiel + */ +public class RangePointFilter implements WorldObjectFilter { + /** + * The coordinate point + */ + private final Point point; + /** + * The desired maximum distance of the object + */ + private final int range; + + /** + * Creates a new instance + * + * @param objcect + * the positionable object as center point for range search + * @param range + * the desired maximum distance of the object + */ + public RangePointFilter(final Point point, final int range) { + Preconditions.checkNotNull(point, "point"); + Preconditions.checkState(range >= 0, "range < 0"); + this.point = point; + this.range = range; + } + + @Override + public boolean accept(PositionableObject other) { + if (other == null) + return false; + return other.getPosition().getDistance(point.getCoordinate()) <= range; + } +} diff --git a/src/main/java/com/l2jserver/util/factory/CollectionFactory.java b/src/main/java/com/l2jserver/util/factory/CollectionFactory.java index 3d563fb03..00ac9fa57 100644 --- a/src/main/java/com/l2jserver/util/factory/CollectionFactory.java +++ b/src/main/java/com/l2jserver/util/factory/CollectionFactory.java @@ -19,6 +19,7 @@ package com.l2jserver.util.factory; import java.util.Collection; import java.util.List; import java.util.Map; +import java.util.PriorityQueue; import java.util.Queue; import java.util.Set; import java.util.WeakHashMap; @@ -69,6 +70,17 @@ public class CollectionFactory { return new ConcurrentLinkedQueue(); } + /** + * Creates a new priority queue of type T + * + * @param + * the type + * @return the created queue + */ + public static final PriorityQueue newPriorityQueue() { + return new PriorityQueue(); + } + /** * Creates a new map. * diff --git a/src/test/java/com/l2jserver/service/world/WorldEventDispatcherImplTest.java b/src/test/java/com/l2jserver/service/world/WorldEventDispatcherImplTest.java index aa3fec3ab..875345101 100644 --- a/src/test/java/com/l2jserver/service/world/WorldEventDispatcherImplTest.java +++ b/src/test/java/com/l2jserver/service/world/WorldEventDispatcherImplTest.java @@ -69,9 +69,9 @@ public class WorldEventDispatcherImplTest { @Test public void testListeners1() throws InterruptedException { - final L2Character character1 = new L2Character(null); + final L2Character character1 = new L2Character(null, null); character1.setID(cidFactory.createID()); - final L2Character character2 = new L2Character(null); + final L2Character character2 = new L2Character(null, null); character2.setID(cidFactory.createID()); final Item item1 = new Item(null); item1.setID(iidFactory.createID()); @@ -110,9 +110,9 @@ public class WorldEventDispatcherImplTest { @Test public void testListeners2() throws InterruptedException { - final L2Character character1 = new L2Character(null); + final L2Character character1 = new L2Character(null, null); character1.setID(cidFactory.createID()); - final L2Character character2 = new L2Character(null); + final L2Character character2 = new L2Character(null, null); character2.setID(cidFactory.createID()); final Item item1 = new Item(null); item1.setID(iidFactory.createID()); diff --git a/src/test/java/com/l2jserver/service/world/WorldServiceImplTest.java b/src/test/java/com/l2jserver/service/world/WorldServiceImplTest.java index 471ea4969..57fa3857e 100644 --- a/src/test/java/com/l2jserver/service/world/WorldServiceImplTest.java +++ b/src/test/java/com/l2jserver/service/world/WorldServiceImplTest.java @@ -57,28 +57,28 @@ public class WorldServiceImplTest { @Test public void testAdd() { - final L2Character character = new L2Character(null); + final L2Character character = new L2Character(null, null); world.add(character); } @Test public void testRemove() { - final L2Character character = new L2Character(null); + final L2Character character = new L2Character(null, null); world.add(character); world.remove(character); } @Test public void testContains() { - final L2Character character = new L2Character(null); + final L2Character character = new L2Character(null, null); world.add(character); Assert.assertTrue(world.contains(character)); } @Test public void testIterator() { - final L2Character character1 = new L2Character(null); - final L2Character character2 = new L2Character(null); + final L2Character character1 = new L2Character(null, null); + final L2Character character2 = new L2Character(null, null); final Item item1 = new Item(null); world.add(character1); world.add(character2); diff --git a/src/tool/java/com/l2jserver/tool/conversor/chartemplate/CharacterTemplateBase.txt b/src/tool/java/com/l2jserver/tool/conversor/chartemplate/CharacterTemplateBase.txt index b28412a03..a5060a9dd 100644 --- a/src/tool/java/com/l2jserver/tool/conversor/chartemplate/CharacterTemplateBase.txt +++ b/src/tool/java/com/l2jserver/tool/conversor/chartemplate/CharacterTemplateBase.txt @@ -18,15 +18,15 @@ package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; -import com.l2jserver.model.id.template.factory.CharacterTemplateIDFactory; +import com.l2jserver.model.id.template.provider.CharacterTemplateIDProvider; import com.l2jserver.model.world.L2Character; import com.l2jserver.model.world.character.CharacterClass; import com.l2jserver.util.dimensional.Point; public class ${javaClassName}Template extends ${parent}Template { @Inject - public ${javaClassName}Template(CharacterTemplateIDFactory factory) { - super(factory.createID(${ClassId}.id), ${ClassId}, Point.fromXYZ(${x}, ${y}, ${z})); + public ${javaClassName}Template(CharacterTemplateIDProvider provider) { + super(provider.createID(${ClassId}.id), ${ClassId}, Point.fromXYZ(${x}, ${y}, ${z})); // ATTRIBUTES attributes.intelligence = ${_INT}; attributes.strength = ${STR}; @@ -46,6 +46,11 @@ public class ${javaClassName}Template extends ${parent}Template { attributes.moveSpeed = ${MOVE_SPD}; attributes.maxWeigth = ${_LOAD}; attributes.craft = ${canCraft}; + + this.maleCollisionRadius = ${M_COL_R}; + this.maleCollisionHeight = ${M_COL_H}; + this.femaleCollisionRadius = ${F_COL_R}; + this.femaleCollisionHeight = ${F_COL_H}; } protected ${javaClassName}Template(CharacterTemplateID id, diff --git a/src/tool/java/com/l2jserver/tool/conversor/npctemplate/NPCTemplateBase.txt b/src/tool/java/com/l2jserver/tool/conversor/npctemplate/NPCTemplateBase.txt index b28412a03..bafdd0996 100644 --- a/src/tool/java/com/l2jserver/tool/conversor/npctemplate/NPCTemplateBase.txt +++ b/src/tool/java/com/l2jserver/tool/conversor/npctemplate/NPCTemplateBase.txt @@ -46,6 +46,11 @@ public class ${javaClassName}Template extends ${parent}Template { attributes.moveSpeed = ${MOVE_SPD}; attributes.maxWeigth = ${_LOAD}; attributes.craft = ${canCraft}; + + this.maleCollisionRadius = ${M_COL_R}; + this.maleCollisionHeight = ${M_COL_H}; + this.femaleCollisionRadius = ${F_COL_R}; + this.femaleCollisionHeight = ${F_COL_H}; } protected ${javaClassName}Template(CharacterTemplateID id,