mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-09 08:52:51 +00:00
Greatly improves source code documentation
This commit is contained in:
@@ -41,6 +41,9 @@ import com.l2jserver.service.network.keygen.BlowfishKeygenService;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class L2JGameServerMain {
|
||||
/**
|
||||
* List of start services
|
||||
*/
|
||||
public static final Class<?>[][] SERVICES = {
|
||||
// core services
|
||||
{ CacheService.class, ConfigurationService.class,
|
||||
|
||||
@@ -65,6 +65,9 @@ public class CM_CHAR_ACTION extends AbstractClientPacket {
|
||||
* The object id
|
||||
*/
|
||||
private int objectId;
|
||||
/**
|
||||
* The action origin
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private Coordinate origin;
|
||||
/**
|
||||
@@ -72,6 +75,11 @@ public class CM_CHAR_ACTION extends AbstractClientPacket {
|
||||
*/
|
||||
private CharacterAction action;
|
||||
|
||||
/**
|
||||
* The character action type
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public enum CharacterAction {
|
||||
/**
|
||||
* If the player has clicked with the left mouse button.
|
||||
@@ -82,12 +90,24 @@ public class CM_CHAR_ACTION extends AbstractClientPacket {
|
||||
*/
|
||||
RIGHT_CLICK(1);
|
||||
|
||||
/**
|
||||
* The action id
|
||||
*/
|
||||
public final int id;
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* the action id
|
||||
*/
|
||||
CharacterAction(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* the action id
|
||||
* @return the {@link CharacterAction} represented by <code>id</code>
|
||||
*/
|
||||
public static CharacterAction fromID(int id) {
|
||||
for (final CharacterAction action : values())
|
||||
if (action.id == id)
|
||||
@@ -96,6 +116,11 @@ public class CM_CHAR_ACTION extends AbstractClientPacket {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param idResolver the id resolver
|
||||
* @param npcService the npc service
|
||||
* @param itemService the item service
|
||||
*/
|
||||
@Inject
|
||||
public CM_CHAR_ACTION(ObjectIDResolver idResolver, NPCService npcService,
|
||||
ItemService itemService) {
|
||||
@@ -119,8 +144,8 @@ public class CM_CHAR_ACTION extends AbstractClientPacket {
|
||||
final NPC npc = ((NPCID) id).getObject();
|
||||
try {
|
||||
npcService.action(npc, conn.getCharacter(), action);
|
||||
} catch(NPCControllerException e) {
|
||||
if(e.getSystemMessage() != null)
|
||||
} catch (NPCControllerException e) {
|
||||
if (e.getSystemMessage() != null)
|
||||
conn.sendSystemMessage(e.getSystemMessage());
|
||||
conn.sendActionFailed();
|
||||
} catch (ActionServiceException | CannotSetTargetServiceException e) {
|
||||
|
||||
@@ -41,6 +41,9 @@ public class CM_CHAR_APPEARING extends AbstractClientPacket {
|
||||
*/
|
||||
private final SpawnService spawnService;
|
||||
|
||||
/**
|
||||
* @param spawnService the spawn service
|
||||
*/
|
||||
@Inject
|
||||
public CM_CHAR_APPEARING(SpawnService spawnService) {
|
||||
this.spawnService = spawnService;
|
||||
|
||||
@@ -49,11 +49,22 @@ public class CM_CHAR_CHAT extends AbstractClientPacket {
|
||||
*/
|
||||
private final ChatService chatService;
|
||||
|
||||
/**
|
||||
* The message
|
||||
*/
|
||||
private String message;
|
||||
/**
|
||||
* The message destination
|
||||
*/
|
||||
private ChatMessageType destination;
|
||||
|
||||
/**
|
||||
* The message target
|
||||
*/
|
||||
private String target;
|
||||
|
||||
/**
|
||||
* @param chatService the chat service
|
||||
*/
|
||||
@Inject
|
||||
public CM_CHAR_CHAT(ChatService chatService) {
|
||||
this.chatService = chatService;
|
||||
|
||||
@@ -125,6 +125,9 @@ public class CM_CHAR_CREATE extends AbstractClientPacket {
|
||||
*/
|
||||
private CharacterFace face;
|
||||
|
||||
/**
|
||||
* @param characterService the character service
|
||||
*/
|
||||
@Inject
|
||||
public CM_CHAR_CREATE(CharacterService characterService) {
|
||||
this.characterService = characterService;
|
||||
|
||||
@@ -50,20 +50,50 @@ public class CM_CHAR_MOVE extends AbstractClientPacket {
|
||||
private final CharacterService charService;
|
||||
|
||||
// packet
|
||||
/**
|
||||
* The movement target
|
||||
*/
|
||||
private Coordinate target;
|
||||
/**
|
||||
* The movement origin
|
||||
*/
|
||||
private Coordinate origin;
|
||||
/**
|
||||
* The movement type
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private MovementType type;
|
||||
|
||||
/**
|
||||
* Defines the movement action type
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public enum MovementType {
|
||||
MOUSE(0x01), KEYBOARD(0x00);
|
||||
/**
|
||||
* The move action was issued by the mouse
|
||||
*/
|
||||
MOUSE(0x01),
|
||||
/**
|
||||
* The move action was issued by the keyboard
|
||||
*/
|
||||
KEYBOARD(0x00);
|
||||
|
||||
/**
|
||||
* The type id
|
||||
*/
|
||||
public final int id;
|
||||
|
||||
/**
|
||||
* @param id the type id
|
||||
*/
|
||||
MovementType(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id the type id
|
||||
* @return the {@link MovementType} represented by <code>id</code>
|
||||
*/
|
||||
public static MovementType fromID(int id) {
|
||||
for (final MovementType type : values()) {
|
||||
if (type.id == id)
|
||||
@@ -73,6 +103,9 @@ public class CM_CHAR_MOVE extends AbstractClientPacket {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param charService the character service
|
||||
*/
|
||||
@Inject
|
||||
public CM_CHAR_MOVE(CharacterService charService) {
|
||||
this.charService = charService;
|
||||
|
||||
@@ -40,10 +40,19 @@ public class CM_CHAR_POSITION extends AbstractClientPacket {
|
||||
*/
|
||||
private final CharacterService charService;
|
||||
|
||||
/**
|
||||
* The current position point
|
||||
*/
|
||||
private Point3D point;
|
||||
/**
|
||||
* Extra data -> vehicle id
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private int extra; // vehicle id
|
||||
|
||||
/**
|
||||
* @param charService the character service
|
||||
*/
|
||||
@Inject
|
||||
public CM_CHAR_POSITION(CharacterService charService) {
|
||||
this.charService = charService;
|
||||
|
||||
@@ -50,6 +50,9 @@ public class CM_CHAR_SELECT extends AbstractClientPacket {
|
||||
*/
|
||||
private int slot;
|
||||
|
||||
/**
|
||||
* @param characterDao the character dao
|
||||
*/
|
||||
@Inject
|
||||
public CM_CHAR_SELECT(CharacterDAO characterDao) {
|
||||
this.characterDao = characterDao;
|
||||
|
||||
@@ -40,6 +40,9 @@ public class CM_ENTER_WORLD extends AbstractClientPacket {
|
||||
*/
|
||||
public static final int OPCODE = 0x11;
|
||||
|
||||
/**
|
||||
* The logger
|
||||
*/
|
||||
private final Logger log = LoggerFactory.getLogger(CM_ENTER_WORLD.class);
|
||||
|
||||
/**
|
||||
@@ -47,6 +50,9 @@ public class CM_ENTER_WORLD extends AbstractClientPacket {
|
||||
*/
|
||||
private final CharacterService characterService;
|
||||
|
||||
/**
|
||||
* @param characterService the character service
|
||||
*/
|
||||
@Inject
|
||||
public CM_ENTER_WORLD(CharacterService characterService) {
|
||||
this.characterService = characterService;
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
* This file is part of l2jserver2 <l2jserver2.com>.
|
||||
*
|
||||
* l2jserver2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* l2jserver2 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with l2jserver2. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jserver.game.net.packet.client;
|
||||
|
||||
import org.jboss.netty.buffer.ChannelBuffer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.l2jserver.game.net.Lineage2Client;
|
||||
import com.l2jserver.game.net.packet.AbstractClientPacket;
|
||||
|
||||
/**
|
||||
* The client is requesting a logout. Currently, when this packet is received
|
||||
* the connection is immediately closed.
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class CM_EXT_REQ_SHORTCUT_REGISTRY extends AbstractClientPacket {
|
||||
/**
|
||||
* The packet OPCODE1
|
||||
*/
|
||||
public static final int OPCODE1 = 0xd0;
|
||||
/**
|
||||
* The packet OPCODE2
|
||||
*/
|
||||
public static final int OPCODE2 = 0x3d;
|
||||
|
||||
/**
|
||||
* The logger
|
||||
*/
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(CM_EXT_REQ_SHORTCUT_REGISTRY.class);
|
||||
|
||||
/**
|
||||
* The shortcut type
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private int type;
|
||||
/**
|
||||
* The shortcut ID
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
private int id;
|
||||
@SuppressWarnings("unused")
|
||||
private int slot;
|
||||
@SuppressWarnings("unused")
|
||||
private int page;
|
||||
@SuppressWarnings("unused")
|
||||
private int lvl;
|
||||
@SuppressWarnings("unused")
|
||||
private int characterType;
|
||||
|
||||
@Override
|
||||
public void read(Lineage2Client conn, ChannelBuffer buffer) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(final Lineage2Client conn) {
|
||||
log.debug("Logging out client {}", conn);
|
||||
conn.close();
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,9 @@ public class CM_GG_KEY extends AbstractClientPacket {
|
||||
*/
|
||||
private byte[] key = new byte[8];
|
||||
|
||||
/**
|
||||
* @param ggService the gameguard service
|
||||
*/
|
||||
@Inject
|
||||
public CM_GG_KEY(GameGuardService ggService) {
|
||||
this.ggService = ggService;
|
||||
|
||||
@@ -48,6 +48,9 @@ public class CM_GOTO_LOBBY extends AbstractClientPacket {
|
||||
*/
|
||||
private final CharacterDAO characterDao;
|
||||
|
||||
/**
|
||||
* @param characterDao the character dao
|
||||
*/
|
||||
@Inject
|
||||
public CM_GOTO_LOBBY(CharacterDAO characterDao) {
|
||||
this.characterDao = characterDao;
|
||||
|
||||
@@ -43,6 +43,9 @@ public class CM_ITEM_DESTROY extends AbstractClientPacket {
|
||||
* The {@link ItemService}
|
||||
*/
|
||||
private final ItemService itemService;
|
||||
/**
|
||||
* The {@link ItemID} provider
|
||||
*/
|
||||
private final ItemIDProvider itemIdProvider;
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,6 +47,9 @@ public class CM_ITEM_DROP extends AbstractClientPacket {
|
||||
* The {@link ItemService}
|
||||
*/
|
||||
private final ItemService itemService;
|
||||
/**
|
||||
* The {@link ItemID} provider
|
||||
*/
|
||||
private final ItemIDProvider itemIdProvider;
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,6 +64,9 @@ public class CM_PROTOCOL_VERSION extends AbstractClientPacket {
|
||||
*/
|
||||
private ProtocolVersion version;
|
||||
|
||||
/**
|
||||
* @param keygen the keygen service
|
||||
*/
|
||||
@Inject
|
||||
public CM_PROTOCOL_VERSION(BlowfishKeygenService keygen) {
|
||||
this.keygen = keygen;
|
||||
@@ -115,8 +118,4 @@ public class CM_PROTOCOL_VERSION extends AbstractClientPacket {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public ProtocolVersion getVersion() {
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,9 @@ public class CM_REQUEST_CHAR_TEMPLATE extends AbstractClientPacket {
|
||||
*/
|
||||
private final CharacterTemplateIDProvider idFactory;
|
||||
|
||||
/**
|
||||
* @param idFactory the character template id provider
|
||||
*/
|
||||
@Inject
|
||||
public CM_REQUEST_CHAR_TEMPLATE(CharacterTemplateIDProvider idFactory) {
|
||||
this.idFactory = idFactory;
|
||||
|
||||
@@ -48,6 +48,10 @@ public class CM_RESTART extends AbstractClientPacket {
|
||||
*/
|
||||
private final CharacterDAO charDao;
|
||||
|
||||
/**
|
||||
* @param charService the character service
|
||||
* @param charDao the character dao
|
||||
*/
|
||||
@Inject
|
||||
public CM_RESTART(CharacterService charService, CharacterDAO charDao) {
|
||||
this.charService = charService;
|
||||
|
||||
@@ -48,12 +48,22 @@ public class SM_ACTOR_ATTACK extends AbstractServerPacket {
|
||||
*/
|
||||
private final List<AttackHit> hits = CollectionFactory.newList();
|
||||
|
||||
/**
|
||||
* @param attacker
|
||||
* the attacked
|
||||
* @param hits
|
||||
* the hits
|
||||
*/
|
||||
public SM_ACTOR_ATTACK(Actor attacker, AttackHit... hits) {
|
||||
super(OPCODE);
|
||||
this.attacker = attacker;
|
||||
Collections.addAll(this.hits, hits);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param hits
|
||||
* the hits
|
||||
*/
|
||||
public SM_ACTOR_ATTACK(AttackHit... hits) {
|
||||
this(hits[0].getAttacker(), hits);
|
||||
}
|
||||
@@ -90,6 +100,13 @@ public class SM_ACTOR_ATTACK extends AbstractServerPacket {
|
||||
buffer.writeInt(first.getTarget().getPoint().getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new hit
|
||||
*
|
||||
* @param hit
|
||||
* the hit
|
||||
* @return this instance
|
||||
*/
|
||||
public SM_ACTOR_ATTACK add(AttackHit hit) {
|
||||
hits.add(hit);
|
||||
return this;
|
||||
|
||||
@@ -54,6 +54,11 @@ public class SM_ACTOR_CHAT extends AbstractServerPacket {
|
||||
*/
|
||||
private int messageID = 0;
|
||||
|
||||
/**
|
||||
* @param character the actor
|
||||
* @param destination the destination
|
||||
* @param message the message
|
||||
*/
|
||||
public SM_ACTOR_CHAT(Actor character, ChatMessageType destination, String message) {
|
||||
super(OPCODE);
|
||||
this.actor = character;
|
||||
@@ -61,6 +66,11 @@ public class SM_ACTOR_CHAT extends AbstractServerPacket {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param actor the actor
|
||||
* @param destination the destination
|
||||
* @param messageID the message id
|
||||
*/
|
||||
public SM_ACTOR_CHAT(Actor actor, ChatMessageType destination, int messageID) {
|
||||
super(OPCODE);
|
||||
this.actor = actor;
|
||||
|
||||
@@ -40,6 +40,10 @@ public class SM_ACTOR_DIE extends AbstractServerPacket {
|
||||
*/
|
||||
private final Actor actor;
|
||||
|
||||
/**
|
||||
* @param actor
|
||||
* the actor
|
||||
*/
|
||||
public SM_ACTOR_DIE(Actor actor) {
|
||||
super(OPCODE);
|
||||
this.actor = actor;
|
||||
|
||||
@@ -45,6 +45,10 @@ public class SM_ACTOR_MOVE extends AbstractServerPacket {
|
||||
*/
|
||||
private Coordinate target;
|
||||
|
||||
/**
|
||||
* @param actor the actor
|
||||
* @param target the target
|
||||
*/
|
||||
public SM_ACTOR_MOVE(Actor actor, Coordinate target) {
|
||||
super(OPCODE);
|
||||
this.actor = actor;
|
||||
|
||||
@@ -39,6 +39,9 @@ public class SM_ACTOR_POSITION extends AbstractServerPacket {
|
||||
*/
|
||||
private final Actor actor;
|
||||
|
||||
/**
|
||||
* @param actor the actor
|
||||
*/
|
||||
public SM_ACTOR_POSITION(Actor actor) {
|
||||
super(OPCODE);
|
||||
this.actor = actor;
|
||||
|
||||
@@ -44,29 +44,151 @@ public class SM_ACTOR_STATUS_UPDATE extends AbstractServerPacket {
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public enum Stat {
|
||||
LEVEL(0x01), EXPERIENCE(0x02), STR(0x03), DEX(0x04), CON(0x05), INT(
|
||||
0x06), WIT(0x07), MEN(0x08),
|
||||
/**
|
||||
* Updates the character level
|
||||
*/
|
||||
LEVEL(0x01),
|
||||
/**
|
||||
* Updates the character experience
|
||||
*/
|
||||
EXPERIENCE(0x02),
|
||||
/**
|
||||
* Updates the character strength
|
||||
*/
|
||||
STR(0x03),
|
||||
/**
|
||||
* Updates the character dexterity
|
||||
*/
|
||||
DEX(0x04),
|
||||
|
||||
HP(0x09), MAX_HP(0x0a), MP(0x0b), MAX_MP(0x0c),
|
||||
/**
|
||||
* Updates the character concentration
|
||||
*/
|
||||
CON(0x05),
|
||||
/**
|
||||
* Updates the character intelligence
|
||||
*/
|
||||
INT(0x06),
|
||||
/**
|
||||
* Updates the character witness
|
||||
*/
|
||||
WIT(0x07),
|
||||
/**
|
||||
* Updates the character mentality
|
||||
*/
|
||||
MEN(0x08),
|
||||
/**
|
||||
* Updates the character hp
|
||||
*/
|
||||
HP(0x09),
|
||||
/**
|
||||
* Updates the character maximum hp
|
||||
*/
|
||||
MAX_HP(0x0a),
|
||||
/**
|
||||
* Updates the character hp
|
||||
*/
|
||||
MP(0x0b),
|
||||
/**
|
||||
* Updates the character maximum mp
|
||||
*/
|
||||
MAX_MP(0x0c),
|
||||
/**
|
||||
* Updates the character sp
|
||||
*/
|
||||
SP(0x0d),
|
||||
/**
|
||||
* Updates the character load
|
||||
*/
|
||||
LOAD(0x0e),
|
||||
/**
|
||||
* Updates the character maximum load
|
||||
*/
|
||||
MAX_LOAD(0x0f),
|
||||
/**
|
||||
* Updates the character physical attack
|
||||
*/
|
||||
PHYSICAL_ATK(0x11),
|
||||
/**
|
||||
* Updates the character attack speed
|
||||
*/
|
||||
ATTACK_SPEED(0x12),
|
||||
/**
|
||||
* Updates the character physical defense
|
||||
*/
|
||||
PHYSICAL_DEFENSE(0x13),
|
||||
/**
|
||||
* Updates the character evasion
|
||||
*/
|
||||
EVASION(0x14),
|
||||
/**
|
||||
* Updates the character accuracy
|
||||
*/
|
||||
ACCURACY(0x15),
|
||||
/**
|
||||
* Updates the character critical
|
||||
*/
|
||||
CRITICAL(0x16),
|
||||
/**
|
||||
* Updates the character magical attack
|
||||
*/
|
||||
MAGICAL_ATTACK(0x17),
|
||||
/**
|
||||
* Updates the character cast speed
|
||||
*/
|
||||
CAST_SPEED(0x18),
|
||||
/**
|
||||
* Updates the character magical defense
|
||||
*/
|
||||
MAGICAL_DEFENSE(0x19),
|
||||
|
||||
SP(0x0d), LOAD(0x0e), MAX_LOAD(0x0f),
|
||||
/**
|
||||
* Updates the character pvp flag
|
||||
*/
|
||||
PVP_FLAG(0x1a),
|
||||
|
||||
PHYSICAL_ATK(0x11), ATTACK_SPEED(0x12), PHYSICAL_DEFENSE(0x13), EVASION(
|
||||
0x14), ACCURACY(0x15), CRITICAL(0x16), MAGICAL_ATTACK(0x17), CAST_SPEED(
|
||||
0x18), MAGICAL_DEFENSE(0x19), PVP_FLAG(0x1a), KARMA(0x1b),
|
||||
/**
|
||||
* Updates the character karma
|
||||
*/
|
||||
KARMA(0x1b),
|
||||
|
||||
CP(0x21), MAX_CP(0x22);
|
||||
/**
|
||||
* Updates the character cp
|
||||
*/
|
||||
CP(0x21),
|
||||
|
||||
/**
|
||||
* Updates the character max cp
|
||||
*/
|
||||
MAX_CP(0x22);
|
||||
|
||||
/**
|
||||
* The stat id
|
||||
*/
|
||||
public final int id;
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* the stat id
|
||||
*/
|
||||
Stat(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The set of updates to be sent
|
||||
*/
|
||||
private final Map<Stat, Integer> update = CollectionFactory.newMap();
|
||||
/**
|
||||
* The actor to be updated
|
||||
*/
|
||||
private final Actor actor;
|
||||
|
||||
/**
|
||||
* @param actor
|
||||
* the actor
|
||||
*/
|
||||
public SM_ACTOR_STATUS_UPDATE(Actor actor) {
|
||||
super(OPCODE);
|
||||
this.actor = actor;
|
||||
@@ -83,6 +205,13 @@ public class SM_ACTOR_STATUS_UPDATE extends AbstractServerPacket {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param stat
|
||||
* the stat
|
||||
* @param value
|
||||
* the stat value
|
||||
* @return this instances
|
||||
*/
|
||||
public SM_ACTOR_STATUS_UPDATE add(Stat stat, int value) {
|
||||
update.put(stat, value);
|
||||
return this;
|
||||
|
||||
@@ -83,11 +83,17 @@ public class SM_CHAR_CREATE_FAIL extends AbstractServerPacket {
|
||||
*/
|
||||
public final int id;
|
||||
|
||||
/**
|
||||
* @param id the reason id
|
||||
*/
|
||||
Reason(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param reason the reason
|
||||
*/
|
||||
public SM_CHAR_CREATE_FAIL(Reason reason) {
|
||||
super(OPCODE);
|
||||
this.reason = reason;
|
||||
|
||||
@@ -37,6 +37,9 @@ public class SM_CHAR_CREATE_OK extends AbstractServerPacket {
|
||||
*/
|
||||
public static final SM_CHAR_CREATE_OK INSTANCE = new SM_CHAR_CREATE_OK();
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*/
|
||||
public SM_CHAR_CREATE_OK() {
|
||||
super(OPCODE);
|
||||
}
|
||||
|
||||
@@ -76,6 +76,9 @@ public class SM_CHAR_INFO extends AbstractServerPacket {
|
||||
*/
|
||||
private L2Character character;
|
||||
|
||||
/**
|
||||
* @param character the character
|
||||
*/
|
||||
public SM_CHAR_INFO(L2Character character) {
|
||||
super(OPCODE);
|
||||
this.character = character;
|
||||
@@ -338,6 +341,16 @@ public class SM_CHAR_INFO extends AbstractServerPacket {
|
||||
buffer.writeInt(0x00); // special effects
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the paperdoll object id
|
||||
*
|
||||
* @param buffer
|
||||
* the buffer
|
||||
* @param character
|
||||
* the character
|
||||
* @param paperdoll
|
||||
* the slot
|
||||
*/
|
||||
private void writePaperdollObjectID(ChannelBuffer buffer,
|
||||
L2Character character, InventoryPaperdoll paperdoll) {
|
||||
final Item item = character.getInventory().getItem(paperdoll);
|
||||
@@ -347,6 +360,16 @@ public class SM_CHAR_INFO extends AbstractServerPacket {
|
||||
buffer.writeInt(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the paperdoll item id
|
||||
*
|
||||
* @param buffer
|
||||
* the buffer
|
||||
* @param character
|
||||
* the character
|
||||
* @param paperdoll
|
||||
* the slot
|
||||
*/
|
||||
private void writePaperdollItemID(ChannelBuffer buffer,
|
||||
L2Character character, InventoryPaperdoll paperdoll) {
|
||||
final Item item = character.getInventory().getItem(paperdoll);
|
||||
@@ -356,6 +379,16 @@ public class SM_CHAR_INFO extends AbstractServerPacket {
|
||||
buffer.writeInt(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the paperdoll augument id
|
||||
*
|
||||
* @param buffer
|
||||
* the buffer
|
||||
* @param character
|
||||
* the character
|
||||
* @param paperdoll
|
||||
* the slot
|
||||
*/
|
||||
private void writePaperdollAugumentID(ChannelBuffer buffer,
|
||||
L2Character character, InventoryPaperdoll paperdoll) {
|
||||
buffer.writeInt(0x00);
|
||||
|
||||
@@ -59,8 +59,15 @@ public class SM_CHAR_INFO_BROADCAST extends AbstractServerPacket {
|
||||
*/
|
||||
public static final int OPCODE = 0x31;
|
||||
|
||||
/**
|
||||
* The character
|
||||
*/
|
||||
private final L2Character character;
|
||||
|
||||
/**
|
||||
* @param character
|
||||
* the character
|
||||
*/
|
||||
public SM_CHAR_INFO_BROADCAST(L2Character character) {
|
||||
super(OPCODE);
|
||||
this.character = character;
|
||||
@@ -248,6 +255,16 @@ public class SM_CHAR_INFO_BROADCAST extends AbstractServerPacket {
|
||||
buffer.writeInt(0x00); // special effect
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the paperdoll item id
|
||||
*
|
||||
* @param buffer
|
||||
* the buffer
|
||||
* @param character
|
||||
* the character
|
||||
* @param paperdoll
|
||||
* the slot
|
||||
*/
|
||||
private void writePaperdollItemID(ChannelBuffer buffer,
|
||||
L2Character character, InventoryPaperdoll paperdoll) {
|
||||
final Item item = character.getInventory().getItem(paperdoll);
|
||||
@@ -257,6 +274,16 @@ public class SM_CHAR_INFO_BROADCAST extends AbstractServerPacket {
|
||||
buffer.writeInt(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the paperdoll augument id
|
||||
*
|
||||
* @param buffer
|
||||
* the buffer
|
||||
* @param character
|
||||
* the character
|
||||
* @param paperdoll
|
||||
* the slot
|
||||
*/
|
||||
private void writePaperdollAugumentID(ChannelBuffer buffer,
|
||||
L2Character character, InventoryPaperdoll paperdoll) {
|
||||
buffer.writeInt(0x00);
|
||||
|
||||
@@ -38,6 +38,9 @@ public class SM_CHAR_INFO_EXTRA extends AbstractServerPacket {
|
||||
*/
|
||||
private L2Character character;
|
||||
|
||||
/**
|
||||
* @param character the character
|
||||
*/
|
||||
public SM_CHAR_INFO_EXTRA(L2Character character) {
|
||||
super(OPCODE);
|
||||
this.character = character;
|
||||
|
||||
@@ -44,6 +44,9 @@ public class SM_CHAR_INVENTORY extends AbstractServerPacket {
|
||||
*/
|
||||
private boolean showWindow = false;
|
||||
|
||||
/**
|
||||
* @param inventory the inventory
|
||||
*/
|
||||
public SM_CHAR_INVENTORY(CharacterInventory inventory) {
|
||||
super(OPCODE);
|
||||
this.inventory = inventory;
|
||||
|
||||
@@ -79,6 +79,16 @@ public class SM_CHAR_LIST extends AbstractServerPacket {
|
||||
*/
|
||||
private final L2Character[] characters;
|
||||
|
||||
/**
|
||||
* @param loginName
|
||||
* the account id
|
||||
* @param sessionId
|
||||
* the session id
|
||||
* @param lastCharacterId
|
||||
* the last character used
|
||||
* @param characters
|
||||
* the characters
|
||||
*/
|
||||
public SM_CHAR_LIST(String loginName, int sessionId, int lastCharacterId,
|
||||
L2Character... characters) {
|
||||
super(OPCODE);
|
||||
@@ -88,12 +98,26 @@ public class SM_CHAR_LIST extends AbstractServerPacket {
|
||||
this.characters = characters;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param session
|
||||
* the session
|
||||
* @param characters
|
||||
* the characters
|
||||
* @return an {@link SM_CHAR_LIST} instance
|
||||
*/
|
||||
public static SM_CHAR_LIST fromL2Session(Lineage2Session session,
|
||||
L2Character... characters) {
|
||||
return new SM_CHAR_LIST(session.getAccountID().getID(),
|
||||
session.getPlayKey2(), -1, characters);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param session
|
||||
* the session
|
||||
* @param characters
|
||||
* the characters
|
||||
* @return an {@link SM_CHAR_LIST} instance
|
||||
*/
|
||||
public static SM_CHAR_LIST fromL2Session(Lineage2Session session,
|
||||
Collection<L2Character> characters) {
|
||||
return fromL2Session(session,
|
||||
@@ -220,6 +244,16 @@ public class SM_CHAR_LIST extends AbstractServerPacket {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the paperdoll item id
|
||||
*
|
||||
* @param buffer
|
||||
* the buffer
|
||||
* @param character
|
||||
* the character
|
||||
* @param paperdoll
|
||||
* the slot
|
||||
*/
|
||||
private void writePaperdollItemID(ChannelBuffer buffer,
|
||||
L2Character character, InventoryPaperdoll paperdoll) {
|
||||
final Item item = character.getInventory().getItem(paperdoll);
|
||||
|
||||
@@ -38,6 +38,9 @@ public class SM_CHAR_MOVE_TYPE extends AbstractServerPacket {
|
||||
*/
|
||||
private final L2Character character;
|
||||
|
||||
/**
|
||||
* @param character the character
|
||||
*/
|
||||
public SM_CHAR_MOVE_TYPE(L2Character character) {
|
||||
super(OPCODE);
|
||||
this.character = character;
|
||||
|
||||
@@ -37,6 +37,9 @@ public class SM_CHAR_OPEN_MAP extends AbstractServerPacket {
|
||||
*/
|
||||
private final int mapID;
|
||||
|
||||
/**
|
||||
* @param mapID the map id
|
||||
*/
|
||||
public SM_CHAR_OPEN_MAP(int mapID) {
|
||||
super(OPCODE);
|
||||
this.mapID = mapID;
|
||||
|
||||
@@ -37,15 +37,25 @@ public class SM_CHAR_RESTART extends AbstractServerPacket {
|
||||
*/
|
||||
private boolean state;
|
||||
|
||||
/**
|
||||
* @param state
|
||||
* the state
|
||||
*/
|
||||
public SM_CHAR_RESTART(boolean state) {
|
||||
super(OPCODE);
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return an OK instance of this packet
|
||||
*/
|
||||
public static SM_CHAR_RESTART ok() {
|
||||
return new SM_CHAR_RESTART(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return an FAILED instance of this packet
|
||||
*/
|
||||
public static SM_CHAR_RESTART denied() {
|
||||
return new SM_CHAR_RESTART(false);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,9 @@ public class SM_CHAR_SELECTED extends AbstractServerPacket {
|
||||
*/
|
||||
private final L2Character character;
|
||||
|
||||
/**
|
||||
* @param character the character
|
||||
*/
|
||||
public SM_CHAR_SELECTED(L2Character character) {
|
||||
super(OPCODE);
|
||||
this.character = character;
|
||||
|
||||
@@ -39,6 +39,10 @@ public class SM_CHAR_SHORTCUT_LIST extends AbstractServerPacket {
|
||||
*/
|
||||
private final CharacterShortcutContainer shortcuts;
|
||||
|
||||
/**
|
||||
* @param shortcuts
|
||||
* the shortcuts container
|
||||
*/
|
||||
public SM_CHAR_SHORTCUT_LIST(CharacterShortcutContainer shortcuts) {
|
||||
super(OPCODE);
|
||||
this.shortcuts = shortcuts;
|
||||
|
||||
@@ -38,6 +38,10 @@ public class SM_CHAR_SHORTCUT_REGISTER extends AbstractServerPacket {
|
||||
*/
|
||||
private final CharacterShortcut shortcut;
|
||||
|
||||
/**
|
||||
* @param shortcut
|
||||
* the shortcut registered
|
||||
*/
|
||||
public SM_CHAR_SHORTCUT_REGISTER(CharacterShortcut shortcut) {
|
||||
super(OPCODE);
|
||||
this.shortcut = shortcut;
|
||||
|
||||
@@ -33,8 +33,14 @@ public class SM_CHAR_STOP extends AbstractServerPacket {
|
||||
*/
|
||||
public static final int OPCODE = 0x47;
|
||||
|
||||
/**
|
||||
* The character
|
||||
*/
|
||||
private L2Character character;
|
||||
|
||||
/**
|
||||
* @param character the character
|
||||
*/
|
||||
public SM_CHAR_STOP(L2Character character) {
|
||||
super(OPCODE);
|
||||
this.character = character;
|
||||
|
||||
@@ -38,14 +38,27 @@ public class SM_CHAR_TARGET extends AbstractServerPacket {
|
||||
* The selected character
|
||||
*/
|
||||
private final Actor object;
|
||||
/**
|
||||
* The name color
|
||||
*/
|
||||
private int color;
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* the target
|
||||
* @param color
|
||||
* the name color
|
||||
*/
|
||||
public SM_CHAR_TARGET(Actor object, int color) {
|
||||
super(OPCODE);
|
||||
this.object = object;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* the target
|
||||
*/
|
||||
public SM_CHAR_TARGET(Actor object) {
|
||||
this(object, 0);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,9 @@ public class SM_CHAR_TARGET_UNSELECT extends AbstractServerPacket {
|
||||
*/
|
||||
private final L2Character character;
|
||||
|
||||
/**
|
||||
* @param character the character
|
||||
*/
|
||||
public SM_CHAR_TARGET_UNSELECT(L2Character character) {
|
||||
super(OPCODE);
|
||||
this.character = character;
|
||||
|
||||
@@ -44,6 +44,10 @@ public class SM_CHAR_TELEPORT extends AbstractServerPacket {
|
||||
*/
|
||||
private final Point3D point;
|
||||
|
||||
/**
|
||||
* @param character the character
|
||||
* @param point the teleport point
|
||||
*/
|
||||
public SM_CHAR_TELEPORT(L2Character character, Point3D point) {
|
||||
super(OPCODE);
|
||||
this.character = character;
|
||||
|
||||
@@ -38,6 +38,9 @@ public class SM_CHAR_TEMPLATE extends AbstractServerPacket {
|
||||
*/
|
||||
private CharacterTemplate[] templates;
|
||||
|
||||
/**
|
||||
* @param templates the character templates
|
||||
*/
|
||||
public SM_CHAR_TEMPLATE(CharacterTemplate... templates) {
|
||||
super(OPCODE);
|
||||
this.templates = templates;
|
||||
|
||||
@@ -41,16 +41,25 @@ public class SM_COMMUNITY_HTML extends AbstractServerPacket {
|
||||
*/
|
||||
private final String html;
|
||||
|
||||
/**
|
||||
* @param html the html
|
||||
*/
|
||||
public SM_COMMUNITY_HTML(String html) {
|
||||
super(OPCODE);
|
||||
this.html = html;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param html the html
|
||||
*/
|
||||
public SM_COMMUNITY_HTML(Html html) {
|
||||
super(OPCODE);
|
||||
this.html = html.toHtml();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param template the html template
|
||||
*/
|
||||
public SM_COMMUNITY_HTML(HtmlTemplate template) {
|
||||
super(OPCODE);
|
||||
this.html = template.toHtmlString();
|
||||
|
||||
@@ -33,6 +33,9 @@ public class SM_FORT_INFO extends AbstractServerPacket {
|
||||
*/
|
||||
public static final int OPCODE = 0xfe;
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*/
|
||||
public SM_FORT_INFO() {
|
||||
super(OPCODE);
|
||||
}
|
||||
|
||||
@@ -33,9 +33,15 @@ public class SM_GG_QUERY extends AbstractServerPacket {
|
||||
* The packet OPCODE
|
||||
*/
|
||||
public static final int OPCODE = 0x74;
|
||||
|
||||
/**
|
||||
* The GG key
|
||||
*/
|
||||
private final int[] key;
|
||||
|
||||
/**
|
||||
* @param key
|
||||
* the game guard key
|
||||
*/
|
||||
public SM_GG_QUERY(int[] key) {
|
||||
super(OPCODE);
|
||||
Preconditions.checkArgument(key.length == 4,
|
||||
@@ -43,6 +49,16 @@ public class SM_GG_QUERY extends AbstractServerPacket {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param key1
|
||||
* the game guard key 1
|
||||
* @param key2
|
||||
* the game guard key 2
|
||||
* @param key3
|
||||
* the game guard key 3
|
||||
* @param key4
|
||||
* the game guard key 4
|
||||
*/
|
||||
public SM_GG_QUERY(int key1, int key2, int key3, int key4) {
|
||||
super(OPCODE);
|
||||
this.key = new int[4];
|
||||
|
||||
@@ -45,32 +45,62 @@ public class SM_HTML extends AbstractServerPacket {
|
||||
*/
|
||||
private final String html;
|
||||
|
||||
/**
|
||||
* @param npc
|
||||
* the npc instance
|
||||
* @param html
|
||||
* the html
|
||||
*/
|
||||
public SM_HTML(NPC npc, String html) {
|
||||
super(OPCODE);
|
||||
this.npc = npc;
|
||||
this.html = html;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param npc
|
||||
* the npc instance
|
||||
* @param html
|
||||
* the html
|
||||
*/
|
||||
public SM_HTML(NPC npc, Html html) {
|
||||
super(OPCODE);
|
||||
this.npc = npc;
|
||||
this.html = html.toHtml();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param npc
|
||||
* the npc instance
|
||||
* @param template
|
||||
* the html template
|
||||
*/
|
||||
public SM_HTML(NPC npc, HtmlTemplate template) {
|
||||
super(OPCODE);
|
||||
this.npc = npc;
|
||||
this.html = template.toHtmlString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param html
|
||||
* the html
|
||||
*/
|
||||
public SM_HTML(String html) {
|
||||
this(null, html);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param html
|
||||
* the html
|
||||
*/
|
||||
public SM_HTML(Html html) {
|
||||
this(null, html);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param template
|
||||
* the html template
|
||||
*/
|
||||
public SM_HTML(HtmlTemplate template) {
|
||||
this(null, template);
|
||||
}
|
||||
|
||||
@@ -32,9 +32,14 @@ public class SM_ITEM_GROUND extends AbstractServerPacket {
|
||||
* The packet OPCODE
|
||||
*/
|
||||
public static final int OPCODE = 0x16;
|
||||
|
||||
/**
|
||||
* The item that is on the ground
|
||||
*/
|
||||
private final Item item;
|
||||
|
||||
/**
|
||||
* @param item the item that is on the ground
|
||||
*/
|
||||
public SM_ITEM_GROUND(Item item) {
|
||||
super(OPCODE);
|
||||
this.item = item;
|
||||
|
||||
@@ -49,6 +49,12 @@ public class SM_KEY extends AbstractServerPacket {
|
||||
*/
|
||||
private boolean status;
|
||||
|
||||
/**
|
||||
* @param key
|
||||
* the cryptography key
|
||||
* @param status
|
||||
* the status
|
||||
*/
|
||||
public SM_KEY(Lineage2CryptographyKey key, boolean status) {
|
||||
super(OPCODE);
|
||||
this.key = Arrays.copyOfRange(key.key, 0, 8);
|
||||
|
||||
@@ -38,6 +38,9 @@ public class SM_MANOR_LIST extends AbstractServerPacket {
|
||||
*/
|
||||
private String[] manors;
|
||||
|
||||
/**
|
||||
* @param manors the manors
|
||||
*/
|
||||
public SM_MANOR_LIST(String... manors) {
|
||||
super(OPCODE);
|
||||
this.manors = manors;
|
||||
|
||||
@@ -34,9 +34,14 @@ public class SM_NPC_INFO extends AbstractServerPacket {
|
||||
* The packet OPCODE
|
||||
*/
|
||||
public static final int OPCODE = 0x0c;
|
||||
|
||||
/**
|
||||
* The {@link NPC}
|
||||
*/
|
||||
private final NPC npc;
|
||||
|
||||
/**
|
||||
* @param npc the npc
|
||||
*/
|
||||
public SM_NPC_INFO(NPC npc) {
|
||||
super(OPCODE);
|
||||
this.npc = npc;
|
||||
|
||||
@@ -39,6 +39,10 @@ public class SM_OBJECT_REMOVE extends AbstractServerPacket {
|
||||
*/
|
||||
private final PositionableObject object;
|
||||
|
||||
/**
|
||||
* @param object
|
||||
* the object to be removed
|
||||
*/
|
||||
public SM_OBJECT_REMOVE(PositionableObject object) {
|
||||
super(OPCODE);
|
||||
this.object = object;
|
||||
|
||||
@@ -35,9 +35,15 @@ public class SM_SERVER_OBJECT extends AbstractServerPacket {
|
||||
* The packet OPCODE
|
||||
*/
|
||||
public static final int OPCODE = 0x92;
|
||||
|
||||
/**
|
||||
* The {@link NPC}
|
||||
*/
|
||||
private final NPC npc;
|
||||
|
||||
/**
|
||||
* @param npc
|
||||
* the npc
|
||||
*/
|
||||
public SM_SERVER_OBJECT(NPC npc) {
|
||||
super(OPCODE);
|
||||
this.npc = npc;
|
||||
|
||||
@@ -23,12 +23,14 @@ import org.jboss.netty.buffer.ChannelBuffer;
|
||||
import com.l2jserver.game.net.Lineage2Client;
|
||||
import com.l2jserver.game.net.SystemMessage;
|
||||
import com.l2jserver.game.net.packet.AbstractServerPacket;
|
||||
import com.l2jserver.model.game.Castle;
|
||||
import com.l2jserver.model.game.Fort;
|
||||
import com.l2jserver.model.game.Skill;
|
||||
import com.l2jserver.model.template.SkillTemplate;
|
||||
import com.l2jserver.model.template.item.ItemTemplate;
|
||||
import com.l2jserver.model.world.Actor;
|
||||
import com.l2jserver.model.world.Item;
|
||||
import com.l2jserver.model.world.NPC;
|
||||
import com.l2jserver.util.BufferUtils;
|
||||
import com.l2jserver.util.factory.CollectionFactory;
|
||||
|
||||
@@ -54,22 +56,69 @@ public class SM_SYSTEM_MESSAGE extends AbstractServerPacket {
|
||||
private List<SystemMessagePacketParameter> params = CollectionFactory
|
||||
.newList();
|
||||
|
||||
/**
|
||||
* System message parameter IDs
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface SystemMessagePacketParameter {
|
||||
/**
|
||||
* String parameter
|
||||
*/
|
||||
public static final byte TYPE_SYSTEM_STRING = 13;
|
||||
/**
|
||||
* Player name parameter
|
||||
*/
|
||||
public static final byte TYPE_PLAYER_NAME = 12;
|
||||
// id 11 - unknown
|
||||
/**
|
||||
* Instance name parameter
|
||||
*/
|
||||
public static final byte TYPE_INSTANCE_NAME = 10;
|
||||
/**
|
||||
* Element name parameter
|
||||
*/
|
||||
public static final byte TYPE_ELEMENT_NAME = 9;
|
||||
// id 8 - same as 3
|
||||
/**
|
||||
* Zone name parameter
|
||||
*/
|
||||
public static final byte TYPE_ZONE_NAME = 7;
|
||||
/**
|
||||
* {@link Item} number parameter
|
||||
*/
|
||||
public static final byte TYPE_ITEM_NUMBER = 6;
|
||||
/**
|
||||
* {@link Castle} name parameter
|
||||
*/
|
||||
public static final byte TYPE_CASTLE_NAME = 5;
|
||||
/**
|
||||
* {@link Skill} name parameter
|
||||
*/
|
||||
public static final byte TYPE_SKILL_NAME = 4;
|
||||
/**
|
||||
* {@link Item} name parameter
|
||||
*/
|
||||
public static final byte TYPE_ITEM_NAME = 3;
|
||||
/**
|
||||
* {@link NPC} name parameter
|
||||
*/
|
||||
public static final byte TYPE_NPC_NAME = 2;
|
||||
/**
|
||||
* Number parameter
|
||||
*/
|
||||
public static final byte TYPE_NUMBER = 1;
|
||||
/**
|
||||
* Text parameter
|
||||
*/
|
||||
public static final byte TYPE_TEXT = 0;
|
||||
|
||||
/**
|
||||
* @param conn
|
||||
* the connection
|
||||
* @param buffer
|
||||
* the buffer
|
||||
*/
|
||||
void write(Lineage2Client conn, ChannelBuffer buffer);
|
||||
}
|
||||
|
||||
@@ -93,6 +142,13 @@ public class SM_SYSTEM_MESSAGE extends AbstractServerPacket {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an string parameter
|
||||
*
|
||||
* @param text
|
||||
* the text
|
||||
* @return this instance
|
||||
*/
|
||||
public final SM_SYSTEM_MESSAGE addString(final String text) {
|
||||
params.add(new SystemMessagePacketParameter() {
|
||||
@Override
|
||||
@@ -126,6 +182,13 @@ public class SM_SYSTEM_MESSAGE extends AbstractServerPacket {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an number parameter
|
||||
*
|
||||
* @param number
|
||||
* the number
|
||||
* @return this instance
|
||||
*/
|
||||
public final SM_SYSTEM_MESSAGE addNumber(final int number) {
|
||||
params.add(new SystemMessagePacketParameter() {
|
||||
@Override
|
||||
@@ -137,6 +200,13 @@ public class SM_SYSTEM_MESSAGE extends AbstractServerPacket {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an item count parameter
|
||||
*
|
||||
* @param number
|
||||
* the number
|
||||
* @return this instance
|
||||
*/
|
||||
public final SM_SYSTEM_MESSAGE addItemCount(final long number) {
|
||||
params.add(new SystemMessagePacketParameter() {
|
||||
@Override
|
||||
@@ -148,6 +218,13 @@ public class SM_SYSTEM_MESSAGE extends AbstractServerPacket {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an the actor name
|
||||
*
|
||||
* @param actor
|
||||
* the actor
|
||||
* @return this instance
|
||||
*/
|
||||
public final SM_SYSTEM_MESSAGE addActorName(final Actor actor) {
|
||||
// params.add(new SystemMessagePacketParameter() {
|
||||
// @Override
|
||||
@@ -160,6 +237,13 @@ public class SM_SYSTEM_MESSAGE extends AbstractServerPacket {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the item name
|
||||
*
|
||||
* @param item
|
||||
* the item
|
||||
* @return this instance
|
||||
*/
|
||||
public final SM_SYSTEM_MESSAGE addItem(final ItemTemplate item) {
|
||||
params.add(new SystemMessagePacketParameter() {
|
||||
@Override
|
||||
@@ -171,10 +255,29 @@ public class SM_SYSTEM_MESSAGE extends AbstractServerPacket {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the item name
|
||||
*
|
||||
* @param item
|
||||
* the item
|
||||
* @return this instance
|
||||
*/
|
||||
public final SM_SYSTEM_MESSAGE addItem(final Item item) {
|
||||
return addItem(item.getTemplateID().getTemplate());
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the zone name
|
||||
*
|
||||
* @param x
|
||||
* the x
|
||||
* @param y
|
||||
* the y
|
||||
* @param z
|
||||
* the z
|
||||
*
|
||||
* @return this instance
|
||||
*/
|
||||
public final SM_SYSTEM_MESSAGE addZoneName(final int x, final int y,
|
||||
final int z) {
|
||||
params.add(new SystemMessagePacketParameter() {
|
||||
@@ -189,6 +292,13 @@ public class SM_SYSTEM_MESSAGE extends AbstractServerPacket {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param skill
|
||||
* the skill template
|
||||
* @param level
|
||||
* the skill level
|
||||
* @return this instance
|
||||
*/
|
||||
public final SM_SYSTEM_MESSAGE addSkill(final SkillTemplate skill,
|
||||
final int level) {
|
||||
params.add(new SystemMessagePacketParameter() {
|
||||
@@ -202,6 +312,11 @@ public class SM_SYSTEM_MESSAGE extends AbstractServerPacket {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param skill
|
||||
* the skill
|
||||
* @return this instance
|
||||
*/
|
||||
public final SM_SYSTEM_MESSAGE addSkill(final Skill skill) {
|
||||
return addSkill(skill.getTemplate(), skill.getLevel());
|
||||
}
|
||||
|
||||
@@ -32,6 +32,9 @@ import com.l2jserver.model.id.provider.IDProvider;
|
||||
*/
|
||||
public class CharacterShortcutID extends
|
||||
AbstractModelID<Integer, CharacterShortcut> {
|
||||
/**
|
||||
* The {@link CharacterShortcutDAO} instance
|
||||
*/
|
||||
private final CharacterShortcutDAO shortcutDao;
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,13 +44,25 @@ import com.l2jserver.util.jaxb.SkillTemplateIDAdapter;
|
||||
@XmlType(namespace = "http://schemas.l2jserver2.com/skill", name = "SkillType")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
public class SkillTemplate extends AbstractTemplate {
|
||||
/**
|
||||
* The skill id
|
||||
*/
|
||||
@XmlAttribute(name = "id", required = true)
|
||||
@XmlJavaTypeAdapter(value = SkillTemplateIDAdapter.class)
|
||||
protected SkillTemplateID id;
|
||||
/**
|
||||
* The skill name
|
||||
*/
|
||||
@XmlAttribute(name = "name", required = true)
|
||||
protected String name;
|
||||
/**
|
||||
* The skill delay
|
||||
*/
|
||||
@XmlAttribute(name = "delay")
|
||||
protected int delay;
|
||||
/**
|
||||
* The skill cooldown
|
||||
*/
|
||||
@XmlAttribute(name = "cooldown")
|
||||
protected int cooldown;
|
||||
|
||||
@@ -59,6 +71,9 @@ public class SkillTemplate extends AbstractTemplate {
|
||||
*/
|
||||
protected int maximumLevel = 1;
|
||||
|
||||
/**
|
||||
* The skill effects
|
||||
*/
|
||||
@XmlElements({ @XmlElement(name = "teleport", type = TeleportEffectTemplate.class) })
|
||||
protected EffectTemplate[] effects;
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "CharacterClassType")
|
||||
@SuppressWarnings("javadoc")
|
||||
public enum CharacterClass {
|
||||
/**
|
||||
* Human fighter
|
||||
|
||||
@@ -8,6 +8,7 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "CharacterRaceType")
|
||||
@SuppressWarnings("javadoc")
|
||||
public enum CharacterRace {
|
||||
HUMAN(0x00), ELF(0x01), DARK_ELF(0x02), ORC(0x03), DWARF(0x04), KAMAEL(0x05);
|
||||
|
||||
|
||||
@@ -39,129 +39,291 @@ import com.l2jserver.util.jaxb.CharacterTemplateIDAdapter;
|
||||
@XmlType(namespace = "http://schemas.l2jserver2.com/character", name = "CharacterType")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
public class CharacterTemplate extends ActorTemplate<L2Character> {
|
||||
/**
|
||||
* The character templat eid
|
||||
*/
|
||||
@XmlJavaTypeAdapter(CharacterTemplateIDAdapter.class)
|
||||
@XmlAttribute(name = "class", required = true)
|
||||
protected CharacterTemplateID id = null;
|
||||
|
||||
/**
|
||||
* The character stats
|
||||
*/
|
||||
@XmlElement(name = "stats", required = true)
|
||||
protected CharacterStatsMetadata stats = null;
|
||||
|
||||
/**
|
||||
* Defines the character stats
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "CharacterStatsType")
|
||||
protected static class CharacterStatsMetadata {
|
||||
/**
|
||||
* The character level
|
||||
*/
|
||||
@XmlAttribute(name = "level", required = true)
|
||||
protected int level = 0;
|
||||
/**
|
||||
* Whether the character is an crafter or not
|
||||
*/
|
||||
@XmlAttribute(name = "crafter", required = false)
|
||||
protected boolean crafter = false;
|
||||
|
||||
/**
|
||||
* The character HP descriptor
|
||||
*/
|
||||
@XmlElement(name = "hp", required = true)
|
||||
protected Stat hp = null;
|
||||
/**
|
||||
* The character MP descriptor
|
||||
*/
|
||||
@XmlElement(name = "mp", required = true)
|
||||
protected Stat mp = null;
|
||||
/**
|
||||
* The character CP descriptor
|
||||
*/
|
||||
@XmlElement(name = "cp", required = true)
|
||||
protected Stat cp = null;
|
||||
|
||||
/**
|
||||
* Describes an character stat (HP, MP or CP)
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "")
|
||||
protected static class Stat {
|
||||
/**
|
||||
* The base value
|
||||
*/
|
||||
@XmlAttribute(name = "base", required = true)
|
||||
protected double base = 0;
|
||||
/**
|
||||
* The value modified
|
||||
*/
|
||||
@XmlAttribute(name = "modifier", required = true)
|
||||
protected double modifier = 0;
|
||||
/**
|
||||
* The value add
|
||||
*/
|
||||
@XmlAttribute(name = "add", required = true)
|
||||
protected double add = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The character attack data
|
||||
*/
|
||||
@XmlElement(name = "attack", required = true)
|
||||
protected AttackMetadata attack = null;
|
||||
|
||||
/**
|
||||
* Defines the character attack data
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "CharacterAttackType")
|
||||
protected static class AttackMetadata {
|
||||
/**
|
||||
* The character evasion
|
||||
*/
|
||||
@XmlAttribute(name = "evasion", required = true)
|
||||
protected int evasion = 0;
|
||||
/**
|
||||
* The character critical chance
|
||||
*/
|
||||
@XmlAttribute(name = "critical", required = true)
|
||||
protected int critical = 0;
|
||||
/**
|
||||
* The character accuracy
|
||||
*/
|
||||
@XmlAttribute(name = "accuracy", required = true)
|
||||
protected int accuracy = 0;
|
||||
|
||||
/**
|
||||
* The character physical attack data
|
||||
*/
|
||||
@XmlElement(name = "physical", required = true)
|
||||
protected AttackValueMetadata physical = null;
|
||||
/**
|
||||
* The character magical attack data
|
||||
*/
|
||||
@XmlElement(name = "magical", required = true)
|
||||
protected AttackValueMetadata magical = null;
|
||||
|
||||
/**
|
||||
* Defines an attack attribute
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "")
|
||||
protected static class AttackValueMetadata {
|
||||
/**
|
||||
* The damage dealt
|
||||
*/
|
||||
@XmlAttribute(name = "damage", required = true)
|
||||
protected double damage = 0;
|
||||
/**
|
||||
* The attack speed
|
||||
*/
|
||||
@XmlAttribute(name = "speed", required = true)
|
||||
protected double speed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The character defense data
|
||||
*/
|
||||
@XmlElement(name = "defense", required = true)
|
||||
protected DefenseMetadata defense = null;
|
||||
|
||||
/**
|
||||
* Defines the character defense data
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "CharacterDefenseType")
|
||||
protected static class DefenseMetadata {
|
||||
/**
|
||||
* The character physical defense
|
||||
*/
|
||||
@XmlElement(name = "physical", required = true)
|
||||
protected DefenseValueMetadata physical = null;
|
||||
/**
|
||||
* The character magical defense
|
||||
*/
|
||||
@XmlElement(name = "magical", required = true)
|
||||
protected DefenseValueMetadata magical = null;
|
||||
|
||||
/**
|
||||
* Defines an defense attribute
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "")
|
||||
protected static class DefenseValueMetadata {
|
||||
/**
|
||||
* The defense value
|
||||
*/
|
||||
@XmlAttribute(name = "value", required = true)
|
||||
protected double value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The charatcer movement medatata
|
||||
*/
|
||||
@XmlElement(name = "move", required = true)
|
||||
protected MoveMetadata move = null;
|
||||
|
||||
/**
|
||||
* Defines the character movement
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "CharacterMovementType")
|
||||
protected static class MoveMetadata {
|
||||
/**
|
||||
* The run speed
|
||||
*/
|
||||
@XmlAttribute(name = "run", required = true)
|
||||
protected double run = 0;
|
||||
/**
|
||||
* The walk speed
|
||||
*/
|
||||
@XmlAttribute(name = "walk", required = true)
|
||||
protected double walk = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The character base stats
|
||||
*/
|
||||
@XmlElement(name = "base", required = true)
|
||||
protected BaseMetadata base = null;
|
||||
|
||||
/**
|
||||
* Defines an character base stats
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "CharacterBaseStatsType")
|
||||
protected static class BaseMetadata {
|
||||
/**
|
||||
* The intelligence
|
||||
*/
|
||||
@XmlAttribute(name = "int", required = true)
|
||||
protected int intelligence = 0;
|
||||
/**
|
||||
* The strength
|
||||
*/
|
||||
@XmlAttribute(name = "str", required = true)
|
||||
protected int strength = 0;
|
||||
/**
|
||||
* The concentration
|
||||
*/
|
||||
@XmlAttribute(name = "con", required = true)
|
||||
protected int concentration = 0;
|
||||
/**
|
||||
* The mentality
|
||||
*/
|
||||
@XmlAttribute(name = "men", required = true)
|
||||
protected int mentality = 0;
|
||||
/**
|
||||
* The dexterity
|
||||
*/
|
||||
@XmlAttribute(name = "dex", required = true)
|
||||
protected int dexterity = 0;
|
||||
/**
|
||||
* The witness
|
||||
*/
|
||||
@XmlAttribute(name = "wit", required = true)
|
||||
protected int witness = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The character maximum load
|
||||
*/
|
||||
@XmlElement(name = "maxload", required = true)
|
||||
protected int maximumLoad = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The character collision data
|
||||
*/
|
||||
@XmlElement(name = "collision", required = true)
|
||||
protected CollitionMetadataContainer collision = null;
|
||||
|
||||
/**
|
||||
* Defines the character collision data
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "CharacterCollisionType")
|
||||
protected static class CollitionMetadataContainer {
|
||||
/**
|
||||
* Collision data for male characters
|
||||
*/
|
||||
@XmlElement(name = "male", required = true)
|
||||
protected CollisionMetadata male = null;
|
||||
|
||||
/**
|
||||
* Collision data for female characters
|
||||
*/
|
||||
@XmlElement(name = "female", required = true)
|
||||
protected CollisionMetadata female = null;
|
||||
|
||||
/**
|
||||
* Defines an collision data
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "")
|
||||
protected static class CollisionMetadata {
|
||||
/**
|
||||
* The character radius
|
||||
*/
|
||||
@XmlAttribute(name = "radius", required = true)
|
||||
protected double radius = 0;
|
||||
/**
|
||||
* The character height
|
||||
*/
|
||||
@XmlAttribute(name = "heigth", required = true)
|
||||
protected double height = 0;
|
||||
}
|
||||
|
||||
@@ -36,10 +36,16 @@ import com.l2jserver.util.jaxb.EffectTemplateIDAdapter;
|
||||
@XmlType(name = "Effect")
|
||||
@XmlSeeAlso({ TeleportEffectTemplate.class })
|
||||
public abstract class EffectTemplate implements Template {
|
||||
/**
|
||||
* The effect template ID
|
||||
*/
|
||||
@XmlAttribute(name = "id")
|
||||
@XmlJavaTypeAdapter(EffectTemplateIDAdapter.class)
|
||||
protected EffectTemplateID id;
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*/
|
||||
protected EffectTemplate() {
|
||||
this.id = null;
|
||||
}
|
||||
|
||||
@@ -39,12 +39,34 @@ import com.l2jserver.util.jaxb.CoordinateAdapter;
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "TeleportEffect")
|
||||
public class TeleportEffectTemplate extends EffectTemplate {
|
||||
/**
|
||||
* The teleportation type
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public enum SkillTeleportEffectLocation {
|
||||
TARGET, OFFSET_FROM_TARGET, POINT;
|
||||
/**
|
||||
* Teleports the caster to the current target
|
||||
*/
|
||||
TARGET,
|
||||
/**
|
||||
* Teleports the caster to an offset from the target
|
||||
*/
|
||||
OFFSET_FROM_TARGET,
|
||||
/**
|
||||
* Teleports the caster to an fixed point
|
||||
*/
|
||||
POINT;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of teleportation
|
||||
*/
|
||||
@XmlAttribute(name = "type", required = false)
|
||||
private SkillTeleportEffectLocation type = SkillTeleportEffectLocation.TARGET;
|
||||
/**
|
||||
* The point (only of <code>type</code> is {@link SkillTeleportEffectLocation#POINT})
|
||||
*/
|
||||
@XmlElement(name = "point")
|
||||
@XmlJavaTypeAdapter(CoordinateAdapter.class)
|
||||
private Coordinate coordinate;
|
||||
|
||||
@@ -25,5 +25,24 @@ import javax.xml.bind.annotation.XmlType;
|
||||
*/
|
||||
@XmlType(name = "ArmorType")
|
||||
public enum ArmorType {
|
||||
NONE, LIGHT, HEAVY, MAGIC, SIGILO;
|
||||
/**
|
||||
* No armor type
|
||||
*/
|
||||
NONE,
|
||||
/**
|
||||
* Light armor type
|
||||
*/
|
||||
LIGHT,
|
||||
/**
|
||||
* Heavy armor type
|
||||
*/
|
||||
HEAVY,
|
||||
/**
|
||||
* Magic armor type
|
||||
*/
|
||||
MAGIC,
|
||||
/**
|
||||
* Unknown
|
||||
*/
|
||||
SIGILO;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,12 @@ package com.l2jserver.model.template.item;
|
||||
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* The material the item is made off
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@SuppressWarnings("javadoc")
|
||||
@XmlType(name = "ItemMaterialType")
|
||||
public enum ItemMaterial {
|
||||
COTTON, WOOD, PAPER, FISH, ORIHARUKON, HORN, ADAMANTAITE, CHRYSOLITE, MITHRIL, COBWEB, RUNE_XP, CLOTH, SCALE_OF_DRAGON, BONE, GOLD, LEATHER, FINE_STEEL, SILVER, DYESTUFF, CRYSTAL, RUNE_REMOVE_PENALTY, STEEL, BRONZE, RUNE_SP, LIQUID, BLOOD_STEEL, DAMASCUS;
|
||||
|
||||
@@ -50,63 +50,148 @@ public class ItemTemplate extends AbstractTemplate {
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(ItemTemplate.class);
|
||||
|
||||
/**
|
||||
* The Item Template ID
|
||||
*/
|
||||
@XmlAttribute(name = "id", required = true)
|
||||
@XmlJavaTypeAdapter(ItemTemplateIDAdapter.class)
|
||||
protected ItemTemplateID id;
|
||||
|
||||
/**
|
||||
* The item name
|
||||
*/
|
||||
@XmlAttribute(name = "name", required = true)
|
||||
protected String name;
|
||||
/**
|
||||
* The item weight
|
||||
*/
|
||||
@XmlElement(name = "weight", required = true)
|
||||
protected int weight = 0;
|
||||
/**
|
||||
* The item price
|
||||
*/
|
||||
@XmlElement(name = "price", required = true)
|
||||
protected int price = 0;
|
||||
/**
|
||||
* The item icon
|
||||
*/
|
||||
@XmlElement(name = "icon", required = false)
|
||||
protected String icon;
|
||||
/**
|
||||
* The item effects
|
||||
*/
|
||||
@XmlElement(name = "effect", required = false)
|
||||
protected EffectContainer effect;
|
||||
|
||||
/**
|
||||
* Effect container for items
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "ItemEffectsType")
|
||||
private static class EffectContainer {
|
||||
/**
|
||||
* The effect type
|
||||
*/
|
||||
@XmlAttribute(name = "type", required = true)
|
||||
protected EffectType effect;
|
||||
}
|
||||
|
||||
/**
|
||||
* The item stats container
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "ItemStatsType")
|
||||
protected static class StatsContainer {
|
||||
/**
|
||||
* The weapon's physical damage
|
||||
*/
|
||||
@XmlElement(name = "physicalDamage", required = false)
|
||||
protected StatAttribute physicalDamage;
|
||||
/**
|
||||
* The weapons's magical damage
|
||||
*/
|
||||
@XmlElement(name = "magicalDamage", required = false)
|
||||
protected StatAttribute magicalDamage;
|
||||
/**
|
||||
* The weapon's critical chance
|
||||
*/
|
||||
@XmlElement(name = "criticalChance", required = false)
|
||||
protected StatAttribute criticalChance;
|
||||
/**
|
||||
* The weapon's physical attack speed
|
||||
*/
|
||||
@XmlElement(name = "physicalAttackSpeed", required = false)
|
||||
protected StatAttribute physicalAttackSpeed;
|
||||
}
|
||||
|
||||
/**
|
||||
* The item stats
|
||||
*/
|
||||
@XmlElement(name = "stats", required = false)
|
||||
protected StatsContainer stats;
|
||||
|
||||
/**
|
||||
* The item material
|
||||
*/
|
||||
@XmlElement(name = "material", required = true)
|
||||
protected ItemMaterial material;
|
||||
|
||||
/**
|
||||
* The item effect type
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "ItemEffectType")
|
||||
public enum EffectType {
|
||||
/**
|
||||
* The effect is applied immediately once used
|
||||
*/
|
||||
IMMEDIATE;
|
||||
}
|
||||
|
||||
/**
|
||||
* The item type
|
||||
*/
|
||||
protected ItemType itemType = ItemType.NONE;
|
||||
/**
|
||||
* The weapon type
|
||||
*/
|
||||
protected WeaponType weaponType = WeaponType.NONE;
|
||||
/**
|
||||
* The armor type
|
||||
*/
|
||||
protected ArmorType armorType = ArmorType.NONE;
|
||||
|
||||
/**
|
||||
* An item stat attribute
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "ItemAttributeType")
|
||||
public static class StatAttribute {
|
||||
/**
|
||||
* The set
|
||||
*/
|
||||
@XmlElement(name = "set", required = true)
|
||||
protected StatSet set;
|
||||
|
||||
/**
|
||||
* Defines an SET calculator function
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "")
|
||||
public static class StatSet {
|
||||
/**
|
||||
* The execution order
|
||||
*/
|
||||
@XmlAttribute(name = "order", required = true)
|
||||
protected int order;
|
||||
/**
|
||||
* The value to be set
|
||||
*/
|
||||
@XmlValue
|
||||
protected double value;
|
||||
|
||||
|
||||
@@ -128,8 +128,31 @@ public enum ItemType {
|
||||
/**
|
||||
* Bolt? unk.
|
||||
*/
|
||||
BOLT(26), SCRL_INC_ENCHANT_PROP_WP(27), SCRL_INC_ENCHANT_PROP_AM(28), ANCIENT_CRYSTAL_ENCHANT_WP(
|
||||
29), ANCIENT_CRYSTAL_ENCHANT_AM(30), RUNE_SELECT(31), RUNE(32);
|
||||
BOLT(26),
|
||||
/**
|
||||
* Scoll
|
||||
*/
|
||||
SCRL_INC_ENCHANT_PROP_WP(27),
|
||||
/**
|
||||
* Scroll
|
||||
*/
|
||||
SCRL_INC_ENCHANT_PROP_AM(28),
|
||||
/**
|
||||
* Ancient crystal enchant weapon
|
||||
*/
|
||||
ANCIENT_CRYSTAL_ENCHANT_WP(29),
|
||||
/**
|
||||
* Ancient crystal enchant armor
|
||||
*/
|
||||
ANCIENT_CRYSTAL_ENCHANT_AM(30),
|
||||
/**
|
||||
* Rune select
|
||||
*/
|
||||
RUNE_SELECT(31),
|
||||
/**
|
||||
* Rune
|
||||
*/
|
||||
RUNE(32);
|
||||
|
||||
/**
|
||||
* The packet id for this item type
|
||||
|
||||
@@ -22,6 +22,7 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCRaceType")
|
||||
@SuppressWarnings("javadoc")
|
||||
public enum NPCRace {
|
||||
// character races
|
||||
HUMAN, ELVEN, DARKELVEN, ORC, DWARVEN, KAMAEL,
|
||||
|
||||
@@ -51,241 +51,539 @@ import com.l2jserver.util.jaxb.SkillTemplateIDAdapter;
|
||||
@XmlType(namespace = "http://schemas.l2jserver2.com/npc", name = "NPCType")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
/**
|
||||
* The template ID
|
||||
*/
|
||||
@XmlAttribute(name = "id", required = true)
|
||||
@XmlJavaTypeAdapter(value = NPCTemplateIDAdapter.class)
|
||||
protected NPCTemplateID id = null;
|
||||
/**
|
||||
* The {@link NPC} controller class
|
||||
*/
|
||||
@XmlAttribute(name = "controller", required = true)
|
||||
protected Class<? extends NPCController> controller;
|
||||
|
||||
/**
|
||||
* The {@link NPC} information metadata
|
||||
*/
|
||||
@XmlElement(name = "info", required = true)
|
||||
protected NPCInformationMetadata info = null;
|
||||
|
||||
/**
|
||||
* The {@link NPC} information metadata model
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCInfoType")
|
||||
protected static class NPCInformationMetadata {
|
||||
/**
|
||||
* The {@link NPC} name metadata
|
||||
*/
|
||||
@XmlElement(name = "name", required = false)
|
||||
public NPCNameMetadata nameMetadata = null;
|
||||
|
||||
/**
|
||||
* Defines the {@link NPC}'s name information
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCNameType")
|
||||
protected static class NPCNameMetadata {
|
||||
/**
|
||||
* The {@link NPC} name
|
||||
*/
|
||||
@XmlValue
|
||||
protected String name = null;
|
||||
/**
|
||||
* Whether the {@link NPC} name should be sent to the client or not
|
||||
*/
|
||||
@XmlAttribute(name = "send")
|
||||
protected Boolean send = false;
|
||||
/**
|
||||
* Whether the name should be displayed on the client or not
|
||||
*/
|
||||
@XmlAttribute(name = "display")
|
||||
protected Boolean display = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The {@link NPC} title metadata
|
||||
*/
|
||||
@XmlElement(name = "title", required = false)
|
||||
protected NPCTitleMetadata titleMetadata = null;
|
||||
|
||||
/**
|
||||
* Defines the {@link NPC}'s title information
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCTitleType")
|
||||
protected static class NPCTitleMetadata {
|
||||
/**
|
||||
* The {@link NPC} title
|
||||
*/
|
||||
@XmlValue
|
||||
protected String title = null;
|
||||
/**
|
||||
* Whether the {@link NPC} title should be sent to the client or not
|
||||
*/
|
||||
@XmlAttribute(name = "send")
|
||||
protected Boolean send = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The {@link NPC} level
|
||||
*/
|
||||
@XmlElement(name = "level", required = true)
|
||||
protected int level = 0;
|
||||
/**
|
||||
* The {@link NPC} race
|
||||
*/
|
||||
@XmlElement(name = "race", required = false)
|
||||
protected NPCRace race = NPCRace.NONE;
|
||||
/**
|
||||
* The {@link NPC} sex
|
||||
*/
|
||||
@XmlElement(name = "sex", required = false)
|
||||
protected ActorSex sex = null;
|
||||
|
||||
/**
|
||||
* Whether this {@link NPC} can be attacked or not
|
||||
*/
|
||||
@XmlAttribute(name = "attackable", required = false)
|
||||
protected boolean attackable = false;
|
||||
/**
|
||||
* Whether this {@link NPC} can be targeted or not
|
||||
*/
|
||||
@XmlAttribute(name = "targetable", required = false)
|
||||
protected boolean targetable = false;
|
||||
/**
|
||||
* Whether this {@link NPC} is aggressive
|
||||
*/
|
||||
@XmlAttribute(name = "aggressive", required = false)
|
||||
protected boolean aggressive = false;
|
||||
|
||||
/**
|
||||
* The {@link NPC} stats metadata, such as hp and mp
|
||||
*/
|
||||
@XmlElement(name = "stats", required = true)
|
||||
protected NPCStatsMetadata stats = null;
|
||||
|
||||
/**
|
||||
* Defines {@link NPC}'s stats, such as HP and MP
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "NPCStatsType")
|
||||
protected static class NPCStatsMetadata {
|
||||
/**
|
||||
* The {@link NPC} maximum HP
|
||||
*/
|
||||
@XmlElement(name = "hp", required = true)
|
||||
protected Stat hp = null;
|
||||
/**
|
||||
* The {@link NPC} maximum MP
|
||||
*/
|
||||
@XmlElement(name = "mp", required = true)
|
||||
protected Stat mp = null;
|
||||
|
||||
/**
|
||||
* Defines an stat (HP or MP)
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "")
|
||||
protected static class Stat {
|
||||
/**
|
||||
* The maximum value
|
||||
*/
|
||||
@XmlAttribute(name = "max", required = true)
|
||||
protected double max = 0;
|
||||
/**
|
||||
* The regeneration speed
|
||||
*/
|
||||
@XmlAttribute(name = "regen", required = true)
|
||||
protected double regen = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The {@link NPC} attack metadata
|
||||
*/
|
||||
@XmlElement(name = "attack", required = false)
|
||||
protected AttackMetadata attack = null;
|
||||
|
||||
/**
|
||||
* Defines {@link NPC}'s attacking metadata
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCAttackType")
|
||||
protected static class AttackMetadata {
|
||||
/**
|
||||
* The {@link NPC}'s attack range
|
||||
*/
|
||||
@XmlAttribute(name = "range", required = true)
|
||||
protected int range = 0;
|
||||
/**
|
||||
* The {@link NPC}'s evasion
|
||||
*/
|
||||
@XmlAttribute(name = "evasion", required = true)
|
||||
protected int evasion = 0;
|
||||
/**
|
||||
* The {@link NPC}'s attack critical chance
|
||||
*/
|
||||
@XmlAttribute(name = "critical", required = true)
|
||||
protected int critical = 0;
|
||||
|
||||
/**
|
||||
* The {@link NPC}'s attack physical damage
|
||||
*/
|
||||
@XmlElement(name = "physical", required = true)
|
||||
protected AttackValueMetadata physical = null;
|
||||
/**
|
||||
* The {@link NPC}'s attack magical damage
|
||||
*/
|
||||
@XmlElement(name = "magical", required = true)
|
||||
protected AttackValueMetadata magical = null;
|
||||
|
||||
/**
|
||||
* Defines an attack value
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "")
|
||||
protected static class AttackValueMetadata {
|
||||
/**
|
||||
* The damage dealt
|
||||
*/
|
||||
@XmlAttribute(name = "damage", required = true)
|
||||
protected double damage = 0;
|
||||
/**
|
||||
* The attacking speed
|
||||
*/
|
||||
@XmlAttribute(name = "speed", required = true)
|
||||
protected double speed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The {@link NPC} defense metadata
|
||||
*/
|
||||
@XmlElement(name = "defense", required = false)
|
||||
protected DefenseMetadata defense = null;
|
||||
|
||||
/**
|
||||
* Defines {@link NPC}'s defensive metadata
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCDefenseType")
|
||||
protected static class DefenseMetadata {
|
||||
/**
|
||||
* The {@link NPC}'s physical defense
|
||||
*/
|
||||
@XmlElement(name = "physical", required = true)
|
||||
protected DefenseValueMetadata physical = null;
|
||||
/**
|
||||
* The {@link NPC}'s magical defense
|
||||
*/
|
||||
@XmlElement(name = "magical", required = true)
|
||||
protected DefenseValueMetadata magical = null;
|
||||
|
||||
/**
|
||||
* Defines an defense value
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "")
|
||||
protected static class DefenseValueMetadata {
|
||||
/**
|
||||
* The defense value
|
||||
*/
|
||||
@XmlAttribute(name = "value", required = true)
|
||||
protected double value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The {@link NPC} movement data
|
||||
*/
|
||||
@XmlElement(name = "move", required = false)
|
||||
protected MoveMetadata move = null;
|
||||
|
||||
/**
|
||||
* Defines {@link NPC} movement data
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCMovementType")
|
||||
protected static class MoveMetadata {
|
||||
/**
|
||||
* The run speed
|
||||
*/
|
||||
@XmlAttribute(name = "run", required = true)
|
||||
protected double run = 0;
|
||||
/**
|
||||
* The walk speed
|
||||
*/
|
||||
@XmlAttribute(name = "walk", required = true)
|
||||
protected double walk = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The {@link NPC} base stats
|
||||
*/
|
||||
@XmlElement(name = "base", required = true)
|
||||
public BaseMetadata base = null;
|
||||
|
||||
/**
|
||||
* Defines all base stats for {@link NPC} instances
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCBaseStatsType")
|
||||
protected static class BaseMetadata {
|
||||
/**
|
||||
* The {@link NPC} intelligence
|
||||
*/
|
||||
@XmlAttribute(name = "int", required = true)
|
||||
protected int intelligence = 0;
|
||||
/**
|
||||
* The {@link NPC} strength
|
||||
*/
|
||||
@XmlAttribute(name = "str", required = true)
|
||||
protected int strength = 0;
|
||||
/**
|
||||
* The {@link NPC} concentration
|
||||
*/
|
||||
@XmlAttribute(name = "con", required = true)
|
||||
protected int concentration = 0;
|
||||
/**
|
||||
* The {@link NPC} mentality
|
||||
*/
|
||||
@XmlAttribute(name = "men", required = true)
|
||||
protected int mentality = 0;
|
||||
/**
|
||||
* The {@link NPC} dexterity
|
||||
*/
|
||||
@XmlAttribute(name = "dex", required = true)
|
||||
protected int dexterity = 0;
|
||||
/**
|
||||
* The {@link NPC} witness
|
||||
*/
|
||||
@XmlAttribute(name = "wit", required = true)
|
||||
protected int witness = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The {@link NPC} experience
|
||||
*/
|
||||
@XmlElement(name = "experience", required = true)
|
||||
protected long experience = 0;
|
||||
/**
|
||||
* The {@link NPC} SP
|
||||
*/
|
||||
@XmlElement(name = "sp", required = true)
|
||||
protected int sp = 0;
|
||||
|
||||
/**
|
||||
* The {@link NPC} holding items
|
||||
*/
|
||||
@XmlElement(name = "item", required = false)
|
||||
protected ItemMetadata item = null;
|
||||
|
||||
/**
|
||||
* Describes what items the {@link NPC} is holding on its hand
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCItemsType")
|
||||
protected static class ItemMetadata {
|
||||
/**
|
||||
* The {@link ItemTemplateID} on {@link NPC}'s right hand
|
||||
*/
|
||||
@XmlAttribute(name = "righthand", required = false)
|
||||
@XmlJavaTypeAdapter(value = ItemTemplateIDAdapter.class)
|
||||
protected ItemTemplateID rightHand = null;
|
||||
/**
|
||||
* The {@link ItemTemplateID} on {@link NPC}'s left hand
|
||||
*/
|
||||
@XmlAttribute(name = "lefthand", required = false)
|
||||
@XmlJavaTypeAdapter(value = ItemTemplateIDAdapter.class)
|
||||
protected ItemTemplateID leftHand = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The {@link NPC} collision data
|
||||
*/
|
||||
@XmlElement(name = "collision", required = false)
|
||||
protected CollisionMetadata collision = null;
|
||||
|
||||
/**
|
||||
* Defines the {@link NPC} dimensions used for collisions
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCCollisionType")
|
||||
protected static class CollisionMetadata {
|
||||
/**
|
||||
* The {@link NPC} radius
|
||||
*/
|
||||
@XmlAttribute(name = "radius", required = true)
|
||||
protected double radius = 0;
|
||||
/**
|
||||
* The {@link NPC} height
|
||||
*/
|
||||
@XmlAttribute(name = "heigth", required = true)
|
||||
protected double height = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The {@link NPC} AI data
|
||||
*/
|
||||
@XmlElement(name = "ai", required = false)
|
||||
protected AIMetadata ai = null;
|
||||
|
||||
/**
|
||||
* Describes the {@link NPC} ai data
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCAIType")
|
||||
protected static class AIMetadata {
|
||||
/**
|
||||
* The ai script to be used
|
||||
*/
|
||||
@XmlAttribute(name = "script", required = true)
|
||||
protected String script = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains all {@link NPC} conversation HTML messages
|
||||
*/
|
||||
@XmlElement(name = "talk", required = false)
|
||||
protected TalkMetadata talk = null;
|
||||
|
||||
/**
|
||||
* Describes {@link NPC} talking capability as HTML messages
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCTalkType")
|
||||
protected static class TalkMetadata {
|
||||
/**
|
||||
* The default chat message
|
||||
*/
|
||||
@XmlAttribute(name = "default", required = true)
|
||||
protected String defaultChat = null;
|
||||
|
||||
/**
|
||||
* The list of {@link Chat} available
|
||||
*/
|
||||
@XmlElement(name = "chat", required = true)
|
||||
protected List<Chat> chats = null;
|
||||
|
||||
/**
|
||||
* Describes an "chat" message (an HTML page)
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "")
|
||||
public static class Chat {
|
||||
/**
|
||||
* The chat ID
|
||||
*/
|
||||
@XmlAttribute(name = "id", required = true)
|
||||
protected String id = null;
|
||||
/**
|
||||
* The message content
|
||||
*/
|
||||
@XmlValue
|
||||
protected String html = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The {@link NPC} drop list
|
||||
*/
|
||||
@XmlElementWrapper(name = "droplist", required = false)
|
||||
@XmlElement(name = "item", required = true)
|
||||
protected List<DropItemMetadata> droplist = null;
|
||||
|
||||
/**
|
||||
* Describes {@link NPC} dropping when it is killed
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCDropType")
|
||||
protected static class DropItemMetadata {
|
||||
/**
|
||||
* The item dropped
|
||||
*/
|
||||
@XmlAttribute(name = "id", required = true)
|
||||
@XmlJavaTypeAdapter(value = ItemTemplateIDAdapter.class)
|
||||
protected ItemTemplateID item = null;
|
||||
/**
|
||||
* The minimum amount of items dropped
|
||||
*/
|
||||
@XmlAttribute(name = "min", required = true)
|
||||
protected int min = 0;
|
||||
/**
|
||||
* The maximum amount of item dropped
|
||||
*/
|
||||
@XmlAttribute(name = "max", required = true)
|
||||
protected int max = 0;
|
||||
|
||||
/**
|
||||
* The drop category
|
||||
*/
|
||||
@XmlAttribute(name = "category", required = true)
|
||||
protected DropCategory category = null;
|
||||
|
||||
/**
|
||||
* The drop category
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@SuppressWarnings("javadoc")
|
||||
@XmlType(name = "NPCDropCategoryType")
|
||||
public enum DropCategory {
|
||||
DROP, SPOIL, UNK_1, UNK_2, UNK_3, UNK_4, UNK_5, UNK_6, UNK_7, UNK_8, UNK_9, UNK_10, UNK_11, UNK_12, UNK_13, UNK_14, UNK_15, UNK_16, UNK_17, UNK_18, UNK_19, UNK_20, UNK_21, UNK_22, UNK_23, UNK_24, UNK_25, UNK_26, UNK_27, UNK_28, UNK_29, UNK_30, UNK_31, UNK_32, UNK_33, UNK_34, UNK_35, UNK_36, UNK_100, UNK_101, UNK_102, UNK_200;
|
||||
}
|
||||
|
||||
/**
|
||||
* The drop chance
|
||||
*/
|
||||
@XmlAttribute(name = "chance", required = true)
|
||||
protected int chance = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* List of all available {@link NPC} skills
|
||||
*/
|
||||
@XmlElementWrapper(name = "skills", required = false)
|
||||
@XmlElement(name = "skill", required = true)
|
||||
protected List<SkillMetadata> skills = null;
|
||||
|
||||
/**
|
||||
* Describes an {@link NPC} skill
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "NPCSkillType")
|
||||
protected static class SkillMetadata {
|
||||
/**
|
||||
* The skill ID
|
||||
*/
|
||||
@XmlAttribute(name = "id", required = true)
|
||||
@XmlJavaTypeAdapter(value = SkillTemplateIDAdapter.class)
|
||||
protected SkillTemplateID skill = null;
|
||||
/**
|
||||
* The skill level
|
||||
*/
|
||||
@XmlAttribute(name = "level", required = true)
|
||||
protected int level = 0;
|
||||
}
|
||||
@@ -321,6 +619,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return controller;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link NPC} name
|
||||
*/
|
||||
public String getName() {
|
||||
if (info == null)
|
||||
return null;
|
||||
@@ -329,6 +630,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.nameMetadata.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the {@link NPC} name should be sent to the client
|
||||
*/
|
||||
public boolean getSendName() {
|
||||
if (info == null)
|
||||
return false;
|
||||
@@ -337,6 +641,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.nameMetadata.send;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the {@link NPC} name should be displayed on the client
|
||||
*/
|
||||
public boolean getDisplayName() {
|
||||
if (info == null)
|
||||
return false;
|
||||
@@ -345,6 +652,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.nameMetadata.display;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the npc title (if any)
|
||||
*/
|
||||
public String getTitle() {
|
||||
if (info == null)
|
||||
return null;
|
||||
@@ -353,6 +663,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.titleMetadata.title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if the {@link NPC} title should be sent to the client
|
||||
*/
|
||||
public boolean getSendTitle() {
|
||||
if (info == null)
|
||||
return false;
|
||||
@@ -433,6 +746,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.sp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link NPC}'s maximum HP
|
||||
*/
|
||||
public double getMaximumHP() {
|
||||
if (info == null)
|
||||
return 0;
|
||||
@@ -443,6 +759,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.stats.hp.max;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link NPC}'s maximum HP regeneration
|
||||
*/
|
||||
public double getHPRegeneration() {
|
||||
if (info == null)
|
||||
return 0;
|
||||
@@ -453,6 +772,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.stats.hp.regen;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link NPC}'s maximum MP
|
||||
*/
|
||||
public double getMaximumMP() {
|
||||
if (info == null)
|
||||
return 0;
|
||||
@@ -463,6 +785,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.stats.mp.max;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link NPC}'s maximum MP regeneration
|
||||
*/
|
||||
public double getMPRegeneration() {
|
||||
if (info == null)
|
||||
return 0;
|
||||
@@ -602,6 +927,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.stats.attack.magical.speed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link NPC}'s run speed
|
||||
*/
|
||||
public double getRunSpeed() {
|
||||
if (info == null)
|
||||
return 0;
|
||||
@@ -612,6 +940,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.stats.move.run;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link NPC}'s walk speed
|
||||
*/
|
||||
public double getWalkSpeed() {
|
||||
if (info == null)
|
||||
return 0;
|
||||
@@ -700,6 +1031,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.stats.base.witness;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the item on {@link NPC}'s right hand
|
||||
*/
|
||||
public ItemTemplateID getRightHand() {
|
||||
if (info == null)
|
||||
return null;
|
||||
@@ -708,6 +1042,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.item.rightHand;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the item on {@link NPC}'s left hand
|
||||
*/
|
||||
public ItemTemplateID getLeftHand() {
|
||||
if (info == null)
|
||||
return null;
|
||||
@@ -716,6 +1053,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.item.leftHand;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link NPC}'s collision radius
|
||||
*/
|
||||
public double getCollisionRadius() {
|
||||
if (info == null)
|
||||
return 0;
|
||||
@@ -724,6 +1064,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.collision.radius;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link NPC}'s collision height
|
||||
*/
|
||||
public double getCollisionHeight() {
|
||||
if (info == null)
|
||||
return 0;
|
||||
@@ -732,12 +1075,20 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return info.collision.height;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link NPC}'s AI script name
|
||||
*/
|
||||
public String getAIScriptName() {
|
||||
if (ai == null)
|
||||
return null;
|
||||
return ai.script;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id
|
||||
* the chat ID
|
||||
* @return the {@link NPC}'s HTML chat by ID
|
||||
*/
|
||||
public String getHTML(String id) {
|
||||
if (talk == null)
|
||||
return null;
|
||||
@@ -750,6 +1101,9 @@ public class NPCTemplate extends ActorTemplate<NPC> {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the {@link NPC}'s default chat, if any.
|
||||
*/
|
||||
public String getDefaultHTML() {
|
||||
if (talk == null)
|
||||
return null;
|
||||
|
||||
@@ -44,28 +44,54 @@ import com.l2jserver.util.jaxb.TeleportationTemplateIDAdapter;
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(namespace = "http://schemas.l2jserver2.com/teleport", name = "TeleportType")
|
||||
public class TeleportationTemplate extends AbstractTemplate {
|
||||
/**
|
||||
* The teleportation template ID
|
||||
*/
|
||||
@XmlAttribute(name = "id")
|
||||
@XmlJavaTypeAdapter(TeleportationTemplateIDAdapter.class)
|
||||
protected TeleportationTemplateID id;
|
||||
/**
|
||||
* The teleportation name
|
||||
*/
|
||||
@XmlAttribute(name = "name")
|
||||
protected String name;
|
||||
|
||||
/**
|
||||
* The teleportation cost item id
|
||||
*/
|
||||
@XmlAttribute(name = "item", required = false)
|
||||
@XmlJavaTypeAdapter(ItemTemplateIDAdapter.class)
|
||||
protected ItemTemplateID itemTemplateID;
|
||||
/**
|
||||
* The amount of items decreased
|
||||
*/
|
||||
@XmlAttribute(name = "price", required = true)
|
||||
protected int price;
|
||||
|
||||
/**
|
||||
* The teleportation point
|
||||
*/
|
||||
@XmlElement(name = "point", required = false)
|
||||
@XmlJavaTypeAdapter(CoordinateAdapter.class)
|
||||
protected Coordinate coordinate;
|
||||
|
||||
/**
|
||||
* The teleportation restrictions
|
||||
*/
|
||||
@XmlElementWrapper(name = "restrictions", required = false)
|
||||
@XmlElement(name = "restriction", required = true)
|
||||
protected List<TeleportRestriction> restrictions;
|
||||
|
||||
/**
|
||||
* Defines an teleport restriction
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@XmlType(name = "TeleportRestrictionType")
|
||||
public enum TeleportRestriction {
|
||||
/**
|
||||
* Only nobles can use this teleport
|
||||
*/
|
||||
NOBLE;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.l2jserver.model.world.Actor;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@SuppressWarnings("javadoc")
|
||||
public enum ActorExperience {
|
||||
/**
|
||||
* This is an unreachable level!
|
||||
|
||||
@@ -31,9 +31,21 @@ import com.l2jserver.model.world.Actor;
|
||||
*/
|
||||
public abstract class AbstractEffect<T extends EffectTemplate> implements
|
||||
Effect {
|
||||
/**
|
||||
* The effect template
|
||||
*/
|
||||
protected final T template;
|
||||
/**
|
||||
* The actor that the effect is applied to
|
||||
*/
|
||||
protected final Actor actor;
|
||||
|
||||
/**
|
||||
* @param template
|
||||
* the effect template
|
||||
* @param actor
|
||||
* the actor that the effect is applied to
|
||||
*/
|
||||
public AbstractEffect(T template, Actor actor) {
|
||||
this.template = template;
|
||||
this.actor = actor;
|
||||
|
||||
@@ -31,8 +31,17 @@ import com.l2jserver.util.exception.L2Exception;
|
||||
*/
|
||||
public abstract class AbstractTemporalEffect<T extends EffectTemplate> extends
|
||||
AbstractEffect<T> implements TemporalEffect {
|
||||
/**
|
||||
* The last time the effect ticked
|
||||
*/
|
||||
protected long lastCallTime;
|
||||
|
||||
/**
|
||||
* @param template
|
||||
* the effect template
|
||||
* @param actor
|
||||
* the actor that the effect is applied to
|
||||
*/
|
||||
public AbstractTemporalEffect(T template, Actor actor) {
|
||||
super(template, actor);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,14 @@ public interface TemporalEffect extends Effect {
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public enum TemporalEffectAction {
|
||||
CANCEL, CONTINUE;
|
||||
/**
|
||||
* Cancels the effect after this tick
|
||||
*/
|
||||
CANCEL,
|
||||
/**
|
||||
* Continues this effect for at least one more tick
|
||||
*/
|
||||
CONTINUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ package com.l2jserver.model.world.actor.stat;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
@SuppressWarnings("javadoc")
|
||||
public enum StatType {
|
||||
MAX_HP, MAX_MP, MAX_CP, REGENERATE_HP_RATE, REGENERATE_CP_RATE, REGENERATE_MP_RATE, RECHARGE_MP_RATE, HEAL_EFFECTIVNESS, HEAL_PROFICIENCY, HEAL_STATIC_BONUS,
|
||||
|
||||
|
||||
@@ -41,18 +41,39 @@ public class CharacterAppearance {
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public enum CharacterFace {
|
||||
/**
|
||||
* Face type A
|
||||
*/
|
||||
FACE_A(0x00),
|
||||
|
||||
/**
|
||||
* Face type B
|
||||
*/
|
||||
FACE_B(0x01),
|
||||
|
||||
/**
|
||||
* Face type C
|
||||
*/
|
||||
FACE_C(0x02);
|
||||
|
||||
/**
|
||||
* The option id
|
||||
*/
|
||||
public final int option;
|
||||
|
||||
/**
|
||||
* @param option
|
||||
* the option id
|
||||
*/
|
||||
CharacterFace(int option) {
|
||||
this.option = option;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param option
|
||||
* the option id
|
||||
* @return the {@link CharacterFace} represented by <code>option</code>
|
||||
*/
|
||||
public static CharacterFace fromOption(int option) {
|
||||
for (CharacterFace face : values()) {
|
||||
if (face.option == option)
|
||||
@@ -73,20 +94,45 @@ public class CharacterAppearance {
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public enum CharacterHairColor {
|
||||
/**
|
||||
* The hair color A
|
||||
*/
|
||||
COLOR_A(0x00),
|
||||
|
||||
/**
|
||||
* The hair color B
|
||||
*/
|
||||
COLOR_B(0x01),
|
||||
|
||||
/**
|
||||
* The hair color C
|
||||
*/
|
||||
COLOR_C(0x02),
|
||||
|
||||
/**
|
||||
* The hair color D
|
||||
*/
|
||||
COLOR_D(0x03);
|
||||
|
||||
/**
|
||||
* The hair color id
|
||||
*/
|
||||
public final int option;
|
||||
|
||||
/**
|
||||
* @param option
|
||||
* the hair color id
|
||||
*/
|
||||
CharacterHairColor(int option) {
|
||||
this.option = option;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param option
|
||||
* the hair color id
|
||||
* @return the {@link CharacterHairColor} from the given
|
||||
* <code>option</code>
|
||||
*/
|
||||
public static CharacterHairColor fromOption(int option) {
|
||||
for (CharacterHairColor color : values()) {
|
||||
if (color.option == option)
|
||||
@@ -107,22 +153,46 @@ public class CharacterAppearance {
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public enum CharacterHairStyle {
|
||||
/**
|
||||
* The hair style A
|
||||
*/
|
||||
STYLE_A(0x00),
|
||||
|
||||
/**
|
||||
* The hair style B
|
||||
*/
|
||||
STYLE_B(0x01),
|
||||
|
||||
/**
|
||||
* The hair style C
|
||||
*/
|
||||
STYLE_C(0x02),
|
||||
|
||||
/**
|
||||
* The hair style D
|
||||
*/
|
||||
STYLE_D(0x03),
|
||||
|
||||
/**
|
||||
* The hair style E
|
||||
*/
|
||||
STYLE_E(0x04);
|
||||
|
||||
/**
|
||||
* The hair style id
|
||||
*/
|
||||
public final int option;
|
||||
|
||||
/**
|
||||
* @param option
|
||||
* the hair style id
|
||||
*/
|
||||
CharacterHairStyle(int option) {
|
||||
this.option = option;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param option
|
||||
* the hair style id
|
||||
* @return the {@link CharacterHairStyle} represented by
|
||||
* <code>option</code>
|
||||
*/
|
||||
public static CharacterHairStyle fromOption(int option) {
|
||||
for (CharacterHairStyle style : values()) {
|
||||
if (style.option == option)
|
||||
@@ -162,6 +232,10 @@ public class CharacterAppearance {
|
||||
*/
|
||||
private boolean visible;
|
||||
|
||||
/**
|
||||
* @param character
|
||||
* the parent character
|
||||
*/
|
||||
public CharacterAppearance(L2Character character) {
|
||||
this.character = character;
|
||||
}
|
||||
|
||||
@@ -209,12 +209,124 @@ public class CharacterInventory implements Iterable<Item> {
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public enum InventoryPaperdoll {
|
||||
UNDERWEAR(0), HEAD(1), HAIR1(2), HAIR2(3), NECK(4), RIGHT_HAND(5), CHEST(
|
||||
6), LEFT_HAND(7), RIGHT_EAR(8), LEFT_EAR(9), GLOVES(10), LEGS(
|
||||
11), FEET(12), RIGHT_FINGER(13), LEFT_FINGER(14), LEFT_BRACELET(
|
||||
15), RIGHT_BRACELET(16), DECORATION_1(17), DECORATION_2(18), DECORATION_3(
|
||||
19), DECORATION_4(20), DECORATION_5(21), DECORATION_6(22), CLOAK(
|
||||
23), BELT(24);
|
||||
/**
|
||||
* Underwear
|
||||
*/
|
||||
UNDERWEAR(0),
|
||||
|
||||
/**
|
||||
* Head
|
||||
*/
|
||||
HEAD(1),
|
||||
|
||||
/**
|
||||
* Hair, slot 1
|
||||
*/
|
||||
HAIR1(2),
|
||||
|
||||
/**
|
||||
* Hair slot 2
|
||||
*/
|
||||
HAIR2(3),
|
||||
|
||||
/**
|
||||
* Neck
|
||||
*/
|
||||
NECK(4),
|
||||
|
||||
/**
|
||||
* Right hant
|
||||
*/
|
||||
RIGHT_HAND(5),
|
||||
|
||||
/**
|
||||
* Chest
|
||||
*/
|
||||
CHEST(6),
|
||||
|
||||
/**
|
||||
* Left hand
|
||||
*/
|
||||
LEFT_HAND(7),
|
||||
|
||||
/**
|
||||
* Right ear
|
||||
*/
|
||||
RIGHT_EAR(8),
|
||||
|
||||
/**
|
||||
* Left ear
|
||||
*/
|
||||
LEFT_EAR(9),
|
||||
|
||||
/**
|
||||
* Gloves
|
||||
*/
|
||||
GLOVES(10),
|
||||
|
||||
/**
|
||||
* Legs
|
||||
*/
|
||||
LEGS(11),
|
||||
|
||||
/**
|
||||
* Feet
|
||||
*/
|
||||
FEET(12),
|
||||
|
||||
/**
|
||||
* Right finger
|
||||
*/
|
||||
RIGHT_FINGER(13),
|
||||
|
||||
/**
|
||||
* Left finger
|
||||
*/
|
||||
LEFT_FINGER(14),
|
||||
|
||||
/**
|
||||
* Left bracelet
|
||||
*/
|
||||
LEFT_BRACELET(15),
|
||||
|
||||
/**
|
||||
* Right bracelet
|
||||
*/
|
||||
RIGHT_BRACELET(16),
|
||||
|
||||
/**
|
||||
* Decoration, slot 1
|
||||
*/
|
||||
DECORATION_1(17),
|
||||
|
||||
/**
|
||||
* Decoration slot 2
|
||||
*/
|
||||
DECORATION_2(18),
|
||||
/**
|
||||
* Decoration slot 3
|
||||
*/
|
||||
DECORATION_3(19),
|
||||
/**
|
||||
* Decoration slot 4
|
||||
*/
|
||||
DECORATION_4(20),
|
||||
/**
|
||||
* Decoration slot 5
|
||||
*/
|
||||
DECORATION_5(21),
|
||||
/**
|
||||
* Decoration slot 6
|
||||
*/
|
||||
DECORATION_6(22),
|
||||
/**
|
||||
* Cloak
|
||||
*/
|
||||
CLOAK(23),
|
||||
/**
|
||||
* Belt
|
||||
*/
|
||||
BELT(24);
|
||||
|
||||
/**
|
||||
* The inventory paperdoll slot id
|
||||
|
||||
@@ -52,6 +52,9 @@ public interface NPCController {
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public static class NPCControllerException extends L2Exception {
|
||||
/**
|
||||
* Serialization ID
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,8 +27,17 @@ import com.l2jserver.model.world.WorldObject;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class NPCTalkEvent implements NPCEvent {
|
||||
/**
|
||||
* The NPC that is sending the HTML content
|
||||
*/
|
||||
private final NPC npc;
|
||||
/**
|
||||
* The character instance that is receiving the HTML content
|
||||
*/
|
||||
private final L2Character character;
|
||||
/**
|
||||
* The html message
|
||||
*/
|
||||
private final String html;
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.l2jserver.service.database;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Injector;
|
||||
import com.l2jserver.model.Model;
|
||||
@@ -42,8 +43,15 @@ import com.l2jserver.util.ClassUtils;
|
||||
*
|
||||
*/
|
||||
public class GameServerDAOResolver implements DAOResolver {
|
||||
/**
|
||||
* The {@link Guice} {@link Injector}
|
||||
*/
|
||||
private final Injector injector;
|
||||
|
||||
/**
|
||||
* @param injector
|
||||
* the {@link Guice} {@link Injector}
|
||||
*/
|
||||
@Inject
|
||||
private GameServerDAOResolver(Injector injector) {
|
||||
this.injector = injector;
|
||||
|
||||
@@ -64,6 +64,9 @@ import com.l2jserver.service.game.template.TemplateService;
|
||||
ConfigurationService.class, TemplateService.class, ThreadService.class })
|
||||
public class GameServerOrientDatabaseService extends
|
||||
AbstractOrientDatabaseService implements DatabaseService {
|
||||
/**
|
||||
* The VFS service
|
||||
*/
|
||||
private final VFSService vfsService;
|
||||
|
||||
/**
|
||||
@@ -73,6 +76,8 @@ public class GameServerOrientDatabaseService extends
|
||||
* the cache service
|
||||
* @param threadService
|
||||
* the thread service
|
||||
* @param vfsService
|
||||
* the VFS service
|
||||
* @param daoResolver
|
||||
* the {@link DataAccessObject DAO} resolver
|
||||
*/
|
||||
|
||||
@@ -145,7 +145,7 @@ public class OrientDBCharacterDAO extends
|
||||
@Override
|
||||
protected OQueryContextNative query(OQueryContextNative record,
|
||||
L2Character o) {
|
||||
return record.field(name(e.characterId)).eq(o.getID().getID());
|
||||
return record.field(name(entity.characterId)).eq(o.getID().getID());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -157,7 +157,7 @@ public class OrientDBCharacterDAO extends
|
||||
@Override
|
||||
protected OQueryContextNative query(OQueryContextNative record,
|
||||
L2Character o) {
|
||||
return record.field(name(e.characterId)).eq(o.getID().getID());
|
||||
return record.field(name(entity.characterId)).eq(o.getID().getID());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -128,9 +128,9 @@ public class OrientDBCharacterFriendDAO extends
|
||||
@Override
|
||||
protected OQueryContextNative query(
|
||||
OQueryContextNative record, CharacterFriend friend) {
|
||||
return record.field(name(e.characterId))
|
||||
return record.field(name(entity.characterId))
|
||||
.eq(friend.getID().getCharacterID().getID())
|
||||
.field(name(e.characterIdFriend))
|
||||
.field(name(entity.characterIdFriend))
|
||||
.eq(friend.getID().getFriendID());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -44,6 +44,9 @@ import com.orientechnologies.orient.core.query.nativ.OQueryContextNative;
|
||||
public class OrientDBCharacterShortcutDAO extends
|
||||
AbstractOrientDBDAO<CharacterShortcut, CharacterShortcutID> implements
|
||||
CharacterShortcutDAO {
|
||||
/**
|
||||
* The {@link CharacterShortcut} mapper
|
||||
*/
|
||||
private final CharacterShortcutMapper mapper;
|
||||
|
||||
/**
|
||||
@@ -117,7 +120,7 @@ public class OrientDBCharacterShortcutDAO extends
|
||||
@Override
|
||||
protected OQueryContextNative query(
|
||||
OQueryContextNative record, CharacterShortcut o) {
|
||||
return record.field(name(e.shortcutId)).eq(
|
||||
return record.field(name(entity.shortcutId)).eq(
|
||||
o.getID().getID());
|
||||
}
|
||||
});
|
||||
@@ -131,7 +134,7 @@ public class OrientDBCharacterShortcutDAO extends
|
||||
@Override
|
||||
protected OQueryContextNative query(
|
||||
OQueryContextNative record, CharacterShortcut o) {
|
||||
return record.field(name(e.shortcutId)).eq(
|
||||
return record.field(name(entity.shortcutId)).eq(
|
||||
o.getID().getID());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -42,6 +42,9 @@ import com.orientechnologies.orient.core.query.nativ.OQueryContextNative;
|
||||
public class OrientDBChatMessageDAO extends
|
||||
AbstractOrientDBDAO<ChatMessage, ChatMessageID> implements
|
||||
ChatMessageDAO {
|
||||
/**
|
||||
* The {@link ChatMessage} mapper
|
||||
*/
|
||||
private final ChatMessageMapper mapper;
|
||||
|
||||
/**
|
||||
@@ -103,7 +106,8 @@ public class OrientDBChatMessageDAO extends
|
||||
@Override
|
||||
protected OQueryContextNative query(OQueryContextNative record,
|
||||
ChatMessage o) {
|
||||
return record.field(name(e.messageId)).eq(o.getID().getID());
|
||||
return record.field(name(entity.messageId)).eq(
|
||||
o.getID().getID());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,7 +40,11 @@ import com.orientechnologies.orient.core.query.nativ.OQueryContextNative;
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class OrientDBClanDAO extends AbstractOrientDBDAO<Clan, ClanID> implements ClanDAO {
|
||||
public class OrientDBClanDAO extends AbstractOrientDBDAO<Clan, ClanID>
|
||||
implements ClanDAO {
|
||||
/**
|
||||
* The {@link Clan} mapper
|
||||
*/
|
||||
private final ClanMapper mapper;
|
||||
|
||||
/**
|
||||
@@ -94,7 +98,7 @@ public class OrientDBClanDAO extends AbstractOrientDBDAO<Clan, ClanID> implement
|
||||
@Override
|
||||
protected OQueryContextNative query(OQueryContextNative record,
|
||||
Clan o) {
|
||||
return record.field(name(e.clanId)).eq(o.getID().getID());
|
||||
return record.field(name(entity.clanId)).eq(o.getID().getID());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -106,7 +110,8 @@ public class OrientDBClanDAO extends AbstractOrientDBDAO<Clan, ClanID> implement
|
||||
@Override
|
||||
protected OQueryContextNative query(
|
||||
OQueryContextNative record, Clan o) {
|
||||
return record.field(name(e.clanId)).eq(o.getID().getID());
|
||||
return record.field(name(entity.clanId)).eq(
|
||||
o.getID().getID());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@ import com.orientechnologies.orient.core.query.nativ.OQueryContextNative;
|
||||
*/
|
||||
public class OrientDBItemDAO extends AbstractOrientDBDAO<Item, ItemID>
|
||||
implements ItemDAO {
|
||||
/**
|
||||
* The {@link Item} mapper
|
||||
*/
|
||||
private final ItemMapper mapper;
|
||||
|
||||
/**
|
||||
@@ -125,7 +128,7 @@ public class OrientDBItemDAO extends AbstractOrientDBDAO<Item, ItemID>
|
||||
@Override
|
||||
protected OQueryContextNative query(OQueryContextNative record,
|
||||
Item o) {
|
||||
return record.field(name(e.itemId)).eq(o.getID().getID());
|
||||
return record.field(name(entity.itemId)).eq(o.getID().getID());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -137,7 +140,7 @@ public class OrientDBItemDAO extends AbstractOrientDBDAO<Item, ItemID>
|
||||
@Override
|
||||
protected OQueryContextNative query(
|
||||
OQueryContextNative record, Item o) {
|
||||
return record.field(name(e.itemId)).eq(o.getID().getID());
|
||||
return record.field(name(entity.itemId)).eq(o.getID().getID());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@ import com.orientechnologies.orient.core.query.nativ.OQueryContextNative;
|
||||
*/
|
||||
public class OrientDBNPCDAO extends AbstractOrientDBDAO<NPC, NPCID> implements
|
||||
NPCDAO {
|
||||
/**
|
||||
* The {@link NPC} mapper
|
||||
*/
|
||||
private final NPCMapper mapper;
|
||||
|
||||
/**
|
||||
@@ -120,7 +123,7 @@ public class OrientDBNPCDAO extends AbstractOrientDBDAO<NPC, NPCID> implements
|
||||
@Override
|
||||
protected OQueryContextNative query(OQueryContextNative record,
|
||||
NPC o) {
|
||||
return record.field(name(e.npcId)).eq(o.getID().getID());
|
||||
return record.field(name(entity.npcId)).eq(o.getID().getID());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -131,7 +134,7 @@ public class OrientDBNPCDAO extends AbstractOrientDBDAO<NPC, NPCID> implements
|
||||
@Override
|
||||
protected OQueryContextNative query(OQueryContextNative record,
|
||||
NPC o) {
|
||||
return record.field(name(e.npcId)).eq(o.getID().getID());
|
||||
return record.field(name(entity.npcId)).eq(o.getID().getID());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public class SQLCharacterDAO extends AbstractSQLDAO<L2Character, CharacterID>
|
||||
QCharacter.character, mapper, characters) {
|
||||
@Override
|
||||
protected void query(SQLUpdateClause q, L2Character o) {
|
||||
q.where(e.characterId.eq(o.getID().getID()));
|
||||
q.where(entity.characterId.eq(o.getID().getID()));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public class SQLCharacterDAO extends AbstractSQLDAO<L2Character, CharacterID>
|
||||
QCharacter.character, characters) {
|
||||
@Override
|
||||
protected void query(SQLDeleteClause q, L2Character o) {
|
||||
q.where(e.characterId.eq(o.getID().getID()));
|
||||
q.where(entity.characterId.eq(o.getID().getID()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -124,9 +124,9 @@ public class SQLCharacterFriendDAO extends
|
||||
QCharacterFriend.characterFriend, friends) {
|
||||
@Override
|
||||
protected void query(SQLDeleteClause q, CharacterFriend o) {
|
||||
q.where(e.characterId.eq(
|
||||
q.where(entity.characterId.eq(
|
||||
o.getID().getCharacterID().getID()).and(
|
||||
e.characterIdFriend.eq(o.getID().getFriendID()
|
||||
entity.characterIdFriend.eq(o.getID().getFriendID()
|
||||
.getID())));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -46,6 +46,9 @@ import com.mysema.query.sql.dml.SQLUpdateClause;
|
||||
public class SQLCharacterShortcutDAO extends
|
||||
AbstractSQLDAO<CharacterShortcut, CharacterShortcutID> implements
|
||||
CharacterShortcutDAO {
|
||||
/**
|
||||
* The {@link CharacterShortcut} mapper
|
||||
*/
|
||||
private final CharacterShortcutMapper mapper;
|
||||
|
||||
/**
|
||||
@@ -116,7 +119,7 @@ public class SQLCharacterShortcutDAO extends
|
||||
QCharacterShortcut.characterShortcut, mapper, shortcuts) {
|
||||
@Override
|
||||
protected void query(SQLUpdateClause q, CharacterShortcut o) {
|
||||
q.where(e.shortcutId.eq(o.getID().getID()));
|
||||
q.where(entity.shortcutId.eq(o.getID().getID()));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -128,7 +131,7 @@ public class SQLCharacterShortcutDAO extends
|
||||
QCharacterShortcut.characterShortcut, shortcuts) {
|
||||
@Override
|
||||
protected void query(SQLDeleteClause q, CharacterShortcut o) {
|
||||
q.where(e.shortcutId.eq(o.getID().getID()));
|
||||
q.where(entity.shortcutId.eq(o.getID().getID()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -42,6 +42,9 @@ import com.mysema.query.sql.dml.SQLDeleteClause;
|
||||
*/
|
||||
public class SQLChatMessageDAO extends
|
||||
AbstractSQLDAO<ChatMessage, ChatMessageID> implements ChatMessageDAO {
|
||||
/**
|
||||
* The {@link ChatMessage} mapper
|
||||
*/
|
||||
private final ChatMessageMapper mapper;
|
||||
|
||||
/**
|
||||
@@ -98,7 +101,7 @@ public class SQLChatMessageDAO extends
|
||||
QLogChat.logChat, objects) {
|
||||
@Override
|
||||
protected void query(SQLDeleteClause q, ChatMessage o) {
|
||||
q.where(e.messageId.eq(o.getID().getID()));
|
||||
q.where(entity.messageId.eq(o.getID().getID()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43,6 +43,9 @@ import com.mysema.query.sql.dml.SQLUpdateClause;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class SQLClanDAO extends AbstractSQLDAO<Clan, ClanID> implements ClanDAO {
|
||||
/**
|
||||
* The {@link Clan} mapper
|
||||
*/
|
||||
private final ClanMapper mapper;
|
||||
|
||||
/**
|
||||
@@ -92,7 +95,7 @@ public class SQLClanDAO extends AbstractSQLDAO<Clan, ClanID> implements ClanDAO
|
||||
objects) {
|
||||
@Override
|
||||
protected void query(SQLUpdateClause q, Clan o) {
|
||||
q.where(e.clanId.eq(o.getID().getID()));
|
||||
q.where(entity.clanId.eq(o.getID().getID()));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -103,7 +106,7 @@ public class SQLClanDAO extends AbstractSQLDAO<Clan, ClanID> implements ClanDAO
|
||||
.query(new DeleteQuery<Clan, QClan>(QClan.clan, objects) {
|
||||
@Override
|
||||
protected void query(SQLDeleteClause q, Clan o) {
|
||||
q.where(e.clanId.eq(o.getID().getID()));
|
||||
q.where(entity.clanId.eq(o.getID().getID()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -45,6 +45,9 @@ import com.mysema.query.sql.dml.SQLUpdateClause;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class SQLItemDAO extends AbstractSQLDAO<Item, ItemID> implements ItemDAO {
|
||||
/**
|
||||
* The {@link Item} mapper
|
||||
*/
|
||||
private final ItemMapper mapper;
|
||||
|
||||
/**
|
||||
@@ -118,7 +121,7 @@ public class SQLItemDAO extends AbstractSQLDAO<Item, ItemID> implements ItemDAO
|
||||
objects) {
|
||||
@Override
|
||||
protected void query(SQLUpdateClause q, Item o) {
|
||||
q.where(e.itemId.eq(o.getID().getID()));
|
||||
q.where(entity.itemId.eq(o.getID().getID()));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -129,7 +132,7 @@ public class SQLItemDAO extends AbstractSQLDAO<Item, ItemID> implements ItemDAO
|
||||
.query(new DeleteQuery<Item, QItem>(QItem.item, objects) {
|
||||
@Override
|
||||
protected void query(SQLDeleteClause q, Item o) {
|
||||
q.where(e.itemId.eq(o.getID().getID()));
|
||||
q.where(entity.itemId.eq(o.getID().getID()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -45,6 +45,9 @@ import com.mysema.query.sql.dml.SQLUpdateClause;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class SQLNPCDAO extends AbstractSQLDAO<NPC, NPCID> implements NPCDAO {
|
||||
/**
|
||||
* The {@link NPC} mapper
|
||||
*/
|
||||
private final NPCMapper mapper;
|
||||
|
||||
/**
|
||||
@@ -113,7 +116,7 @@ public class SQLNPCDAO extends AbstractSQLDAO<NPC, NPCID> implements NPCDAO {
|
||||
objects) {
|
||||
@Override
|
||||
protected void query(SQLUpdateClause q, NPC o) {
|
||||
q.where(e.npcId.eq(o.getID().getID()));
|
||||
q.where(entity.npcId.eq(o.getID().getID()));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -123,7 +126,7 @@ public class SQLNPCDAO extends AbstractSQLDAO<NPC, NPCID> implements NPCDAO {
|
||||
return database.query(new DeleteQuery<NPC, QNPC>(QNPC.npc, objects) {
|
||||
@Override
|
||||
protected void query(SQLDeleteClause q, NPC o) {
|
||||
q.where(e.npcId.eq(o.getID().getID()));
|
||||
q.where(entity.npcId.eq(o.getID().getID()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,6 +41,9 @@ import com.l2jserver.util.geometry.Point3D;
|
||||
*/
|
||||
public class CharacterMapper extends
|
||||
AbstractMapper<L2Character, Integer, CharacterID, QCharacter> {
|
||||
/**
|
||||
* The primary key mapper
|
||||
*/
|
||||
private final PrimaryKeyMapper<CharacterID, Integer> pk = new PrimaryKeyMapper<CharacterID, Integer>() {
|
||||
@Override
|
||||
public CharacterID createID(Integer raw) {
|
||||
|
||||
@@ -38,6 +38,9 @@ import com.l2jserver.service.database.model.QCharacterShortcut;
|
||||
public class CharacterShortcutMapper
|
||||
extends
|
||||
AbstractMapper<CharacterShortcut, Integer, CharacterShortcutID, QCharacterShortcut> {
|
||||
/**
|
||||
* The primary key mapper
|
||||
*/
|
||||
private final PrimaryKeyMapper<CharacterShortcutID, Integer> idMapper = new PrimaryKeyMapper<CharacterShortcutID, Integer>() {
|
||||
@Override
|
||||
public CharacterShortcutID createID(Integer raw) {
|
||||
|
||||
@@ -34,6 +34,9 @@ import com.l2jserver.service.database.model.QLogChat;
|
||||
*/
|
||||
public class ChatMessageMapper extends
|
||||
AbstractMapper<ChatMessage, Integer, ChatMessageID, QLogChat> {
|
||||
/**
|
||||
* The primary key mapper
|
||||
*/
|
||||
private final PrimaryKeyMapper<ChatMessageID, Integer> idMapper = new PrimaryKeyMapper<ChatMessageID, Integer>() {
|
||||
@Override
|
||||
public ChatMessageID createID(Integer raw) {
|
||||
|
||||
@@ -33,6 +33,9 @@ import com.l2jserver.service.database.model.QClan;
|
||||
*
|
||||
*/
|
||||
public class ClanMapper extends AbstractMapper<Clan, Integer, ClanID, QClan> {
|
||||
/**
|
||||
* The primary key mapper
|
||||
*/
|
||||
private final PrimaryKeyMapper<ClanID, Integer> idMapper = new PrimaryKeyMapper<ClanID, Integer>() {
|
||||
@Override
|
||||
public ClanID createID(Integer raw) {
|
||||
|
||||
@@ -46,6 +46,9 @@ public class ItemMapper extends AbstractMapper<Item, Integer, ItemID, QItem> {
|
||||
*/
|
||||
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
/**
|
||||
* The primary key mapper
|
||||
*/
|
||||
private final PrimaryKeyMapper<ItemID, Integer> idMapper = new PrimaryKeyMapper<ItemID, Integer>() {
|
||||
@Override
|
||||
public ItemID createID(Integer raw) {
|
||||
|
||||
@@ -43,6 +43,9 @@ public class NPCMapper extends AbstractMapper<NPC, Integer, NPCID, QNPC> {
|
||||
*/
|
||||
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
/**
|
||||
* The primary key mapper
|
||||
*/
|
||||
private final PrimaryKeyMapper<NPCID, Integer> idMapper = new PrimaryKeyMapper<NPCID, Integer>() {
|
||||
@Override
|
||||
public NPCID createID(Integer raw) {
|
||||
|
||||
@@ -16,31 +16,67 @@ import com.mysema.query.types.path.NumberPath;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class QActorSkill extends RelationalPathBase<Skill> {
|
||||
private static final long serialVersionUID = -146336131;
|
||||
/**
|
||||
* The Java Serialization UID
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Default entity for {@link QActorSkill}
|
||||
*/
|
||||
public static final QActorSkill actorSkill = new QActorSkill("actor_skill");
|
||||
|
||||
/**
|
||||
* Column: <code>actor_id</code>
|
||||
*/
|
||||
@ColumnSize(10)
|
||||
public final NumberPath<Integer> actorId = createNumber("actor_id",
|
||||
Integer.class);
|
||||
/**
|
||||
* Column: <code>skill_id</code>
|
||||
*/
|
||||
@ColumnSize(6)
|
||||
public final NumberPath<Integer> skillId = createNumber("skill_id",
|
||||
Integer.class);
|
||||
|
||||
/**
|
||||
* Column: <code>level</code>
|
||||
*/
|
||||
@ColumnSize(4)
|
||||
public final NumberPath<Integer> level = createNumber("level",
|
||||
Integer.class);
|
||||
|
||||
/**
|
||||
* The entity primary key
|
||||
*/
|
||||
public final PrimaryKey<Skill> primary = createPrimaryKey(actorId, skillId);
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param variable
|
||||
* the query variable
|
||||
*/
|
||||
public QActorSkill(String variable) {
|
||||
super(Skill.class, forVariable(variable), "null", "actor_skill");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param entity
|
||||
* the parent entity
|
||||
*/
|
||||
public QActorSkill(Path<? extends Skill> entity) {
|
||||
super(entity.getType(), entity.getMetadata(), "null", "actor_skill");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param metadata
|
||||
* the entity metadata
|
||||
*/
|
||||
public QActorSkill(PathMetadata<?> metadata) {
|
||||
super(Skill.class, metadata, "null", "actor_skill");
|
||||
}
|
||||
|
||||
@@ -24,72 +24,160 @@ import com.mysema.query.types.path.StringPath;
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public class QCharacter extends RelationalPathBase<Integer> {
|
||||
private static final long serialVersionUID = -59499032;
|
||||
/**
|
||||
* The Java Serialization UID
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Default entity for {@link QCharacter}
|
||||
*/
|
||||
public static final QCharacter character = new QCharacter("l2character");
|
||||
|
||||
/**
|
||||
* Column: <code>character_id</code>
|
||||
*/
|
||||
@ColumnSize(10)
|
||||
public final NumberPath<Integer> characterId = createNumber("character_id",
|
||||
Integer.class);
|
||||
/**
|
||||
* Column: <code>account_id</code>
|
||||
*/
|
||||
@ColumnSize(50)
|
||||
public final StringPath accountId = createString("account_id");
|
||||
/**
|
||||
* Column: <code>clan_id</code>
|
||||
*/
|
||||
@ColumnSize(10)
|
||||
@ColumnNullable
|
||||
public final NumberPath<Integer> clanId = createNumber("clan_id",
|
||||
Integer.class);
|
||||
|
||||
/**
|
||||
* Column: <code>name</code>
|
||||
*/
|
||||
@ColumnSize(100)
|
||||
public final StringPath name = createString("name");
|
||||
|
||||
/**
|
||||
* Column: <code>race</code>
|
||||
*/
|
||||
public final EnumPath<CharacterRace> race = createEnum("race",
|
||||
CharacterRace.class);
|
||||
/**
|
||||
* Column: <code>sex</code>
|
||||
*/
|
||||
public final EnumPath<ActorSex> sex = createEnum("sex", ActorSex.class);
|
||||
|
||||
/**
|
||||
* Column: <code>character_class</code>
|
||||
*/
|
||||
public final EnumPath<CharacterClass> characterClass = createEnum("class",
|
||||
CharacterClass.class);
|
||||
/**
|
||||
* Column: <code>level</code>
|
||||
*/
|
||||
@ColumnSize(4)
|
||||
public final NumberPath<Integer> level = createNumber("level",
|
||||
Integer.class);
|
||||
/**
|
||||
* Column: <code>experience</code>
|
||||
*/
|
||||
@ColumnSize(10)
|
||||
public final NumberPath<Long> experience = createNumber("experience",
|
||||
Long.class);
|
||||
/**
|
||||
* Column: <code>sp</code>
|
||||
*/
|
||||
@ColumnSize(10)
|
||||
public final NumberPath<Integer> sp = createNumber("sp", Integer.class);
|
||||
|
||||
/**
|
||||
* Column: <code>cp</code>
|
||||
*/
|
||||
public final NumberPath<Double> cp = createNumber("cp", Double.class);
|
||||
/**
|
||||
* Column: <code>hp</code>
|
||||
*/
|
||||
public final NumberPath<Double> hp = createNumber("hp", Double.class);
|
||||
/**
|
||||
* Column: <code>mp</code>
|
||||
*/
|
||||
public final NumberPath<Double> mp = createNumber("mp", Double.class);
|
||||
|
||||
/**
|
||||
* Column: <code>point_x</code>
|
||||
*/
|
||||
@ColumnSize(10)
|
||||
public final NumberPath<Integer> pointX = createNumber("point_x",
|
||||
Integer.class);
|
||||
/**
|
||||
* Column: <code>point_y</code>
|
||||
*/
|
||||
@ColumnSize(10)
|
||||
public final NumberPath<Integer> pointY = createNumber("point_y",
|
||||
Integer.class);
|
||||
/**
|
||||
* Column: <code>point_z</code>
|
||||
*/
|
||||
@ColumnSize(10)
|
||||
public final NumberPath<Integer> pointZ = createNumber("point_z",
|
||||
Integer.class);
|
||||
/**
|
||||
* Column: <code>point_angle</code>
|
||||
*/
|
||||
public final NumberPath<Double> pointAngle = createNumber("point_angle",
|
||||
Double.class);
|
||||
|
||||
/**
|
||||
* Column: <code>appearance_hair_color</code>
|
||||
*/
|
||||
public final EnumPath<CharacterHairColor> appearanceHairColor = createEnum(
|
||||
"appearance_hair_color", CharacterHairColor.class);
|
||||
/**
|
||||
* Column: <code>appearance_hair_style</code>
|
||||
*/
|
||||
public final EnumPath<CharacterHairStyle> appearanceHairStyle = createEnum(
|
||||
"appearance_hair_style", CharacterHairStyle.class);
|
||||
/**
|
||||
* Column: <code>appearance_face</code>
|
||||
*/
|
||||
public final EnumPath<CharacterFace> apperanceFace = createEnum(
|
||||
"apperance_face", CharacterFace.class);
|
||||
|
||||
/**
|
||||
* The entity primary key
|
||||
*/
|
||||
public final PrimaryKey<Integer> primary = createPrimaryKey(characterId);
|
||||
//public final ForeignKey<Clan> clanIdKey = createForeignKey(clanId, "");
|
||||
|
||||
// public final ForeignKey<Clan> clanIdKey = createForeignKey(clanId, "");
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param variable
|
||||
* the query variable
|
||||
*/
|
||||
public QCharacter(String variable) {
|
||||
super(Integer.class, forVariable(variable), "null", "character");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param entity
|
||||
* the parent entity
|
||||
*/
|
||||
public QCharacter(Path<? extends Integer> entity) {
|
||||
super(entity.getType(), entity.getMetadata(), "null", "character");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param metadata
|
||||
* the entity metadata
|
||||
*/
|
||||
public QCharacter(PathMetadata<?> metadata) {
|
||||
super(Integer.class, metadata, "null", "character");
|
||||
}
|
||||
|
||||
@@ -16,30 +16,61 @@ import com.mysema.query.types.path.NumberPath;
|
||||
*/
|
||||
public class QCharacterFriend extends
|
||||
com.mysema.query.sql.RelationalPathBase<FriendID> {
|
||||
private static final long serialVersionUID = 1488651942;
|
||||
/**
|
||||
* The Java Serialization UID
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Default entity for {@link QCharacterFriend}
|
||||
*/
|
||||
public static final QCharacterFriend characterFriend = new QCharacterFriend(
|
||||
"character_friend");
|
||||
|
||||
/**
|
||||
* Column: <code>character_id</code>
|
||||
*/
|
||||
@ColumnSize(10)
|
||||
public final NumberPath<Integer> characterId = createNumber("character_id",
|
||||
Integer.class);
|
||||
/**
|
||||
* Column: <code>character_id_friend</code>
|
||||
*/
|
||||
@ColumnSize(10)
|
||||
public final NumberPath<Integer> characterIdFriend = createNumber(
|
||||
"character_id_friend", Integer.class);
|
||||
|
||||
/**
|
||||
* The entity primary key
|
||||
*/
|
||||
public final PrimaryKey<FriendID> primary = createPrimaryKey(characterId,
|
||||
characterIdFriend);
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
* @param variable the query variable
|
||||
*/
|
||||
public QCharacterFriend(String variable) {
|
||||
super(FriendID.class, forVariable(variable), "null", "character_friend");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param entity
|
||||
* the parent entity
|
||||
*/
|
||||
public QCharacterFriend(Path<? extends FriendID> entity) {
|
||||
super(entity.getType(), entity.getMetadata(), "null",
|
||||
"character_friend");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param metadata
|
||||
* the entity metadata
|
||||
*/
|
||||
public QCharacterFriend(PathMetadata<?> metadata) {
|
||||
super(FriendID.class, metadata, "null", "character_friend");
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user