From 85f1f8eba076d4b3a2713c2ebd3ee1f4b48fe2ae Mon Sep 17 00:00:00 2001 From: Rogiel Date: Sun, 15 May 2011 18:53:17 -0300 Subject: [PATCH] Template concept changes Signed-off-by: Rogiel --- .../character/AbstractCharacterTemplate.java | 2 +- .../AbstractDarkElfCharacterTemplate.java | 2 +- .../AbstractDwarfCharacterTemplate.java | 2 +- .../AbstractElfCharacterTemplate.java | 2 +- .../AbstractHumanCharacterTemplate.java | 2 +- .../AbstractKamaelCharacterTemplate.java | 2 +- .../AbstractOrcCharacterTemplate.java | 2 +- .../character/AbyssWalkerTemplate.java | 2 +- .../character/AdventurerTemplate.java | 6 +- .../character/ArbalesterTemplate.java | 2 +- .../character/ArcanaLordTemplate.java | 2 +- .../character/ArchmageTemplate.java | 2 +- .../character/ArtisanTemplate.java | 2 +- .../character/AssassinTemplate.java | 2 +- .../character/BersekerTemplate.java | 2 +- .../{ => actor}/character/BishopTemplate.java | 2 +- .../character/BladedancerTemplate.java | 2 +- .../character/BountyHunterTemplate.java | 2 +- .../character/CardinalTemplate.java | 2 +- .../{ => actor}/character/ClericTemplate.java | 2 +- .../character/DarkAvengerTemplate.java | 2 +- .../character/DarkFighterTemplate.java | 2 +- .../character/DarkMysticTemplate.java | 2 +- .../character/DarkWizardTemplate.java | 2 +- .../character/DestroyerTemplate.java | 2 +- .../character/DominatorTemplate.java | 2 +- .../character/DoombringerTemplate.java | 2 +- .../character/DoomcryerTemplate.java | 2 +- .../character/DreadnoughtTemplate.java | 2 +- .../character/DuelistTemplate.java | 2 +- .../character/DwarvenFighterTemplate.java | 2 +- .../{ => actor}/character/ElderTemplate.java | 2 +- .../character/ElementalMasterTemplate.java | 2 +- .../character/ElementalSummonerTemplate.java | 2 +- .../character/ElvenFighterTemplate.java | 2 +- .../character/ElvenKnightTemplate.java | 2 +- .../character/ElvenMysticTemplate.java | 2 +- .../character/ElvenScoutTemplate.java | 2 +- .../character/ElvenWizardTemplate.java | 2 +- .../character/EvaSaintTemplate.java | 2 +- .../character/EvaTemplarTemplate.java | 2 +- .../character/FemaleSoldierTemplate.java | 2 +- .../character/FemaleSoulbreakerTemplate.java | 2 +- .../character/FemaleSouldhoundTemplate.java | 2 +- .../character/FortuneSeekerTemplate.java | 2 +- .../character/GhostHunterTemplate.java} | 12 +- .../character/GhostSentinelTemplate.java} | 12 +- .../character/GladiatorTemplate.java | 2 +- .../character/GrandKhauatariTemplate.java | 2 +- .../character/HawkeyeTemplate.java | 2 +- .../character/HellKnightTemplate.java} | 12 +- .../character/HierophantTemplate.java | 2 +- .../character/HumanFighterTemplate.java | 2 +- .../character/HumanMysticTemplate.java | 2 +- .../character/InspectorTemplate.java | 2 +- .../character/JudicatorTemplate.java | 2 +- .../{ => actor}/character/KnightTemplate.java | 2 +- .../character/MaestroTemplate.java | 2 +- .../character/MaleSoldierTemplate.java | 2 +- .../character/MaleSoulbreakerTemplate.java | 2 +- .../character/MaleSouldhoundTemplate.java | 2 +- .../character/MoonlightSentinelTemplate.java | 2 +- .../character/MysticMuseTemplate.java | 2 +- .../character/NecromancerTemplate.java | 2 +- .../{ => actor}/character/OracleTemplate.java | 2 +- .../character/OrcFighterTemplate.java | 2 +- .../character/OrcMonkTemplate.java | 2 +- .../character/OrcMysticTemplate.java | 2 +- .../character/OrcRaiderTemplate.java | 2 +- .../character/OrcShamanTemplate.java | 2 +- .../character/OverlordTemplate.java | 2 +- .../character/PaladinTemplate.java | 2 +- .../character/PalusKnightTemplate.java | 2 +- .../character/PhantomRangerTemplate.java | 2 +- .../character/PhantomSummonerTemplate.java | 2 +- .../character/PhoenixKnightTemplate.java} | 12 +- .../character/PlainsWalkerTemplate.java | 2 +- .../character/ProphetTemplate.java | 2 +- .../{ => actor}/character/RogueTemplate.java | 2 +- .../character/SagittariusTemplate.java | 6 +- .../character/ScavengerTemplate.java | 2 +- .../character/ShillieanSaintTemplate.java | 2 +- .../character/ShillienElderTemplate.java | 2 +- .../character/ShillienKnightTemplate.java | 2 +- .../character/ShillienOracleTemplate.java | 2 +- .../character/ShillienTemplarTemplate.java | 2 +- .../character/SilverRangerTemplate.java | 2 +- .../character/SorcerorTemplate.java | 2 +- .../character/SoultakerTemplate.java | 2 +- .../character/SpectralMasterTemplate.java | 2 +- .../character/SpectraldancerTemplate.java | 2 +- .../character/SpellhowlerTemplate.java | 2 +- .../character/SpellsingerTemplate.java | 2 +- .../character/StormScreamerTemplate.java | 2 +- .../character/SwordMuseTemplate.java | 2 +- .../character/SwordSingerTemplate.java | 2 +- .../character/TempleKnightTemplate.java | 2 +- .../{ => actor}/character/TitanTemplate.java | 2 +- .../character/TreasureHunterTemplate.java | 2 +- .../character/TricksterTemplate.java | 2 +- .../character/TrooperTemplate.java | 2 +- .../{ => actor}/character/TyrantTemplate.java | 2 +- .../character/WarcryerTemplate.java | 2 +- .../{ => actor}/character/WarderTemplate.java | 2 +- .../character/WarlockTemplate.java | 2 +- .../character/WarlordTemplate.java | 2 +- .../character/WarriorTemplate.java | 2 +- .../character/WarsmithTemplate.java | 2 +- .../character/WindRiderTemplate.java | 2 +- .../{ => actor}/character/WizardTemplate.java | 2 +- .../template/skill/TestSkillTemplate.java | 1 + .../db/dao/mysql5/MySQL5CharacterDAO.java | 44 ++- src/main/java/com/l2jserver/L2JConstants.java | 2 +- .../server/CharacterEnterWorldPacket.java | 2 +- .../server/CharacterSelectionListPacket.java | 2 +- .../server/CharacterTemplatePacket.java | 2 +- .../net/packet/server/InventoryPacket.java | 62 ++-- .../model/game/CharacterShortcut.java | 273 ++++++++++++++++++ .../java/com/l2jserver/model/game/Skill.java | 108 +++++++ .../java/com/l2jserver/model/game/Spawn.java | 58 ++++ .../id/object/factory/CharacterIDFactory.java | 2 +- .../id/object/factory/ClanIDFactory.java | 2 +- .../id/object/factory/ItemIDFactory.java | 2 +- .../model/id/object/factory/PetIDFactory.java | 2 +- .../model/id/template/ActorTemplateID.java | 32 ++ .../id/template/CharacterTemplateID.java | 15 +- .../model/id/template/NPCTemplateID.java | 21 ++ .../model/template/ActorTemplate.java | 215 ++++++++++++++ .../model/template/CharacterTemplate.java | 203 +------------ .../l2jserver/model/template/NPCTemplate.java | 43 +++ .../model/template/SkillTemplate.java | 22 +- .../l2jserver/model/world/AbstractActor.java | 36 ++- .../l2jserver/model/world/L2Character.java | 13 + .../world/actor/ActorSkillContainer.java | 138 +++++++++ .../model/world/capability/Actor.java | 13 + .../model/world/character/CharacterClass.java | 8 +- .../world/character/CharacterInventory.java | 13 +- .../character/CharacterShortcutContainer.java | 116 ++++++++ src/main/resources/sql/character.sql | 1 + 139 files changed, 1310 insertions(+), 409 deletions(-) rename data/script/template/script/template/{ => actor}/character/AbstractCharacterTemplate.java (96%) rename data/script/template/script/template/{ => actor}/character/AbstractDarkElfCharacterTemplate.java (96%) rename data/script/template/script/template/{ => actor}/character/AbstractDwarfCharacterTemplate.java (96%) rename data/script/template/script/template/{ => actor}/character/AbstractElfCharacterTemplate.java (96%) rename data/script/template/script/template/{ => actor}/character/AbstractHumanCharacterTemplate.java (96%) rename data/script/template/script/template/{ => actor}/character/AbstractKamaelCharacterTemplate.java (96%) rename data/script/template/script/template/{ => actor}/character/AbstractOrcCharacterTemplate.java (96%) rename data/script/template/script/template/{ => actor}/character/AbyssWalkerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/AdventurerTemplate.java (93%) rename data/script/template/script/template/{ => actor}/character/ArbalesterTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ArcanaLordTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ArchmageTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ArtisanTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/AssassinTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/BersekerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/BishopTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/BladedancerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/BountyHunterTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/CardinalTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ClericTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/DarkAvengerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/DarkFighterTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/DarkMysticTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/DarkWizardTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/DestroyerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/DominatorTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/DoombringerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/DoomcryerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/DreadnoughtTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/DuelistTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/DwarvenFighterTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ElderTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ElementalMasterTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ElementalSummonerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ElvenFighterTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ElvenKnightTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ElvenMysticTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ElvenScoutTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ElvenWizardTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/EvaSaintTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/EvaTemplarTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/FemaleSoldierTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/FemaleSoulbreakerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/FemaleSouldhoundTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/FortuneSeekerTemplate.java (97%) rename data/script/template/script/template/{character/GhosthunterTemplate.java => actor/character/GhostHunterTemplate.java} (83%) rename data/script/template/script/template/{character/GhostsentinelTemplate.java => actor/character/GhostSentinelTemplate.java} (83%) rename data/script/template/script/template/{ => actor}/character/GladiatorTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/GrandKhauatariTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/HawkeyeTemplate.java (97%) rename data/script/template/script/template/{character/HellknightTemplate.java => actor/character/HellKnightTemplate.java} (83%) rename data/script/template/script/template/{ => actor}/character/HierophantTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/HumanFighterTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/HumanMysticTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/InspectorTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/JudicatorTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/KnightTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/MaestroTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/MaleSoldierTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/MaleSoulbreakerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/MaleSouldhoundTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/MoonlightSentinelTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/MysticMuseTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/NecromancerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/OracleTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/OrcFighterTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/OrcMonkTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/OrcMysticTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/OrcRaiderTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/OrcShamanTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/OverlordTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/PaladinTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/PalusKnightTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/PhantomRangerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/PhantomSummonerTemplate.java (97%) rename data/script/template/script/template/{character/PhoenixknightTemplate.java => actor/character/PhoenixKnightTemplate.java} (83%) rename data/script/template/script/template/{ => actor}/character/PlainsWalkerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ProphetTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/RogueTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/SagittariusTemplate.java (93%) rename data/script/template/script/template/{ => actor}/character/ScavengerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ShillieanSaintTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ShillienElderTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ShillienKnightTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ShillienOracleTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/ShillienTemplarTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/SilverRangerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/SorcerorTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/SoultakerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/SpectralMasterTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/SpectraldancerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/SpellhowlerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/SpellsingerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/StormScreamerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/SwordMuseTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/SwordSingerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/TempleKnightTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/TitanTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/TreasureHunterTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/TricksterTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/TrooperTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/TyrantTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/WarcryerTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/WarderTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/WarlockTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/WarlordTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/WarriorTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/WarsmithTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/WindRiderTemplate.java (97%) rename data/script/template/script/template/{ => actor}/character/WizardTemplate.java (97%) create mode 100644 src/main/java/com/l2jserver/model/game/CharacterShortcut.java create mode 100644 src/main/java/com/l2jserver/model/game/Skill.java create mode 100644 src/main/java/com/l2jserver/model/game/Spawn.java create mode 100644 src/main/java/com/l2jserver/model/id/template/ActorTemplateID.java create mode 100644 src/main/java/com/l2jserver/model/id/template/NPCTemplateID.java create mode 100644 src/main/java/com/l2jserver/model/template/ActorTemplate.java create mode 100644 src/main/java/com/l2jserver/model/template/NPCTemplate.java create mode 100644 src/main/java/com/l2jserver/model/world/actor/ActorSkillContainer.java create mode 100644 src/main/java/com/l2jserver/model/world/character/CharacterShortcutContainer.java diff --git a/data/script/template/script/template/character/AbstractCharacterTemplate.java b/data/script/template/script/template/actor/character/AbstractCharacterTemplate.java similarity index 96% rename from data/script/template/script/template/character/AbstractCharacterTemplate.java rename to data/script/template/script/template/actor/character/AbstractCharacterTemplate.java index b6d77f5ea..398645b90 100644 --- a/data/script/template/script/template/character/AbstractCharacterTemplate.java +++ b/data/script/template/script/template/actor/character/AbstractCharacterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.l2jserver.model.id.template.CharacterTemplateID; import com.l2jserver.model.template.CharacterTemplate; diff --git a/data/script/template/script/template/character/AbstractDarkElfCharacterTemplate.java b/data/script/template/script/template/actor/character/AbstractDarkElfCharacterTemplate.java similarity index 96% rename from data/script/template/script/template/character/AbstractDarkElfCharacterTemplate.java rename to data/script/template/script/template/actor/character/AbstractDarkElfCharacterTemplate.java index 3bd23e3ad..9736a6561 100644 --- a/data/script/template/script/template/character/AbstractDarkElfCharacterTemplate.java +++ b/data/script/template/script/template/actor/character/AbstractDarkElfCharacterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.l2jserver.model.id.template.CharacterTemplateID; import com.l2jserver.model.world.L2Character; diff --git a/data/script/template/script/template/character/AbstractDwarfCharacterTemplate.java b/data/script/template/script/template/actor/character/AbstractDwarfCharacterTemplate.java similarity index 96% rename from data/script/template/script/template/character/AbstractDwarfCharacterTemplate.java rename to data/script/template/script/template/actor/character/AbstractDwarfCharacterTemplate.java index b3f0d37cf..7cdaf1d04 100644 --- a/data/script/template/script/template/character/AbstractDwarfCharacterTemplate.java +++ b/data/script/template/script/template/actor/character/AbstractDwarfCharacterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.l2jserver.model.id.template.CharacterTemplateID; import com.l2jserver.model.world.L2Character; diff --git a/data/script/template/script/template/character/AbstractElfCharacterTemplate.java b/data/script/template/script/template/actor/character/AbstractElfCharacterTemplate.java similarity index 96% rename from data/script/template/script/template/character/AbstractElfCharacterTemplate.java rename to data/script/template/script/template/actor/character/AbstractElfCharacterTemplate.java index 058f5770a..3029df7e7 100644 --- a/data/script/template/script/template/character/AbstractElfCharacterTemplate.java +++ b/data/script/template/script/template/actor/character/AbstractElfCharacterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.l2jserver.model.id.template.CharacterTemplateID; import com.l2jserver.model.world.L2Character; diff --git a/data/script/template/script/template/character/AbstractHumanCharacterTemplate.java b/data/script/template/script/template/actor/character/AbstractHumanCharacterTemplate.java similarity index 96% rename from data/script/template/script/template/character/AbstractHumanCharacterTemplate.java rename to data/script/template/script/template/actor/character/AbstractHumanCharacterTemplate.java index cb6383a7a..8dfdaae6a 100644 --- a/data/script/template/script/template/character/AbstractHumanCharacterTemplate.java +++ b/data/script/template/script/template/actor/character/AbstractHumanCharacterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.l2jserver.model.id.template.CharacterTemplateID; import com.l2jserver.model.world.L2Character; diff --git a/data/script/template/script/template/character/AbstractKamaelCharacterTemplate.java b/data/script/template/script/template/actor/character/AbstractKamaelCharacterTemplate.java similarity index 96% rename from data/script/template/script/template/character/AbstractKamaelCharacterTemplate.java rename to data/script/template/script/template/actor/character/AbstractKamaelCharacterTemplate.java index f0804dfde..f5cb6dd16 100644 --- a/data/script/template/script/template/character/AbstractKamaelCharacterTemplate.java +++ b/data/script/template/script/template/actor/character/AbstractKamaelCharacterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.l2jserver.model.id.template.CharacterTemplateID; import com.l2jserver.model.world.L2Character; diff --git a/data/script/template/script/template/character/AbstractOrcCharacterTemplate.java b/data/script/template/script/template/actor/character/AbstractOrcCharacterTemplate.java similarity index 96% rename from data/script/template/script/template/character/AbstractOrcCharacterTemplate.java rename to data/script/template/script/template/actor/character/AbstractOrcCharacterTemplate.java index b60d32784..fb604ae24 100644 --- a/data/script/template/script/template/character/AbstractOrcCharacterTemplate.java +++ b/data/script/template/script/template/actor/character/AbstractOrcCharacterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.l2jserver.model.id.template.CharacterTemplateID; import com.l2jserver.model.world.L2Character; diff --git a/data/script/template/script/template/character/AbyssWalkerTemplate.java b/data/script/template/script/template/actor/character/AbyssWalkerTemplate.java similarity index 97% rename from data/script/template/script/template/character/AbyssWalkerTemplate.java rename to data/script/template/script/template/actor/character/AbyssWalkerTemplate.java index 5aefa542b..f8a277492 100644 --- a/data/script/template/script/template/character/AbyssWalkerTemplate.java +++ b/data/script/template/script/template/actor/character/AbyssWalkerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/AdventurerTemplate.java b/data/script/template/script/template/actor/character/AdventurerTemplate.java similarity index 93% rename from data/script/template/script/template/character/AdventurerTemplate.java rename to data/script/template/script/template/actor/character/AdventurerTemplate.java index d4329ebb9..eef650660 100644 --- a/data/script/template/script/template/character/AdventurerTemplate.java +++ b/data/script/template/script/template/actor/character/AdventurerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; @@ -10,8 +10,8 @@ import com.l2jserver.util.dimensional.Point; public class AdventurerTemplate extends TreasureHunterTemplate { @Inject public AdventurerTemplate(CharacterTemplateIDFactory factory) { - super(factory.createID(CharacterClass.adventurer.id), - CharacterClass.adventurer, + super(factory.createID(CharacterClass.ADVENTURER.id), + CharacterClass.ADVENTURER, // ATTRIBUTES 21,// INT 40,// STR diff --git a/data/script/template/script/template/character/ArbalesterTemplate.java b/data/script/template/script/template/actor/character/ArbalesterTemplate.java similarity index 97% rename from data/script/template/script/template/character/ArbalesterTemplate.java rename to data/script/template/script/template/actor/character/ArbalesterTemplate.java index 28d03bb09..55de7b7f8 100644 --- a/data/script/template/script/template/character/ArbalesterTemplate.java +++ b/data/script/template/script/template/actor/character/ArbalesterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ArcanaLordTemplate.java b/data/script/template/script/template/actor/character/ArcanaLordTemplate.java similarity index 97% rename from data/script/template/script/template/character/ArcanaLordTemplate.java rename to data/script/template/script/template/actor/character/ArcanaLordTemplate.java index 569a5e46e..0a789b0e8 100644 --- a/data/script/template/script/template/character/ArcanaLordTemplate.java +++ b/data/script/template/script/template/actor/character/ArcanaLordTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ArchmageTemplate.java b/data/script/template/script/template/actor/character/ArchmageTemplate.java similarity index 97% rename from data/script/template/script/template/character/ArchmageTemplate.java rename to data/script/template/script/template/actor/character/ArchmageTemplate.java index 15c62a09e..751805285 100644 --- a/data/script/template/script/template/character/ArchmageTemplate.java +++ b/data/script/template/script/template/actor/character/ArchmageTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ArtisanTemplate.java b/data/script/template/script/template/actor/character/ArtisanTemplate.java similarity index 97% rename from data/script/template/script/template/character/ArtisanTemplate.java rename to data/script/template/script/template/actor/character/ArtisanTemplate.java index 69a6c20f4..9c65af93d 100644 --- a/data/script/template/script/template/character/ArtisanTemplate.java +++ b/data/script/template/script/template/actor/character/ArtisanTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/AssassinTemplate.java b/data/script/template/script/template/actor/character/AssassinTemplate.java similarity index 97% rename from data/script/template/script/template/character/AssassinTemplate.java rename to data/script/template/script/template/actor/character/AssassinTemplate.java index 039b5f9d7..9c8ad6c1b 100644 --- a/data/script/template/script/template/character/AssassinTemplate.java +++ b/data/script/template/script/template/actor/character/AssassinTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/BersekerTemplate.java b/data/script/template/script/template/actor/character/BersekerTemplate.java similarity index 97% rename from data/script/template/script/template/character/BersekerTemplate.java rename to data/script/template/script/template/actor/character/BersekerTemplate.java index 30e92ef93..05d282a24 100644 --- a/data/script/template/script/template/character/BersekerTemplate.java +++ b/data/script/template/script/template/actor/character/BersekerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/BishopTemplate.java b/data/script/template/script/template/actor/character/BishopTemplate.java similarity index 97% rename from data/script/template/script/template/character/BishopTemplate.java rename to data/script/template/script/template/actor/character/BishopTemplate.java index 913d54ebe..6e82bb431 100644 --- a/data/script/template/script/template/character/BishopTemplate.java +++ b/data/script/template/script/template/actor/character/BishopTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/BladedancerTemplate.java b/data/script/template/script/template/actor/character/BladedancerTemplate.java similarity index 97% rename from data/script/template/script/template/character/BladedancerTemplate.java rename to data/script/template/script/template/actor/character/BladedancerTemplate.java index 082a97476..bf10ac5dc 100644 --- a/data/script/template/script/template/character/BladedancerTemplate.java +++ b/data/script/template/script/template/actor/character/BladedancerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/BountyHunterTemplate.java b/data/script/template/script/template/actor/character/BountyHunterTemplate.java similarity index 97% rename from data/script/template/script/template/character/BountyHunterTemplate.java rename to data/script/template/script/template/actor/character/BountyHunterTemplate.java index cdbcc607f..5f98c7b57 100644 --- a/data/script/template/script/template/character/BountyHunterTemplate.java +++ b/data/script/template/script/template/actor/character/BountyHunterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/CardinalTemplate.java b/data/script/template/script/template/actor/character/CardinalTemplate.java similarity index 97% rename from data/script/template/script/template/character/CardinalTemplate.java rename to data/script/template/script/template/actor/character/CardinalTemplate.java index 1e74cd2b0..97db839ac 100644 --- a/data/script/template/script/template/character/CardinalTemplate.java +++ b/data/script/template/script/template/actor/character/CardinalTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ClericTemplate.java b/data/script/template/script/template/actor/character/ClericTemplate.java similarity index 97% rename from data/script/template/script/template/character/ClericTemplate.java rename to data/script/template/script/template/actor/character/ClericTemplate.java index 151617c82..2b96edc4d 100644 --- a/data/script/template/script/template/character/ClericTemplate.java +++ b/data/script/template/script/template/actor/character/ClericTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/DarkAvengerTemplate.java b/data/script/template/script/template/actor/character/DarkAvengerTemplate.java similarity index 97% rename from data/script/template/script/template/character/DarkAvengerTemplate.java rename to data/script/template/script/template/actor/character/DarkAvengerTemplate.java index 07e4fce2e..13efd3b55 100644 --- a/data/script/template/script/template/character/DarkAvengerTemplate.java +++ b/data/script/template/script/template/actor/character/DarkAvengerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/DarkFighterTemplate.java b/data/script/template/script/template/actor/character/DarkFighterTemplate.java similarity index 97% rename from data/script/template/script/template/character/DarkFighterTemplate.java rename to data/script/template/script/template/actor/character/DarkFighterTemplate.java index cfc3e99de..97835aa8e 100644 --- a/data/script/template/script/template/character/DarkFighterTemplate.java +++ b/data/script/template/script/template/actor/character/DarkFighterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/DarkMysticTemplate.java b/data/script/template/script/template/actor/character/DarkMysticTemplate.java similarity index 97% rename from data/script/template/script/template/character/DarkMysticTemplate.java rename to data/script/template/script/template/actor/character/DarkMysticTemplate.java index 9119f32d9..be6e6a187 100644 --- a/data/script/template/script/template/character/DarkMysticTemplate.java +++ b/data/script/template/script/template/actor/character/DarkMysticTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/DarkWizardTemplate.java b/data/script/template/script/template/actor/character/DarkWizardTemplate.java similarity index 97% rename from data/script/template/script/template/character/DarkWizardTemplate.java rename to data/script/template/script/template/actor/character/DarkWizardTemplate.java index 1d3e477a4..3e8422851 100644 --- a/data/script/template/script/template/character/DarkWizardTemplate.java +++ b/data/script/template/script/template/actor/character/DarkWizardTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/DestroyerTemplate.java b/data/script/template/script/template/actor/character/DestroyerTemplate.java similarity index 97% rename from data/script/template/script/template/character/DestroyerTemplate.java rename to data/script/template/script/template/actor/character/DestroyerTemplate.java index 09afd3be3..8e89b8b62 100644 --- a/data/script/template/script/template/character/DestroyerTemplate.java +++ b/data/script/template/script/template/actor/character/DestroyerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/DominatorTemplate.java b/data/script/template/script/template/actor/character/DominatorTemplate.java similarity index 97% rename from data/script/template/script/template/character/DominatorTemplate.java rename to data/script/template/script/template/actor/character/DominatorTemplate.java index 0c7e5cf5c..013e6195f 100644 --- a/data/script/template/script/template/character/DominatorTemplate.java +++ b/data/script/template/script/template/actor/character/DominatorTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/DoombringerTemplate.java b/data/script/template/script/template/actor/character/DoombringerTemplate.java similarity index 97% rename from data/script/template/script/template/character/DoombringerTemplate.java rename to data/script/template/script/template/actor/character/DoombringerTemplate.java index 876983728..ea97c098d 100644 --- a/data/script/template/script/template/character/DoombringerTemplate.java +++ b/data/script/template/script/template/actor/character/DoombringerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/DoomcryerTemplate.java b/data/script/template/script/template/actor/character/DoomcryerTemplate.java similarity index 97% rename from data/script/template/script/template/character/DoomcryerTemplate.java rename to data/script/template/script/template/actor/character/DoomcryerTemplate.java index 60212ace0..0589c6cf9 100644 --- a/data/script/template/script/template/character/DoomcryerTemplate.java +++ b/data/script/template/script/template/actor/character/DoomcryerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/DreadnoughtTemplate.java b/data/script/template/script/template/actor/character/DreadnoughtTemplate.java similarity index 97% rename from data/script/template/script/template/character/DreadnoughtTemplate.java rename to data/script/template/script/template/actor/character/DreadnoughtTemplate.java index b0c600212..37588e8eb 100644 --- a/data/script/template/script/template/character/DreadnoughtTemplate.java +++ b/data/script/template/script/template/actor/character/DreadnoughtTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/DuelistTemplate.java b/data/script/template/script/template/actor/character/DuelistTemplate.java similarity index 97% rename from data/script/template/script/template/character/DuelistTemplate.java rename to data/script/template/script/template/actor/character/DuelistTemplate.java index f34450e3d..87d3d90b1 100644 --- a/data/script/template/script/template/character/DuelistTemplate.java +++ b/data/script/template/script/template/actor/character/DuelistTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/DwarvenFighterTemplate.java b/data/script/template/script/template/actor/character/DwarvenFighterTemplate.java similarity index 97% rename from data/script/template/script/template/character/DwarvenFighterTemplate.java rename to data/script/template/script/template/actor/character/DwarvenFighterTemplate.java index b0b37fd1c..d597bad7d 100644 --- a/data/script/template/script/template/character/DwarvenFighterTemplate.java +++ b/data/script/template/script/template/actor/character/DwarvenFighterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ElderTemplate.java b/data/script/template/script/template/actor/character/ElderTemplate.java similarity index 97% rename from data/script/template/script/template/character/ElderTemplate.java rename to data/script/template/script/template/actor/character/ElderTemplate.java index 3e75c2d46..c423c34bb 100644 --- a/data/script/template/script/template/character/ElderTemplate.java +++ b/data/script/template/script/template/actor/character/ElderTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ElementalMasterTemplate.java b/data/script/template/script/template/actor/character/ElementalMasterTemplate.java similarity index 97% rename from data/script/template/script/template/character/ElementalMasterTemplate.java rename to data/script/template/script/template/actor/character/ElementalMasterTemplate.java index 4af791ac2..885d06414 100644 --- a/data/script/template/script/template/character/ElementalMasterTemplate.java +++ b/data/script/template/script/template/actor/character/ElementalMasterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ElementalSummonerTemplate.java b/data/script/template/script/template/actor/character/ElementalSummonerTemplate.java similarity index 97% rename from data/script/template/script/template/character/ElementalSummonerTemplate.java rename to data/script/template/script/template/actor/character/ElementalSummonerTemplate.java index 79f3a1ddb..bffa0b549 100644 --- a/data/script/template/script/template/character/ElementalSummonerTemplate.java +++ b/data/script/template/script/template/actor/character/ElementalSummonerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ElvenFighterTemplate.java b/data/script/template/script/template/actor/character/ElvenFighterTemplate.java similarity index 97% rename from data/script/template/script/template/character/ElvenFighterTemplate.java rename to data/script/template/script/template/actor/character/ElvenFighterTemplate.java index 343028c50..5308a0e45 100644 --- a/data/script/template/script/template/character/ElvenFighterTemplate.java +++ b/data/script/template/script/template/actor/character/ElvenFighterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ElvenKnightTemplate.java b/data/script/template/script/template/actor/character/ElvenKnightTemplate.java similarity index 97% rename from data/script/template/script/template/character/ElvenKnightTemplate.java rename to data/script/template/script/template/actor/character/ElvenKnightTemplate.java index 1662e0cc7..4e8c6c2f6 100644 --- a/data/script/template/script/template/character/ElvenKnightTemplate.java +++ b/data/script/template/script/template/actor/character/ElvenKnightTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ElvenMysticTemplate.java b/data/script/template/script/template/actor/character/ElvenMysticTemplate.java similarity index 97% rename from data/script/template/script/template/character/ElvenMysticTemplate.java rename to data/script/template/script/template/actor/character/ElvenMysticTemplate.java index 4b88c7612..dbd4c8a34 100644 --- a/data/script/template/script/template/character/ElvenMysticTemplate.java +++ b/data/script/template/script/template/actor/character/ElvenMysticTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ElvenScoutTemplate.java b/data/script/template/script/template/actor/character/ElvenScoutTemplate.java similarity index 97% rename from data/script/template/script/template/character/ElvenScoutTemplate.java rename to data/script/template/script/template/actor/character/ElvenScoutTemplate.java index a4c692e64..332ed44a9 100644 --- a/data/script/template/script/template/character/ElvenScoutTemplate.java +++ b/data/script/template/script/template/actor/character/ElvenScoutTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ElvenWizardTemplate.java b/data/script/template/script/template/actor/character/ElvenWizardTemplate.java similarity index 97% rename from data/script/template/script/template/character/ElvenWizardTemplate.java rename to data/script/template/script/template/actor/character/ElvenWizardTemplate.java index 2fd0111cf..7873c01db 100644 --- a/data/script/template/script/template/character/ElvenWizardTemplate.java +++ b/data/script/template/script/template/actor/character/ElvenWizardTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/EvaSaintTemplate.java b/data/script/template/script/template/actor/character/EvaSaintTemplate.java similarity index 97% rename from data/script/template/script/template/character/EvaSaintTemplate.java rename to data/script/template/script/template/actor/character/EvaSaintTemplate.java index afcc8cbd0..bf6e4ef7c 100644 --- a/data/script/template/script/template/character/EvaSaintTemplate.java +++ b/data/script/template/script/template/actor/character/EvaSaintTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/EvaTemplarTemplate.java b/data/script/template/script/template/actor/character/EvaTemplarTemplate.java similarity index 97% rename from data/script/template/script/template/character/EvaTemplarTemplate.java rename to data/script/template/script/template/actor/character/EvaTemplarTemplate.java index 1786d9bee..ed11e2c5d 100644 --- a/data/script/template/script/template/character/EvaTemplarTemplate.java +++ b/data/script/template/script/template/actor/character/EvaTemplarTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/FemaleSoldierTemplate.java b/data/script/template/script/template/actor/character/FemaleSoldierTemplate.java similarity index 97% rename from data/script/template/script/template/character/FemaleSoldierTemplate.java rename to data/script/template/script/template/actor/character/FemaleSoldierTemplate.java index cae6f1e08..edbdf091a 100644 --- a/data/script/template/script/template/character/FemaleSoldierTemplate.java +++ b/data/script/template/script/template/actor/character/FemaleSoldierTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/FemaleSoulbreakerTemplate.java b/data/script/template/script/template/actor/character/FemaleSoulbreakerTemplate.java similarity index 97% rename from data/script/template/script/template/character/FemaleSoulbreakerTemplate.java rename to data/script/template/script/template/actor/character/FemaleSoulbreakerTemplate.java index 56a16e6e4..cbd4bd645 100644 --- a/data/script/template/script/template/character/FemaleSoulbreakerTemplate.java +++ b/data/script/template/script/template/actor/character/FemaleSoulbreakerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/FemaleSouldhoundTemplate.java b/data/script/template/script/template/actor/character/FemaleSouldhoundTemplate.java similarity index 97% rename from data/script/template/script/template/character/FemaleSouldhoundTemplate.java rename to data/script/template/script/template/actor/character/FemaleSouldhoundTemplate.java index d2d5cbda7..f4e44b60c 100644 --- a/data/script/template/script/template/character/FemaleSouldhoundTemplate.java +++ b/data/script/template/script/template/actor/character/FemaleSouldhoundTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/FortuneSeekerTemplate.java b/data/script/template/script/template/actor/character/FortuneSeekerTemplate.java similarity index 97% rename from data/script/template/script/template/character/FortuneSeekerTemplate.java rename to data/script/template/script/template/actor/character/FortuneSeekerTemplate.java index 92c9fcc6e..443b889d4 100644 --- a/data/script/template/script/template/character/FortuneSeekerTemplate.java +++ b/data/script/template/script/template/actor/character/FortuneSeekerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/GhosthunterTemplate.java b/data/script/template/script/template/actor/character/GhostHunterTemplate.java similarity index 83% rename from data/script/template/script/template/character/GhosthunterTemplate.java rename to data/script/template/script/template/actor/character/GhostHunterTemplate.java index 74e73b92d..8f4b65186 100644 --- a/data/script/template/script/template/character/GhosthunterTemplate.java +++ b/data/script/template/script/template/actor/character/GhostHunterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; @@ -7,11 +7,11 @@ import com.l2jserver.model.world.L2Character; import com.l2jserver.model.world.character.CharacterClass; import com.l2jserver.util.dimensional.Point; -public class GhosthunterTemplate extends AbyssWalkerTemplate { +public class GhostHunterTemplate extends AbyssWalkerTemplate { @Inject - public GhosthunterTemplate(CharacterTemplateIDFactory factory) { - super(factory.createID(CharacterClass.ghostHunter.id), - CharacterClass.ghostHunter, + public GhostHunterTemplate(CharacterTemplateIDFactory factory) { + super(factory.createID(CharacterClass.GHOST_HUNTER.id), + CharacterClass.GHOST_HUNTER, // ATTRIBUTES 25,// INT 41,// STR @@ -35,7 +35,7 @@ public class GhosthunterTemplate extends AbyssWalkerTemplate { ); } - protected GhosthunterTemplate(CharacterTemplateID id, + protected GhostHunterTemplate(CharacterTemplateID id, CharacterClass characterClass, int intelligence, int strength, int concentration, int mentality, int dexterity, int witness, int physicalAttack, int magicalAttack, int physicalDefense, diff --git a/data/script/template/script/template/character/GhostsentinelTemplate.java b/data/script/template/script/template/actor/character/GhostSentinelTemplate.java similarity index 83% rename from data/script/template/script/template/character/GhostsentinelTemplate.java rename to data/script/template/script/template/actor/character/GhostSentinelTemplate.java index 036bfc74a..57b26b85f 100644 --- a/data/script/template/script/template/character/GhostsentinelTemplate.java +++ b/data/script/template/script/template/actor/character/GhostSentinelTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; @@ -7,11 +7,11 @@ import com.l2jserver.model.world.L2Character; import com.l2jserver.model.world.character.CharacterClass; import com.l2jserver.util.dimensional.Point; -public class GhostsentinelTemplate extends PhantomRangerTemplate { +public class GhostSentinelTemplate extends PhantomRangerTemplate { @Inject - public GhostsentinelTemplate(CharacterTemplateIDFactory factory) { - super(factory.createID(CharacterClass.ghostSentinel.id), - CharacterClass.ghostSentinel, + public GhostSentinelTemplate(CharacterTemplateIDFactory factory) { + super(factory.createID(CharacterClass.GHOST_SENTINEL.id), + CharacterClass.GHOST_SENTINEL, // ATTRIBUTES 25,// INT 41,// STR @@ -35,7 +35,7 @@ public class GhostsentinelTemplate extends PhantomRangerTemplate { ); } - protected GhostsentinelTemplate(CharacterTemplateID id, + protected GhostSentinelTemplate(CharacterTemplateID id, CharacterClass characterClass, int intelligence, int strength, int concentration, int mentality, int dexterity, int witness, int physicalAttack, int magicalAttack, int physicalDefense, diff --git a/data/script/template/script/template/character/GladiatorTemplate.java b/data/script/template/script/template/actor/character/GladiatorTemplate.java similarity index 97% rename from data/script/template/script/template/character/GladiatorTemplate.java rename to data/script/template/script/template/actor/character/GladiatorTemplate.java index 585ab1b7b..09fbfe291 100644 --- a/data/script/template/script/template/character/GladiatorTemplate.java +++ b/data/script/template/script/template/actor/character/GladiatorTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/GrandKhauatariTemplate.java b/data/script/template/script/template/actor/character/GrandKhauatariTemplate.java similarity index 97% rename from data/script/template/script/template/character/GrandKhauatariTemplate.java rename to data/script/template/script/template/actor/character/GrandKhauatariTemplate.java index 11d275bea..db17ab7c1 100644 --- a/data/script/template/script/template/character/GrandKhauatariTemplate.java +++ b/data/script/template/script/template/actor/character/GrandKhauatariTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/HawkeyeTemplate.java b/data/script/template/script/template/actor/character/HawkeyeTemplate.java similarity index 97% rename from data/script/template/script/template/character/HawkeyeTemplate.java rename to data/script/template/script/template/actor/character/HawkeyeTemplate.java index 439ed330b..2facea262 100644 --- a/data/script/template/script/template/character/HawkeyeTemplate.java +++ b/data/script/template/script/template/actor/character/HawkeyeTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/HellknightTemplate.java b/data/script/template/script/template/actor/character/HellKnightTemplate.java similarity index 83% rename from data/script/template/script/template/character/HellknightTemplate.java rename to data/script/template/script/template/actor/character/HellKnightTemplate.java index c3ded0ee2..91b6e7dd5 100644 --- a/data/script/template/script/template/character/HellknightTemplate.java +++ b/data/script/template/script/template/actor/character/HellKnightTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; @@ -7,11 +7,11 @@ import com.l2jserver.model.world.L2Character; import com.l2jserver.model.world.character.CharacterClass; import com.l2jserver.util.dimensional.Point; -public class HellknightTemplate extends DarkAvengerTemplate { +public class HellKnightTemplate extends DarkAvengerTemplate { @Inject - public HellknightTemplate(CharacterTemplateIDFactory factory) { - super(factory.createID(CharacterClass.hellKnight.id), - CharacterClass.hellKnight, + public HellKnightTemplate(CharacterTemplateIDFactory factory) { + super(factory.createID(CharacterClass.HELL_KNIGHT.id), + CharacterClass.HELL_KNIGHT, // ATTRIBUTES 21,// INT 40,// STR @@ -35,7 +35,7 @@ public class HellknightTemplate extends DarkAvengerTemplate { ); } - protected HellknightTemplate(CharacterTemplateID id, + protected HellKnightTemplate(CharacterTemplateID id, CharacterClass characterClass, int intelligence, int strength, int concentration, int mentality, int dexterity, int witness, int physicalAttack, int magicalAttack, int physicalDefense, diff --git a/data/script/template/script/template/character/HierophantTemplate.java b/data/script/template/script/template/actor/character/HierophantTemplate.java similarity index 97% rename from data/script/template/script/template/character/HierophantTemplate.java rename to data/script/template/script/template/actor/character/HierophantTemplate.java index d67635316..da3e06bf2 100644 --- a/data/script/template/script/template/character/HierophantTemplate.java +++ b/data/script/template/script/template/actor/character/HierophantTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/HumanFighterTemplate.java b/data/script/template/script/template/actor/character/HumanFighterTemplate.java similarity index 97% rename from data/script/template/script/template/character/HumanFighterTemplate.java rename to data/script/template/script/template/actor/character/HumanFighterTemplate.java index 5ee81e9ec..46ef923a4 100644 --- a/data/script/template/script/template/character/HumanFighterTemplate.java +++ b/data/script/template/script/template/actor/character/HumanFighterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/HumanMysticTemplate.java b/data/script/template/script/template/actor/character/HumanMysticTemplate.java similarity index 97% rename from data/script/template/script/template/character/HumanMysticTemplate.java rename to data/script/template/script/template/actor/character/HumanMysticTemplate.java index dda5c1c19..5c4a5dfda 100644 --- a/data/script/template/script/template/character/HumanMysticTemplate.java +++ b/data/script/template/script/template/actor/character/HumanMysticTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/InspectorTemplate.java b/data/script/template/script/template/actor/character/InspectorTemplate.java similarity index 97% rename from data/script/template/script/template/character/InspectorTemplate.java rename to data/script/template/script/template/actor/character/InspectorTemplate.java index 13894f71e..abaaf9ef6 100644 --- a/data/script/template/script/template/character/InspectorTemplate.java +++ b/data/script/template/script/template/actor/character/InspectorTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/JudicatorTemplate.java b/data/script/template/script/template/actor/character/JudicatorTemplate.java similarity index 97% rename from data/script/template/script/template/character/JudicatorTemplate.java rename to data/script/template/script/template/actor/character/JudicatorTemplate.java index b46ac6882..69e27bba7 100644 --- a/data/script/template/script/template/character/JudicatorTemplate.java +++ b/data/script/template/script/template/actor/character/JudicatorTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/KnightTemplate.java b/data/script/template/script/template/actor/character/KnightTemplate.java similarity index 97% rename from data/script/template/script/template/character/KnightTemplate.java rename to data/script/template/script/template/actor/character/KnightTemplate.java index d13bca09b..9b1d86c31 100644 --- a/data/script/template/script/template/character/KnightTemplate.java +++ b/data/script/template/script/template/actor/character/KnightTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/MaestroTemplate.java b/data/script/template/script/template/actor/character/MaestroTemplate.java similarity index 97% rename from data/script/template/script/template/character/MaestroTemplate.java rename to data/script/template/script/template/actor/character/MaestroTemplate.java index 8ca10818e..b7108234b 100644 --- a/data/script/template/script/template/character/MaestroTemplate.java +++ b/data/script/template/script/template/actor/character/MaestroTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/MaleSoldierTemplate.java b/data/script/template/script/template/actor/character/MaleSoldierTemplate.java similarity index 97% rename from data/script/template/script/template/character/MaleSoldierTemplate.java rename to data/script/template/script/template/actor/character/MaleSoldierTemplate.java index 2b1e58eb1..0415ad171 100644 --- a/data/script/template/script/template/character/MaleSoldierTemplate.java +++ b/data/script/template/script/template/actor/character/MaleSoldierTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/MaleSoulbreakerTemplate.java b/data/script/template/script/template/actor/character/MaleSoulbreakerTemplate.java similarity index 97% rename from data/script/template/script/template/character/MaleSoulbreakerTemplate.java rename to data/script/template/script/template/actor/character/MaleSoulbreakerTemplate.java index 72ec83080..74b48476e 100644 --- a/data/script/template/script/template/character/MaleSoulbreakerTemplate.java +++ b/data/script/template/script/template/actor/character/MaleSoulbreakerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/MaleSouldhoundTemplate.java b/data/script/template/script/template/actor/character/MaleSouldhoundTemplate.java similarity index 97% rename from data/script/template/script/template/character/MaleSouldhoundTemplate.java rename to data/script/template/script/template/actor/character/MaleSouldhoundTemplate.java index a7e875656..e87dd2302 100644 --- a/data/script/template/script/template/character/MaleSouldhoundTemplate.java +++ b/data/script/template/script/template/actor/character/MaleSouldhoundTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/MoonlightSentinelTemplate.java b/data/script/template/script/template/actor/character/MoonlightSentinelTemplate.java similarity index 97% rename from data/script/template/script/template/character/MoonlightSentinelTemplate.java rename to data/script/template/script/template/actor/character/MoonlightSentinelTemplate.java index 865df6509..5cdf3e811 100644 --- a/data/script/template/script/template/character/MoonlightSentinelTemplate.java +++ b/data/script/template/script/template/actor/character/MoonlightSentinelTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/MysticMuseTemplate.java b/data/script/template/script/template/actor/character/MysticMuseTemplate.java similarity index 97% rename from data/script/template/script/template/character/MysticMuseTemplate.java rename to data/script/template/script/template/actor/character/MysticMuseTemplate.java index 5f07b780b..71a6a1751 100644 --- a/data/script/template/script/template/character/MysticMuseTemplate.java +++ b/data/script/template/script/template/actor/character/MysticMuseTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/NecromancerTemplate.java b/data/script/template/script/template/actor/character/NecromancerTemplate.java similarity index 97% rename from data/script/template/script/template/character/NecromancerTemplate.java rename to data/script/template/script/template/actor/character/NecromancerTemplate.java index 0e213ad9b..aef605441 100644 --- a/data/script/template/script/template/character/NecromancerTemplate.java +++ b/data/script/template/script/template/actor/character/NecromancerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/OracleTemplate.java b/data/script/template/script/template/actor/character/OracleTemplate.java similarity index 97% rename from data/script/template/script/template/character/OracleTemplate.java rename to data/script/template/script/template/actor/character/OracleTemplate.java index c76c7ad7b..5497303f4 100644 --- a/data/script/template/script/template/character/OracleTemplate.java +++ b/data/script/template/script/template/actor/character/OracleTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/OrcFighterTemplate.java b/data/script/template/script/template/actor/character/OrcFighterTemplate.java similarity index 97% rename from data/script/template/script/template/character/OrcFighterTemplate.java rename to data/script/template/script/template/actor/character/OrcFighterTemplate.java index a26c35c55..ae8ca11f2 100644 --- a/data/script/template/script/template/character/OrcFighterTemplate.java +++ b/data/script/template/script/template/actor/character/OrcFighterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/OrcMonkTemplate.java b/data/script/template/script/template/actor/character/OrcMonkTemplate.java similarity index 97% rename from data/script/template/script/template/character/OrcMonkTemplate.java rename to data/script/template/script/template/actor/character/OrcMonkTemplate.java index f694a9507..0086aa72a 100644 --- a/data/script/template/script/template/character/OrcMonkTemplate.java +++ b/data/script/template/script/template/actor/character/OrcMonkTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/OrcMysticTemplate.java b/data/script/template/script/template/actor/character/OrcMysticTemplate.java similarity index 97% rename from data/script/template/script/template/character/OrcMysticTemplate.java rename to data/script/template/script/template/actor/character/OrcMysticTemplate.java index 338c34050..4008c969d 100644 --- a/data/script/template/script/template/character/OrcMysticTemplate.java +++ b/data/script/template/script/template/actor/character/OrcMysticTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/OrcRaiderTemplate.java b/data/script/template/script/template/actor/character/OrcRaiderTemplate.java similarity index 97% rename from data/script/template/script/template/character/OrcRaiderTemplate.java rename to data/script/template/script/template/actor/character/OrcRaiderTemplate.java index acef61a0f..b14c552ea 100644 --- a/data/script/template/script/template/character/OrcRaiderTemplate.java +++ b/data/script/template/script/template/actor/character/OrcRaiderTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/OrcShamanTemplate.java b/data/script/template/script/template/actor/character/OrcShamanTemplate.java similarity index 97% rename from data/script/template/script/template/character/OrcShamanTemplate.java rename to data/script/template/script/template/actor/character/OrcShamanTemplate.java index 2df99006e..2f3893e8c 100644 --- a/data/script/template/script/template/character/OrcShamanTemplate.java +++ b/data/script/template/script/template/actor/character/OrcShamanTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/OverlordTemplate.java b/data/script/template/script/template/actor/character/OverlordTemplate.java similarity index 97% rename from data/script/template/script/template/character/OverlordTemplate.java rename to data/script/template/script/template/actor/character/OverlordTemplate.java index d5266627a..7ba9460ca 100644 --- a/data/script/template/script/template/character/OverlordTemplate.java +++ b/data/script/template/script/template/actor/character/OverlordTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/PaladinTemplate.java b/data/script/template/script/template/actor/character/PaladinTemplate.java similarity index 97% rename from data/script/template/script/template/character/PaladinTemplate.java rename to data/script/template/script/template/actor/character/PaladinTemplate.java index cef756ac2..096dba454 100644 --- a/data/script/template/script/template/character/PaladinTemplate.java +++ b/data/script/template/script/template/actor/character/PaladinTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/PalusKnightTemplate.java b/data/script/template/script/template/actor/character/PalusKnightTemplate.java similarity index 97% rename from data/script/template/script/template/character/PalusKnightTemplate.java rename to data/script/template/script/template/actor/character/PalusKnightTemplate.java index b3f9b8a68..6c9cd0194 100644 --- a/data/script/template/script/template/character/PalusKnightTemplate.java +++ b/data/script/template/script/template/actor/character/PalusKnightTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/PhantomRangerTemplate.java b/data/script/template/script/template/actor/character/PhantomRangerTemplate.java similarity index 97% rename from data/script/template/script/template/character/PhantomRangerTemplate.java rename to data/script/template/script/template/actor/character/PhantomRangerTemplate.java index 4336e1117..5a3a75f9b 100644 --- a/data/script/template/script/template/character/PhantomRangerTemplate.java +++ b/data/script/template/script/template/actor/character/PhantomRangerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/PhantomSummonerTemplate.java b/data/script/template/script/template/actor/character/PhantomSummonerTemplate.java similarity index 97% rename from data/script/template/script/template/character/PhantomSummonerTemplate.java rename to data/script/template/script/template/actor/character/PhantomSummonerTemplate.java index f4d807b66..9e8cb25bd 100644 --- a/data/script/template/script/template/character/PhantomSummonerTemplate.java +++ b/data/script/template/script/template/actor/character/PhantomSummonerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/PhoenixknightTemplate.java b/data/script/template/script/template/actor/character/PhoenixKnightTemplate.java similarity index 83% rename from data/script/template/script/template/character/PhoenixknightTemplate.java rename to data/script/template/script/template/actor/character/PhoenixKnightTemplate.java index cf28a6e11..40ddf3e1d 100644 --- a/data/script/template/script/template/character/PhoenixknightTemplate.java +++ b/data/script/template/script/template/actor/character/PhoenixKnightTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; @@ -7,11 +7,11 @@ import com.l2jserver.model.world.L2Character; import com.l2jserver.model.world.character.CharacterClass; import com.l2jserver.util.dimensional.Point; -public class PhoenixknightTemplate extends PaladinTemplate { +public class PhoenixKnightTemplate extends PaladinTemplate { @Inject - public PhoenixknightTemplate(CharacterTemplateIDFactory factory) { - super(factory.createID(CharacterClass.phoenixKnight.id), - CharacterClass.phoenixKnight, + public PhoenixKnightTemplate(CharacterTemplateIDFactory factory) { + super(factory.createID(CharacterClass.PHOENIX_KNIGHT.id), + CharacterClass.PHOENIX_KNIGHT, // ATTRIBUTES 21,// INT 40,// STR @@ -35,7 +35,7 @@ public class PhoenixknightTemplate extends PaladinTemplate { ); } - protected PhoenixknightTemplate(CharacterTemplateID id, + protected PhoenixKnightTemplate(CharacterTemplateID id, CharacterClass characterClass, int intelligence, int strength, int concentration, int mentality, int dexterity, int witness, int physicalAttack, int magicalAttack, int physicalDefense, diff --git a/data/script/template/script/template/character/PlainsWalkerTemplate.java b/data/script/template/script/template/actor/character/PlainsWalkerTemplate.java similarity index 97% rename from data/script/template/script/template/character/PlainsWalkerTemplate.java rename to data/script/template/script/template/actor/character/PlainsWalkerTemplate.java index e32bf68d7..5368c7c04 100644 --- a/data/script/template/script/template/character/PlainsWalkerTemplate.java +++ b/data/script/template/script/template/actor/character/PlainsWalkerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ProphetTemplate.java b/data/script/template/script/template/actor/character/ProphetTemplate.java similarity index 97% rename from data/script/template/script/template/character/ProphetTemplate.java rename to data/script/template/script/template/actor/character/ProphetTemplate.java index 8b4fade2e..9a72eeb50 100644 --- a/data/script/template/script/template/character/ProphetTemplate.java +++ b/data/script/template/script/template/actor/character/ProphetTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/RogueTemplate.java b/data/script/template/script/template/actor/character/RogueTemplate.java similarity index 97% rename from data/script/template/script/template/character/RogueTemplate.java rename to data/script/template/script/template/actor/character/RogueTemplate.java index 1feb05a8e..1870652aa 100644 --- a/data/script/template/script/template/character/RogueTemplate.java +++ b/data/script/template/script/template/actor/character/RogueTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/SagittariusTemplate.java b/data/script/template/script/template/actor/character/SagittariusTemplate.java similarity index 93% rename from data/script/template/script/template/character/SagittariusTemplate.java rename to data/script/template/script/template/actor/character/SagittariusTemplate.java index ebfaa8e6e..e060cae6c 100644 --- a/data/script/template/script/template/character/SagittariusTemplate.java +++ b/data/script/template/script/template/actor/character/SagittariusTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; @@ -10,8 +10,8 @@ import com.l2jserver.util.dimensional.Point; public class SagittariusTemplate extends HawkeyeTemplate { @Inject public SagittariusTemplate(CharacterTemplateIDFactory factory) { - super(factory.createID(CharacterClass.sagittarius.id), - CharacterClass.sagittarius, + super(factory.createID(CharacterClass.SAGITTARIUS.id), + CharacterClass.SAGITTARIUS, // ATTRIBUTES 21,// INT 40,// STR diff --git a/data/script/template/script/template/character/ScavengerTemplate.java b/data/script/template/script/template/actor/character/ScavengerTemplate.java similarity index 97% rename from data/script/template/script/template/character/ScavengerTemplate.java rename to data/script/template/script/template/actor/character/ScavengerTemplate.java index edb64aab0..f81a47298 100644 --- a/data/script/template/script/template/character/ScavengerTemplate.java +++ b/data/script/template/script/template/actor/character/ScavengerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ShillieanSaintTemplate.java b/data/script/template/script/template/actor/character/ShillieanSaintTemplate.java similarity index 97% rename from data/script/template/script/template/character/ShillieanSaintTemplate.java rename to data/script/template/script/template/actor/character/ShillieanSaintTemplate.java index 3cf047792..e78025b71 100644 --- a/data/script/template/script/template/character/ShillieanSaintTemplate.java +++ b/data/script/template/script/template/actor/character/ShillieanSaintTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ShillienElderTemplate.java b/data/script/template/script/template/actor/character/ShillienElderTemplate.java similarity index 97% rename from data/script/template/script/template/character/ShillienElderTemplate.java rename to data/script/template/script/template/actor/character/ShillienElderTemplate.java index 426bd7f83..569eea4ee 100644 --- a/data/script/template/script/template/character/ShillienElderTemplate.java +++ b/data/script/template/script/template/actor/character/ShillienElderTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ShillienKnightTemplate.java b/data/script/template/script/template/actor/character/ShillienKnightTemplate.java similarity index 97% rename from data/script/template/script/template/character/ShillienKnightTemplate.java rename to data/script/template/script/template/actor/character/ShillienKnightTemplate.java index 455d44e07..28406bec3 100644 --- a/data/script/template/script/template/character/ShillienKnightTemplate.java +++ b/data/script/template/script/template/actor/character/ShillienKnightTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ShillienOracleTemplate.java b/data/script/template/script/template/actor/character/ShillienOracleTemplate.java similarity index 97% rename from data/script/template/script/template/character/ShillienOracleTemplate.java rename to data/script/template/script/template/actor/character/ShillienOracleTemplate.java index 777ae995e..ca8f160aa 100644 --- a/data/script/template/script/template/character/ShillienOracleTemplate.java +++ b/data/script/template/script/template/actor/character/ShillienOracleTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/ShillienTemplarTemplate.java b/data/script/template/script/template/actor/character/ShillienTemplarTemplate.java similarity index 97% rename from data/script/template/script/template/character/ShillienTemplarTemplate.java rename to data/script/template/script/template/actor/character/ShillienTemplarTemplate.java index 23a7a5072..f7519e61c 100644 --- a/data/script/template/script/template/character/ShillienTemplarTemplate.java +++ b/data/script/template/script/template/actor/character/ShillienTemplarTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/SilverRangerTemplate.java b/data/script/template/script/template/actor/character/SilverRangerTemplate.java similarity index 97% rename from data/script/template/script/template/character/SilverRangerTemplate.java rename to data/script/template/script/template/actor/character/SilverRangerTemplate.java index 64b9ee08d..2bb5d1945 100644 --- a/data/script/template/script/template/character/SilverRangerTemplate.java +++ b/data/script/template/script/template/actor/character/SilverRangerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/SorcerorTemplate.java b/data/script/template/script/template/actor/character/SorcerorTemplate.java similarity index 97% rename from data/script/template/script/template/character/SorcerorTemplate.java rename to data/script/template/script/template/actor/character/SorcerorTemplate.java index 4eab0ab3a..1e0603c25 100644 --- a/data/script/template/script/template/character/SorcerorTemplate.java +++ b/data/script/template/script/template/actor/character/SorcerorTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/SoultakerTemplate.java b/data/script/template/script/template/actor/character/SoultakerTemplate.java similarity index 97% rename from data/script/template/script/template/character/SoultakerTemplate.java rename to data/script/template/script/template/actor/character/SoultakerTemplate.java index 7758de1af..910d9b288 100644 --- a/data/script/template/script/template/character/SoultakerTemplate.java +++ b/data/script/template/script/template/actor/character/SoultakerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/SpectralMasterTemplate.java b/data/script/template/script/template/actor/character/SpectralMasterTemplate.java similarity index 97% rename from data/script/template/script/template/character/SpectralMasterTemplate.java rename to data/script/template/script/template/actor/character/SpectralMasterTemplate.java index 119368d21..d201f1332 100644 --- a/data/script/template/script/template/character/SpectralMasterTemplate.java +++ b/data/script/template/script/template/actor/character/SpectralMasterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/SpectraldancerTemplate.java b/data/script/template/script/template/actor/character/SpectraldancerTemplate.java similarity index 97% rename from data/script/template/script/template/character/SpectraldancerTemplate.java rename to data/script/template/script/template/actor/character/SpectraldancerTemplate.java index e1162aa2c..a77c5fbf8 100644 --- a/data/script/template/script/template/character/SpectraldancerTemplate.java +++ b/data/script/template/script/template/actor/character/SpectraldancerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/SpellhowlerTemplate.java b/data/script/template/script/template/actor/character/SpellhowlerTemplate.java similarity index 97% rename from data/script/template/script/template/character/SpellhowlerTemplate.java rename to data/script/template/script/template/actor/character/SpellhowlerTemplate.java index 77ce9b53c..703b092e7 100644 --- a/data/script/template/script/template/character/SpellhowlerTemplate.java +++ b/data/script/template/script/template/actor/character/SpellhowlerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/SpellsingerTemplate.java b/data/script/template/script/template/actor/character/SpellsingerTemplate.java similarity index 97% rename from data/script/template/script/template/character/SpellsingerTemplate.java rename to data/script/template/script/template/actor/character/SpellsingerTemplate.java index 3af4db08b..61f208e7a 100644 --- a/data/script/template/script/template/character/SpellsingerTemplate.java +++ b/data/script/template/script/template/actor/character/SpellsingerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/StormScreamerTemplate.java b/data/script/template/script/template/actor/character/StormScreamerTemplate.java similarity index 97% rename from data/script/template/script/template/character/StormScreamerTemplate.java rename to data/script/template/script/template/actor/character/StormScreamerTemplate.java index 977a72148..bc113d1b8 100644 --- a/data/script/template/script/template/character/StormScreamerTemplate.java +++ b/data/script/template/script/template/actor/character/StormScreamerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/SwordMuseTemplate.java b/data/script/template/script/template/actor/character/SwordMuseTemplate.java similarity index 97% rename from data/script/template/script/template/character/SwordMuseTemplate.java rename to data/script/template/script/template/actor/character/SwordMuseTemplate.java index c64e095d2..0ad20e820 100644 --- a/data/script/template/script/template/character/SwordMuseTemplate.java +++ b/data/script/template/script/template/actor/character/SwordMuseTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/SwordSingerTemplate.java b/data/script/template/script/template/actor/character/SwordSingerTemplate.java similarity index 97% rename from data/script/template/script/template/character/SwordSingerTemplate.java rename to data/script/template/script/template/actor/character/SwordSingerTemplate.java index d63ba896a..95a92cee3 100644 --- a/data/script/template/script/template/character/SwordSingerTemplate.java +++ b/data/script/template/script/template/actor/character/SwordSingerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/TempleKnightTemplate.java b/data/script/template/script/template/actor/character/TempleKnightTemplate.java similarity index 97% rename from data/script/template/script/template/character/TempleKnightTemplate.java rename to data/script/template/script/template/actor/character/TempleKnightTemplate.java index 69d430664..53cc0d3d4 100644 --- a/data/script/template/script/template/character/TempleKnightTemplate.java +++ b/data/script/template/script/template/actor/character/TempleKnightTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/TitanTemplate.java b/data/script/template/script/template/actor/character/TitanTemplate.java similarity index 97% rename from data/script/template/script/template/character/TitanTemplate.java rename to data/script/template/script/template/actor/character/TitanTemplate.java index 250db4d7b..b3da8eb9c 100644 --- a/data/script/template/script/template/character/TitanTemplate.java +++ b/data/script/template/script/template/actor/character/TitanTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/TreasureHunterTemplate.java b/data/script/template/script/template/actor/character/TreasureHunterTemplate.java similarity index 97% rename from data/script/template/script/template/character/TreasureHunterTemplate.java rename to data/script/template/script/template/actor/character/TreasureHunterTemplate.java index 57a32f12f..dc5d7aeab 100644 --- a/data/script/template/script/template/character/TreasureHunterTemplate.java +++ b/data/script/template/script/template/actor/character/TreasureHunterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/TricksterTemplate.java b/data/script/template/script/template/actor/character/TricksterTemplate.java similarity index 97% rename from data/script/template/script/template/character/TricksterTemplate.java rename to data/script/template/script/template/actor/character/TricksterTemplate.java index 86a1cc35d..19f404388 100644 --- a/data/script/template/script/template/character/TricksterTemplate.java +++ b/data/script/template/script/template/actor/character/TricksterTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/TrooperTemplate.java b/data/script/template/script/template/actor/character/TrooperTemplate.java similarity index 97% rename from data/script/template/script/template/character/TrooperTemplate.java rename to data/script/template/script/template/actor/character/TrooperTemplate.java index 4026c7bdc..f4ba567d9 100644 --- a/data/script/template/script/template/character/TrooperTemplate.java +++ b/data/script/template/script/template/actor/character/TrooperTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/TyrantTemplate.java b/data/script/template/script/template/actor/character/TyrantTemplate.java similarity index 97% rename from data/script/template/script/template/character/TyrantTemplate.java rename to data/script/template/script/template/actor/character/TyrantTemplate.java index 5e16e6cad..9dd022a6d 100644 --- a/data/script/template/script/template/character/TyrantTemplate.java +++ b/data/script/template/script/template/actor/character/TyrantTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/WarcryerTemplate.java b/data/script/template/script/template/actor/character/WarcryerTemplate.java similarity index 97% rename from data/script/template/script/template/character/WarcryerTemplate.java rename to data/script/template/script/template/actor/character/WarcryerTemplate.java index 70e0f9d30..c365ec2e8 100644 --- a/data/script/template/script/template/character/WarcryerTemplate.java +++ b/data/script/template/script/template/actor/character/WarcryerTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/WarderTemplate.java b/data/script/template/script/template/actor/character/WarderTemplate.java similarity index 97% rename from data/script/template/script/template/character/WarderTemplate.java rename to data/script/template/script/template/actor/character/WarderTemplate.java index 3e1c1d804..4b799b054 100644 --- a/data/script/template/script/template/character/WarderTemplate.java +++ b/data/script/template/script/template/actor/character/WarderTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/WarlockTemplate.java b/data/script/template/script/template/actor/character/WarlockTemplate.java similarity index 97% rename from data/script/template/script/template/character/WarlockTemplate.java rename to data/script/template/script/template/actor/character/WarlockTemplate.java index 363d22908..4717d323c 100644 --- a/data/script/template/script/template/character/WarlockTemplate.java +++ b/data/script/template/script/template/actor/character/WarlockTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/WarlordTemplate.java b/data/script/template/script/template/actor/character/WarlordTemplate.java similarity index 97% rename from data/script/template/script/template/character/WarlordTemplate.java rename to data/script/template/script/template/actor/character/WarlordTemplate.java index 887d54062..072b18596 100644 --- a/data/script/template/script/template/character/WarlordTemplate.java +++ b/data/script/template/script/template/actor/character/WarlordTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/WarriorTemplate.java b/data/script/template/script/template/actor/character/WarriorTemplate.java similarity index 97% rename from data/script/template/script/template/character/WarriorTemplate.java rename to data/script/template/script/template/actor/character/WarriorTemplate.java index c449e7424..3b96d1858 100644 --- a/data/script/template/script/template/character/WarriorTemplate.java +++ b/data/script/template/script/template/actor/character/WarriorTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/WarsmithTemplate.java b/data/script/template/script/template/actor/character/WarsmithTemplate.java similarity index 97% rename from data/script/template/script/template/character/WarsmithTemplate.java rename to data/script/template/script/template/actor/character/WarsmithTemplate.java index 5ca5b9fde..0587118e4 100644 --- a/data/script/template/script/template/character/WarsmithTemplate.java +++ b/data/script/template/script/template/actor/character/WarsmithTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/WindRiderTemplate.java b/data/script/template/script/template/actor/character/WindRiderTemplate.java similarity index 97% rename from data/script/template/script/template/character/WindRiderTemplate.java rename to data/script/template/script/template/actor/character/WindRiderTemplate.java index 2a9904730..4031ba656 100644 --- a/data/script/template/script/template/character/WindRiderTemplate.java +++ b/data/script/template/script/template/actor/character/WindRiderTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/character/WizardTemplate.java b/data/script/template/script/template/actor/character/WizardTemplate.java similarity index 97% rename from data/script/template/script/template/character/WizardTemplate.java rename to data/script/template/script/template/actor/character/WizardTemplate.java index 16787f0a0..569886942 100644 --- a/data/script/template/script/template/character/WizardTemplate.java +++ b/data/script/template/script/template/actor/character/WizardTemplate.java @@ -1,4 +1,4 @@ -package script.template.character; +package script.template.actor.character; import com.google.inject.Inject; import com.l2jserver.model.id.template.CharacterTemplateID; diff --git a/data/script/template/script/template/skill/TestSkillTemplate.java b/data/script/template/script/template/skill/TestSkillTemplate.java index 4fd43c370..53fa8f1d7 100644 --- a/data/script/template/script/template/skill/TestSkillTemplate.java +++ b/data/script/template/script/template/skill/TestSkillTemplate.java @@ -13,6 +13,7 @@ public class TestSkillTemplate extends SkillTemplate { @Inject public TestSkillTemplate(SkillTemplateIDFactory factory) { super(factory.createID(ID)); + this.maximumLevel = 1; } @Override 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 b65b6a2e4..e04c9aaf6 100644 --- a/src/dao/mysql5/com/l2jserver/db/dao/mysql5/MySQL5CharacterDAO.java +++ b/src/dao/mysql5/com/l2jserver/db/dao/mysql5/MySQL5CharacterDAO.java @@ -3,6 +3,7 @@ package com.l2jserver.db.dao.mysql5; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Types; import java.util.List; import com.google.inject.Inject; @@ -10,7 +11,9 @@ import com.l2jserver.db.dao.CharacterDAO; import com.l2jserver.model.id.AccountID; import com.l2jserver.model.id.factory.AccountIDFactory; import com.l2jserver.model.id.object.CharacterID; +import com.l2jserver.model.id.object.ClanID; import com.l2jserver.model.id.object.factory.CharacterIDFactory; +import com.l2jserver.model.id.object.factory.ClanIDFactory; import com.l2jserver.model.id.template.CharacterTemplateID; import com.l2jserver.model.id.template.factory.CharacterTemplateIDFactory; import com.l2jserver.model.template.CharacterTemplate; @@ -48,6 +51,10 @@ public class MySQL5CharacterDAO extends AbstractMySQL5DAO * The {@link AccountID} factory */ private final AccountIDFactory accountIdFactory; + /** + * The {@link ClanID} factory + */ + private final ClanIDFactory clanIdFactory; /** * Character table name @@ -56,6 +63,7 @@ public class MySQL5CharacterDAO extends AbstractMySQL5DAO // FIELDS public static final String CHAR_ID = "character_id"; public static final String ACCOUNT_ID = "account_id"; + public static final String CLAN_ID = "clan_id"; public static final String NAME = "name"; public static final String RACE = "race"; @@ -79,11 +87,12 @@ public class MySQL5CharacterDAO extends AbstractMySQL5DAO public MySQL5CharacterDAO(DatabaseService database, final CharacterIDFactory idFactory, CharacterTemplateIDFactory templateIdFactory, - AccountIDFactory accountIdFactory) { + AccountIDFactory accountIdFactory, ClanIDFactory clanIdFactory) { super(database); this.idFactory = idFactory; this.templateIdFactory = templateIdFactory; this.accountIdFactory = accountIdFactory; + this.clanIdFactory = clanIdFactory; } /** @@ -107,9 +116,12 @@ public class MySQL5CharacterDAO extends AbstractMySQL5DAO final L2Character character = new L2Character( template.getBaseAttributes()); + character.setID(idFactory.createID(rs.getInt(CHAR_ID))); character.setAccountID(accountIdFactory.createID(rs .getString(ACCOUNT_ID))); + if (rs.getString(CLAN_ID) != null) + character.setClanID(clanIdFactory.createID(rs.getInt(CLAN_ID))); character.setName(rs.getString(NAME)); @@ -229,12 +241,13 @@ public class MySQL5CharacterDAO extends AbstractMySQL5DAO @Override protected String query() { return "INSERT INTO `" + TABLE + "` (`" + CHAR_ID + "`,`" - + ACCOUNT_ID + "`,`" + NAME + "`,`" + RACE + "`,`" - + CLASS + "`,`" + SEX + "`,`" + LEVEL + "`,`" + POINT_X - + "`,`" + POINT_Y + "`,`" + POINT_ANGLE + "`,`" - + APPEARANCE_HAIR_STYLE + "`,`" + APPEARANCE_HAIR_COLOR - + "`,`" + APPEARANCE_FACE - + "`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)"; + + ACCOUNT_ID + "`,`" + CLAN_ID + "`,`" + NAME + "`,`" + + RACE + "`,`" + CLASS + "`,`" + SEX + "`,`" + LEVEL + + "`,`" + POINT_X + "`,`" + POINT_Y + "`,`" + POINT_Z + + "`,`" + POINT_ANGLE + "`,`" + APPEARANCE_HAIR_STYLE + + "`,`" + APPEARANCE_HAIR_COLOR + "`,`" + + APPEARANCE_FACE + + "`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; } @Override @@ -245,7 +258,12 @@ public class MySQL5CharacterDAO extends AbstractMySQL5DAO int i = 1; st.setInt(i++, character.getID().getID()); - st.setString(i++, character.getAccountID().getID()); // FIXME + st.setString(i++, character.getAccountID().getID()); + if (character.getClanID() != null) + st.setInt(i++, character.getClanID().getID()); + else + st.setNull(i++, Types.INTEGER); + st.setString(i++, character.getName()); st.setString(i++, character.getRace().name()); @@ -253,9 +271,13 @@ public class MySQL5CharacterDAO extends AbstractMySQL5DAO st.setString(i++, character.getSex().name()); st.setInt(i++, character.getLevel()); - st.setInt(i++, character.getPosition().getX()); - st.setInt(i++, character.getPosition().getY()); - st.setInt(i++, character.getPosition().getZ()); + // TODO save experience + // TODO save sp + + st.setInt(i++, character.getPoint().getX()); + st.setInt(i++, character.getPoint().getY()); + st.setInt(i++, character.getPoint().getZ()); + st.setDouble(i++, character.getPoint().getAngle()); // appearance st.setString(i++, appearance.getHairStyle().name()); diff --git a/src/main/java/com/l2jserver/L2JConstants.java b/src/main/java/com/l2jserver/L2JConstants.java index df8b526d9..010b8dfe7 100644 --- a/src/main/java/com/l2jserver/L2JConstants.java +++ b/src/main/java/com/l2jserver/L2JConstants.java @@ -9,7 +9,7 @@ import com.l2jserver.game.ProtocolVersion; */ public class L2JConstants { /** - * Indicated the supported protocol for this compilation. + * Indicate the supported protocol for this compilation. *

* This MUST be hard-coded! */ diff --git a/src/main/java/com/l2jserver/game/net/packet/server/CharacterEnterWorldPacket.java b/src/main/java/com/l2jserver/game/net/packet/server/CharacterEnterWorldPacket.java index 46b23ead7..6a5a4629e 100644 --- a/src/main/java/com/l2jserver/game/net/packet/server/CharacterEnterWorldPacket.java +++ b/src/main/java/com/l2jserver/game/net/packet/server/CharacterEnterWorldPacket.java @@ -34,7 +34,7 @@ public class CharacterEnterWorldPacket extends AbstractServerPacket { buffer.writeInt(0x00); // clan id buffer.writeInt(0x00); // ?? buffer.writeInt(character.getSex().option); - buffer.writeInt(character.getRace().option); + buffer.writeInt(character.getRace().id); buffer.writeInt(character.getCharacterClass().id); buffer.writeInt(0x01); // active ?? buffer.writeInt(character.getPosition().getX()); diff --git a/src/main/java/com/l2jserver/game/net/packet/server/CharacterSelectionListPacket.java b/src/main/java/com/l2jserver/game/net/packet/server/CharacterSelectionListPacket.java index 4ae8fb0c4..98865ced1 100644 --- a/src/main/java/com/l2jserver/game/net/packet/server/CharacterSelectionListPacket.java +++ b/src/main/java/com/l2jserver/game/net/packet/server/CharacterSelectionListPacket.java @@ -63,7 +63,7 @@ public class CharacterSelectionListPacket extends AbstractServerPacket { buffer.writeInt(0x00); // ?? buffer.writeInt(0x01); // sex - buffer.writeInt(character.getRace().option); // race + buffer.writeInt(character.getRace().id); // race // if (character.getClassId() == character.getBaseClassId()) buffer.writeInt(character.getCharacterClass().id); // base class id diff --git a/src/main/java/com/l2jserver/game/net/packet/server/CharacterTemplatePacket.java b/src/main/java/com/l2jserver/game/net/packet/server/CharacterTemplatePacket.java index 9e854a738..539573d30 100644 --- a/src/main/java/com/l2jserver/game/net/packet/server/CharacterTemplatePacket.java +++ b/src/main/java/com/l2jserver/game/net/packet/server/CharacterTemplatePacket.java @@ -25,7 +25,7 @@ public class CharacterTemplatePacket extends AbstractServerPacket { public void write(Lineage2Connection conn, ChannelBuffer buffer) { buffer.writeInt(templates.length); for (final CharacterTemplate template : templates) { - buffer.writeInt(template.getRace().option); + buffer.writeInt(template.getRace().id); buffer.writeInt(template.getCharacterClass().id); buffer.writeInt(0x46); buffer.writeInt(template.getBaseAttributes().getStrength()); diff --git a/src/main/java/com/l2jserver/game/net/packet/server/InventoryPacket.java b/src/main/java/com/l2jserver/game/net/packet/server/InventoryPacket.java index 7021702ac..583660c29 100644 --- a/src/main/java/com/l2jserver/game/net/packet/server/InventoryPacket.java +++ b/src/main/java/com/l2jserver/game/net/packet/server/InventoryPacket.java @@ -4,6 +4,7 @@ import org.jboss.netty.buffer.ChannelBuffer; import com.l2jserver.game.net.Lineage2Connection; import com.l2jserver.game.net.packet.AbstractServerPacket; +import com.l2jserver.model.world.Item; import com.l2jserver.model.world.character.CharacterInventory; /** @@ -17,51 +18,48 @@ public class InventoryPacket extends AbstractServerPacket { */ public static final int OPCODE = 0x11; - // private CharacterInventory inventory; + private CharacterInventory inventory; private boolean showWindow = false; public InventoryPacket(CharacterInventory inventory) { super(OPCODE); - // this.inventory = inventory; + this.inventory = inventory; } @Override public void write(Lineage2Connection conn, ChannelBuffer buffer) { buffer.writeByte((showWindow ? 0x01 : 0x00)); - buffer.writeInt(0x00); // item count - // for (Item item : inventory) { - // buffer.writeInt(item.getID().getID()); - // buffer.writeInt(item.getTemplateID().getID()); - // buffer.writeInt(0x00); // loc slot - // buffer.writeLong(0x00); //count - // buffer.writeShort(0x00); // item type2 - // buffer.writeShort(0x00); // item type3 - // buffer.writeShort(0x00); // equiped? - // buffer.writeInt(0x00); // body part - // buffer.writeShort(0x00); // enchant level - // // race tickets - // buffer.writeShort(temp.getCustomType2()); // item type4 - // buffer.writeInt(0x00); // augument - // buffer.writeInt(temp.getMana()); // mana - // buffer.writeInt(-9999); // time - // buffer.writeShort(temp.getAttackElementType()); // attack element - // type - // buffer.writeShort(temp.getAttackElementPower()); // attack element - // power - // for (byte i = 0; i < 6; i++) { - // buffer.writeShort(temp.getElementDefAttr(i)); // element def attrib - // } - // // Enchant Effects - // buffer.writeShort(0x00); - // buffer.writeShort(0x00); - // buffer.writeShort(0x00); - // } - // if (_inventory.hasInventoryBlock()) { + buffer.writeInt(inventory.getItemCount()); // item count + for (Item item : inventory) { + buffer.writeInt(item.getID().getID()); + buffer.writeInt(item.getTemplateID().getID()); + buffer.writeInt(0x00); // loc slot + buffer.writeLong(0x00); // count + buffer.writeShort(0x00); // item type2 + buffer.writeShort(0x00); // item type3 + buffer.writeShort(0x00); // equiped? + buffer.writeInt(0x00); // body part + buffer.writeShort(0x00); // enchant level + // race tickets + buffer.writeShort(0x00); // item type4 (custom type 2) + buffer.writeInt(0x00); // augument + buffer.writeInt(0x00); // mana + buffer.writeInt(-9999); // time + buffer.writeShort(0x00); // attack element type + buffer.writeShort(0x00); // attack element power + for (byte i = 0; i < 6; i++) { + buffer.writeShort(0x00); // element def attrib + } + // Enchant Effects + buffer.writeShort(0x00); + buffer.writeShort(0x00); + buffer.writeShort(0x00); + } + // TODO inventory block // buffer.writeShort(_inventory.getBlockItems().length); // writeC(_inventory.getBlockMode()); // for (int i : _inventory.getBlockItems()) // buffer.writeInt(i); - // } else buffer.writeShort(0x00); } } diff --git a/src/main/java/com/l2jserver/model/game/CharacterShortcut.java b/src/main/java/com/l2jserver/model/game/CharacterShortcut.java new file mode 100644 index 000000000..355885701 --- /dev/null +++ b/src/main/java/com/l2jserver/model/game/CharacterShortcut.java @@ -0,0 +1,273 @@ +package com.l2jserver.model.game; + +import com.l2jserver.model.id.object.CharacterID; +import com.l2jserver.model.id.object.ItemID; +import com.l2jserver.model.id.template.SkillTemplateID; +import com.l2jserver.model.world.L2Character; + +/** + * An shortcut in Lineage II game interface + * + * @author Rogiel + */ +public class CharacterShortcut { + /** + * The character id + */ + private final CharacterID characterID; + /** + * The shortcut skill id (only if type is + * {@link ShortcutType#SKILL}) + */ + private SkillTemplateID skillID; + + /** + * The shortcut item id (only if type is {@link ShortcutType#ITEM}) + */ + private ItemID itemID; + + /** + * The shortcut slot (0 - 11 = 12 slots/page) + */ + private int slot; + /** + * The shortcut page (0-3 = 4 pages) + */ + private int page; + /** + * The shortcut type + */ + private ShortcutType type; + + /** + * Enum with all shortcut types supported + * + * @author Rogiel + */ + public enum ShortcutType { + ITEM(1), SKILL(2), ACTION(3), MACRO(4), RECIPE(5), TPBOOKMARK(6); + + /** + * The shortcut type id + */ + public final int id; + + ShortcutType(int id) { + this.id = id; + } + + /** + * + * @param id + * the type id + * @return + */ + public static ShortcutType fromID(int id) { + for (final ShortcutType shortcut : values()) { + if (shortcut.id == id) + return shortcut; + } + return null; + } + } + + /** + * The skill level (only if type is {@link ShortcutType#SKILL}) + */ + private int level; + /** + * unknown! + */ + private int characterType; + + /** + * Creates a new instance + * + * @param character + * the character + */ + public CharacterShortcut(CharacterID characterID) { + this.characterID = characterID; + } + + /** + * Creates a new Item Shortcut + * + * @param characterID + * the character id + * @param itemID + * the item id + * @param characterType + * the character type + */ + public CharacterShortcut(CharacterID characterID, ItemID itemID, + int characterType) { + this.type = ShortcutType.ITEM; + this.characterID = characterID; + this.itemID = itemID; + this.characterType = characterType; + } + + /** + * Creates a new Skill Shortcut + * + * @param characterID + * the character id + * @param skillID + * the skill id + * @param level + * the skill level + * @param characterType + * the character type + */ + public CharacterShortcut(CharacterID characterID, SkillTemplateID skillID, + int level, int characterType) { + this.type = ShortcutType.SKILL; + this.characterID = characterID; + this.skillID = skillID; + this.level = level; + this.characterType = characterType; + } + + /** + * Creates another type of shortcut + * + * @param characterID + * the character id + * @param type + * the shortcut type + * @param slot + * the shortcut slot + * @param page + * the shortcut page + * @param characterType + * the character type + */ + public CharacterShortcut(CharacterID characterID, ShortcutType type, + int slot, int page, int characterType) { + this.characterID = characterID; + this.slot = slot; + this.page = page; + this.type = type; + this.characterType = characterType; + } + + /** + * @return the skillID + */ + public SkillTemplateID getSkillID() { + return skillID; + } + + /** + * @param skillID + * the skillID to set + */ + public void setSkillID(SkillTemplateID skillID) { + this.skillID = skillID; + } + + /** + * @return the itemID + */ + public ItemID getItemID() { + return itemID; + } + + /** + * @param itemID + * the itemID to set + */ + public void setItemID(ItemID itemID) { + this.itemID = itemID; + } + + /** + * @return the slot + */ + public int getSlot() { + return slot; + } + + /** + * @param slot + * the slot to set + */ + public void setSlot(int slot) { + this.slot = slot; + } + + /** + * @return the page + */ + public int getPage() { + return page; + } + + /** + * @param page + * the page to set + */ + public void setPage(int page) { + this.page = page; + } + + /** + * @return the type + */ + public ShortcutType getType() { + return type; + } + + /** + * @param type + * the type to set + */ + public void setType(ShortcutType type) { + this.type = type; + } + + /** + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * @param level + * the level to set + */ + public void setLevel(int level) { + this.level = level; + } + + /** + * @return the characterType + */ + public int getCharacterType() { + return characterType; + } + + /** + * @param characterType + * the characterType to set + */ + public void setCharacterType(int characterType) { + this.characterType = characterType; + } + + /** + * @return the character id + */ + public CharacterID getCharacterID() { + return characterID; + } + + /** + * @return the character + */ + public L2Character getCharacter() { + return characterID.getObject(); + } +} diff --git a/src/main/java/com/l2jserver/model/game/Skill.java b/src/main/java/com/l2jserver/model/game/Skill.java new file mode 100644 index 000000000..14cfe3a98 --- /dev/null +++ b/src/main/java/com/l2jserver/model/game/Skill.java @@ -0,0 +1,108 @@ +package com.l2jserver.model.game; + +import com.l2jserver.model.id.object.ActorID; +import com.l2jserver.model.id.template.SkillTemplateID; +import com.l2jserver.model.template.SkillTemplate; +import com.l2jserver.model.world.capability.Actor; + +/** + * Register the state of a skill known by an {@link Actor}. + * + * @author Rogiel + */ +public class Skill { + /** + * The skill template ID + */ + private final SkillTemplateID skillTemplateID; + /** + * The actor id that has learned this skill + */ + private ActorID actorID; + + /** + * The skill level learned + */ + private int level; + + /** + * Creates a new instance + * + * @param skillTemplateID + * the skill template id + * @param level + * the skill level + */ + public Skill(SkillTemplateID skillTemplateID, int level) { + this.skillTemplateID = skillTemplateID; + this.level = level; + } + + /** + * Creates a new instance in level one + * + * @param skillTemplateID + * the skill template id + */ + public Skill(SkillTemplateID skillTemplateID) { + this(skillTemplateID, 1); + } + + /** + * @return true if this skill is learned in the maximum level + */ + public boolean isMaximumLevel() { + return level >= skillTemplateID.getTemplate().getMaximumLevel(); + } + + /** + * @return the actorID + */ + public ActorID getActorID() { + return actorID; + } + + /** + * @return the actor + */ + public Actor getActor() { + return actorID.getObject(); + } + + /** + * @param actorID + * the actor ID to set + */ + public void setActorID(ActorID actorID) { + this.actorID = actorID; + } + + /** + * @return the level + */ + public int getLevel() { + return level; + } + + /** + * @param level + * the level to set + */ + public void setLevel(int level) { + this.level = level; + } + + /** + * @return the skillTemplateID + */ + public SkillTemplateID getSkillTemplateID() { + return skillTemplateID; + } + + /** + * @return the skillTemplate + */ + public SkillTemplate getSkillTemplate() { + return skillTemplateID.getTemplate(); + } +} diff --git a/src/main/java/com/l2jserver/model/game/Spawn.java b/src/main/java/com/l2jserver/model/game/Spawn.java new file mode 100644 index 000000000..e346b5bc0 --- /dev/null +++ b/src/main/java/com/l2jserver/model/game/Spawn.java @@ -0,0 +1,58 @@ +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/id/object/factory/CharacterIDFactory.java b/src/main/java/com/l2jserver/model/id/object/factory/CharacterIDFactory.java index 2b03df46b..9c72db04c 100644 --- a/src/main/java/com/l2jserver/model/id/object/factory/CharacterIDFactory.java +++ b/src/main/java/com/l2jserver/model/id/object/factory/CharacterIDFactory.java @@ -58,6 +58,6 @@ public class CharacterIDFactory implements ObjectIDFactory { * the numeric ID * @return the new ID created by injection */ - public CharacterID create(@Assisted int id); + CharacterID create(@Assisted int id); } } diff --git a/src/main/java/com/l2jserver/model/id/object/factory/ClanIDFactory.java b/src/main/java/com/l2jserver/model/id/object/factory/ClanIDFactory.java index 58733fa55..38782f46e 100644 --- a/src/main/java/com/l2jserver/model/id/object/factory/ClanIDFactory.java +++ b/src/main/java/com/l2jserver/model/id/object/factory/ClanIDFactory.java @@ -57,6 +57,6 @@ public class ClanIDFactory implements ObjectIDFactory { * the numeric ID * @return the new ID created by injection */ - public ClanID create(@Assisted int id); + ClanID create(@Assisted int id); } } diff --git a/src/main/java/com/l2jserver/model/id/object/factory/ItemIDFactory.java b/src/main/java/com/l2jserver/model/id/object/factory/ItemIDFactory.java index eec906e93..f45089ab3 100644 --- a/src/main/java/com/l2jserver/model/id/object/factory/ItemIDFactory.java +++ b/src/main/java/com/l2jserver/model/id/object/factory/ItemIDFactory.java @@ -57,6 +57,6 @@ public class ItemIDFactory implements ObjectIDFactory { * the numeric ID * @return the new ID created by injection */ - public ItemID create(@Assisted int id); + ItemID create(@Assisted int id); } } diff --git a/src/main/java/com/l2jserver/model/id/object/factory/PetIDFactory.java b/src/main/java/com/l2jserver/model/id/object/factory/PetIDFactory.java index 6a7d94b4f..30d65aa4d 100644 --- a/src/main/java/com/l2jserver/model/id/object/factory/PetIDFactory.java +++ b/src/main/java/com/l2jserver/model/id/object/factory/PetIDFactory.java @@ -57,6 +57,6 @@ public class PetIDFactory implements ObjectIDFactory { * the numeric ID * @return the new ID created by injection */ - public PetID create(@Assisted int id); + PetID create(@Assisted int id); } } diff --git a/src/main/java/com/l2jserver/model/id/template/ActorTemplateID.java b/src/main/java/com/l2jserver/model/id/template/ActorTemplateID.java new file mode 100644 index 000000000..4b55363fd --- /dev/null +++ b/src/main/java/com/l2jserver/model/id/template/ActorTemplateID.java @@ -0,0 +1,32 @@ +package com.l2jserver.model.id.template; + +import com.google.inject.Inject; +import com.google.inject.assistedinject.Assisted; +import com.l2jserver.model.id.TemplateID; +import com.l2jserver.model.template.ActorTemplate; +import com.l2jserver.service.game.template.TemplateService; + +/** + * An {@link TemplateID} instance representing an {@link ActorTemplate} + * object + * + * @author Rogiel + */ +public class ActorTemplateID> extends TemplateID { + /** + * The template service + */ + private final TemplateService templateService; + + @Inject + protected ActorTemplateID(@Assisted int id, + TemplateService templateService) { + super(id); + this.templateService = templateService; + } + + @Override + public T getTemplate() { + return templateService.getTemplate(this); + } +} diff --git a/src/main/java/com/l2jserver/model/id/template/CharacterTemplateID.java b/src/main/java/com/l2jserver/model/id/template/CharacterTemplateID.java index 185cb734c..5cfdd1b45 100644 --- a/src/main/java/com/l2jserver/model/id/template/CharacterTemplateID.java +++ b/src/main/java/com/l2jserver/model/id/template/CharacterTemplateID.java @@ -12,21 +12,10 @@ import com.l2jserver.service.game.template.TemplateService; * * @author Rogiel */ -public class CharacterTemplateID extends TemplateID { - /** - * The template service - */ - private final TemplateService templateService; - +public class CharacterTemplateID extends ActorTemplateID { @Inject protected CharacterTemplateID(@Assisted int id, TemplateService templateService) { - super(id); - this.templateService = templateService; - } - - @Override - public CharacterTemplate getTemplate() { - return templateService.getTemplate(this); + super(id, templateService); } } diff --git a/src/main/java/com/l2jserver/model/id/template/NPCTemplateID.java b/src/main/java/com/l2jserver/model/id/template/NPCTemplateID.java new file mode 100644 index 000000000..42fbb3693 --- /dev/null +++ b/src/main/java/com/l2jserver/model/id/template/NPCTemplateID.java @@ -0,0 +1,21 @@ +package com.l2jserver.model.id.template; + +import com.google.inject.Inject; +import com.google.inject.assistedinject.Assisted; +import com.l2jserver.model.id.TemplateID; +import com.l2jserver.model.template.NPCTemplate; +import com.l2jserver.service.game.template.TemplateService; + +/** + * An {@link TemplateID} instance representing an {@link NPCTemplate} + * object + * + * @author Rogiel + */ +public class NPCTemplateID extends ActorTemplateID { + @Inject + protected NPCTemplateID(@Assisted int id, + TemplateService templateService) { + super(id, templateService); + } +} diff --git a/src/main/java/com/l2jserver/model/template/ActorTemplate.java b/src/main/java/com/l2jserver/model/template/ActorTemplate.java new file mode 100644 index 000000000..79a03f448 --- /dev/null +++ b/src/main/java/com/l2jserver/model/template/ActorTemplate.java @@ -0,0 +1,215 @@ +package com.l2jserver.model.template; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.l2jserver.model.id.template.CharacterTemplateID; +import com.l2jserver.model.world.AbstractActor.Race; +import com.l2jserver.model.world.capability.Actor; +import com.l2jserver.model.world.character.CharacterBaseAttributes; + +/** + * Template for {@link Actor} + * + * @author Rogiel + */ +public abstract class ActorTemplate extends + AbstractTemplate { + /** + * The logger + */ + private static final Logger log = LoggerFactory + .getLogger(ActorTemplate.class); + + /** + * The actor race + */ + protected final Race race; + /** + * The base attributes instance + */ + protected final CharacterBaseAttributes baseAttributes; + + public ActorTemplate(CharacterTemplateID id, Race race, int intelligence, + int strength, int concentration, int mentality, int dexterity, + int witness, int physicalAttack, int magicalAttack, + int physicalDefense, int magicalDefense, int attackSpeed, + int castSpeed, int accuracy, int criticalChance, int evasionChance, + int moveSpeed, int maxWeigth, boolean craft) { + super(id); + this.race = race; + baseAttributes = new CharacterBaseAttributes(intelligence, strength, + concentration, mentality, dexterity, witness, physicalAttack, + magicalAttack, physicalDefense, magicalDefense, attackSpeed, + castSpeed, accuracy, criticalChance, evasionChance, moveSpeed, + maxWeigth, craft); + } + + @Override + public T create() { + log.debug("Creating a new Actor instance with template {}", this); + final T actor = createInstance(); + + return actor; + } + + public abstract T createInstance(); + + /** + * @return the race + */ + public Race getRace() { + return race; + } + + /** + * @return the baseAttributes + */ + public CharacterBaseAttributes getBaseAttributes() { + return baseAttributes; + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getIntelligence() + */ + public int getIntelligence() { + return baseAttributes.getIntelligence(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getStrength() + */ + public int getStrength() { + return baseAttributes.getStrength(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getConcentration() + */ + public int getConcentration() { + return baseAttributes.getConcentration(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getMentality() + */ + public int getMentality() { + return baseAttributes.getMentality(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getDexterity() + */ + public int getDextry() { + return baseAttributes.getDexterity(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getWitness() + */ + public int getWitness() { + return baseAttributes.getWitness(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getPhysicalAttack() + */ + public int getPhysicalAttack() { + return baseAttributes.getPhysicalAttack(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getMagicalAttack() + */ + public int getMagicalAttack() { + return baseAttributes.getMagicalAttack(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getPhysicalDefense() + */ + public int getPhysicalDefense() { + return baseAttributes.getPhysicalDefense(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getMagicalDefense() + */ + public int getMagicalDefense() { + return baseAttributes.getMagicalDefense(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getAttackSpeed() + */ + public int getAttackSpeed() { + return baseAttributes.getAttackSpeed(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getCastSpeed() + */ + public int getCastSpeed() { + return baseAttributes.getCastSpeed(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getAccuracy() + */ + public int getAccuracy() { + return baseAttributes.getAccuracy(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getCriticalChance() + */ + public int getCriticalChance() { + return baseAttributes.getCriticalChance(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getEvasionChance() + */ + public int getEvasionChance() { + return baseAttributes.getEvasionChance(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getMoveSpeed() + */ + public int getMoveSpeed() { + return baseAttributes.getMoveSpeed(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getMaxWeigth() + */ + public int getMaxWeigth() { + return baseAttributes.getMaxWeigth(); + } + + /** + * @return + * @see com.l2jserver.model.world.character.CharacterBaseAttributes#canCraft() + */ + public boolean canCraft() { + return baseAttributes.canCraft(); + } +} diff --git a/src/main/java/com/l2jserver/model/template/CharacterTemplate.java b/src/main/java/com/l2jserver/model/template/CharacterTemplate.java index 127aa90cb..325c769ab 100644 --- a/src/main/java/com/l2jserver/model/template/CharacterTemplate.java +++ b/src/main/java/com/l2jserver/model/template/CharacterTemplate.java @@ -1,12 +1,7 @@ package com.l2jserver.model.template; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import com.l2jserver.model.id.template.CharacterTemplateID; -import com.l2jserver.model.world.AbstractActor.Race; import com.l2jserver.model.world.L2Character; -import com.l2jserver.model.world.character.CharacterBaseAttributes; import com.l2jserver.model.world.character.CharacterClass; import com.l2jserver.util.dimensional.Point; @@ -15,17 +10,7 @@ import com.l2jserver.util.dimensional.Point; * * @author Rogiel */ -public abstract class CharacterTemplate extends AbstractTemplate { - /** - * The logger - */ - private static final Logger log = LoggerFactory - .getLogger(CharacterTemplate.class); - - /** - * The character race - */ - protected final Race race; +public abstract class CharacterTemplate extends ActorTemplate { /** * The character class */ @@ -34,55 +19,34 @@ public abstract class CharacterTemplate extends AbstractTemplate { * The initial location for the character to be spawned */ protected final Point spawnLocation; - /** - * The base attributes instance - */ - protected final CharacterBaseAttributes baseAttributes; - public CharacterTemplate(CharacterTemplateID id, + protected CharacterTemplate(CharacterTemplateID id, CharacterClass characterClass, int intelligence, int strength, int concentration, int mentality, int dexterity, int witness, int physicalAttack, int magicalAttack, int physicalDefense, int magicalDefense, int attackSpeed, int castSpeed, int accuracy, int criticalChance, int evasionChance, int moveSpeed, int maxWeigth, boolean craft, Point spawnLocation) { - super(id); - this.race = characterClass.race; + super(id, characterClass.race, intelligence, strength, concentration, + mentality, dexterity, witness, physicalAttack, magicalAttack, + physicalDefense, magicalDefense, attackSpeed, castSpeed, + accuracy, criticalChance, evasionChance, moveSpeed, maxWeigth, + craft); this.characterClass = characterClass; this.spawnLocation = spawnLocation; - baseAttributes = new CharacterBaseAttributes(intelligence, strength, - concentration, mentality, dexterity, witness, physicalAttack, - magicalAttack, physicalDefense, magicalDefense, attackSpeed, - castSpeed, accuracy, criticalChance, evasionChance, moveSpeed, - maxWeigth, craft); } @Override - public L2Character create() { - log.debug("Creating a new Character instance with template {}", this); + public L2Character createInstance() { final L2Character character = new L2Character(baseAttributes); character.setRace(race); character.setCharacterClass(characterClass); character.setPoint(spawnLocation); - // character.getBaseAttributes().setIntelligence(intelligence); - // character.getBaseAttributes().setStrength(strength); - // character.getBaseAttributes().setConcentration(concentration); - // character.getBaseAttributes().setMentality(mentality); - // character.getBaseAttributes().setDextry(dextry); - // character.getBaseAttributes().setWitness(witness); - return character; } - /** - * @return the race - */ - public Race getRace() { - return race; - } - /** * @return the characterClass */ @@ -97,157 +61,6 @@ public abstract class CharacterTemplate extends AbstractTemplate { return spawnLocation; } - /** - * @return the baseAttributes - */ - public CharacterBaseAttributes getBaseAttributes() { - return baseAttributes; - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getIntelligence() - */ - public int getIntelligence() { - return baseAttributes.getIntelligence(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getStrength() - */ - public int getStrength() { - return baseAttributes.getStrength(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getConcentration() - */ - public int getConcentration() { - return baseAttributes.getConcentration(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getMentality() - */ - public int getMentality() { - return baseAttributes.getMentality(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getDexterity() - */ - public int getDextry() { - return baseAttributes.getDexterity(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getWitness() - */ - public int getWitness() { - return baseAttributes.getWitness(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getPhysicalAttack() - */ - public int getPhysicalAttack() { - return baseAttributes.getPhysicalAttack(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getMagicalAttack() - */ - public int getMagicalAttack() { - return baseAttributes.getMagicalAttack(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getPhysicalDefense() - */ - public int getPhysicalDefense() { - return baseAttributes.getPhysicalDefense(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getMagicalDefense() - */ - public int getMagicalDefense() { - return baseAttributes.getMagicalDefense(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getAttackSpeed() - */ - public int getAttackSpeed() { - return baseAttributes.getAttackSpeed(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getCastSpeed() - */ - public int getCastSpeed() { - return baseAttributes.getCastSpeed(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getAccuracy() - */ - public int getAccuracy() { - return baseAttributes.getAccuracy(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getCriticalChance() - */ - public int getCriticalChance() { - return baseAttributes.getCriticalChance(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getEvasionChance() - */ - public int getEvasionChance() { - return baseAttributes.getEvasionChance(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getMoveSpeed() - */ - public int getMoveSpeed() { - return baseAttributes.getMoveSpeed(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#getMaxWeigth() - */ - public int getMaxWeigth() { - return baseAttributes.getMaxWeigth(); - } - - /** - * @return - * @see com.l2jserver.model.world.character.CharacterBaseAttributes#canCraft() - */ - public boolean canCraft() { - return baseAttributes.canCraft(); - } - @Override public CharacterTemplateID getID() { return (CharacterTemplateID) super.getID(); diff --git a/src/main/java/com/l2jserver/model/template/NPCTemplate.java b/src/main/java/com/l2jserver/model/template/NPCTemplate.java new file mode 100644 index 000000000..195aa5b88 --- /dev/null +++ b/src/main/java/com/l2jserver/model/template/NPCTemplate.java @@ -0,0 +1,43 @@ +package com.l2jserver.model.template; + +import com.l2jserver.model.id.template.CharacterTemplateID; +import com.l2jserver.model.id.template.NPCTemplateID; +import com.l2jserver.model.world.AbstractActor.Race; +import com.l2jserver.model.world.L2Character; + +/** + * Template for {@link NPC} + * + * @author Rogiel + */ +public abstract class NPCTemplate extends ActorTemplate { + protected NPCTemplate(CharacterTemplateID id, Race race, int intelligence, + int strength, int concentration, int mentality, int dexterity, + int witness, int physicalAttack, int magicalAttack, + int physicalDefense, int magicalDefense, int attackSpeed, + int castSpeed, int accuracy, int criticalChance, int evasionChance, + int moveSpeed, int maxWeigth, boolean craft) { + super(id, race, intelligence, strength, concentration, mentality, + dexterity, witness, physicalAttack, magicalAttack, + physicalDefense, magicalDefense, attackSpeed, castSpeed, + accuracy, criticalChance, evasionChance, moveSpeed, maxWeigth, + craft); + } + + @Override + public L2Character createInstance() { + return null; + } + + /** + * @return the race + */ + public Race getRace() { + return race; + } + + @Override + public NPCTemplateID getID() { + return (NPCTemplateID) super.getID(); + } +} diff --git a/src/main/java/com/l2jserver/model/template/SkillTemplate.java b/src/main/java/com/l2jserver/model/template/SkillTemplate.java index 16da515c3..a1675ca30 100644 --- a/src/main/java/com/l2jserver/model/template/SkillTemplate.java +++ b/src/main/java/com/l2jserver/model/template/SkillTemplate.java @@ -1,25 +1,39 @@ package com.l2jserver.model.template; +import com.l2jserver.model.game.Skill; import com.l2jserver.model.id.template.SkillTemplateID; import com.l2jserver.model.template.capability.Castable; import com.l2jserver.model.world.character.CharacterClass; /** - * Template for skill + * Template for {@link Skill} object * * @author Rogiel */ -public abstract class SkillTemplate extends AbstractTemplate implements +public abstract class SkillTemplate extends AbstractTemplate implements Castable { + /** + * The maximum level supported by this skill + */ + protected int maximumLevel = 1; + public SkillTemplate(SkillTemplateID id) { super(id); } + /** + * @return the maximumLevel + */ + public int getMaximumLevel() { + return maximumLevel; + } + public abstract CharacterClass[] getClasses(); @Override - public Void create() { - return null; + public Skill create() { + final Skill skill = new Skill(this.getID()); + return skill; } @Override diff --git a/src/main/java/com/l2jserver/model/world/AbstractActor.java b/src/main/java/com/l2jserver/model/world/AbstractActor.java index 70b37ef78..fe6b23789 100644 --- a/src/main/java/com/l2jserver/model/world/AbstractActor.java +++ b/src/main/java/com/l2jserver/model/world/AbstractActor.java @@ -1,8 +1,10 @@ package com.l2jserver.model.world; +import com.l2jserver.model.id.object.ActorID; import com.l2jserver.model.template.SkillTemplate; import com.l2jserver.model.template.capability.Attackable; import com.l2jserver.model.world.actor.ActorEffects; +import com.l2jserver.model.world.actor.ActorSkillContainer; import com.l2jserver.model.world.capability.Actor; import com.l2jserver.model.world.capability.Attacker; import com.l2jserver.model.world.capability.Castable; @@ -31,15 +33,25 @@ public abstract class AbstractActor extends AbstractObject implements Actor { HUMAN(0x00), ELF(0x01), DARK_ELF(0x02), ORC(0x03), DWARF(0x04), KAMAEL( 0x05); - public final int option; + /** + * The numeric ID representing this race + */ + public final int id; - Race(int option) { - this.option = option; + Race(int id) { + this.id = id; } - public static Race fromOption(int option) { + /** + * Finds the race based on the id + * + * @param id + * the id + * @return the race constant + */ + public static Race fromOption(int id) { for (final Race race : values()) { - if (race.option == option) + if (race.id == id) return race; } return null; @@ -91,6 +103,10 @@ public abstract class AbstractActor extends AbstractObject implements Actor { * The currently effects active on the actor */ protected final ActorEffects effects = new ActorEffects(this); + /** + * The skills learned by this actor + */ + protected final ActorSkillContainer skills = new ActorSkillContainer(this); @Override public void receiveDamage(int damage) { @@ -212,6 +228,11 @@ public abstract class AbstractActor extends AbstractObject implements Actor { return effects; } + @Override + public ActorSkillContainer getSkills() { + return skills; + } + @Override public void die(WorldObject killer) { // TODO @@ -247,4 +268,9 @@ public abstract class AbstractActor extends AbstractObject implements Actor { public void equip(Equiper equiper) { // TODO } + + @Override + public ActorID getID() { + return (ActorID) super.getID(); + } } diff --git a/src/main/java/com/l2jserver/model/world/L2Character.java b/src/main/java/com/l2jserver/model/world/L2Character.java index 7bb108899..05bed709d 100644 --- a/src/main/java/com/l2jserver/model/world/L2Character.java +++ b/src/main/java/com/l2jserver/model/world/L2Character.java @@ -13,6 +13,7 @@ import com.l2jserver.model.world.character.CharacterCalculatedAttributes; import com.l2jserver.model.world.character.CharacterClass; import com.l2jserver.model.world.character.CharacterFriendList; import com.l2jserver.model.world.character.CharacterInventory; +import com.l2jserver.model.world.character.CharacterShortcutContainer; /** * This class represents a playable character in Lineage II world. @@ -69,6 +70,11 @@ public class L2Character extends Player { * The list of friend of this character */ private final CharacterFriendList friendList = new CharacterFriendList(this); + /** + * The shortcut container of this character + */ + private final CharacterShortcutContainer shortcuts = new CharacterShortcutContainer( + this); /** * Creates a new instance @@ -239,6 +245,13 @@ public class L2Character extends Player { return friendList; } + /** + * @return the shortcuts + */ + public CharacterShortcutContainer getShortcuts() { + return shortcuts; + } + @Override public CharacterID getID() { return (CharacterID) super.getID(); diff --git a/src/main/java/com/l2jserver/model/world/actor/ActorSkillContainer.java b/src/main/java/com/l2jserver/model/world/actor/ActorSkillContainer.java new file mode 100644 index 000000000..84fd7edbc --- /dev/null +++ b/src/main/java/com/l2jserver/model/world/actor/ActorSkillContainer.java @@ -0,0 +1,138 @@ +package com.l2jserver.model.world.actor; + +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +import com.l2jserver.model.game.Skill; +import com.l2jserver.model.id.template.SkillTemplateID; +import com.l2jserver.model.template.SkillTemplate; +import com.l2jserver.model.world.capability.Actor; +import com.l2jserver.util.factory.CollectionFactory; + +/** + * The Skill container will manage all learned skills by an actor. This class + * can also create the {@link Skill} object if an actor is learning a new skill. + * + * @author Rogiel + */ +public class ActorSkillContainer implements Iterable { + /** + * The actor + */ + private final Actor actor; + /** + * The learned skill list + */ + private List skills = CollectionFactory.newList(Skill.class); + + /** + * Creates a new instance + * + * @param actor + * the actor + */ + public ActorSkillContainer(Actor actor) { + this.actor = actor; + } + + /** + * Learns a new skill + * + * @param template + * the skill to be learned + * @param level + * the skill level + * @return the created skill object, null if skill existed or could not be + * learned. + */ + public Skill learn(SkillTemplate template, int level) { + if (hasSkill(template.getID()) != null) + return null; + if (level > template.getMaximumLevel()) + level = template.getMaximumLevel(); + final Skill newSkill = template.create(); + newSkill.setLevel(level); + if (skills.add(newSkill)) + return newSkill; + return null; + } + + /** + * Learns a new skill. The skill level will be 1. + * + * @param template + * the skill to be learned + * @return the created skill object, null if skill existed or could not be + * learned. + * @see ActorSkillContainer#learn(SkillTemplate, int) + */ + public Skill learn(SkillTemplate template) { + return learn(template, 1); + } + + /** + * Learns a new skill + * + * @param skill + * the skill to be learned + * @param level + * the skill level + * @return the created skill object, null if skill existed or could not be + * learned. + * @see ActorSkillContainer#learn(SkillTemplate, int) + */ + public Skill learn(SkillTemplateID skill, int level) { + return learn(skill.getTemplate(), level); + } + + /** + * Learns a new skill. The skill level will be 1. + * + * @param skill + * the skill to be learned + * @return the created skill object, null if skill existed or could not be + * learned. + * @see ActorSkillContainer#learn(SkillTemplate, int) + */ + public Skill learn(SkillTemplateID skill) { + return learn(skill, 1); + } + + /** + * Test is the actor knows the given skillTemplate + * + * @param skillTemplate + * the skill + * @return return the learned skill or null if does not learned skill + */ + public Skill hasSkill(SkillTemplateID skillTemplate) { + for (final Skill skill : this.skills) { + if (skill.getSkillTemplateID().equals(skillTemplate)) + return skill; + } + return null; + } + + /** + * Load all skills in the {@link Collection} to this container + * + * @param skills + * the skill collection + */ + public void load(Collection skills) { + this.skills.addAll(skills); + } + + @Override + public Iterator iterator() { + return skills.iterator(); + } + + /** + * @return the actor + */ + public Actor getActor() { + return actor; + } +} diff --git a/src/main/java/com/l2jserver/model/world/capability/Actor.java b/src/main/java/com/l2jserver/model/world/capability/Actor.java index 5c02915b8..60168c4ef 100644 --- a/src/main/java/com/l2jserver/model/world/capability/Actor.java +++ b/src/main/java/com/l2jserver/model/world/capability/Actor.java @@ -1,9 +1,11 @@ package com.l2jserver.model.world.capability; +import com.l2jserver.model.id.object.ActorID; import com.l2jserver.model.world.AbstractObject; import com.l2jserver.model.world.actor.ActorEffects; import com.l2jserver.model.world.actor.ActorEvent; import com.l2jserver.model.world.actor.ActorListener; +import com.l2jserver.model.world.actor.ActorSkillContainer; /** * Defines an {@link AbstractObject} that defines an Actor (NPC, player, pet, @@ -14,5 +16,16 @@ import com.l2jserver.model.world.actor.ActorListener; public interface Actor extends Listenable, Spawnable, Pointable, Damagable, Attackable, Attacker, Castable, Caster, Levelable, Killable, Equiper, Equipable { + /** + * @return the actor effects + */ ActorEffects getEffects(); + + /** + * @return the actor skills + */ + ActorSkillContainer getSkills(); + + @Override + ActorID getID(); } diff --git a/src/main/java/com/l2jserver/model/world/character/CharacterClass.java b/src/main/java/com/l2jserver/model/world/character/CharacterClass.java index 6ac9a2f50..61a6efb54 100644 --- a/src/main/java/com/l2jserver/model/world/character/CharacterClass.java +++ b/src/main/java/com/l2jserver/model/world/character/CharacterClass.java @@ -17,8 +17,8 @@ public enum CharacterClass { KNIGHT), ROGUE(0x07, HUMAN_FIGHTER), TREASURE_HUNTER(0x08, ROGUE), HAWKEYE( 0x09, ROGUE), // 3rd classes - DUELIST(0x58, GLADIATOR), DREADNOUGHT(0x59, WARLORD), phoenixKnight(0x5a, - PALADIN), hellKnight(0x5b, DARK_AVENGER), sagittarius(0x5c, HAWKEYE), adventurer( + DUELIST(0x58, GLADIATOR), DREADNOUGHT(0x59, WARLORD), PHOENIX_KNIGHT(0x5a, + PALADIN), HELL_KNIGHT(0x5b, DARK_AVENGER), SAGITTARIUS(0x5c, HAWKEYE), ADVENTURER( 0x5d, TREASURE_HUNTER), /** @@ -61,8 +61,8 @@ public enum CharacterClass { 0x22, PALUS_KNIGHT), ASSASSIN(0x23, DARK_FIGHTER), ABYSS_WALKER( 0x24, ASSASSIN), PHANTOM_RANGER(0x25, ASSASSIN), // 3rd classes - SHILLIEN_TEMPLAR(0x6a, SHILLIEN_KNIGHT), spectralDancer(0x6b, BLADEDANCER), ghostHunter( - 0x6c, ABYSS_WALKER), ghostSentinel(0x6d, PHANTOM_RANGER), + SHILLIEN_TEMPLAR(0x6a, SHILLIEN_KNIGHT), spectralDancer(0x6b, BLADEDANCER), GHOST_HUNTER( + 0x6c, ABYSS_WALKER), GHOST_SENTINEL(0x6d, PHANTOM_RANGER), /** * Dark elf mystic diff --git a/src/main/java/com/l2jserver/model/world/character/CharacterInventory.java b/src/main/java/com/l2jserver/model/world/character/CharacterInventory.java index 621981999..8b6f13bce 100644 --- a/src/main/java/com/l2jserver/model/world/character/CharacterInventory.java +++ b/src/main/java/com/l2jserver/model/world/character/CharacterInventory.java @@ -46,10 +46,10 @@ public class CharacterInventory implements Iterable { } /** - * @return the character + * @return the amount if items in inventory */ - public L2Character getCharacter() { - return character; + public int getItemCount() { + return items.size(); } @Override @@ -85,4 +85,11 @@ public class CharacterInventory implements Iterable { public enum InventoryPaperdoll { UNDERWEAR, HEAD, HAIR1, HAIR2, NECK, RIGHT_HAND, LEFT_HAND, RIGHT_EAR, LEFT_EAR, GLOVES, LEGS, LEFT_FEET, RIGHT_FEET, RIGHT_FINGER, LEFT_FINGER, LEFT_BRACELET, RIGHT_BRACELET, DECORATION_1, DECOREATION_2, DECORATION_3, DECORATION_4, DECORATION_5, DECORATION_6, CLOAK, BELT; } + + /** + * @return the character + */ + public L2Character getCharacter() { + return character; + } } diff --git a/src/main/java/com/l2jserver/model/world/character/CharacterShortcutContainer.java b/src/main/java/com/l2jserver/model/world/character/CharacterShortcutContainer.java new file mode 100644 index 000000000..fa4eaa193 --- /dev/null +++ b/src/main/java/com/l2jserver/model/world/character/CharacterShortcutContainer.java @@ -0,0 +1,116 @@ +package com.l2jserver.model.world.character; + +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +import com.l2jserver.model.game.CharacterShortcut; +import com.l2jserver.model.world.L2Character; +import com.l2jserver.util.factory.CollectionFactory; + +/** + * Container that controls shortcut for character instances + * + * @author Rogiel + */ +public class CharacterShortcutContainer implements Iterable { + /** + * The character + */ + private final L2Character character; + /** + * The shortcut list + */ + private List shortcuts = CollectionFactory + .newList(CharacterShortcut.class); + + /** + * Creates a new instance + * + * @param character + * the character + */ + public CharacterShortcutContainer(L2Character character) { + this.character = character; + } + + /** + * Registers a new shortcut to this container + * + * @param shortcut + * the shortcut to be added + */ + public void register(CharacterShortcut shortcut) { + shortcuts.add(shortcut); + } + + /** + * Unregisters the given shortcut from this container + * + * @param shortcut + * the shortcut to be removed + */ + public void unregister(CharacterShortcut shortcut) { + shortcuts.remove(shortcut); + } + + /** + * Swap two shortcuts between them. Once swap is complete, + * shortcut1 will be in the place of shortcut2, and + * shortcut2 in shortcut1. + * + * @param shortcut1 + * the first shortcut + * @param shortcut2 + * the second shortcut + */ + public void swap(CharacterShortcut shortcut1, CharacterShortcut shortcut2) { + // only swap if is registered already + if (!shortcuts.contains(shortcut1) || !shortcuts.contains(shortcut2)) + return; + + final int slot1 = shortcut1.getSlot(); + final int page1 = shortcut1.getPage(); + shortcut1.setSlot(shortcut2.getSlot()); + shortcut1.setPage(shortcut2.getPage()); + shortcut2.setSlot(slot1); + shortcut2.setPage(page1); + } + + /** + * @return true if container is full + */ + public boolean isFull() { + return shortcuts.size() >= 12 * 4; + } + + /** + * @return true if there is not shortcut registered + */ + public boolean isEmpty() { + return shortcuts.isEmpty(); + } + + /** + * Loads all shortcuts in the given {@link Collection}. This method is + * normally called from a DAO. + * + * @param shortcuts + * the collection of shortcuts + */ + public void load(Collection shortcuts) { + this.shortcuts.addAll(shortcuts); + } + + @Override + public Iterator iterator() { + return shortcuts.iterator(); + } + + /** + * @return the character + */ + public L2Character getCharacter() { + return character; + } +} diff --git a/src/main/resources/sql/character.sql b/src/main/resources/sql/character.sql index d421c58e3..5138dc787 100644 --- a/src/main/resources/sql/character.sql +++ b/src/main/resources/sql/character.sql @@ -1,6 +1,7 @@ CREATE TABLE `character` ( `character_id` int(12) NOT NULL, `account_id` varchar(50) NOT NULL, + `clan_id` int(10) NOT NULL, `name` varchar(50) NOT NULL, `race` enum('HUMAN', 'ELF', 'DARK_ELF', 'ORC', 'DWARF', 'KAMAEL') NOT NULL, `class` enum('HUMAN_FIGHTER','WARRIOR','GLADIATOR','WARLORD','KNIGHT','PALADIN','DARK_AVENGER','ROGUE','TREASURE_HUNTER','HAWKEYE','DUELIST','DREADNOUGHT','phoenixKnight','hellKnight','sagittarius','adventurer','HUMAN_MYSTIC','WIZARD','SORCEROR','NECROMANCER','WARLOCK','CLERIC','BISHOP','PROPHET','ARCHMAGE','SOULTAKER','ARCANA_LORD','CARDINAL','HIEROPHANT','ELVEN_FIGHTER','ELVEN_KNIGHT','TEMPLE_KNIGHT','SWORD_SINGER','ELVEN_SCOUT','PLAINS_WALKER','SILVER_RANGER','EVA_TEMPLAR','SWORD_MUSE','WIND_RIDER','MOONLIGHT_SENTINEL','ELVEN_MYSTIC','ELVEN_WIZARD','SPELLSINGER','ELEMENTAL_SUMMONER','ORACLE','ELDER','MYSTIC_MUSE','ELEMENTAL_MASTER','EVA_SAINT','DARK_FIGHTER','PALUS_KNIGHT','SHILLIEN_KNIGHT','BLADEDANCER','ASSASSIN','ABYSS_WALKER','PHANTOM_RANGER','SHILLIEN_TEMPLAR','spectralDancer','ghostHunter','ghostSentinel','DARK_MYSTIC','DARK_WIZARD','SPELLHOWLER','PHANTOM_SUMMONER','SHILLIEN_ORACLE','SHILLIEN_ELDER','STORM_SCREAMER','SPECTRAL_MASTER','SHILLIEAN_SAINT','ORC_FIGHTER','ORC_RAIDER','DESTROYER','ORC_MONK','TYRANT','TITAN','GRAND_KHAUATARI','ORC_MYSTIC','ORC_SHAMAN','OVERLORD','WARCRYER','DOMINATOR','DOOMCRYER','DWARVEN_FIGHTER','SCAVENGER','BOUNTY_HUNTER','ARTISAN','WARSMITH','FORTUNE_SEEKER','MAESTRO','MALE_SOLDIER','TROOPER','BERSEKER','MALE_SOULBREAKER','DOOMBRINGER','MALE_SOULDHOUND','FEMALE_SOLDIER','WARDER','FEMALE_SOULBREAKER','ARBALESTER','FEMALE_SOULDHOUND','TRICKSTER','INSPECTOR','JUDICATOR') NOT NULL DEFAULT 'HUMAN_FIGHTER',