mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-08 08:23:11 +00:00
Service exceptions externalized and better logging configuration
Signed-off-by: Rogiel <rogiel@rogiel.com>
This commit is contained in:
@@ -27,10 +27,11 @@ import com.l2jserver.model.world.AbstractActor.Race;
|
||||
import com.l2jserver.model.world.L2Character;
|
||||
import com.l2jserver.model.world.NPC;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.service.game.CharacterService;
|
||||
import com.l2jserver.service.game.CharacterService.CannotSetTargetServiceException;
|
||||
import com.l2jserver.service.game.character.CannotSetTargetServiceException;
|
||||
import com.l2jserver.service.game.character.CharacterService;
|
||||
import com.l2jserver.service.network.NetworkService;
|
||||
import com.l2jserver.util.calculator.Calculator;
|
||||
import com.l2jserver.util.exception.L2Exception;
|
||||
import com.l2jserver.util.html.markup.HtmlTemplate;
|
||||
import com.l2jserver.util.html.markup.MarkupTag;
|
||||
|
||||
@@ -101,8 +102,11 @@ public abstract class NPCTemplate extends ActorTemplate<NPC> {
|
||||
* the interacting character
|
||||
* @param action
|
||||
* the action performed
|
||||
* @throws L2Exception
|
||||
* any {@link L2Exception}
|
||||
*/
|
||||
public void action(NPC npc, L2Character character, CharacterAction action) {
|
||||
public void action(NPC npc, L2Character character, CharacterAction action)
|
||||
throws L2Exception {
|
||||
final Lineage2Connection conn = networkService.discover(character
|
||||
.getID());
|
||||
if (conn == null)
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.l2jserver.model.template.npc;
|
||||
|
||||
import com.l2jserver.model.id.template.NPCTemplateID;
|
||||
import com.l2jserver.model.template.NPCTemplate;
|
||||
|
||||
/**
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.l2jserver.model.template.npc;
|
||||
|
||||
import com.l2jserver.model.id.template.NPCTemplateID;
|
||||
import com.l2jserver.model.template.NPCTemplate;
|
||||
|
||||
/**
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.l2jserver.model.template.npc;
|
||||
|
||||
import com.l2jserver.model.id.template.NPCTemplateID;
|
||||
import com.l2jserver.model.template.NPCTemplate;
|
||||
|
||||
/**
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
|
||||
@@ -16,14 +16,11 @@
|
||||
*/
|
||||
package com.l2jserver.model.world;
|
||||
|
||||
import com.l2jserver.game.net.packet.client.CharacterActionPacket.CharacterAction;
|
||||
import com.l2jserver.model.id.TemplateID;
|
||||
import com.l2jserver.model.id.object.NPCID;
|
||||
import com.l2jserver.model.id.template.NPCTemplateID;
|
||||
import com.l2jserver.model.template.NPCTemplate;
|
||||
import com.l2jserver.model.world.capability.Actor;
|
||||
import com.l2jserver.service.game.ai.AIScript;
|
||||
import com.l2jserver.util.calculator.Calculator;
|
||||
|
||||
/**
|
||||
* NPC stand for "Not Playable Character" and is an character that not player
|
||||
@@ -48,23 +45,6 @@ public class NPC extends AbstractActor {
|
||||
this.templateID = templateID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes an action on this NPC
|
||||
*
|
||||
* @param character
|
||||
* the interacting character
|
||||
* @param action
|
||||
* the action
|
||||
*/
|
||||
public void action(L2Character character, CharacterAction action) {
|
||||
getTemplate().action(this, character, action);
|
||||
}
|
||||
|
||||
public void receiveAttack(Calculator calculator, Actor attacker) {
|
||||
// TODO add buffs to calculator!
|
||||
getTemplate().receiveAttack(this, calculator, attacker);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the NPC template ID
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user