Unified javadoc format and related cleanups.
This commit is contained in:
@@ -36,7 +36,7 @@ public abstract class ReceivablePacket<T extends MMOClient<?>>extends AbstractPa
|
||||
public abstract void run();
|
||||
|
||||
/**
|
||||
* Reads <B>byte[]</B> from the buffer. <BR>
|
||||
* Reads <b>byte[]</b> from the buffer.<br>
|
||||
* Reads as many bytes as the length of the array.
|
||||
* @param dst : the byte array which will be filled with the data.
|
||||
*/
|
||||
@@ -46,8 +46,8 @@ public abstract class ReceivablePacket<T extends MMOClient<?>>extends AbstractPa
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads <B>byte[]</B> from the buffer. <BR>
|
||||
* Reads as many bytes as the given length (len). Starts to fill the byte array from the given offset to <B>offset</B> + <B>len</B>.
|
||||
* Reads <b>byte[]</b> from the buffer.<br>
|
||||
* Reads as many bytes as the given length (len). Starts to fill the byte array from the given offset to <b>offset</b> + <b>len</b>.
|
||||
* @param dst : the byte array which will be filled with the data.
|
||||
* @param offset : starts to fill the byte array from the given offset.
|
||||
* @param len : the given length of bytes to be read.
|
||||
@@ -58,7 +58,7 @@ public abstract class ReceivablePacket<T extends MMOClient<?>>extends AbstractPa
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads <B>byte</B> from the buffer. <BR>
|
||||
* Reads <b>byte</b> from the buffer.<br>
|
||||
* 8bit integer (00)
|
||||
* @return
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ public abstract class ReceivablePacket<T extends MMOClient<?>>extends AbstractPa
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads <B>short</B> from the buffer. <BR>
|
||||
* Reads <b>short</b> from the buffer.<br>
|
||||
* 16bit integer (00 00)
|
||||
* @return
|
||||
*/
|
||||
@@ -78,7 +78,7 @@ public abstract class ReceivablePacket<T extends MMOClient<?>>extends AbstractPa
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads <B>int</B> from the buffer. <BR>
|
||||
* Reads <b>int</b> from the buffer.<br>
|
||||
* 32bit integer (00 00 00 00)
|
||||
* @return
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ public abstract class ReceivablePacket<T extends MMOClient<?>>extends AbstractPa
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads <B>long</B> from the buffer. <BR>
|
||||
* Reads <b>long</b> from the buffer.<br>
|
||||
* 64bit integer (00 00 00 00 00 00 00 00)
|
||||
* @return
|
||||
*/
|
||||
@@ -98,7 +98,7 @@ public abstract class ReceivablePacket<T extends MMOClient<?>>extends AbstractPa
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads <B>double</B> from the buffer. <BR>
|
||||
* Reads <b>double</b> from the buffer.<br>
|
||||
* 64bit double precision float (00 00 00 00 00 00 00 00)
|
||||
* @return
|
||||
*/
|
||||
@@ -108,7 +108,7 @@ public abstract class ReceivablePacket<T extends MMOClient<?>>extends AbstractPa
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads <B>String</B> from the buffer.
|
||||
* Reads <b>String</b> from the buffer.
|
||||
* @return
|
||||
*/
|
||||
protected final String readS()
|
||||
|
||||
@@ -42,12 +42,11 @@ public class SelectorConfig
|
||||
public int MAX_READ_PER_PASS = 10;
|
||||
|
||||
/**
|
||||
* Defines how much time (in milis) should the selector sleep, an higher value increases throughput but also increases latency(to a max of the sleep value itself).<BR>
|
||||
* Also an extremely high value(usually > 100) will decrease throughput due to the server not doing enough sends per second (depends on max sends per pass).<BR>
|
||||
* <BR>
|
||||
* Recommended values:<BR>
|
||||
* 1 for minimal latency.<BR>
|
||||
* 10-30 for an latency/troughput trade-off based on your needs.<BR>
|
||||
* Defines how much time (in milis) should the selector sleep, an higher value increases throughput but also increases latency(to a max of the sleep value itself).<br>
|
||||
* Also an extremely high value(usually > 100) will decrease throughput due to the server not doing enough sends per second (depends on max sends per pass).<br>
|
||||
* Recommended values:<br>
|
||||
* 1 for minimal latency.<br>
|
||||
* 10-30 for an latency/troughput trade-off based on your needs.
|
||||
*/
|
||||
public int SLEEP_TIME = 10;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public abstract class SendablePacket<T extends MMOClient<?>>extends AbstractPack
|
||||
}
|
||||
|
||||
/**
|
||||
* Write <B>byte</B> to the buffer. <BR>
|
||||
* Write <b>byte</b> to the buffer.<br>
|
||||
* 8bit integer (00)
|
||||
* @param data
|
||||
*/
|
||||
@@ -48,7 +48,7 @@ public abstract class SendablePacket<T extends MMOClient<?>>extends AbstractPack
|
||||
}
|
||||
|
||||
/**
|
||||
* Write <B>double</B> to the buffer. <BR>
|
||||
* Write <b>double</b> to the buffer.<br>
|
||||
* 64bit double precision float (00 00 00 00 00 00 00 00)
|
||||
* @param value
|
||||
*/
|
||||
@@ -58,7 +58,7 @@ public abstract class SendablePacket<T extends MMOClient<?>>extends AbstractPack
|
||||
}
|
||||
|
||||
/**
|
||||
* Write <B>short</B> to the buffer. <BR>
|
||||
* Write <b>short</b> to the buffer.<br>
|
||||
* 16bit integer (00 00)
|
||||
* @param value
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ public abstract class SendablePacket<T extends MMOClient<?>>extends AbstractPack
|
||||
}
|
||||
|
||||
/**
|
||||
* Write <B>int</B> to the buffer. <BR>
|
||||
* Write <b>int</b> to the buffer.<br>
|
||||
* 32bit integer (00 00 00 00)
|
||||
* @param value
|
||||
*/
|
||||
@@ -78,7 +78,7 @@ public abstract class SendablePacket<T extends MMOClient<?>>extends AbstractPack
|
||||
}
|
||||
|
||||
/**
|
||||
* Write <B>long</B> to the buffer. <BR>
|
||||
* Write <b>long</b> to the buffer.<br>
|
||||
* 64bit integer (00 00 00 00 00 00 00 00)
|
||||
* @param value
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ public abstract class SendablePacket<T extends MMOClient<?>>extends AbstractPack
|
||||
}
|
||||
|
||||
/**
|
||||
* Write <B>byte[]</B> to the buffer. <BR>
|
||||
* Write <b>byte[]</b> to the buffer.<br>
|
||||
* 8bit integer array (00 ...)
|
||||
* @param data
|
||||
*/
|
||||
@@ -98,7 +98,7 @@ public abstract class SendablePacket<T extends MMOClient<?>>extends AbstractPack
|
||||
}
|
||||
|
||||
/**
|
||||
* Write <B>String</B> to the buffer.
|
||||
* Write <b>String</b> to the buffer.
|
||||
* @param text
|
||||
*/
|
||||
protected final void writeS(String text)
|
||||
|
||||
@@ -37,7 +37,7 @@ import java.util.Arrays;
|
||||
public class PrimeFinder
|
||||
{
|
||||
/**
|
||||
* The largest prime this class can generate; currently equal to <tt>Integer.MAX_VALUE</tt>.
|
||||
* The largest prime this class can generate; currently equal to <tt>Integer.MAX_VALUE</tt>
|
||||
*/
|
||||
public static final int LARGEST_PRIME = Integer.MAX_VALUE; // yes, it is prime.
|
||||
|
||||
|
||||
@@ -86,12 +86,11 @@ public class GameTimeController
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Creature to movingObjects of GameTimeController.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* All Creature in movement are identified in <B>movingObjects</B> of GameTimeController.<BR>
|
||||
* <BR>
|
||||
* Add a Creature to movingObjects of GameTimeController.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.
|
||||
* @param creature The Creature to add to movingObjects of GameTimeController
|
||||
*/
|
||||
public synchronized void registerMovingObject(Creature creature)
|
||||
@@ -108,18 +107,16 @@ public class GameTimeController
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* All Creature in movement are identified in <B>movingObjects</B> of GameTimeController.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Move all Creatures contained in movingObjects of GameTimeController.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Update the position of each Creature</li>
|
||||
* <li>If movement is finished, the Creature is removed from movingObjects</li>
|
||||
* <li>Create a task to update the _knownObject and _knowPlayers of each Creature that finished its movement and of their already known WorldObject then notify AI with EVT_ARRIVED</li><BR>
|
||||
* <BR>
|
||||
* <li>Create a task to update the _knownObject and _knowPlayers of each Creature that finished its movement and of their already known WorldObject then notify AI with EVT_ARRIVED</li>
|
||||
*/
|
||||
protected synchronized void moveObjects()
|
||||
{
|
||||
@@ -233,8 +230,7 @@ public class GameTimeController
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the _knownObject and _knowPlayers of each Creature that finished its movement and of their already known WorldObject then notify AI with EVT_ARRIVED.<BR>
|
||||
* <BR>
|
||||
* Update the _knownObject and _knowPlayers of each Creature that finished its movement and of their already known WorldObject then notify AI with EVT_ARRIVED.
|
||||
*/
|
||||
class MovingObjectArrived implements Runnable
|
||||
{
|
||||
|
||||
@@ -75,7 +75,6 @@ public class LoginServerThread extends Thread
|
||||
* The BlowFish engine used to encrypt packets<br>
|
||||
* It is first initialized with a unified key:<br>
|
||||
* "_;v.]05-31!|+-%xT!^[$\00"<br>
|
||||
* <br>
|
||||
* and then after handshake, with a new key sent by<br>
|
||||
* loginserver during the handshake. This new key is stored<br>
|
||||
* in {@link #_blowfishKey}
|
||||
|
||||
@@ -153,7 +153,7 @@ public class Shutdown extends Thread
|
||||
}
|
||||
else
|
||||
{
|
||||
// gm shutdown: send warnings and then call exit to start shutdown sequence
|
||||
// GM shutdown: send warnings and then call exit to start shutdown sequence
|
||||
countdown();
|
||||
|
||||
if (_shutdownMode != ABORT)
|
||||
@@ -543,7 +543,7 @@ public class Shutdown extends Thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the shutdown-hook instance the shutdown-hook instance is created by the first call of this function, but it has to be registered externally.<br>
|
||||
* Get the shutdown-hook instance the shutdown-hook instance is created by the first call of this function, but it has to be registered externally.
|
||||
* @return instance of Shutdown, to be used as shutdown hook
|
||||
*/
|
||||
public static Shutdown getInstance()
|
||||
|
||||
@@ -46,12 +46,10 @@ import org.l2jmobius.gameserver.network.serverpackets.StopRotation;
|
||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
|
||||
/**
|
||||
* Mother class of all objects AI in the world.<BR>
|
||||
* <BR>
|
||||
* AbastractAI :<BR>
|
||||
* <BR>
|
||||
* <li>CreatureAI</li><BR>
|
||||
* <BR>
|
||||
* Mother class of all objects AI in the world.<br>
|
||||
* <br>
|
||||
* AbastractAI:<br>
|
||||
* <li>CreatureAI</li>
|
||||
*/
|
||||
abstract class AbstractAI implements Ctrl
|
||||
{
|
||||
@@ -139,8 +137,7 @@ abstract class AbstractAI implements Ctrl
|
||||
private static final int ATTACK_FOLLOW_INTERVAL = 500;
|
||||
|
||||
/**
|
||||
* Constructor of AbstractAI.<BR>
|
||||
* <BR>
|
||||
* Constructor of AbstractAI.
|
||||
* @param accessor The AI accessor of the Creature
|
||||
*/
|
||||
protected AbstractAI(Creature.AIAccessor accessor)
|
||||
@@ -152,8 +149,7 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Creature managed by this Accessor AI.<BR>
|
||||
* <BR>
|
||||
* Return the Creature managed by this Accessor AI.
|
||||
*/
|
||||
@Override
|
||||
public Creature getActor()
|
||||
@@ -162,14 +158,13 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Intention of this AbstractAI.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method is USED by AI classes</B></FONT><BR>
|
||||
* <BR>
|
||||
* <B><U> Overriden in </U> : </B><BR>
|
||||
* <B>AttackableAI</B> : Create an AI Task executed every 1s (if necessary)<BR>
|
||||
* <B>L2PlayerAI</B> : Stores the current AI intention parameters to later restore it if necessary<BR>
|
||||
* <BR>
|
||||
* Set the Intention of this AbstractAI.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method is USED by AI classes</b></font><br>
|
||||
* <br>
|
||||
* <b><u>Overriden in</u>:</b><br>
|
||||
* <br>
|
||||
* <b>AttackableAI</b> : Create an AI Task executed every 1s (if necessary)<br>
|
||||
* <b>L2PlayerAI</b> : Stores the current AI intention parameters to later restore it if necessary
|
||||
* @param intention The new Intention to set to the AI
|
||||
* @param arg0 The first parameter of the Intention
|
||||
* @param arg1 The second parameter of the Intention
|
||||
@@ -182,10 +177,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch the CreatureAI onIntention method corresponding to the new Intention.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Stop the FOLLOW mode if necessary</B></FONT><BR>
|
||||
* <BR>
|
||||
* Launch the CreatureAI onIntention method corresponding to the new Intention.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Stop the FOLLOW mode if necessary</b></font>
|
||||
* @param intention The new Intention to set to the AI
|
||||
*/
|
||||
@Override
|
||||
@@ -195,10 +188,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch the CreatureAI onIntention method corresponding to the new Intention.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Stop the FOLLOW mode if necessary</B></FONT><BR>
|
||||
* <BR>
|
||||
* Launch the CreatureAI onIntention method corresponding to the new Intention.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Stop the FOLLOW mode if necessary</b></font>
|
||||
* @param intention The new Intention to set to the AI
|
||||
* @param arg0 The first parameter of the Intention (optional target)
|
||||
*/
|
||||
@@ -209,10 +200,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch the CreatureAI onIntention method corresponding to the new Intention.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Stop the FOLLOW mode if necessary</B></FONT><BR>
|
||||
* <BR>
|
||||
* Launch the CreatureAI onIntention method corresponding to the new Intention.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Stop the FOLLOW mode if necessary</b></font>
|
||||
* @param intention The new Intention to set to the AI
|
||||
* @param arg0 The first parameter of the Intention (optional target)
|
||||
* @param arg1 The second parameter of the Intention (optional target)
|
||||
@@ -288,10 +277,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch the CreatureAI onEvt method corresponding to the Event.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : The current general intention won't be change (ex : If the character attack and is stunned, he will attack again after the stunned periode)</B></FONT><BR>
|
||||
* <BR>
|
||||
* Launch the CreatureAI onEvt method corresponding to the Event.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: The current general intention won't be change (ex : If the character attack and is stunned, he will attack again after the stunned periode)</b></font>
|
||||
* @param evt The event whose the AI must be notified
|
||||
*/
|
||||
@Override
|
||||
@@ -301,10 +288,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch the CreatureAI onEvt method corresponding to the Event.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : The current general intention won't be change (ex : If the character attack and is stunned, he will attack again after the stunned periode)</B></FONT><BR>
|
||||
* <BR>
|
||||
* Launch the CreatureAI onEvt method corresponding to the Event.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: The current general intention won't be change (ex : If the character attack and is stunned, he will attack again after the stunned periode)</b></font>
|
||||
* @param evt The event whose the AI must be notified
|
||||
* @param arg0 The first parameter of the Event (optional target)
|
||||
*/
|
||||
@@ -315,10 +300,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch the CreatureAI onEvt method corresponding to the Event.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : The current general intention won't be change (ex : If the character attack and is stunned, he will attack again after the stunned periode)</B></FONT><BR>
|
||||
* <BR>
|
||||
* Launch the CreatureAI onEvt method corresponding to the Event.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: The current general intention won't be change (ex : If the character attack and is stunned, he will attack again after the stunned periode)</b></font>
|
||||
* @param evt The event whose the AI must be notified
|
||||
* @param arg0 The first parameter of the Event (optional target)
|
||||
* @param arg1 The second parameter of the Event (optional target)
|
||||
@@ -483,10 +466,8 @@ abstract class AbstractAI implements Ctrl
|
||||
protected abstract void onEvtFinishCasting();
|
||||
|
||||
/**
|
||||
* Cancel action client side by sending Server->Client packet ActionFailed to the PlayerInstance actor.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT><BR>
|
||||
* <BR>
|
||||
* Cancel action client side by sending Server->Client packet ActionFailed to the PlayerInstance actor.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Low level function, used by AI subclasses</b></font>
|
||||
*/
|
||||
protected void clientActionFailed()
|
||||
{
|
||||
@@ -497,10 +478,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Move the actor to Pawn server side AND client side by sending Server->Client packet MoveToPawn <I>(broadcast)</I>.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT><BR>
|
||||
* <BR>
|
||||
* Move the actor to Pawn server side AND client side by sending Server->Client packet MoveToPawn <i>(broadcast)</i>.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Low level function, used by AI subclasses</b></font>
|
||||
* @param pawn
|
||||
* @param offset
|
||||
*/
|
||||
@@ -590,10 +569,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation <I>(broadcast)</I>.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT><BR>
|
||||
* <BR>
|
||||
* Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation <i>(broadcast)</i>.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Low level function, used by AI subclasses</b></font>
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
@@ -638,10 +615,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation <I>(broadcast)</I>.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT><BR>
|
||||
* <BR>
|
||||
* Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation <i>(broadcast)</i>.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Low level function, used by AI subclasses</b></font>
|
||||
* @param pos
|
||||
*/
|
||||
protected void clientStopMoving(Location pos)
|
||||
@@ -683,10 +658,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the actor Auto Attack client side by sending Server->Client packet AutoAttackStart <I>(broadcast)</I>.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT><BR>
|
||||
* <BR>
|
||||
* Start the actor Auto Attack client side by sending Server->Client packet AutoAttackStart <i>(broadcast)</i>.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Low level function, used by AI subclasses</b></font>
|
||||
*/
|
||||
public void clientStartAutoAttack()
|
||||
{
|
||||
@@ -718,10 +691,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop <I>(broadcast)</I>.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT><BR>
|
||||
* <BR>
|
||||
* Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop <i>(broadcast)</i>.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Low level function, used by AI subclasses</b></font>
|
||||
*/
|
||||
public void clientStopAutoAttack()
|
||||
{
|
||||
@@ -752,10 +723,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Kill the actor client side by sending Server->Client packet AutoAttackStop, StopMove/StopRotation, Die <I>(broadcast)</I>.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT><BR>
|
||||
* <BR>
|
||||
* Kill the actor client side by sending Server->Client packet AutoAttackStop, StopMove/StopRotation, Die <i>(broadcast)</i>.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Low level function, used by AI subclasses</b></font>
|
||||
*/
|
||||
protected void clientNotifyDead()
|
||||
{
|
||||
@@ -773,10 +742,8 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT><BR>
|
||||
* <BR>
|
||||
* Update the state of this actor client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance player.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Low level function, used by AI subclasses</b></font>
|
||||
* @param player The PlayerIstance to notify with state of this Creature
|
||||
*/
|
||||
public void describeStateToPlayer(PlayerInstance player)
|
||||
@@ -798,8 +765,7 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and Launch an AI Follow Task to execute every 1s.<BR>
|
||||
* <BR>
|
||||
* Create and Launch an AI Follow Task to execute every 1s.
|
||||
* @param target The Creature to follow
|
||||
*/
|
||||
public synchronized void startFollow(Creature target)
|
||||
@@ -816,8 +782,7 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and Launch an AI Follow Task to execute every 0.5s, following at specified range.<BR>
|
||||
* <BR>
|
||||
* Create and Launch an AI Follow Task to execute every 0.5s, following at specified range.
|
||||
* @param target The Creature to follow
|
||||
* @param range
|
||||
*/
|
||||
@@ -834,8 +799,7 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop an AI Follow Task.<BR>
|
||||
* <BR>
|
||||
* Stop an AI Follow Task.
|
||||
*/
|
||||
public synchronized void stopFollow()
|
||||
{
|
||||
@@ -882,8 +846,7 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Return current attack target.<BR>
|
||||
* <BR>
|
||||
* Return current attack target.
|
||||
*/
|
||||
@Override
|
||||
public synchronized Creature getAttackTarget()
|
||||
@@ -934,8 +897,7 @@ abstract class AbstractAI implements Ctrl
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current Intention.<BR>
|
||||
* <BR>
|
||||
* Return the current Intention.
|
||||
*/
|
||||
@Override
|
||||
public synchronized CtrlIntention getIntention()
|
||||
|
||||
@@ -58,8 +58,7 @@ import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
||||
|
||||
/**
|
||||
* This class manages AI of Attackable.<BR>
|
||||
* <BR>
|
||||
* This class manages AI of Attackable.
|
||||
*/
|
||||
public class AttackableAI extends CreatureAI
|
||||
{
|
||||
@@ -82,8 +81,7 @@ public class AttackableAI extends CreatureAI
|
||||
private boolean _thinking; // to prevent recursive thinking
|
||||
|
||||
/**
|
||||
* Constructor of AttackableAI.<BR>
|
||||
* <BR>
|
||||
* Constructor of AttackableAI.
|
||||
* @param accessor The AI accessor of the Creature
|
||||
*/
|
||||
public AttackableAI(Creature.AIAccessor accessor)
|
||||
@@ -94,38 +92,33 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the target is autoattackable (depends on the actor type).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a GuardInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* Return True if the target is autoattackable (depends on the actor type).<br>
|
||||
* <br>
|
||||
* <b><u>Actor is a GuardInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk or a Door</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>The PlayerInstance target has karma (=PK)</li>
|
||||
* <li>The MonsterInstance target is aggressive</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a SiegeGuardInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>The MonsterInstance target is aggressive</li><br>
|
||||
* <br>
|
||||
* <b><u>Actor is a SiegeGuardInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk or a Door</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>A siege is in progress</li>
|
||||
* <li>The PlayerInstance target isn't a Defender</li> <BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a FriendlyMobInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>The PlayerInstance target isn't a Defender</li><br>
|
||||
* <br>
|
||||
* <b><u>Actor is a FriendlyMobInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk, a Door or another NpcInstance</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>The PlayerInstance target has karma (=PK)</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a MonsterInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>The PlayerInstance target has karma (=PK)</li><br>
|
||||
* <br>
|
||||
* <b><u>Actor is a MonsterInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk, a Door or another NpcInstance</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>The actor is Aggressive</li><BR>
|
||||
* <BR>
|
||||
* <li>The actor is Aggressive</li><br>
|
||||
* @param target The targeted WorldObject
|
||||
* @return
|
||||
*/
|
||||
@@ -324,10 +317,8 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Intention of this CreatureAI and create an AI Task executed every 1s (call onEvtThink method) for this Attackable.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : If actor _knowPlayer isn't EMPTY, AI_INTENTION_IDLE will be change in AI_INTENTION_ACTIVE</B></FONT><BR>
|
||||
* <BR>
|
||||
* Set the Intention of this CreatureAI and create an AI Task executed every 1s (call onEvtThink method) for this Attackable.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: If actor _knowPlayer isn't EMPTY, AI_INTENTION_IDLE will be change in AI_INTENTION_ACTIVE</b></font>
|
||||
* @param intention The new Intention to set to the AI
|
||||
* @param arg0 The first parameter of the Intention
|
||||
* @param arg1 The second parameter of the Intention
|
||||
@@ -372,8 +363,7 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Attack Intention : Stop current Attack (if necessary), Calculate attack timeout, Start a new Attack and Launch Think Event.<BR>
|
||||
* <BR>
|
||||
* Manage the Attack Intention : Stop current Attack (if necessary), Calculate attack timeout, Start a new Attack and Launch Think Event.
|
||||
* @param target The Creature to attack
|
||||
*/
|
||||
@Override
|
||||
@@ -387,15 +377,13 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage AI standard thinks of a Attackable (called by onEvtThink).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage AI standard thinks of a Attackable (called by onEvtThink).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Update every 1s the _globalAggro counter to come close to 0</li>
|
||||
* <li>If the actor is Aggressive and can attack, add all autoAttackable Creature in its Aggro Range to its _aggroList, chose a target and order to attack it</li>
|
||||
* <li>If the actor is a GuardInstance that can't attack, order to it to return to its home location</li>
|
||||
* <li>If the actor is a MonsterInstance that can't attack, order to it to random walk (1/100)</li><BR>
|
||||
* <BR>
|
||||
* <li>If the actor is a MonsterInstance that can't attack, order to it to random walk (1/100)</li>
|
||||
*/
|
||||
private void thinkActive()
|
||||
{
|
||||
@@ -612,15 +600,13 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage AI attack thinks of a Attackable (called by onEvtThink).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage AI attack thinks of a Attackable (called by onEvtThink).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Update the attack timeout if actor is running</li>
|
||||
* <li>If target is dead or timeout is expired, stop this attack and set the Intention to AI_INTENTION_ACTIVE</li>
|
||||
* <li>Call all WorldObject of its Faction inside the Faction Range</li>
|
||||
* <li>Chose a target and order to attack it with magic skill or physical attack</li><BR>
|
||||
* <BR>
|
||||
* <li>Chose a target and order to attack it with magic skill or physical attack</li><br>
|
||||
* TODO: Manage casting rules to healer mobs (like Ant Nurses)
|
||||
*/
|
||||
private void thinkAttack()
|
||||
@@ -1021,8 +1007,7 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage AI thinking actions of a Attackable.<BR>
|
||||
* <BR>
|
||||
* Manage AI thinking actions of a Attackable.
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtThink()
|
||||
@@ -1056,14 +1041,12 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Attacked.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Attacked.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Init the attack : Calculate the attack timeout, Set the _globalAggro to 0, Add the attacker to the actor _aggroList</li>
|
||||
* <li>Set the Creature movement type to run and send Server->Client packet ChangeMoveType to all others PlayerInstance</li>
|
||||
* <li>Set the Intention to AI_INTENTION_ATTACK</li> <BR>
|
||||
* <BR>
|
||||
* <li>Set the Intention to AI_INTENTION_ATTACK</li>
|
||||
* @param attacker The Creature that attacks the actor
|
||||
*/
|
||||
@Override
|
||||
@@ -1104,13 +1087,11 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Aggression.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Aggression.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Add the target to the actor _aggroList or update hate if already present</li>
|
||||
* <li>Set the actor Intention to AI_INTENTION_ATTACK (if actor is GuardInstance check if it isn't too far from its home location)</li><BR>
|
||||
* <BR>
|
||||
* <li>Set the actor Intention to AI_INTENTION_ATTACK (if actor is GuardInstance check if it isn't too far from its home location)</li><br>
|
||||
* @param target the Creature that attacks
|
||||
* @param aggro The value of hate to add to the actor against the target
|
||||
*/
|
||||
|
||||
@@ -44,15 +44,13 @@ import org.l2jmobius.gameserver.network.serverpackets.AutoAttackStop;
|
||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
|
||||
/**
|
||||
* This class manages AI of Creature.<BR>
|
||||
* <BR>
|
||||
* CreatureAI :<BR>
|
||||
* <BR>
|
||||
* This class manages AI of Creature.<br>
|
||||
* <br>
|
||||
* CreatureAI:<br>
|
||||
* <li>AttackableAI</li>
|
||||
* <li>DoorAI</li>
|
||||
* <li>PlayerAI</li>
|
||||
* <li>SummonAI</li><BR>
|
||||
* <BR>
|
||||
* <li>SummonAI</li>
|
||||
*/
|
||||
public class CreatureAI extends AbstractAI
|
||||
{
|
||||
@@ -66,8 +64,7 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor of CreatureAI.<BR>
|
||||
* <BR>
|
||||
* Constructor of CreatureAI.
|
||||
* @param accessor The AI accessor of the Creature
|
||||
*/
|
||||
public CreatureAI(Creature.AIAccessor accessor)
|
||||
@@ -76,16 +73,14 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Idle Intention : Stop Attack, Movement and Stand Up the actor.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage the Idle Intention : Stop Attack, Movement and Stand Up the actor.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Set the AI Intention to AI_INTENTION_IDLE</li>
|
||||
* <li>Init cast and attack target</li>
|
||||
* <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
|
||||
* <li>Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)</li>
|
||||
* <li>Stand up the actor server side AND client side by sending Server->Client packet ChangeWaitType (broadcast)</li><BR>
|
||||
* <BR>
|
||||
* <li>Stand up the actor server side AND client side by sending Server->Client packet ChangeWaitType (broadcast)</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onIntentionIdle()
|
||||
@@ -105,16 +100,14 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Active Intention : Stop Attack, Movement and Launch Think Event.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : <I>if the Intention is not already Active</I></B><BR>
|
||||
* <BR>
|
||||
* Manage the Active Intention : Stop Attack, Movement and Launch Think Event.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : <i>if the Intention is not already Active</i></b><br>
|
||||
* <li>Set the AI Intention to AI_INTENTION_ACTIVE</li>
|
||||
* <li>Init cast and attack target</li>
|
||||
* <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
|
||||
* <li>Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)</li>
|
||||
* <li>Launch the Think Event</li><BR>
|
||||
* <BR>
|
||||
* <li>Launch the Think Event</li><br>
|
||||
* @param target
|
||||
*/
|
||||
protected void onIntentionActive(Creature target)
|
||||
@@ -148,12 +141,10 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Rest Intention.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : </B><BR>
|
||||
* <BR>
|
||||
* <li>Set the AI Intention to AI_INTENTION_IDLE</li><BR>
|
||||
* <BR>
|
||||
* Manage the Rest Intention.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : </b><br>
|
||||
* <li>Set the AI Intention to AI_INTENTION_IDLE</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onIntentionRest()
|
||||
@@ -163,20 +154,17 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Attack Intention : Stop current Attack (if necessary), Start a new Attack and Launch Think Event.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : </B><BR>
|
||||
* <BR>
|
||||
* Manage the Attack Intention : Stop current Attack (if necessary), Start a new Attack and Launch Think Event.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : </b><br>
|
||||
* <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
|
||||
* <li>Set the Intention of this AI to AI_INTENTION_ATTACK</li>
|
||||
* <li>Set or change the AI attack target</li>
|
||||
* <li>Start the actor Auto Attack client side by sending Server->Client packet AutoAttackStart (broadcast)</li>
|
||||
* <li>Launch the Think Event</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Overridden in</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>AttackableAI : Calculate attack timeout</li><BR>
|
||||
* <BR>
|
||||
* <li>Launch the Think Event</li><br>
|
||||
* <br>
|
||||
* <b><u>Overridden in</u>:</b><br>
|
||||
* <li>AttackableAI : Calculate attack timeout</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onIntentionAttack(Creature target)
|
||||
@@ -236,17 +224,15 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Cast Intention : Stop current Attack, Init the AI in order to cast and Launch Think Event.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : </B><BR>
|
||||
* <BR>
|
||||
* Manage the Cast Intention : Stop current Attack, Init the AI in order to cast and Launch Think Event.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : </b><br>
|
||||
* <li>Set the AI cast target</li>
|
||||
* <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
|
||||
* <li>Cancel action client side by sending Server->Client packet ActionFailed to the PlayerInstance actor</li>
|
||||
* <li>Set the AI skill used by INTENTION_CAST</li>
|
||||
* <li>Set the Intention of this AI to AI_INTENTION_CAST</li>
|
||||
* <li>Launch the Think Event</li><BR>
|
||||
* <BR>
|
||||
* <li>Launch the Think Event</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onIntentionCast(Skill skill, WorldObject target)
|
||||
@@ -303,14 +289,12 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Move To Intention : Stop current Attack and Launch a Move to Location Task.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : </B><BR>
|
||||
* <BR>
|
||||
* Manage the Move To Intention : Stop current Attack and Launch a Move to Location Task.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : </b><br>
|
||||
* <li>Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
|
||||
* <li>Set the Intention of this AI to AI_INTENTION_MOVE_TO</li>
|
||||
* <li>Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)</li><BR>
|
||||
* <BR>
|
||||
* <li>Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onIntentionMoveTo(Location pos)
|
||||
@@ -396,14 +380,12 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Follow Intention : Stop current Attack and Launch a Follow Task.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : </B><BR>
|
||||
* <BR>
|
||||
* Manage the Follow Intention : Stop current Attack and Launch a Follow Task.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : </b><br>
|
||||
* <li>Stop the actor auto-attack server side AND client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
|
||||
* <li>Set the Intention of this AI to AI_INTENTION_FOLLOW</li>
|
||||
* <li>Create and Launch an AI Follow Task to execute every 1s</li><BR>
|
||||
* <BR>
|
||||
* <li>Create and Launch an AI Follow Task to execute every 1s</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onIntentionFollow(Creature target)
|
||||
@@ -454,14 +436,12 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the PickUp Intention : Set the pick up target and Launch a Move To Pawn Task (offset=20).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : </B><BR>
|
||||
* <BR>
|
||||
* Manage the PickUp Intention : Set the pick up target and Launch a Move To Pawn Task (offset=20).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : </b><br>
|
||||
* <li>Set the AI pick up target</li>
|
||||
* <li>Set the Intention of this AI to AI_INTENTION_PICK_UP</li>
|
||||
* <li>Move the actor to Pawn server side AND client side by sending Server->Client packet MoveToPawn (broadcast)</li><BR>
|
||||
* <BR>
|
||||
* <li>Move the actor to Pawn server side AND client side by sending Server->Client packet MoveToPawn (broadcast)</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onIntentionPickUp(WorldObject object)
|
||||
@@ -512,15 +492,13 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Interact Intention : Set the interact target and Launch a Move To Pawn Task (offset=60).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : </B><BR>
|
||||
* <BR>
|
||||
* Manage the Interact Intention : Set the interact target and Launch a Move To Pawn Task (offset=60).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : </b><br>
|
||||
* <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
|
||||
* <li>Set the AI interact target</li>
|
||||
* <li>Set the Intention of this AI to AI_INTENTION_INTERACT</li>
|
||||
* <li>Move the actor to Pawn server side AND client side by sending Server->Client packet MoveToPawn (broadcast)</li><BR>
|
||||
* <BR>
|
||||
* <li>Move the actor to Pawn server side AND client side by sending Server->Client packet MoveToPawn (broadcast)</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onIntentionInteract(WorldObject object)
|
||||
@@ -556,8 +534,7 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Do nothing.<BR>
|
||||
* <BR>
|
||||
* Do nothing.
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtThink()
|
||||
@@ -566,8 +543,7 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Do nothing.<BR>
|
||||
* <BR>
|
||||
* Do nothing.
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtAggression(Creature target, int aggro)
|
||||
@@ -576,16 +552,14 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Stunned then onAttacked Event.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Stunned then onAttacked Event.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
|
||||
* <li>Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)</li>
|
||||
* <li>Break an attack and send Server->Client ActionFailed packet and a System Message to the Creature</li>
|
||||
* <li>Break a cast and send Server->Client ActionFailed packet and a System Message to the Creature</li>
|
||||
* <li>Launch actions corresponding to the Event onAttacked (only for AttackableAI after the stunning periode)</li><BR>
|
||||
* <BR>
|
||||
* <li>Launch actions corresponding to the Event onAttacked (only for AttackableAI after the stunning periode)</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtStunned(Creature attacker)
|
||||
@@ -608,15 +582,13 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Sleeping.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Sleeping.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
|
||||
* <li>Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)</li>
|
||||
* <li>Break an attack and send Server->Client ActionFailed packet and a System Message to the Creature</li>
|
||||
* <li>Break a cast and send Server->Client ActionFailed packet and a System Message to the Creature</li><BR>
|
||||
* <BR>
|
||||
* <li>Break a cast and send Server->Client ActionFailed packet and a System Message to the Creature</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtSleeping(Creature attacker)
|
||||
@@ -636,13 +608,11 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Rooted.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Rooted.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)</li>
|
||||
* <li>Launch actions corresponding to the Event onAttacked</li><BR>
|
||||
* <BR>
|
||||
* <li>Launch actions corresponding to the Event onAttacked</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtRooted(Creature attacker)
|
||||
@@ -660,13 +630,11 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Confused.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Confused.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)</li>
|
||||
* <li>Launch actions corresponding to the Event onAttacked</li><BR>
|
||||
* <BR>
|
||||
* <li>Launch actions corresponding to the Event onAttacked</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtConfused(Creature attacker)
|
||||
@@ -679,12 +647,10 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Muted.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Break a cast and send Server->Client ActionFailed packet and a System Message to the Creature</li><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Muted.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Break a cast and send Server->Client ActionFailed packet and a System Message to the Creature</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtMuted(Creature attacker)
|
||||
@@ -694,12 +660,10 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event ReadyToAct.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Launch actions corresponding to the Event Think</li><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event ReadyToAct.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Launch actions corresponding to the Event Think</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtReadyToAct()
|
||||
@@ -709,8 +673,7 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Do nothing.<BR>
|
||||
* <BR>
|
||||
* Do nothing.
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtUserCmd(Object arg0, Object arg1)
|
||||
@@ -719,13 +682,11 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Arrived.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Arrived.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>If the Intention was AI_INTENTION_MOVE_TO, set the Intention to AI_INTENTION_ACTIVE</li>
|
||||
* <li>Launch actions corresponding to the Event Think</li><BR>
|
||||
* <BR>
|
||||
* <li>Launch actions corresponding to the Event Think</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtArrived()
|
||||
@@ -763,12 +724,10 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event ArrivedRevalidate.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Launch actions corresponding to the Event Think</li><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event ArrivedRevalidate.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Launch actions corresponding to the Event Think</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtArrivedRevalidate()
|
||||
@@ -778,14 +737,12 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event ArrivedBlocked.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event ArrivedBlocked.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)</li>
|
||||
* <li>If the Intention was AI_INTENTION_MOVE_TO, set the Intention to AI_INTENTION_ACTIVE</li>
|
||||
* <li>Launch actions corresponding to the Event Think</li><BR>
|
||||
* <BR>
|
||||
* <li>Launch actions corresponding to the Event Think</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtArrivedBlocked(Location location)
|
||||
@@ -804,16 +761,14 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event ForgetObject.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event ForgetObject.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>If the object was targeted and the Intention was AI_INTENTION_INTERACT or AI_INTENTION_PICK_UP, set the Intention to AI_INTENTION_ACTIVE</li>
|
||||
* <li>If the object was targeted to attack, stop the auto-attack, cancel target and set the Intention to AI_INTENTION_ACTIVE</li>
|
||||
* <li>If the object was targeted to cast, cancel target and set the Intention to AI_INTENTION_ACTIVE</li>
|
||||
* <li>If the object was targeted to follow, stop the movement, cancel AI Follow Task and set the Intention to AI_INTENTION_ACTIVE</li>
|
||||
* <li>If the targeted object was the actor , cancel AI target, stop AI Follow Task, stop the movement and set the Intention to AI_INTENTION_IDLE</li><BR>
|
||||
* <BR>
|
||||
* <li>If the targeted object was the actor , cancel AI target, stop AI Follow Task, stop the movement and set the Intention to AI_INTENTION_IDLE</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtForgetObject(WorldObject object)
|
||||
@@ -886,13 +841,11 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Cancel.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Cancel.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Stop an AI Follow Task</li>
|
||||
* <li>Launch actions corresponding to the Event Think</li><BR>
|
||||
* <BR>
|
||||
* <li>Launch actions corresponding to the Event Think</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtCancel()
|
||||
@@ -910,13 +863,11 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Dead.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Dead.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Stop an AI Follow Task</li>
|
||||
* <li>Kill the actor client side by sending Server->Client packet AutoAttackStop, StopMove/StopRotation, Die (broadcast)</li><BR>
|
||||
* <BR>
|
||||
* <li>Kill the actor client side by sending Server->Client packet AutoAttackStop, StopMove/StopRotation, Die (broadcast)</li>
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtDead()
|
||||
@@ -934,10 +885,9 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Fake Death.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Fake Death.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Stop an AI Follow Task</li>
|
||||
*/
|
||||
@Override
|
||||
@@ -957,8 +907,7 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Do nothing.<BR>
|
||||
* <BR>
|
||||
* Do nothing.
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtFinishCasting()
|
||||
@@ -967,18 +916,15 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Move to Pawn action in function of the distance and of the Interact area.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage the Move to Pawn action in function of the distance and of the Interact area.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Get the distance between the current position of the Creature and the target (x,y)</li>
|
||||
* <li>If the distance > offset+20, move the actor (by running) to Pawn server side AND client side by sending Server->Client packet MoveToPawn (broadcast)</li>
|
||||
* <li>If the distance <= offset+20, Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>PLayerAI, SummonAI</li><BR>
|
||||
* <BR>
|
||||
* <li>If the distance <= offset+20, Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)</li><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>PLayerAI, SummonAI</li><br>
|
||||
* @param target The targeted WorldObject
|
||||
* @param offset The Interact area radius
|
||||
* @return True if a movement must be done
|
||||
@@ -1085,20 +1031,17 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify current Intention and actions if the target is lost or dead.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : <I>If the target is lost or dead</I></B><BR>
|
||||
* <BR>
|
||||
* Modify current Intention and actions if the target is lost or dead.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : <i>If the target is lost or dead</i></b><br>
|
||||
* <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
|
||||
* <li><BR>
|
||||
* Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation<BR>
|
||||
* <li><br>
|
||||
* Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation<br>
|
||||
* (broadcast)</li>
|
||||
* <li>Set the Intention of this AbstractAI to AI_INTENTION_ACTIVE</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>PLayerAI, SummonAI</li><BR>
|
||||
* <BR>
|
||||
* <li>Set the Intention of this AbstractAI to AI_INTENTION_ACTIVE</li><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>PLayerAI, SummonAI</li><br>
|
||||
* @param target The targeted WorldObject
|
||||
* @return True if the target is lost or dead (false if fakedeath)
|
||||
*/
|
||||
@@ -1122,18 +1065,15 @@ public class CreatureAI extends AbstractAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify current Intention and actions if the target is lost.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : <I>If the target is lost</I></B><BR>
|
||||
* <BR>
|
||||
* Modify current Intention and actions if the target is lost.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : <i>If the target is lost</i></b><br>
|
||||
* <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
|
||||
* <li>Stop the actor movement server side AND client side by sending Server->Client packet StopMove/StopRotation (broadcast)</li>
|
||||
* <li>Set the Intention of this AbstractAI to AI_INTENTION_ACTIVE</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>PLayerAI, SummonAI</li><BR>
|
||||
* <BR>
|
||||
* <li>Set the Intention of this AbstractAI to AI_INTENTION_ACTIVE</li><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>PLayerAI, SummonAI</li><br>
|
||||
* @param target The targeted WorldObject
|
||||
* @return True if the target is lost
|
||||
*/
|
||||
|
||||
@@ -83,8 +83,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
private final int _attackRange;
|
||||
|
||||
/**
|
||||
* Constructor of AttackableAI.<BR>
|
||||
* <BR>
|
||||
* Constructor of AttackableAI.
|
||||
* @param accessor The AI accessor of the Creature
|
||||
*/
|
||||
public FortSiegeGuardAI(Creature.AIAccessor accessor)
|
||||
@@ -104,38 +103,33 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the target is autoattackable (depends on the actor type).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a GuardInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* Return True if the target is autoattackable (depends on the actor type).<br>
|
||||
* <br>
|
||||
* <b><u>Actor is a GuardInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk or a Door</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>The PlayerInstance target has karma (=PK)</li>
|
||||
* <li>The MonsterInstance target is aggressive</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a SiegeGuardInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>The MonsterInstance target is aggressive</li><br>
|
||||
* <br>
|
||||
* <b><u>Actor is a SiegeGuardInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk or a Door</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>A siege is in progress</li>
|
||||
* <li>The PlayerInstance target isn't a Defender</li> <BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a FriendlyMobInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>The PlayerInstance target isn't a Defender</li><br>
|
||||
* <br>
|
||||
* <b><u>Actor is a FriendlyMobInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk, a Door or another NpcInstance</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>The PlayerInstance target has karma (=PK)</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a MonsterInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>The PlayerInstance target has karma (=PK)</li><br>
|
||||
* <br>
|
||||
* <b><u>Actor is a MonsterInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk, a Door or another NpcInstance</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>The actor is Aggressive</li><BR>
|
||||
* <BR>
|
||||
* <li>The actor is Aggressive</li><br>
|
||||
* @param target The targeted WorldObject
|
||||
* @return
|
||||
*/
|
||||
@@ -197,10 +191,8 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Intention of this CreatureAI and create an AI Task executed every 1s (call onEvtThink method) for this Attackable.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : If actor _knowPlayer isn't EMPTY, AI_INTENTION_IDLE will be change in AI_INTENTION_ACTIVE</B></FONT><BR>
|
||||
* <BR>
|
||||
* Set the Intention of this CreatureAI and create an AI Task executed every 1s (call onEvtThink method) for this Attackable.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: If actor _knowPlayer isn't EMPTY, AI_INTENTION_IDLE will be change in AI_INTENTION_ACTIVE</b></font>
|
||||
* @param intention The new Intention to set to the AI
|
||||
* @param arg0 The first parameter of the Intention
|
||||
* @param arg1 The second parameter of the Intention
|
||||
@@ -256,8 +248,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Attack Intention : Stop current Attack (if necessary), Calculate attack timeout, Start a new Attack and Launch Think Event.<BR>
|
||||
* <BR>
|
||||
* Manage the Attack Intention : Stop current Attack (if necessary), Calculate attack timeout, Start a new Attack and Launch Think Event.
|
||||
* @param target The Creature to attack
|
||||
*/
|
||||
@Override
|
||||
@@ -272,10 +263,9 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage AI standard thinks of a Attackable (called by onEvtThink).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage AI standard thinks of a Attackable (called by onEvtThink).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Update every 1s the _globalAggro counter to come close to 0</li>
|
||||
* <li>If the actor is Aggressive and can attack, add all autoAttackable Creature in its Aggro Range to its _aggroList, chose a target and order to attack it</li>
|
||||
* <li>If the actor can't attack, order to it to return to its home location</li>
|
||||
@@ -367,15 +357,13 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage AI attack thinks of a Attackable (called by onEvtThink).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage AI attack thinks of a Attackable (called by onEvtThink).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Update the attack timeout if actor is running</li>
|
||||
* <li>If target is dead or timeout is expired, stop this attack and set the Intention to AI_INTENTION_ACTIVE</li>
|
||||
* <li>Call all WorldObject of its Faction inside the Faction Range</li>
|
||||
* <li>Chose a target and order to attack it with magic skill or physical attack</li><BR>
|
||||
* <BR>
|
||||
* <li>Chose a target and order to attack it with magic skill or physical attack</li><br>
|
||||
* TODO: Manage casting rules to healer mobs (like Ant Nurses)
|
||||
*/
|
||||
private void thinkAttack()
|
||||
@@ -828,8 +816,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage AI thinking actions of a Attackable.<BR>
|
||||
* <BR>
|
||||
* Manage AI thinking actions of a Attackable.
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtThink()
|
||||
@@ -866,14 +853,12 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Attacked.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Attacked.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Init the attack : Calculate the attack timeout, Set the _globalAggro to 0, Add the attacker to the actor _aggroList</li>
|
||||
* <li>Set the Creature movement type to run and send Server->Client packet ChangeMoveType to all others PlayerInstance</li>
|
||||
* <li>Set the Intention to AI_INTENTION_ATTACK</li> <BR>
|
||||
* <BR>
|
||||
* <li>Set the Intention to AI_INTENTION_ATTACK</li>
|
||||
* @param attacker The Creature that attacks the actor
|
||||
*/
|
||||
@Override
|
||||
@@ -907,13 +892,11 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Aggression.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Aggression.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Add the target to the actor _aggroList or update hate if already present</li>
|
||||
* <li>Set the actor Intention to AI_INTENTION_ATTACK (if actor is GuardInstance check if it isn't too far from its home location)</li><BR>
|
||||
* <BR>
|
||||
* <li>Set the actor Intention to AI_INTENTION_ATTACK (if actor is GuardInstance check if it isn't too far from its home location)</li><br>
|
||||
* @param target The Creature that attacks
|
||||
* @param aggro The value of hate to add to the actor against the target
|
||||
*/
|
||||
|
||||
@@ -60,8 +60,7 @@ public class NpcWalkerAI extends CreatureAI implements Runnable
|
||||
private int _currentPos;
|
||||
|
||||
/**
|
||||
* Constructor of CreatureAI.<BR>
|
||||
* <BR>
|
||||
* Constructor of CreatureAI.
|
||||
* @param accessor The AI accessor of the Creature
|
||||
*/
|
||||
public NpcWalkerAI(Creature.AIAccessor accessor)
|
||||
|
||||
@@ -64,8 +64,7 @@ public class PlayerAI extends CreatureAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the current Intention for this PlayerAI if necessary and calls changeIntention in AbstractAI.<BR>
|
||||
* <BR>
|
||||
* Saves the current Intention for this PlayerAI if necessary and calls changeIntention in AbstractAI.
|
||||
* @param intention The new Intention to set to the AI
|
||||
* @param arg0 The first parameter of the Intention
|
||||
* @param arg1 The second parameter of the Intention
|
||||
@@ -97,9 +96,8 @@ public class PlayerAI extends CreatureAI
|
||||
}
|
||||
|
||||
/**
|
||||
* Finalize the casting of a skill. This method overrides CreatureAI method.<BR>
|
||||
* <BR>
|
||||
* <B>What it does:</B> Check if actual intention is set to CAST and, if so, retrieves latest intention before the actual CAST and set it as the current intention for the player
|
||||
* Finalize the casting of a skill. This method overrides CreatureAI method.<br>
|
||||
* <b>What it does:</b> Check if actual intention is set to CAST and, if so, retrieves latest intention before the actual CAST and set it as the current intention for the player
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtFinishCasting()
|
||||
|
||||
@@ -41,8 +41,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.SiegeGuardInstance;
|
||||
|
||||
/**
|
||||
* This class manages AI of Attackable.<BR>
|
||||
* <BR>
|
||||
* This class manages AI of Attackable.
|
||||
*/
|
||||
public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
{
|
||||
@@ -65,8 +64,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
private final int _attackRange;
|
||||
|
||||
/**
|
||||
* Constructor of AttackableAI.<BR>
|
||||
* <BR>
|
||||
* Constructor of AttackableAI.
|
||||
* @param accessor The AI accessor of the Creature
|
||||
*/
|
||||
public SiegeGuardAI(Creature.AIAccessor accessor)
|
||||
@@ -86,38 +84,33 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the target is autoattackable (depends on the actor type).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a GuardInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* Return True if the target is autoattackable (depends on the actor type).<br>
|
||||
* <br>
|
||||
* <b><u>Actor is a GuardInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk or a Door</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>The PlayerInstance target has karma (=PK)</li>
|
||||
* <li>The MonsterInstance target is aggressive</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a SiegeGuardInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>The MonsterInstance target is aggressive</li><br>
|
||||
* <br>
|
||||
* <b><u>Actor is a SiegeGuardInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk or a Door</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>A siege is in progress</li>
|
||||
* <li>The PlayerInstance target isn't a Defender</li> <BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a FriendlyMobInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>The PlayerInstance target isn't a Defender</li><br>
|
||||
* <br>
|
||||
* <b><u>Actor is a FriendlyMobInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk, a Door or another NpcInstance</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>The PlayerInstance target has karma (=PK)</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Actor is a MonsterInstance</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>The PlayerInstance target has karma (=PK)</li><br>
|
||||
* <br>
|
||||
* <b><u>Actor is a MonsterInstance</u>:</b><br>
|
||||
* <li>The target isn't a Folk, a Door or another NpcInstance</li>
|
||||
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
|
||||
* <li>The target is in the actor Aggro range and is at the same height</li>
|
||||
* <li>The actor is Aggressive</li><BR>
|
||||
* <BR>
|
||||
* <li>The actor is Aggressive</li><br>
|
||||
* @param target The targeted WorldObject
|
||||
* @return
|
||||
*/
|
||||
@@ -150,10 +143,8 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Intention of this CreatureAI and create an AI Task executed every 1s (call onEvtThink method) for this Attackable.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : If actor _knowPlayer isn't EMPTY, AI_INTENTION_IDLE will be change in AI_INTENTION_ACTIVE</B></FONT><BR>
|
||||
* <BR>
|
||||
* Set the Intention of this CreatureAI and create an AI Task executed every 1s (call onEvtThink method) for this Attackable.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: If actor _knowPlayer isn't EMPTY, AI_INTENTION_IDLE will be change in AI_INTENTION_ACTIVE</b></font>
|
||||
* @param intention The new Intention to set to the AI
|
||||
* @param arg0 The first parameter of the Intention
|
||||
* @param arg1 The second parameter of the Intention
|
||||
@@ -210,8 +201,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage the Attack Intention : Stop current Attack (if necessary), Calculate attack timeout, Start a new Attack and Launch Think Event.<BR>
|
||||
* <BR>
|
||||
* Manage the Attack Intention : Stop current Attack (if necessary), Calculate attack timeout, Start a new Attack and Launch Think Event.
|
||||
* @param target The Creature to attack
|
||||
*/
|
||||
@Override
|
||||
@@ -226,10 +216,9 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage AI standard thinks of a Attackable (called by onEvtThink).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage AI standard thinks of a Attackable (called by onEvtThink).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Update every 1s the _globalAggro counter to come close to 0</li>
|
||||
* <li>If the actor is Aggressive and can attack, add all autoAttackable Creature in its Aggro Range to its _aggroList, chose a target and order to attack it</li>
|
||||
* <li>If the actor can't attack, order to it to return to its home location</li>
|
||||
@@ -525,15 +514,13 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage AI attack thinks of a Attackable (called by onEvtThink).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage AI attack thinks of a Attackable (called by onEvtThink).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Update the attack timeout if actor is running</li>
|
||||
* <li>If target is dead or timeout is expired, stop this attack and set the Intention to AI_INTENTION_ACTIVE</li>
|
||||
* <li>Call all WorldObject of its Faction inside the Faction Range</li>
|
||||
* <li>Chose a target and order to attack it with magic skill or physical attack</li><BR>
|
||||
* <BR>
|
||||
* <li>Chose a target and order to attack it with magic skill or physical attack</li><br>
|
||||
* TODO: Manage casting rules to healer mobs (like Ant Nurses)
|
||||
*/
|
||||
private void thinkAttack()
|
||||
@@ -639,8 +626,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage AI thinking actions of a Attackable.<BR>
|
||||
* <BR>
|
||||
* Manage AI thinking actions of a Attackable.
|
||||
*/
|
||||
@Override
|
||||
protected void onEvtThink()
|
||||
@@ -674,14 +660,12 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Attacked.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Attacked.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Init the attack : Calculate the attack timeout, Set the _globalAggro to 0, Add the attacker to the actor _aggroList</li>
|
||||
* <li>Set the Creature movement type to run and send Server->Client packet ChangeMoveType to all others PlayerInstance</li>
|
||||
* <li>Set the Intention to AI_INTENTION_ATTACK</li> <BR>
|
||||
* <BR>
|
||||
* <li>Set the Intention to AI_INTENTION_ATTACK</li>
|
||||
* @param attacker The Creature that attacks the actor
|
||||
*/
|
||||
@Override
|
||||
@@ -715,13 +699,11 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch actions corresponding to the Event Aggression.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Launch actions corresponding to the Event Aggression.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Add the target to the actor _aggroList or update hate if already present</li>
|
||||
* <li>Set the actor Intention to AI_INTENTION_ATTACK (if actor is GuardInstance check if it isn't too far from its home location)</li><BR>
|
||||
* <BR>
|
||||
* <li>Set the actor Intention to AI_INTENTION_ATTACK (if actor is GuardInstance check if it isn't too far from its home location)</li><br>
|
||||
* @param target The Creature that attacks
|
||||
* @param aggro The value of hate to add to the actor against the target
|
||||
*/
|
||||
|
||||
@@ -162,14 +162,12 @@ public class ItemTable
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the ItemInstance corresponding to the Item Identifier and quantitiy add logs the activity.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Create the ItemInstance corresponding to the Item Identifier and quantitiy add logs the activity.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Create and Init the ItemInstance corresponding to the Item Identifier and quantity</li>
|
||||
* <li>Add the ItemInstance object to _allObjects of L2world</li>
|
||||
* <li>Logs Item creation according to LOGGER settings</li><BR>
|
||||
* <BR>
|
||||
* <li>Logs Item creation according to LOGGER settings</li><br>
|
||||
* @param process : String Identifier of process triggering this action
|
||||
* @param itemId : int Item Identifier of the item to be created
|
||||
* @param count : int Quantity of items to be created for stackable items
|
||||
@@ -240,9 +238,8 @@ public class ItemTable
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a dummy (fr = factice) item.<BR>
|
||||
* <BR>
|
||||
* <U><I>Concept :</I></U><BR>
|
||||
* Returns a dummy (fr = factice) item.<br>
|
||||
* <u><i>Concept :</i></u><br>
|
||||
* Dummy item is created by setting the ID of the object in the world at null value
|
||||
* @param itemId : int designating the item
|
||||
* @return ItemInstance designating the dummy item created
|
||||
@@ -275,14 +272,12 @@ public class ItemTable
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys the ItemInstance.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Destroys the ItemInstance.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Sets ItemInstance parameters to be unusable</li>
|
||||
* <li>Removes the ItemInstance object to _allObjects of L2world</li>
|
||||
* <li>Logs Item delettion according to LOGGER settings</li><BR>
|
||||
* <BR>
|
||||
* <li>Logs Item delettion according to LOGGER settings</li><br>
|
||||
* @param process : String Identifier of process triggering this action
|
||||
* @param item
|
||||
* @param actor : PlayerInstance Player requesting the item destroy
|
||||
|
||||
+1
-2
@@ -231,8 +231,7 @@ public class SkillTreeTable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the minimum level needed to have this Expertise.<BR>
|
||||
* <BR>
|
||||
* Return the minimum level needed to have this Expertise.
|
||||
* @param grade The grade level searched
|
||||
* @return
|
||||
*/
|
||||
|
||||
+1
-2
@@ -337,8 +337,7 @@ public class SpawnTable
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the spawn of a NPC<BR>
|
||||
* <BR>
|
||||
* Get all the spawn of a NPC
|
||||
* @param player
|
||||
* @param npcId : ID of the NPC to find.
|
||||
* @param teleportIndex
|
||||
|
||||
@@ -163,11 +163,9 @@ public class AdminData implements IXmlReader
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the access level by characterAccessLevel<br>
|
||||
* <br>
|
||||
* Returns the access level by characterAccessLevel
|
||||
* @param accessLevelNum as int<br>
|
||||
* <br>
|
||||
* @return AccessLevel: AccessLevel instance by char access level<br>
|
||||
* @return AccessLevel: AccessLevel instance by char access level
|
||||
*/
|
||||
public AccessLevel getAccessLevel(int accessLevelNum)
|
||||
{
|
||||
|
||||
+1
-1
@@ -272,7 +272,7 @@ public class ManorSeedData implements IXmlReader
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns castle id where seed can be showed<br>
|
||||
* Returns castle id where seed can be showed
|
||||
* @param seedId
|
||||
* @return castleId
|
||||
*/
|
||||
|
||||
+4
-4
@@ -123,7 +123,7 @@ public class AutoAnnouncementHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a globally active autoannouncement.<BR>
|
||||
* Registers a globally active autoannouncement.<br>
|
||||
* Returns the associated auto announcement instance.
|
||||
* @param id
|
||||
* @param announcementTexts
|
||||
@@ -136,7 +136,7 @@ public class AutoAnnouncementHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a NON globally-active auto announcement <BR>
|
||||
* Registers a NON globally-active auto announcement<br>
|
||||
* Returns the associated auto chat instance.
|
||||
* @param id
|
||||
* @param announcementTexts
|
||||
@@ -413,8 +413,8 @@ public class AutoAnnouncementHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto Announcement Runner <BR>
|
||||
* <BR>
|
||||
* Auto Announcement Runner<br>
|
||||
* <br>
|
||||
* Represents the auto announcement scheduled task for each announcement instance.
|
||||
* @author chief
|
||||
*/
|
||||
|
||||
+13
-15
@@ -98,7 +98,7 @@ public class AutoChatHandler implements SpawnListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a globally active auto chat for ALL instances of the given NPC ID. <BR>
|
||||
* Registers a globally active auto chat for ALL instances of the given NPC ID.<br>
|
||||
* Returns the associated auto chat instance.
|
||||
* @param npcId
|
||||
* @param chatTexts
|
||||
@@ -111,7 +111,7 @@ public class AutoChatHandler implements SpawnListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a NON globally-active auto chat for the given NPC instance, and adds to the currently assigned chat instance for this NPC ID, otherwise creates a new instance if a previous one is not found. <BR>
|
||||
* Registers a NON globally-active auto chat for the given NPC instance, and adds to the currently assigned chat instance for this NPC ID, otherwise creates a new instance if a previous one is not found.<br>
|
||||
* Returns the associated auto chat instance.
|
||||
* @param npcInst
|
||||
* @param chatTexts
|
||||
@@ -215,8 +215,7 @@ public class AutoChatHandler implements SpawnListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Used in conjunction with a SpawnListener, this method is called every time an NPC is spawned in the world. <BR>
|
||||
* <BR>
|
||||
* Used in conjunction with a SpawnListener, this method is called every time an NPC is spawned in the world.<br>
|
||||
* If an auto chat instance is set to be "global", all instances matching the registered NPC ID will be added to that chat instance.
|
||||
*/
|
||||
@Override
|
||||
@@ -242,8 +241,7 @@ public class AutoChatHandler implements SpawnListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto Chat Instance <BR>
|
||||
* <BR>
|
||||
* Auto Chat Instance<br>
|
||||
* Manages the auto chat instances for a specific registered NPC ID.
|
||||
* @author Tempy
|
||||
*/
|
||||
@@ -281,9 +279,9 @@ public class AutoChatHandler implements SpawnListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines an auto chat for an instance matching this auto chat instance's registered NPC ID, and launches the scheduled chat task. <BR>
|
||||
* Returns the object ID for the NPC instance, with which to refer to the created chat definition. <BR>
|
||||
* <B>Note</B>: Uses pre-defined default values for texts and chat delays from the chat instance.
|
||||
* Defines an auto chat for an instance matching this auto chat instance's registered NPC ID, and launches the scheduled chat task.<br>
|
||||
* Returns the object ID for the NPC instance, with which to refer to the created chat definition.<br>
|
||||
* <b>Note</b>: Uses pre-defined default values for texts and chat delays from the chat instance.
|
||||
* @param npcInst
|
||||
* @return objectId
|
||||
*/
|
||||
@@ -293,7 +291,7 @@ public class AutoChatHandler implements SpawnListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines an auto chat for an instance matching this auto chat instance's registered NPC ID, and launches the scheduled chat task. <BR>
|
||||
* Defines an auto chat for an instance matching this auto chat instance's registered NPC ID, and launches the scheduled chat task.<br>
|
||||
* Returns the object ID for the NPC instance, with which to refer to the created chat definition.
|
||||
* @param npcInst
|
||||
* @param chatTexts
|
||||
@@ -512,9 +510,9 @@ public class AutoChatHandler implements SpawnListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto Chat Definition <BR>
|
||||
* <BR>
|
||||
* Stores information about specific chat data for an instance of the NPC ID specified by the containing auto chat instance. <BR>
|
||||
* Auto Chat Definition<br>
|
||||
* <br>
|
||||
* Stores information about specific chat data for an instance of the NPC ID specified by the containing auto chat instance.<br>
|
||||
* Each NPC instance of this type should be stored in a subsequent AutoChatDefinition class.
|
||||
* @author Tempy
|
||||
*/
|
||||
@@ -618,8 +616,8 @@ public class AutoChatHandler implements SpawnListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto Chat Runner <BR>
|
||||
* <BR>
|
||||
* Auto Chat Runner<br>
|
||||
* <br>
|
||||
* Represents the auto chat scheduled task for each chat instance.
|
||||
* @author Tempy
|
||||
*/
|
||||
|
||||
@@ -29,8 +29,8 @@ public interface IBBSHandler
|
||||
String[] getBBSCommands();
|
||||
|
||||
/**
|
||||
* @param command as String - _bbs<br>
|
||||
* @param player as PlayerInstance - Alt+B<br>
|
||||
* @param command as String - _bbs
|
||||
* @param player as PlayerInstance - Alt+B
|
||||
* @param params as String -
|
||||
*/
|
||||
void handleCommand(String command, PlayerInstance player, String params);
|
||||
|
||||
@@ -29,9 +29,8 @@ public interface IItemHandler
|
||||
void useItem(Playable playable, ItemInstance item);
|
||||
|
||||
/**
|
||||
* Returns the list of item IDs corresponding to the type of item.<BR>
|
||||
* <BR>
|
||||
* <B><I>Use :</I></U><BR>
|
||||
* Returns the list of item IDs corresponding to the type of item.<br>
|
||||
* <b><i>Use :</i></u><br>
|
||||
* This method is called at initialization to register all the item IDs automatically
|
||||
* @return int[] designating all itemIds for a type of item.
|
||||
*/
|
||||
|
||||
@@ -129,10 +129,9 @@ public class ItemHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds handler of item type in <I>datatable</I>.<BR>
|
||||
* <BR>
|
||||
* <B><I>Concept :</I></U><BR>
|
||||
* This handler is put in <I>datatable</I> Map <Integer ; IItemHandler > for each ID corresponding to an item type (existing in classes of package itemhandlers) sets as key of the Map.
|
||||
* Adds handler of item type in <i>datatable</i>.<br>
|
||||
* <b><i>Concept :</i></u><br>
|
||||
* This handler is put in <i>datatable</i> Map <Integer ; IItemHandler > for each ID corresponding to an item type (existing in classes of package itemhandlers) sets as key of the Map.
|
||||
* @param handler (IItemHandler)
|
||||
*/
|
||||
public void registerItemHandler(IItemHandler handler)
|
||||
|
||||
+2
-2
@@ -78,13 +78,13 @@ public class AdminAdmin implements IAdminCommandHandler
|
||||
case "admin_gmliston":
|
||||
{
|
||||
AdminData.getInstance().showGm(activeChar);
|
||||
BuilderUtil.sendSysMessage(activeChar, "Registerd into gm list.");
|
||||
BuilderUtil.sendSysMessage(activeChar, "Registerd into GM list.");
|
||||
return true;
|
||||
}
|
||||
case "admin_gmlistoff":
|
||||
{
|
||||
AdminData.getInstance().hideGm(activeChar);
|
||||
BuilderUtil.sendSysMessage(activeChar, "Removed from gm list.");
|
||||
BuilderUtil.sendSysMessage(activeChar, "Removed from GM list.");
|
||||
return true;
|
||||
}
|
||||
case "admin_silence":
|
||||
|
||||
+1
-2
@@ -22,8 +22,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
||||
|
||||
/**
|
||||
* <b>This class handles Access Level Management commands:</b><br>
|
||||
* <br>
|
||||
* <b>This class handles Access Level Management commands:</b>
|
||||
*/
|
||||
public class AdminChangeAccessLevel implements IAdminCommandHandler
|
||||
{
|
||||
|
||||
+1
-1
@@ -495,7 +495,7 @@ public class AdminEventEngine implements IAdminCommandHandler
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
|
||||
final StringBuilder replyMSG = new StringBuilder("<html><body>");
|
||||
replyMSG.append("<center><font color=\"LEVEL\">[ L2J EVENT ENGINE ]</font></center><br>");
|
||||
replyMSG.append("<br><center>Event's Title <br><font color=\"LEVEL\">");
|
||||
replyMSG.append("<br><center>Event's Title<br><font color=\"LEVEL\">");
|
||||
if (tempName.equals(""))
|
||||
{
|
||||
replyMSG.append("Use //event_name text to insert a new title");
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
|
||||
/**
|
||||
* This class handles following admin commands: - gm = turns gm mode on/off
|
||||
* This class handles following admin commands: - GM = turns GM mode on/off
|
||||
* @version $Revision: 1.1.2.1 $ $Date: 2005/03/15 21:32:48 $
|
||||
*/
|
||||
public class AdminFightCalculator implements IAdminCommandHandler
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
||||
|
||||
/**
|
||||
* This class handles following admin commands: - gm = turns gm mode on/off
|
||||
* This class handles following admin commands: - GM = turns GM mode on/off
|
||||
* @version $Revision: 1.2.4.4 $ $Date: 2005/04/11 10:06:06 $
|
||||
*/
|
||||
public class AdminGm implements IAdminCommandHandler
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
||||
|
||||
/**
|
||||
* This class handles commands for gm to forge packets
|
||||
* This class handles commands for GM to forge packets
|
||||
* @author Maktakien
|
||||
*/
|
||||
public class AdminPForge implements IAdminCommandHandler
|
||||
|
||||
+7
-7
@@ -29,14 +29,14 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
||||
|
||||
/**
|
||||
* <B>Pledge Manipulation:</B><BR>
|
||||
* <LI>With target in a character without clan:<BR>
|
||||
* <b>Pledge Manipulation:</b><br>
|
||||
* <li>With target in a character without clan:<br>
|
||||
* //pledge create clanname
|
||||
* <LI>With target in a clan leader:<BR>
|
||||
* //pledge info<BR>
|
||||
* //pledge dismiss<BR>
|
||||
* //pledge setlevel level<BR>
|
||||
* //pledge rep reputation_points<BR>
|
||||
* <li>With target in a clan leader:<br>
|
||||
* //pledge info<br>
|
||||
* //pledge dismiss<br>
|
||||
* //pledge setlevel level<br>
|
||||
* //pledge rep reputation_points
|
||||
*/
|
||||
public class AdminPledge implements IAdminCommandHandler
|
||||
{
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ public class AdminSkill implements IAdminCommandHandler
|
||||
|
||||
/**
|
||||
* This function will give all the skills that the target can learn at his/her level
|
||||
* @param activeChar the gm char
|
||||
* @param activeChar the GM char
|
||||
*/
|
||||
private void adminGiveAllSkills(PlayerInstance activeChar)
|
||||
{
|
||||
|
||||
+1
-2
@@ -112,8 +112,7 @@ public class SiegeFlag implements ISkillHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if character clan place a flag<BR>
|
||||
* <BR>
|
||||
* Return true if character clan place a flag
|
||||
* @param creature The Creature of the creature placing the flag
|
||||
* @param isCheckOnly if false, it will send a notification to the player telling him why it failed
|
||||
* @return
|
||||
|
||||
+1
-2
@@ -150,8 +150,7 @@ public class StrSiegeAssault implements ISkillHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if character clan place a flag<BR>
|
||||
* <BR>
|
||||
* Return true if character clan place a flag
|
||||
* @param creature The Creature of the creature placing the flag
|
||||
* @param isCheckOnly if false, it will send a notification to the player telling him why it failed
|
||||
* @return
|
||||
|
||||
+1
-2
@@ -98,8 +98,7 @@ public class TakeCastle implements ISkillHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if character clan place a flag<BR>
|
||||
* <BR>
|
||||
* Return true if character clan place a flag
|
||||
* @param creature The Creature of the creature placing the flag
|
||||
* @param isCheckOnly
|
||||
* @return
|
||||
|
||||
+2
-2
@@ -25,8 +25,8 @@ package org.l2jmobius.gameserver.handler.skillhandlers;
|
||||
* || !checkIfOkToCastFlagDisplay(player, fort, true)) return; try { // if(targets[0] instanceof ArtefactInstance) fort.EndOfSiege(player.getClan()); } catch(Exception e) {} } //public SkillType[] getSkillIds() //{ //return SKILL_IDS; //}
|
||||
*/
|
||||
/**
|
||||
* Return true if character clan place a flag<BR>
|
||||
* <BR>
|
||||
* Return true if character clan place a flag<br>
|
||||
* <br>
|
||||
* @param activeChar The Creature of the creature placing the flag
|
||||
*/
|
||||
/*
|
||||
|
||||
+6
-6
@@ -30,12 +30,12 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
|
||||
/**
|
||||
* <B><U>User Character .repair voicecommand - SL2 L2JEmu</U></B><BR>
|
||||
* <BR>
|
||||
* <U>NOTICE:</U> Voice command .repair that when used, allows player to try to repair any of characters on his account, by setting spawn to Floran, removing all shortcuts and moving everything equipped to that char warehouse.<BR>
|
||||
* <BR>
|
||||
* (solving client crashes on character entering world)<BR>
|
||||
* <BR>
|
||||
* <b><u>User Character .repair voicecommand - SL2 L2JEmu</u></b><br>
|
||||
* <br>
|
||||
* <u>NOTICE:</u> Voice command .repair that when used, allows player to try to repair any of characters on his account, by setting spawn to Floran, removing all shortcuts and moving everything equipped to that char warehouse.<br>
|
||||
* <br>
|
||||
* (solving client crashes on character entering world)<br>
|
||||
* <br>
|
||||
* @author szponiasty
|
||||
* @version $Revision: 0.17.2.95.2.9 $ $Date: 2010/03/03 9:07:11 $
|
||||
*/
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ public class StatsCmd implements IVoicedCommandHandler
|
||||
replyMSG.append("<center><font color=\"LEVEL\">[ L2J EVENT ENGINE ]</font></center><br>");
|
||||
replyMSG.append("<br>Statistics for player <font color=\"LEVEL\">" + targetp.getName() + "</font><br>");
|
||||
replyMSG.append("Total kills <font color=\"FF0000\">" + targetp.kills.size() + "</font><br>");
|
||||
replyMSG.append("<br>Detailed list: <br>");
|
||||
replyMSG.append("<br>Detailed list:<br>");
|
||||
for (String kill : targetp.kills)
|
||||
{
|
||||
replyMSG.append("<font color=\"FF0000\">" + kill + "</font><br>");
|
||||
|
||||
+9
-18
@@ -46,8 +46,7 @@ public class FortSiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Add guard.<BR>
|
||||
* <BR>
|
||||
* Add guard.
|
||||
* @param player
|
||||
* @param npcId
|
||||
*/
|
||||
@@ -62,8 +61,7 @@ public class FortSiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Add guard.<BR>
|
||||
* <BR>
|
||||
* Add guard.
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
@@ -76,8 +74,7 @@ public class FortSiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Hire merc.<BR>
|
||||
* <BR>
|
||||
* Hire merc.
|
||||
* @param player
|
||||
* @param npcId
|
||||
*/
|
||||
@@ -92,8 +89,7 @@ public class FortSiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Hire merc.<BR>
|
||||
* <BR>
|
||||
* Hire merc.
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
@@ -131,8 +127,7 @@ public class FortSiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove mercs.<BR>
|
||||
* <BR>
|
||||
* Remove mercs.
|
||||
*/
|
||||
public void removeMercs()
|
||||
{
|
||||
@@ -150,8 +145,7 @@ public class FortSiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawn guards.<BR>
|
||||
* <BR>
|
||||
* Spawn guards.
|
||||
*/
|
||||
public void spawnSiegeGuard()
|
||||
{
|
||||
@@ -173,8 +167,7 @@ public class FortSiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Unspawn guards.<BR>
|
||||
* <BR>
|
||||
* Unspawn guards.
|
||||
*/
|
||||
public void unspawnSiegeGuard()
|
||||
{
|
||||
@@ -193,8 +186,7 @@ public class FortSiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Load guards.<BR>
|
||||
* <BR>
|
||||
* Load guards.
|
||||
*/
|
||||
private void loadSiegeGuard()
|
||||
{
|
||||
@@ -237,8 +229,7 @@ public class FortSiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Save guards.<BR>
|
||||
* <BR>
|
||||
* Save guards.
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
|
||||
+2
-4
@@ -78,8 +78,7 @@ public class FortSiegeManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if character summon<BR>
|
||||
* <BR>
|
||||
* Return true if character summon
|
||||
* @param creature The Creature of the creature can summon
|
||||
* @param isCheckOnly
|
||||
* @return
|
||||
@@ -120,8 +119,7 @@ public class FortSiegeManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the clan is registered or owner of a fort<BR>
|
||||
* <BR>
|
||||
* Return true if the clan is registered or owner of a fort
|
||||
* @param clan The Clan of the player
|
||||
* @param fortid
|
||||
* @return
|
||||
|
||||
+2
-2
@@ -44,8 +44,8 @@ public class QuestManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads a the quest given by questId.<BR>
|
||||
* <B>NOTICE: Will only work if the quest name is equal the quest folder name</B>
|
||||
* Reloads a the quest given by questId.<br>
|
||||
* <b>NOTICE: Will only work if the quest name is equal the quest folder name</b>
|
||||
* @param questId The id of the quest to be reloaded
|
||||
* @return true if reload was succesful, false otherwise
|
||||
*/
|
||||
|
||||
+9
-18
@@ -43,8 +43,7 @@ public class SiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Add guard.<BR>
|
||||
* <BR>
|
||||
* Add guard.
|
||||
* @param player
|
||||
* @param npcId
|
||||
*/
|
||||
@@ -59,8 +58,7 @@ public class SiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Add guard.<BR>
|
||||
* <BR>
|
||||
* Add guard.
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
@@ -73,8 +71,7 @@ public class SiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Hire merc.<BR>
|
||||
* <BR>
|
||||
* Hire merc.
|
||||
* @param player
|
||||
* @param npcId
|
||||
*/
|
||||
@@ -89,8 +86,7 @@ public class SiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Hire merc.<BR>
|
||||
* <BR>
|
||||
* Hire merc.
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
@@ -128,8 +124,7 @@ public class SiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove mercs.<BR>
|
||||
* <BR>
|
||||
* Remove mercs.
|
||||
*/
|
||||
public void removeMercs()
|
||||
{
|
||||
@@ -147,8 +142,7 @@ public class SiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawn guards.<BR>
|
||||
* <BR>
|
||||
* Spawn guards.
|
||||
*/
|
||||
public void spawnSiegeGuard()
|
||||
{
|
||||
@@ -163,8 +157,7 @@ public class SiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Unspawn guards.<BR>
|
||||
* <BR>
|
||||
* Unspawn guards.
|
||||
*/
|
||||
public void unspawnSiegeGuard()
|
||||
{
|
||||
@@ -183,8 +176,7 @@ public class SiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Load guards.<BR>
|
||||
* <BR>
|
||||
* Load guards.
|
||||
*/
|
||||
private void loadSiegeGuard()
|
||||
{
|
||||
@@ -235,8 +227,7 @@ public class SiegeGuardManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Save guards.<BR>
|
||||
* <BR>
|
||||
* Save guards.
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
|
||||
+2
-4
@@ -80,8 +80,7 @@ public class SiegeManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if character summon<BR>
|
||||
* <BR>
|
||||
* Return true if character summon
|
||||
* @param creature The Creature of the creature can summon
|
||||
* @param isCheckOnly
|
||||
* @return
|
||||
@@ -134,8 +133,7 @@ public class SiegeManager
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the clan is registered or owner of a castle<BR>
|
||||
* <BR>
|
||||
* Return true if the clan is registered or owner of a castle
|
||||
* @param clan The Clan of the player
|
||||
* @param castleid
|
||||
* @return
|
||||
|
||||
@@ -38,22 +38,21 @@ public class AccessLevel
|
||||
private boolean _canDisableGmStatus = false;
|
||||
|
||||
/**
|
||||
* Initializes members<br>
|
||||
* <br>
|
||||
* @param accessLevel as int<br>
|
||||
* @param name as String<br>
|
||||
* @param nameColor as int<br>
|
||||
* @param titleColor as int<br>
|
||||
* @param isGm as boolean<br>
|
||||
* @param allowPeaceAttack as boolean<br>
|
||||
* @param allowFixedRes as boolean<br>
|
||||
* @param allowTransaction as boolean<br>
|
||||
* @param allowAltG as boolean<br>
|
||||
* @param giveDamage as boolean<br>
|
||||
* @param takeAggro as boolean<br>
|
||||
* @param gainExp as boolean<br>
|
||||
* @param useNameColor as boolean<br>
|
||||
* @param useTitleColor as boolean<br>
|
||||
* Initializes members
|
||||
* @param accessLevel as int
|
||||
* @param name as String
|
||||
* @param nameColor as int
|
||||
* @param titleColor as int
|
||||
* @param isGm as boolean
|
||||
* @param allowPeaceAttack as boolean
|
||||
* @param allowFixedRes as boolean
|
||||
* @param allowTransaction as boolean
|
||||
* @param allowAltG as boolean
|
||||
* @param giveDamage as boolean
|
||||
* @param takeAggro as boolean
|
||||
* @param gainExp as boolean
|
||||
* @param useNameColor as boolean
|
||||
* @param useTitleColor as boolean
|
||||
* @param canDisableGmStatus
|
||||
*/
|
||||
public AccessLevel(int accessLevel, String name, int nameColor, int titleColor, boolean isGm, boolean allowPeaceAttack, boolean allowFixedRes, boolean allowTransaction, boolean allowAltG, boolean giveDamage, boolean takeAggro, boolean gainExp, boolean useNameColor, boolean useTitleColor, boolean canDisableGmStatus)
|
||||
@@ -76,9 +75,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the access level<br>
|
||||
* <br>
|
||||
* @return int: access level<br>
|
||||
* Returns the access level
|
||||
* @return int: access level
|
||||
*/
|
||||
public int getLevel()
|
||||
{
|
||||
@@ -86,9 +84,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the access level name<br>
|
||||
* <br>
|
||||
* @return String: access level name<br>
|
||||
* Returns the access level name
|
||||
* @return String: access level name
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
@@ -96,9 +93,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name color of the access level<br>
|
||||
* <br>
|
||||
* @return int: the name color for the access level<br>
|
||||
* Returns the name color of the access level
|
||||
* @return int: the name color for the access level
|
||||
*/
|
||||
public int getNameColor()
|
||||
{
|
||||
@@ -106,9 +102,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the title color color of the access level<br>
|
||||
* <br>
|
||||
* @return int: the title color for the access level<br>
|
||||
* Returns the title color color of the access level
|
||||
* @return int: the title color for the access level
|
||||
*/
|
||||
public int getTitleColor()
|
||||
{
|
||||
@@ -116,9 +111,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Retuns if the access level has gm access or not<br>
|
||||
* <br>
|
||||
* @return boolean: true if access level have gm access, otherwise false<br>
|
||||
* Retuns if the access level has GM access or not
|
||||
* @return boolean: true if access level have GM access, otherwise false
|
||||
*/
|
||||
public boolean isGm()
|
||||
{
|
||||
@@ -126,9 +120,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the access level is allowed to attack in peace zone or not<br>
|
||||
* <br>
|
||||
* @return boolean: true if the access level is allowed to attack in peace zone, otherwise false<br>
|
||||
* Returns if the access level is allowed to attack in peace zone or not
|
||||
* @return boolean: true if the access level is allowed to attack in peace zone, otherwise false
|
||||
*/
|
||||
public boolean allowPeaceAttack()
|
||||
{
|
||||
@@ -144,9 +137,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the access level is allowed to perform transactions or not<br>
|
||||
* <br>
|
||||
* @return boolean: true if access level is allowed to perform transactions, otherwise false<br>
|
||||
* Returns if the access level is allowed to perform transactions or not
|
||||
* @return boolean: true if access level is allowed to perform transactions, otherwise false
|
||||
*/
|
||||
public boolean allowTransaction()
|
||||
{
|
||||
@@ -154,9 +146,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the access level is allowed to use AltG commands or not<br>
|
||||
* <br>
|
||||
* @return boolean: true if access level is allowed to use AltG commands, otherwise false<br>
|
||||
* Returns if the access level is allowed to use AltG commands or not
|
||||
* @return boolean: true if access level is allowed to use AltG commands, otherwise false
|
||||
*/
|
||||
public boolean allowAltG()
|
||||
{
|
||||
@@ -164,9 +155,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the access level can give damage or not<br>
|
||||
* <br>
|
||||
* @return boolean: true if the access level can give damage, otherwise false<br>
|
||||
* Returns if the access level can give damage or not
|
||||
* @return boolean: true if the access level can give damage, otherwise false
|
||||
*/
|
||||
public boolean canGiveDamage()
|
||||
{
|
||||
@@ -174,9 +164,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the access level can take aggro or not<br>
|
||||
* <br>
|
||||
* @return boolean: true if the access level can take aggro, otherwise false<br>
|
||||
* Returns if the access level can take aggro or not
|
||||
* @return boolean: true if the access level can take aggro, otherwise false
|
||||
*/
|
||||
public boolean canTakeAggro()
|
||||
{
|
||||
@@ -184,9 +173,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the access level can gain exp or not<br>
|
||||
* <br>
|
||||
* @return boolean: true if the access level can gain exp, otherwise false<br>
|
||||
* Returns if the access level can gain exp or not
|
||||
* @return boolean: true if the access level can gain exp, otherwise false
|
||||
*/
|
||||
public boolean canGainExp()
|
||||
{
|
||||
@@ -204,9 +192,8 @@ public class AccessLevel
|
||||
}
|
||||
|
||||
/**
|
||||
* Retuns if the access level is a gm that can temp disable gm access<br>
|
||||
* <br>
|
||||
* @return boolean: true if is a gm that can temp disable gm access, otherwise false<br>
|
||||
* Retuns if the access level is a GM that can temp disable GM access
|
||||
* @return boolean: true if is a GM that can temp disable GM access, otherwise false
|
||||
*/
|
||||
public boolean canDisableGmStatus()
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ArmorSet
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if player have equiped all items from set (not checking shield)
|
||||
* Checks if player have equipped all items from set (not checking shield)
|
||||
* @param player whose inventory is being checked
|
||||
* @return True if player equips whole set
|
||||
*/
|
||||
|
||||
@@ -351,13 +351,11 @@ public abstract class Effect
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the Effect task and send Server->Client update packet.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Stop the Effect task and send Server->Client update packet.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Cancel the effect in the the abnormal effect map of the Creature</li>
|
||||
* <li>Stop the task of the Effect, remove it and update client magic icone</li><BR>
|
||||
* <BR>
|
||||
* <li>Stop the task of the Effect, remove it and update client magic icone</li>
|
||||
*/
|
||||
public void exit()
|
||||
{
|
||||
@@ -378,13 +376,11 @@ public abstract class Effect
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the task of the Effect, remove it and update client magic icone.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Stop the task of the Effect, remove it and update client magic icone.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Cancel the task</li>
|
||||
* <li>Stop and remove Effect from Creature and update client magic icone</li><BR>
|
||||
* <BR>
|
||||
* <li>Stop and remove Effect from Creature and update client magic icone</li>
|
||||
*/
|
||||
public synchronized void stopEffectTask()
|
||||
{
|
||||
@@ -426,8 +422,7 @@ public abstract class Effect
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel the effect in the the abnormal effect map of the effected Creature.<BR>
|
||||
* <BR>
|
||||
* Cancel the effect in the the abnormal effect map of the effected Creature.
|
||||
*/
|
||||
public void onExit()
|
||||
{
|
||||
|
||||
@@ -398,7 +398,7 @@ public abstract class Inventory extends ItemContainer
|
||||
return;
|
||||
}
|
||||
|
||||
// checks if equiped item is part of set
|
||||
// checks if equipped item is part of set
|
||||
if (armorSet.containItem(slot, item.getItemId()))
|
||||
{
|
||||
if (armorSet.containAll(player))
|
||||
@@ -618,7 +618,7 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop item from inventory by using its <B>objectID</B> and updates database
|
||||
* Drop item from inventory by using its <b>objectID</b> and updates database
|
||||
* @param process : String Identifier of process triggering this action
|
||||
* @param objectId : int Item Instance identifier of the item to be dropped
|
||||
* @param count : int Quantity of items to be dropped
|
||||
@@ -652,8 +652,7 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds item to inventory for further adjustments and Equip it if necessary (itemlocation defined)<BR>
|
||||
* <BR>
|
||||
* Adds item to inventory for further adjustments and Equip it if necessary (itemlocation defined)
|
||||
* @param item : ItemInstance to be added from inventory
|
||||
*/
|
||||
@Override
|
||||
@@ -859,7 +858,7 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
/**
|
||||
* Equips an item in the given slot of the paperdoll. <U><I>Remark :</I></U> The item <B>HAS TO BE</B> already in the inventory
|
||||
* Equips an item in the given slot of the paperdoll. <u><i>Remark :</i></u> The item <b>HAS TO BE</b> already in the inventory
|
||||
* @param slot : int pointing out the slot of the paperdoll
|
||||
* @param item : ItemInstance pointing out the item to add in slot
|
||||
* @return ItemInstance designating the item placed in the slot before
|
||||
@@ -1479,8 +1478,7 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ItemInstance of the arrows needed for this bow.<BR>
|
||||
* <BR>
|
||||
* Return the ItemInstance of the arrows needed for this bow.
|
||||
* @param bow : Item designating the bow
|
||||
* @return ItemInstance pointing out arrows for bow
|
||||
*/
|
||||
|
||||
@@ -83,8 +83,7 @@ public abstract class ItemContainer
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the item from inventory by using its <B>itemId</B><BR>
|
||||
* <BR>
|
||||
* Returns the item from inventory by using its <b>itemId</b>
|
||||
* @param itemId : int designating the ID of the item
|
||||
* @return ItemInstance designating the item or null if not found in inventory
|
||||
*/
|
||||
@@ -101,8 +100,7 @@ public abstract class ItemContainer
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the item from inventory by using its <B>itemId</B><BR>
|
||||
* <BR>
|
||||
* Returns the item from inventory by using its <b>itemId</b>
|
||||
* @param itemId : int designating the ID of the item
|
||||
* @param itemToIgnore : used during a loop, to avoid returning the same item
|
||||
* @return ItemInstance designating the item or null if not found in inventory
|
||||
@@ -120,7 +118,7 @@ public abstract class ItemContainer
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns item from inventory by using its <B>objectId</B>
|
||||
* Returns item from inventory by using its <b>objectId</b>
|
||||
* @param objectId : int designating the ID of the object
|
||||
* @return ItemInstance designating the item or null if not found in inventory
|
||||
*/
|
||||
@@ -303,8 +301,7 @@ public abstract class ItemContainer
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds Wear/Try On item to inventory<BR>
|
||||
* <BR>
|
||||
* Adds Wear/Try On item to inventory
|
||||
* @param process : String Identifier of process triggering this action
|
||||
* @param itemId : int Item Identifier of the item to be added
|
||||
* @param actor : PlayerInstance Player requesting the item add
|
||||
@@ -463,7 +460,7 @@ public abstract class ItemContainer
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy item from inventory by using its <B>objectID</B> and updates database
|
||||
* Destroy item from inventory by using its <b>objectID</b> and updates database
|
||||
* @param process : String Identifier of process triggering this action
|
||||
* @param objectId : int Item Instance identifier of the item to be destroyed
|
||||
* @param count : int Quantity of items to be destroyed
|
||||
@@ -498,7 +495,7 @@ public abstract class ItemContainer
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy item from inventory by using its <B>itemId</B> and updates database
|
||||
* Destroy item from inventory by using its <b>itemId</b> and updates database
|
||||
* @param process : String Identifier of process triggering this action
|
||||
* @param itemId : int Item identifier of the item to be destroyed
|
||||
* @param count : int Quantity of items to be destroyed
|
||||
|
||||
@@ -20,8 +20,7 @@ import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
|
||||
/**
|
||||
* Get all information from ItemInstance to generate ItemInfo.<BR>
|
||||
* <BR>
|
||||
* Get all information from ItemInstance to generate ItemInfo.
|
||||
*/
|
||||
public class ItemInfo
|
||||
{
|
||||
@@ -38,8 +37,7 @@ public class ItemInfo
|
||||
private int _mana;
|
||||
|
||||
/**
|
||||
* Get all information from ItemInstance to generate ItemInfo.<BR>
|
||||
* <BR>
|
||||
* Get all information from ItemInstance to generate ItemInfo.
|
||||
* @param item
|
||||
*/
|
||||
public ItemInfo(ItemInstance item)
|
||||
|
||||
@@ -19,11 +19,11 @@ package org.l2jmobius.gameserver.model;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
|
||||
/**
|
||||
* This class defines the spawn data of a Minion type In a group mob, there are one master called RaidBoss and several slaves called Minions. <B><U> Data</U> :</B><BR>
|
||||
* <BR>
|
||||
* This class defines the spawn data of a Minion type In a group mob, there are one master called RaidBoss and several slaves called Minions.<br>
|
||||
* <br>
|
||||
* <b><u>Data</u>:</b>
|
||||
* <li>_minionId : The Identifier of the Minion to spawn</li>
|
||||
* <li>_minionAmount : The number of this Minion Type to spawn</li><BR>
|
||||
* <BR>
|
||||
* <li>_minionAmount : The number of this Minion Type to spawn</li>
|
||||
*/
|
||||
public class MinionData
|
||||
{
|
||||
@@ -36,8 +36,7 @@ public class MinionData
|
||||
private int _minionAmountMax;
|
||||
|
||||
/**
|
||||
* Set the Identifier of the Minion to spawn.<BR>
|
||||
* <BR>
|
||||
* Set the Identifier of the Minion to spawn.
|
||||
* @param id
|
||||
*/
|
||||
public void setMinionId(int id)
|
||||
@@ -54,8 +53,7 @@ public class MinionData
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the minimum of minions to amount.<BR>
|
||||
* <BR>
|
||||
* Set the minimum of minions to amount.
|
||||
* @param amountMin The minimum quantity of this Minion type to spawn
|
||||
*/
|
||||
public void setAmountMin(int amountMin)
|
||||
@@ -64,8 +62,7 @@ public class MinionData
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the maximum of minions to amount.<BR>
|
||||
* <BR>
|
||||
* Set the maximum of minions to amount.
|
||||
* @param amountMax The maximum quantity of this Minion type to spawn
|
||||
*/
|
||||
public void setAmountMax(int amountMax)
|
||||
@@ -74,8 +71,7 @@ public class MinionData
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the amount of this Minion type to spawn.<BR>
|
||||
* <BR>
|
||||
* Set the amount of this Minion type to spawn.
|
||||
* @param amount The quantity of this Minion type to spawn
|
||||
*/
|
||||
public void setAmount(int amount)
|
||||
|
||||
@@ -42,15 +42,13 @@ public class ObjectPosition
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the x,y,z position of the WorldObject and if necessary modify its _worldRegion.<BR>
|
||||
* <BR>
|
||||
* <B><U> Assert </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>_worldRegion != null</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Update position during and after movement, or after teleport</li><BR>
|
||||
* Set the x,y,z position of the WorldObject and if necessary modify its _worldRegion.<br>
|
||||
* <br>
|
||||
* <b><u>Assert</u>:</b><br>
|
||||
* <li>_worldRegion != null</li><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Update position during and after movement, or after teleport</li><br>
|
||||
* @param x the x
|
||||
* @param y the y
|
||||
* @param z the z
|
||||
@@ -82,20 +80,18 @@ public class ObjectPosition
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the x,y,z position of the WorldObject and make it invisible.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* A WorldObject is invisble if <B>_hidden</B>=true or <B>_worldregion</B>==null <BR>
|
||||
* <BR>
|
||||
* <B><U> Assert </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>_worldregion==null <I>(WorldObject is invisible)</I></li><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* Set the x,y,z position of the WorldObject and make it invisible.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* A WorldObject is invisble if <b>_hidden</b>=true or <b>_worldregion</b>==null<br>
|
||||
* <br>
|
||||
* <b><u>Assert</u>:</b><br>
|
||||
* <li>_worldregion==null <i>(WorldObject is invisible)</i></li><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Create a Door</li>
|
||||
* <li>Restore PlayerInstance</li><BR>
|
||||
* <li>Restore PlayerInstance</li><br>
|
||||
* @param x the x
|
||||
* @param y the y
|
||||
* @param z the z
|
||||
|
||||
@@ -683,17 +683,14 @@ public class Party
|
||||
}
|
||||
|
||||
/**
|
||||
* Distribute Experience and SP rewards to PlayerInstance Party members in the known area of the last attacker.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Distribute Experience and SP rewards to PlayerInstance Party members in the known area of the last attacker.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Get the PlayerInstance owner of the SummonInstance (if necessary)</li>
|
||||
* <li>Calculate the Experience and SP reward distribution rate</li>
|
||||
* <li>Add Experience and SP to the PlayerInstance</li><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T GIVE rewards to PetInstance</B></FONT><BR>
|
||||
* <BR>
|
||||
* Exception are PetInstances that leech from the owner's XP; they get the exp indirectly, via the owner's exp gain<BR>
|
||||
* <li>Add Experience and SP to the PlayerInstance</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T GIVE rewards to PetInstance</b></font><br>
|
||||
* Exception are PetInstances that leech from the owner's XP; they get the exp indirectly, via the owner's exp gain
|
||||
* @param xpReward The Experience reward to distribute
|
||||
* @param spReward The SP reward to distribute
|
||||
* @param rewardedMembers The list of PlayerInstance to reward
|
||||
@@ -765,9 +762,8 @@ public class Party
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates and gives final XP and SP rewards to the party member.<BR>
|
||||
* This method takes in consideration number of members, members' levels, rewarder's level and bonus modifier for the actual party.<BR>
|
||||
* <BR>
|
||||
* Calculates and gives final XP and SP rewards to the party member.<br>
|
||||
* This method takes in consideration number of members, members' levels, rewarder's level and bonus modifier for the actual party.
|
||||
* @param member is the Creature to be rewarded
|
||||
* @param xpReward is the total amount of XP to be "splited" and given to the member
|
||||
* @param spReward is the total amount of SP to be "splited" and given to the member
|
||||
|
||||
@@ -92,7 +92,7 @@ public class PlayerFreight extends ItemContainer
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the item from inventory by using its <B>itemId</B>
|
||||
* Returns the item from inventory by using its <b>itemId</b>
|
||||
* @param itemId : int designating the ID of the item
|
||||
* @return ItemInstance designating the item or null if not found in inventory
|
||||
*/
|
||||
|
||||
@@ -515,7 +515,7 @@ public class PlayerInventory extends Inventory
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy item from inventory by using its <B>itemId</B> and checks _adena and _ancientAdena
|
||||
* Destroy item from inventory by using its <b>itemId</b> and checks _adena and _ancientAdena
|
||||
* @param process : String Identifier of process triggering this action
|
||||
* @param itemId : int Item identifier of the item to be destroyed
|
||||
* @param count : int Quantity of items to be destroyed
|
||||
@@ -566,7 +566,7 @@ public class PlayerInventory extends Inventory
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop item from inventory by using its <B>objectID</B> and checks _adena and _ancientAdena
|
||||
* Drop item from inventory by using its <b>objectID</b> and checks _adena and _ancientAdena
|
||||
* @param process : String Identifier of process triggering this action
|
||||
* @param objectId : int Item Instance identifier of the item to be dropped
|
||||
* @param count : int Quantity of items to be dropped
|
||||
|
||||
@@ -19,8 +19,7 @@ package org.l2jmobius.gameserver.model;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.RecipeInstance;
|
||||
|
||||
/**
|
||||
* This class describes a Recipe used by Dwarf to craft Item. All RecipeList are made of RecipeInstance (1 line of the recipe : Item-Quantity needed).<BR>
|
||||
* <BR>
|
||||
* This class describes a Recipe used by Dwarf to craft Item. All RecipeList are made of RecipeInstance (1 line of the recipe : Item-Quantity needed).
|
||||
*/
|
||||
public class RecipeList
|
||||
{
|
||||
|
||||
@@ -50,8 +50,7 @@ public class Request
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the PlayerInstance member of a transaction (ex : FriendInvite, JoinAlly, JoinParty...).<BR>
|
||||
* <BR>
|
||||
* Set the PlayerInstance member of a transaction (ex : FriendInvite, JoinAlly, JoinParty...).
|
||||
* @param partner
|
||||
*/
|
||||
private synchronized void setPartner(PlayerInstance partner)
|
||||
@@ -131,8 +130,7 @@ public class Request
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears PC request state. Should be called after answer packet receive.<BR>
|
||||
* <BR>
|
||||
* Clears PC request state. Should be called after answer packet receive.
|
||||
*/
|
||||
public void onRequestResponse()
|
||||
{
|
||||
|
||||
@@ -1390,10 +1390,9 @@ public abstract class Skill
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all targets of the skill in a table in function a the skill type.<BR>
|
||||
* <BR>
|
||||
* <B><U> Values of skill type</U> :</B><BR>
|
||||
* <BR>
|
||||
* Return all targets of the skill in a table in function a the skill type.<br>
|
||||
* <br>
|
||||
* <b><u>Values of skill type</u>:</b><br>
|
||||
* <li>ONE : The skill can only be used on the PlayerInstance targeted, or on the caster if it's a PlayerInstance and no PlayerInstance targeted</li>
|
||||
* <li>SELF</li>
|
||||
* <li>HOLY, UNDEAD</li>
|
||||
@@ -1404,8 +1403,7 @@ public abstract class Skill
|
||||
* <li>PARTY, CLAN</li>
|
||||
* <li>CORPSE_PLAYER, CORPSE_MOB, CORPSE_CLAN</li>
|
||||
* <li>UNLOCKABLE</li>
|
||||
* <li>ITEM</li><BR>
|
||||
* <BR>
|
||||
* <li>ITEM</li><br>
|
||||
* @param creature The Creature who use the skill
|
||||
* @param onlyFirst
|
||||
* @param target
|
||||
|
||||
@@ -80,12 +80,11 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Add WorldObject object in _allObjects.<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* Add WorldObject object in _allObjects.<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Withdraw an item from the warehouse, create an item</li>
|
||||
* <li>Spawn a Creature (PC, NPC, Pet)</li><BR>
|
||||
* <li>Spawn a Creature (PC, NPC, Pet)</li><br>
|
||||
* @param object the object
|
||||
*/
|
||||
public void storeObject(WorldObject object)
|
||||
@@ -94,13 +93,12 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove WorldObject object from _allObjects of World.<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* Remove WorldObject object from _allObjects of World.<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Delete item from inventory, tranfer Item from inventory to warehouse</li>
|
||||
* <li>Crystallize item</li>
|
||||
* <li>Remove NPC/PC/Pet from the world</li><BR>
|
||||
* <li>Remove NPC/PC/Pet from the world</li><br>
|
||||
* @param object WorldObject to remove from _allObjects of World
|
||||
*/
|
||||
public void removeObject(WorldObject object)
|
||||
@@ -133,13 +131,12 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the WorldObject object that belongs to an ID or null if no object found.<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Client packets : Action, AttackRequest, RequestJoinParty, RequestJoinPledge...</li><BR>
|
||||
* Return the WorldObject object that belongs to an ID or null if no object found.<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Client packets : Action, AttackRequest, RequestJoinParty, RequestJoinPledge...</li><br>
|
||||
* @param oID Identifier of the WorldObject
|
||||
* @return the l2 object
|
||||
* @return the object
|
||||
*/
|
||||
public WorldObject findObject(int oID)
|
||||
{
|
||||
@@ -156,8 +153,7 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the count of all visible objects in world.<br>
|
||||
* <br>
|
||||
* Get the count of all visible objects in world.
|
||||
* @return count off all World objects
|
||||
*/
|
||||
public int getAllVisibleObjectsCount()
|
||||
@@ -166,10 +162,8 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a collection containing all players in game.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Read-only, please! </B></FONT><BR>
|
||||
* <BR>
|
||||
* Return a collection containing all players in game.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Read-only, please! </b></font>
|
||||
* @return the all players
|
||||
*/
|
||||
public Collection<PlayerInstance> getAllPlayers()
|
||||
@@ -178,8 +172,7 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Return how many players are online.<BR>
|
||||
* <BR>
|
||||
* Return how many players are online.
|
||||
* @return number of online players.
|
||||
*/
|
||||
public static Integer getAllPlayersCount()
|
||||
@@ -215,10 +208,8 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a collection containing all pets in game.<BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Read-only, please! </B></FONT><BR>
|
||||
* <BR>
|
||||
* Return a collection containing all pets in game.<br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Read-only, please! </b></font>
|
||||
* @return the all pets
|
||||
*/
|
||||
public Collection<PetInstance> getAllPets()
|
||||
@@ -227,8 +218,7 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the pet instance from the given ownerId.<BR>
|
||||
* <BR>
|
||||
* Return the pet instance from the given ownerId.
|
||||
* @param ownerId ID of the owner
|
||||
* @return the pet
|
||||
*/
|
||||
@@ -238,11 +228,10 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the given pet instance from the given ownerId.<BR>
|
||||
* <BR>
|
||||
* Add the given pet instance from the given ownerId.
|
||||
* @param ownerId ID of the owner
|
||||
* @param pet PetInstance of the pet
|
||||
* @return the l2 pet instance
|
||||
* @return the pet instance
|
||||
*/
|
||||
public PetInstance addPet(int ownerId, PetInstance pet)
|
||||
{
|
||||
@@ -250,8 +239,7 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the given pet instance.<BR>
|
||||
* <BR>
|
||||
* Remove the given pet instance.
|
||||
* @param ownerId ID of the owner
|
||||
*/
|
||||
public void removePet(int ownerId)
|
||||
@@ -260,8 +248,7 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the given pet instance.<BR>
|
||||
* <BR>
|
||||
* Remove the given pet instance.
|
||||
* @param pet the pet to remove
|
||||
*/
|
||||
public void removePet(PetInstance pet)
|
||||
@@ -270,31 +257,27 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a WorldObject in the world.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* WorldObject (including PlayerInstance) are identified in <B>_visibleObjects</B> of his current WorldRegion and in <B>_knownObjects</B> of other surrounding Creatures <BR>
|
||||
* PlayerInstance are identified in <B>_allPlayers</B> of World, in <B>_allPlayers</B> of his current WorldRegion and in <B>_knownPlayer</B> of other surrounding Creatures <BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Add a WorldObject in the world.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* WorldObject (including PlayerInstance) are identified in <b>_visibleObjects</b> of his current WorldRegion and in <b>_knownObjects</b> of other surrounding Creatures<br>
|
||||
* PlayerInstance are identified in <b>_allPlayers</b> of World, in <b>_allPlayers</b> of his current WorldRegion and in <b>_knownPlayer</b> of other surrounding Creatures<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Add the WorldObject object in _allPlayers* of World</li>
|
||||
* <li>Add the WorldObject object in _gmList** of GmListTable</li>
|
||||
* <li>Add object in _knownObjects and _knownPlayer* of all surrounding WorldRegion Creatures</li> <BR>
|
||||
* <li>If object is a Creature, add all surrounding WorldObject in its _knownObjects and all surrounding PlayerInstance in its _knownPlayer</li><BR>
|
||||
* <I>* only if object is a PlayerInstance</I><BR>
|
||||
* <I>** only if object is a GM PlayerInstance</I><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object in _visibleObjects and _allPlayers* of WorldRegion (need synchronisation)</B></FONT><BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects and _allPlayers* of World (need synchronisation)</B></FONT><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Add object in _knownObjects and _knownPlayer* of all surrounding WorldRegion Creatures</li>
|
||||
* <li>If object is a Creature, add all surrounding WorldObject in its _knownObjects and all surrounding PlayerInstance in its _knownPlayer</li><br>
|
||||
* <i>* only if object is a PlayerInstance</i><br>
|
||||
* <i>** only if object is a GM PlayerInstance</i><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T ADD the object in _visibleObjects and _allPlayers* of WorldRegion (need synchronisation)</b></font><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T ADD the object to _allObjects and _allPlayers* of World (need synchronisation)</b></font><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Drop an Item</li>
|
||||
* <li>Spawn a Creature</li>
|
||||
* <li>Apply Death Penalty of a PlayerInstance</li><BR>
|
||||
* <BR>
|
||||
* <li>Apply Death Penalty of a PlayerInstance</li><br>
|
||||
* @param object L2object to add in the world
|
||||
* @param newRegion the new region
|
||||
* @param dropper Creature who has dropped the object (if necessary)
|
||||
@@ -383,11 +366,10 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the PlayerInstance from _allPlayers of World.<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Remove a player fom the visible objects</li><BR>
|
||||
* Remove the PlayerInstance from _allPlayers of World.<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Remove a player fom the visible objects</li><br>
|
||||
* @param player the cha
|
||||
*/
|
||||
public void removeFromAllPlayers(PlayerInstance player)
|
||||
@@ -399,31 +381,26 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a WorldObject from the world.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* WorldObject (including PlayerInstance) are identified in <B>_visibleObjects</B> of his current WorldRegion and in <B>_knownObjects</B> of other surrounding Creatures <BR>
|
||||
* PlayerInstance are identified in <B>_allPlayers</B> of World, in <B>_allPlayers</B> of his current WorldRegion and in <B>_knownPlayer</B> of other surrounding Creatures <BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Remove a WorldObject from the world.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* WorldObject (including PlayerInstance) are identified in <b>_visibleObjects</b> of his current WorldRegion and in <b>_knownObjects</b> of other surrounding Creatures<br>
|
||||
* PlayerInstance are identified in <b>_allPlayers</b> of World, in <b>_allPlayers</b> of his current WorldRegion and in <b>_knownPlayer</b> of other surrounding Creatures<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Remove the WorldObject object from _allPlayers* of World</li>
|
||||
* <li>Remove the WorldObject object from _visibleObjects and _allPlayers* of WorldRegion</li>
|
||||
* <li>Remove the WorldObject object from _gmList** of GmListTable</li>
|
||||
* <li>Remove object from _knownObjects and _knownPlayer* of all surrounding WorldRegion Creatures</li><BR>
|
||||
* <li>If object is a Creature, remove all WorldObject from its _knownObjects and all PlayerInstance from its _knownPlayer</li><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of World</B></FONT><BR>
|
||||
* <BR>
|
||||
* <I>* only if object is a PlayerInstance</I><BR>
|
||||
* <I>** only if object is a GM PlayerInstance</I><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Remove object from _knownObjects and _knownPlayer* of all surrounding WorldRegion Creatures</li>
|
||||
* <li>If object is a Creature, remove all WorldObject from its _knownObjects and all PlayerInstance from its _knownPlayer</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T REMOVE the object from _allObjects of World</b></font><br>
|
||||
* <i>* only if object is a PlayerInstance</i><br>
|
||||
* <i>** only if object is a GM PlayerInstance</i><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Pickup an Item</li>
|
||||
* <li>Decay a Creature</li><BR>
|
||||
* <BR>
|
||||
* <li>Decay a Creature</li><br>
|
||||
* @param object L2object to remove from the world
|
||||
* @param oldRegion the old region
|
||||
*/
|
||||
@@ -483,16 +460,15 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all visible objects of the WorldRegion object's and of its surrounding WorldRegion.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* All visible object are identified in <B>_visibleObjects</B> of their current WorldRegion <BR>
|
||||
* All surrounding WorldRegion are identified in <B>_surroundingRegions</B> of the selected WorldRegion in order to scan a large area around a WorldObject<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Find Close Objects for Creature</li><BR>
|
||||
* Return all visible objects of the WorldRegion object's and of its surrounding WorldRegion.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All visible object are identified in <b>_visibleObjects</b> of their current WorldRegion<br>
|
||||
* All surrounding WorldRegion are identified in <b>_surroundingRegions</b> of the selected WorldRegion in order to scan a large area around a WorldObject<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Find Close Objects for Creature</li><br>
|
||||
* @param object L2object that determine the current WorldRegion
|
||||
* @return the visible objects
|
||||
*/
|
||||
@@ -540,18 +516,17 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all visible objects of the WorldRegions in the circular area (radius) centered on the object.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* All visible object are identified in <B>_visibleObjects</B> of their current WorldRegion <BR>
|
||||
* All surrounding WorldRegion are identified in <B>_surroundingRegions</B> of the selected WorldRegion in order to scan a large area around a WorldObject<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* Return all visible objects of the WorldRegions in the circular area (radius) centered on the object.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All visible object are identified in <b>_visibleObjects</b> of their current WorldRegion<br>
|
||||
* All surrounding WorldRegion are identified in <b>_surroundingRegions</b> of the selected WorldRegion in order to scan a large area around a WorldObject<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Define the aggrolist of monster</li>
|
||||
* <li>Define visible objects of a WorldObject</li>
|
||||
* <li>Skill : Confusion...</li> <BR>
|
||||
* <li>Skill : Confusion...</li>
|
||||
* @param object L2object that determine the center of the circular area
|
||||
* @param radius Radius of the circular area
|
||||
* @return the visible objects
|
||||
@@ -609,18 +584,16 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all visible objects of the WorldRegions in the spheric area (radius) centered on the object.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* All visible object are identified in <B>_visibleObjects</B> of their current WorldRegion <BR>
|
||||
* All surrounding WorldRegion are identified in <B>_surroundingRegions</B> of the selected WorldRegion in order to scan a large area around a WorldObject<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* Return all visible objects of the WorldRegions in the spheric area (radius) centered on the object.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All visible object are identified in <b>_visibleObjects</b> of their current WorldRegion<br>
|
||||
* All surrounding WorldRegion are identified in <b>_surroundingRegions</b> of the selected WorldRegion in order to scan a large area around a WorldObject<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Define the target list of a skill</li>
|
||||
* <li>Define the target list of a polearme attack</li><BR>
|
||||
* <BR>
|
||||
* <li>Define the target list of a polearme attack</li><br>
|
||||
* @param object L2object that determine the center of the circular area
|
||||
* @param radius Radius of the spheric area
|
||||
* @return the visible objects3 d
|
||||
@@ -672,16 +645,15 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all visible players of the WorldRegion object's and of its surrounding WorldRegion.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* All visible object are identified in <B>_visibleObjects</B> of their current WorldRegion <BR>
|
||||
* All surrounding WorldRegion are identified in <B>_surroundingRegions</B> of the selected WorldRegion in order to scan a large area around a WorldObject<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Find Close Objects for Creature</li><BR>
|
||||
* Return all visible players of the WorldRegion object's and of its surrounding WorldRegion.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All visible object are identified in <b>_visibleObjects</b> of their current WorldRegion<br>
|
||||
* All surrounding WorldRegion are identified in <b>_surroundingRegions</b> of the selected WorldRegion in order to scan a large area around a WorldObject<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Find Close Objects for Creature</li><br>
|
||||
* @param object WorldObject that determine the current WorldRegion
|
||||
* @return the visible playable
|
||||
*/
|
||||
@@ -725,12 +697,11 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the current WorldRegions of the object according to its position (x,y).<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* Calculate the current WorldRegions of the object according to its position (x,y).<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Set position of a new WorldObject (drop, spawn...)</li>
|
||||
* <li>Update position of a WorldObject after a mouvement</li><BR>
|
||||
* <li>Update position of a WorldObject after a mouvement</li><br>
|
||||
* @param location the point
|
||||
* @return the region
|
||||
*/
|
||||
@@ -760,15 +731,14 @@ public class World
|
||||
}
|
||||
|
||||
/**
|
||||
* Init each WorldRegion and their surrounding table.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* All surrounding WorldRegion are identified in <B>_surroundingRegions</B> of the selected WorldRegion in order to scan a large area around a WorldObject<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Constructor of World</li><BR>
|
||||
* Init each WorldRegion and their surrounding table.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* All surrounding WorldRegion are identified in <b>_surroundingRegions</b> of the selected WorldRegion in order to scan a large area around a WorldObject<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Constructor of World</li>
|
||||
*/
|
||||
private void initRegions()
|
||||
{
|
||||
|
||||
@@ -32,10 +32,9 @@ import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.GetItem;
|
||||
|
||||
/**
|
||||
* Mother class of all objects in the world which ones is it possible to interact (PC, NPC, Item...)<BR>
|
||||
* <BR>
|
||||
* WorldObject :<BR>
|
||||
* <BR>
|
||||
* Mother class of all objects in the world which ones is it possible to interact (PC, NPC, Item...)<br>
|
||||
* <br>
|
||||
* WorldObject:<br>
|
||||
* <li>Creature</li>
|
||||
* <li>ItemInstance</li>
|
||||
* <li>Potion</li>
|
||||
@@ -84,13 +83,11 @@ public abstract class WorldObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Do Nothing.<BR>
|
||||
* <BR>
|
||||
* <B><U> Overridden in </U> :</B><BR>
|
||||
* <BR>
|
||||
* Do Nothing.<br>
|
||||
* <br>
|
||||
* <b><u>Overridden in</u>:</b><br>
|
||||
* <li>GuardInstance : Set the home location of its GuardInstance</li>
|
||||
* <li>Attackable : Reset the Spoiled flag</li><BR>
|
||||
* <BR>
|
||||
* <li>Attackable : Reset the Spoiled flag</li>
|
||||
*/
|
||||
public void onSpawn()
|
||||
{
|
||||
@@ -123,23 +120,18 @@ public abstract class WorldObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a WorldObject from the world.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Remove the WorldObject from the world</li><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of World </B></FONT><BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packets to players</B></FONT><BR>
|
||||
* <BR>
|
||||
* <B><U> Assert </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>_worldRegion != null <I>(WorldObject is visible at the beginning)</I></li><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Delete NPC/PC or Unsummon</li><BR>
|
||||
* <BR>
|
||||
* Remove a WorldObject from the world.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Remove the WorldObject from the world</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T REMOVE the object from _allObjects of World </b></font><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font><br>
|
||||
* <br>
|
||||
* <b><u>Assert</u>:</b><br>
|
||||
* <li>_worldRegion != null <i>(WorldObject is visible at the beginning)</i></li><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Delete NPC/PC or Unsummon</li>
|
||||
*/
|
||||
public void decayMe()
|
||||
{
|
||||
@@ -156,24 +148,19 @@ public abstract class WorldObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a ItemInstance from the world and send server->client GetItem packets.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Remove a ItemInstance from the world and send server->client GetItem packets.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Send a Server->Client Packet GetItem to player that pick up and its _knowPlayers member</li>
|
||||
* <li>Remove the WorldObject from the world</li><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of World </B></FONT><BR>
|
||||
* <BR>
|
||||
* <B><U> Assert </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Remove the WorldObject from the world</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T REMOVE the object from _allObjects of World </b></font><br>
|
||||
* <br>
|
||||
* <b><u>Assert</u>:</b><br>
|
||||
* <li>this instanceof ItemInstance</li>
|
||||
* <li>_worldRegion != null <I>(WorldObject is visible at the beginning)</I></li> <BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Do Pickup Item : PCInstance and Pet</li><BR>
|
||||
* <BR>
|
||||
* <li>_worldRegion != null <i>(WorldObject is visible at the beginning)</i></li><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Do Pickup Item : PCInstance and Pet</li><br>
|
||||
* @param creature Player that pick up the item
|
||||
*/
|
||||
public void pickupMe(Creature creature) // NOTE: Should move this function into ItemInstance because it does not apply to Creature
|
||||
@@ -213,23 +200,20 @@ public abstract class WorldObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Init the position of a WorldObject spawn and add it in the world as a visible object.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Init the position of a WorldObject spawn and add it in the world as a visible object.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Set the x,y,z position of the WorldObject spawn and update its _worldregion</li>
|
||||
* <li>Add the WorldObject spawn in the _allobjects of World</li>
|
||||
* <li>Add the WorldObject spawn to _visibleObjects of its WorldRegion</li>
|
||||
* <li>Add the WorldObject spawn in the world as a <B>visible</B> object</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Assert </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>_worldRegion == null <I>(WorldObject is invisible at the beginning)</I></li><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Add the WorldObject spawn in the world as a <b>visible</b> object</li><br>
|
||||
* <br>
|
||||
* <b><u>Assert</u>:</b><br>
|
||||
* <li>_worldRegion == null <i>(WorldObject is invisible at the beginning)</i></li><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Create Door</li>
|
||||
* <li>Spawn : Monster, Minion, CTs, Summon...</li><BR>
|
||||
* <li>Spawn : Monster, Minion, CTs, Summon...</li>
|
||||
*/
|
||||
public void spawnMe()
|
||||
{
|
||||
@@ -315,10 +299,9 @@ public abstract class WorldObject
|
||||
public abstract boolean isAutoAttackable(Creature attacker);
|
||||
|
||||
/**
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* A WorldObject is visible if <B>__IsVisible</B>=true and <B>_worldregion</B>!=null <BR>
|
||||
* <BR>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* A WorldObject is visible if <b>__IsVisible</b>=true and <b>_worldregion</b>!=null
|
||||
* @return the visibility state of the WorldObject.
|
||||
*/
|
||||
public boolean isVisible()
|
||||
|
||||
@@ -284,8 +284,8 @@ public class WorldRegion
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the WorldObject in the WorldObjectHashSet(WorldObject) _visibleObjects containing WorldObject visible in this WorldRegion <BR>
|
||||
* If WorldObject is a PlayerInstance, Add the PlayerInstance in the WorldObjectHashSet(PlayerInstance) _allPlayable containing PlayerInstance of all player in game in this WorldRegion <BR>
|
||||
* Add the WorldObject in the WorldObjectHashSet(WorldObject) _visibleObjects containing WorldObject visible in this WorldRegion<br>
|
||||
* If WorldObject is a PlayerInstance, Add the PlayerInstance in the WorldObjectHashSet(PlayerInstance) _allPlayable containing PlayerInstance of all player in game in this WorldRegion<br>
|
||||
* Assert : object.getCurrentWorldRegion() == this
|
||||
* @param object
|
||||
*/
|
||||
@@ -311,9 +311,8 @@ public class WorldRegion
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the WorldObject from the WorldObjectHashSet(WorldObject) _visibleObjects in this WorldRegion <BR>
|
||||
* <BR>
|
||||
* If WorldObject is a PlayerInstance, remove it from the WorldObjectHashSet(PlayerInstance) _allPlayable of this WorldRegion <BR>
|
||||
* Remove the WorldObject from the WorldObjectHashSet(WorldObject) _visibleObjects in this WorldRegion<br>
|
||||
* If WorldObject is a PlayerInstance, remove it from the WorldObjectHashSet(PlayerInstance) _allPlayable of this WorldRegion<br>
|
||||
* Assert : object.getCurrentWorldRegion() == this || object.getCurrentWorldRegion() == null
|
||||
* @param object
|
||||
*/
|
||||
|
||||
+81
-130
@@ -69,10 +69,9 @@ import org.l2jmobius.gameserver.script.EventDroplist.DateDrop;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* This class manages all NPC that can be attacked.<BR>
|
||||
* <BR>
|
||||
* Attackable :<BR>
|
||||
* <BR>
|
||||
* This class manages all NPC that can be attacked.<br>
|
||||
* <br>
|
||||
* Attackable:<br>
|
||||
* <li>ArtefactInstance</li>
|
||||
* <li>FriendlyMobInstance</li>
|
||||
* <li>MonsterInstance</li>
|
||||
@@ -82,14 +81,12 @@ import org.l2jmobius.gameserver.util.Util;
|
||||
public class Attackable extends NpcInstance
|
||||
{
|
||||
/**
|
||||
* This class contains all AggroInfo of the Attackable against the attacker Creature.<BR>
|
||||
* <BR>
|
||||
* <B><U> Data</U> :</B><BR>
|
||||
* <BR>
|
||||
* This class contains all AggroInfo of the Attackable against the attacker Creature.<br>
|
||||
* <br>
|
||||
* <b><u>Data</u>:</b><br>
|
||||
* <li>attacker : The attaker Creature concerned by this AggroInfo of this Attackable</li>
|
||||
* <li>hate : Hate level of this Attackable against the attaker Creature (hate = damage)</li>
|
||||
* <li>damage : Number of damages that the attaker Creature gave to this Attackable</li><BR>
|
||||
* <BR>
|
||||
* <li>damage : Number of damages that the attaker Creature gave to this Attackable</li>
|
||||
*/
|
||||
public class AggroInfo
|
||||
{
|
||||
@@ -103,8 +100,7 @@ public class Attackable extends NpcInstance
|
||||
protected int _damage;
|
||||
|
||||
/**
|
||||
* Constructor of AggroInfo.<BR>
|
||||
* <BR>
|
||||
* Constructor of AggroInfo.
|
||||
* @param pAttacker
|
||||
*/
|
||||
AggroInfo(Creature pAttacker)
|
||||
@@ -113,8 +109,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify is object is equal to this AggroInfo.<BR>
|
||||
* <BR>
|
||||
* Verify is object is equal to this AggroInfo.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
@@ -133,8 +128,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Identifier of the attacker Creature.<BR>
|
||||
* <BR>
|
||||
* Return the Identifier of the attacker Creature.
|
||||
*/
|
||||
@Override
|
||||
public int hashCode()
|
||||
@@ -144,10 +138,9 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* This class contains all RewardInfo of the Attackable against the any attacker Creature, based on amount of damage done.<BR>
|
||||
* <BR>
|
||||
* <B><U> Data</U> :</B><BR>
|
||||
* <BR>
|
||||
* This class contains all RewardInfo of the Attackable against the any attacker Creature, based on amount of damage done.<br>
|
||||
* <br>
|
||||
* <b><u>Data</u>:</b><br>
|
||||
* <li>attacker : The attacker Creature concerned by this RewardInfo of this Attackable</li>
|
||||
* <li>dmg : Total amount of damage done by the attacker to this Attackable (summon + own)</li>
|
||||
*/
|
||||
@@ -191,10 +184,9 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* This class contains all AbsorberInfo of the Attackable against the absorber Creature.<BR>
|
||||
* <BR>
|
||||
* <B><U> Data</U> :</B><BR>
|
||||
* <BR>
|
||||
* This class contains all AbsorberInfo of the Attackable against the absorber Creature.<br>
|
||||
* <br>
|
||||
* <b><u>Data</u>:</b><br>
|
||||
* <li>absorber : The attacker Creature concerned by this AbsorberInfo of this Attackable</li>
|
||||
*/
|
||||
public class AbsorberInfo
|
||||
@@ -205,8 +197,7 @@ public class Attackable extends NpcInstance
|
||||
protected double _absorbedHP;
|
||||
|
||||
/**
|
||||
* Constructor of AbsorberInfo.<BR>
|
||||
* <BR>
|
||||
* Constructor of AbsorberInfo.
|
||||
* @param attacker
|
||||
* @param pCrystalId
|
||||
* @param pAbsorbedHP
|
||||
@@ -219,8 +210,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify is object is equal to this AbsorberInfo.<BR>
|
||||
* <BR>
|
||||
* Verify is object is equal to this AbsorberInfo.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
@@ -239,8 +229,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Identifier of the absorber Creature.<BR>
|
||||
* <BR>
|
||||
* Return the Identifier of the absorber Creature.
|
||||
*/
|
||||
@Override
|
||||
public int hashCode()
|
||||
@@ -250,8 +239,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* This class is used to create item reward lists instead of creating item instances.<BR>
|
||||
* <BR>
|
||||
* This class is used to create item reward lists instead of creating item instances.
|
||||
*/
|
||||
public class RewardItem
|
||||
{
|
||||
@@ -348,14 +336,12 @@ public class Attackable extends NpcInstance
|
||||
public Creature _mostHated;
|
||||
|
||||
/**
|
||||
* Constructor of Attackable (use Creature and NpcInstance constructor).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Constructor of Attackable (use Creature and NpcInstance constructor).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Call the Creature constructor to set the _template of the Attackable (copy skills from template to object and link _calculators to NPC_STD_CALCULATOR)</li>
|
||||
* <li>Set the name of the Attackable</li>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><BR>
|
||||
* <BR>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><br>
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @param template
|
||||
*/
|
||||
@@ -377,8 +363,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Creature AI of the Attackable and if its null create a new one.<BR>
|
||||
* <BR>
|
||||
* Return the Creature AI of the Attackable and if its null create a new one.
|
||||
*/
|
||||
@Override
|
||||
public CreatureAI getAI()
|
||||
@@ -397,8 +382,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Not used.<BR>
|
||||
* <BR>
|
||||
* Not used.
|
||||
* @param target
|
||||
* @return
|
||||
* @deprecated
|
||||
@@ -420,8 +404,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduce the current HP of the Attackable.<BR>
|
||||
* <BR>
|
||||
* Reduce the current HP of the Attackable.
|
||||
* @param damage The HP decrease value
|
||||
* @param attacker The Creature who attacks
|
||||
*/
|
||||
@@ -432,7 +415,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduce the current HP of the Attackable, update its _aggroList and launch the doDie Task if necessary.<BR>
|
||||
* Reduce the current HP of the Attackable, update its _aggroList and launch the doDie Task if necessary.
|
||||
* @param attacker The Creature who attacks
|
||||
* @param awake The awake state (If True : stop sleeping)
|
||||
*/
|
||||
@@ -509,16 +492,13 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Kill the Attackable (the corpse disappeared after 7 seconds), distribute rewards (EXP, SP, Drops...) and notify Quest Engine.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Kill the Attackable (the corpse disappeared after 7 seconds), distribute rewards (EXP, SP, Drops...) and notify Quest Engine.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Distribute Exp and SP rewards to PlayerInstance (including Summon owner) that hit the Attackable and to their Party members</li>
|
||||
* <li>Notify the Quest Engine of the Attackable death if necessary</li>
|
||||
* <li>Kill the NpcInstance (the corpse disappeared after 7 seconds)</li><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T GIVE rewards to PetInstance</B></FONT><BR>
|
||||
* <BR>
|
||||
* <li>Kill the NpcInstance (the corpse disappeared after 7 seconds)</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T GIVE rewards to PetInstance</b></font>
|
||||
* @param killer The Creature that has killed the Attackable
|
||||
*/
|
||||
@Override
|
||||
@@ -598,16 +578,13 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Distribute Exp and SP rewards to PlayerInstance (including Summon owner) that hit the Attackable and to their Party members.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Distribute Exp and SP rewards to PlayerInstance (including Summon owner) that hit the Attackable and to their Party members.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Get the PlayerInstance owner of the SummonInstance (if necessary) and Party in progress</li>
|
||||
* <li>Calculate the Experience and SP rewards in function of the level difference</li>
|
||||
* <li>Add Exp and SP rewards to PlayerInstance (including Summon penalty) and to Party members in the known area of the last attacker</li><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T GIVE rewards to PetInstance</B></FONT><BR>
|
||||
* <BR>
|
||||
* <li>Add Exp and SP rewards to PlayerInstance (including Summon penalty) and to Party members in the known area of the last attacker</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T GIVE rewards to PetInstance</b></font>
|
||||
* @param lastAttacker The Creature that has killed the Attackable
|
||||
*/
|
||||
@Override
|
||||
@@ -944,8 +921,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Add damage and hate to the attacker AggroInfo of the Attackable _aggroList.<BR>
|
||||
* <BR>
|
||||
* Add damage and hate to the attacker AggroInfo of the Attackable _aggroList.
|
||||
* @param attacker The Creature that gave damages to this Attackable
|
||||
* @param damage The number of damages given by the attacker Creature
|
||||
*/
|
||||
@@ -955,8 +931,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Add damage and hate to the attacker AggroInfo of the Attackable _aggroList.<BR>
|
||||
* <BR>
|
||||
* Add damage and hate to the attacker AggroInfo of the Attackable _aggroList.
|
||||
* @param attacker The Creature that gave damages to this Attackable
|
||||
* @param damage The number of damages given by the attacker Creature
|
||||
* @param aggro The hate (=damage) given by the attacker Creature
|
||||
@@ -1086,8 +1061,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears _aggroList hate of the Creature without removing from the list.<BR>
|
||||
* <BR>
|
||||
* Clears _aggroList hate of the Creature without removing from the list.
|
||||
* @param target
|
||||
*/
|
||||
public void stopHating(Creature target)
|
||||
@@ -1107,8 +1081,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the most hated Creature of the Attackable _aggroList.<BR>
|
||||
* <BR>
|
||||
* Return the most hated Creature of the Attackable _aggroList.<br>
|
||||
* @return
|
||||
*/
|
||||
public Creature getMostHated()
|
||||
@@ -1154,8 +1127,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the hate level of the Attackable against this Creature contained in _aggroList.<BR>
|
||||
* <BR>
|
||||
* Return the hate level of the Attackable against this Creature contained in _aggroList.
|
||||
* @param target The Creature whose hate level must be returned
|
||||
* @return
|
||||
*/
|
||||
@@ -1200,7 +1172,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates quantity of items for specific drop according to current situation <br>
|
||||
* Calculates quantity of items for specific drop according to current situation
|
||||
* @param drop The DropData count is being calculated for
|
||||
* @param lastAttacker The PlayerInstance that has killed the Attackable
|
||||
* @param levelModifier level modifier in %'s (will be subtracted from drop chance)
|
||||
@@ -1452,7 +1424,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates quantity of items for specific drop CATEGORY according to current situation <br>
|
||||
* Calculates quantity of items for specific drop CATEGORY according to current situation<br>
|
||||
* Only a max of ONE item from a category is allowed to be dropped.
|
||||
* @param lastAttacker The PlayerInstance that has killed the Attackable
|
||||
* @param categoryDrops
|
||||
@@ -1739,7 +1711,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the level modifier for drop<br>
|
||||
* Calculates the level modifier for drop
|
||||
* @param lastAttacker The PlayerInstance that has killed the Attackable
|
||||
* @return
|
||||
*/
|
||||
@@ -1777,22 +1749,20 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage Base, Quests and Special Events drops of Attackable (called by calculateRewards).<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* During a Special Event all Attackable can drop extra Items. Those extra Items are defined in the table <B>allNpcDateDrops</B> of the EventDroplist. Each Special Event has a start and end date to stop to drop extra Items automaticaly. <BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : </B><BR>
|
||||
* <BR>
|
||||
* Manage Base, Quests and Special Events drops of Attackable (called by calculateRewards).<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* During a Special Event all Attackable can drop extra Items. Those extra Items are defined in the table <b>allNpcDateDrops</b> of the EventDroplist. Each Special Event has a start and end date to stop to drop extra Items automaticaly.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : </b><br>
|
||||
* <li>Manage drop of Special Events created by GM for a defined period</li>
|
||||
* <li>Get all possible drops of this Attackable from NpcTemplate and add it Quest drops</li>
|
||||
* <li>For each possible drops (base + quests), calculate which one must be dropped (random)</li>
|
||||
* <li>Get each Item quantity dropped (random)</li>
|
||||
* <li>Create this or these ItemInstance corresponding to each Item Identifier dropped</li>
|
||||
* <li>If the autoLoot mode is actif and if the Creature that has killed the Attackable is a PlayerInstance, give this or these Item(s) to the PlayerInstance that has killed the Attackable</li>
|
||||
* <li>If the autoLoot mode isn't actif or if the Creature that has killed the Attackable is not a PlayerInstance, add this or these Item(s) in the world as a visible object at the position where mob was last</li><BR>
|
||||
* <BR>
|
||||
* <li>If the autoLoot mode isn't actif or if the Creature that has killed the Attackable is not a PlayerInstance, add this or these Item(s) in the world as a visible object at the position where mob was last</li><br>
|
||||
* @param npcTemplate
|
||||
* @param lastAttacker The Creature that has killed the Attackable
|
||||
*/
|
||||
@@ -2278,20 +2248,18 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage Special Events drops created by GM for a defined period.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* During a Special Event all Attackable can drop extra Items. Those extra Items are defined in the table <B>allNpcDateDrops</B> of the EventDroplist. Each Special Event has a start and end date to stop to drop extra Items automaticaly. <BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> : <I>If an extra drop must be generated</I></B><BR>
|
||||
* <BR>
|
||||
* Manage Special Events drops created by GM for a defined period.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* During a Special Event all Attackable can drop extra Items. Those extra Items are defined in the table <b>allNpcDateDrops</b> of the EventDroplist. Each Special Event has a start and end date to stop to drop extra Items automaticaly.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u> : <i>If an extra drop must be generated</i></b><br>
|
||||
* <li>Get an Item Identifier (random) from the DateDrop Item table of this Event</li>
|
||||
* <li>Get the Item quantity dropped (random)</li>
|
||||
* <li>Create this or these ItemInstance corresponding to this Item Identifier</li>
|
||||
* <li>If the autoLoot mode is actif and if the Creature that has killed the Attackable is a PlayerInstance, give this or these Item(s) to the PlayerInstance that has killed the Attackable</li>
|
||||
* <li>If the autoLoot mode isn't actif or if the Creature that has killed the Attackable is not a PlayerInstance, add this or these Item(s) in the world as a visible object at the position where mob was last</li><BR>
|
||||
* <BR>
|
||||
* <li>If the autoLoot mode isn't actif or if the Creature that has killed the Attackable is not a PlayerInstance, add this or these Item(s) in the world as a visible object at the position where mob was last</li><br>
|
||||
* @param lastAttacker The Creature that has killed the Attackable
|
||||
*/
|
||||
public void doEventDrop(Creature lastAttacker)
|
||||
@@ -2343,8 +2311,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Drop reward item.<BR>
|
||||
* <BR>
|
||||
* Drop reward item.
|
||||
* @param mainDamageDealer
|
||||
* @param item
|
||||
* @return
|
||||
@@ -2388,8 +2355,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the active weapon of this Attackable (= null).<BR>
|
||||
* <BR>
|
||||
* Return the active weapon of this Attackable (= null).<br>
|
||||
* @return
|
||||
*/
|
||||
public ItemInstance getActiveWeapon()
|
||||
@@ -2398,8 +2364,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the _aggroList of this Attackable is Empty.<BR>
|
||||
* <BR>
|
||||
* Return True if the _aggroList of this Attackable is Empty.<br>
|
||||
* @return
|
||||
*/
|
||||
public boolean noTarget()
|
||||
@@ -2408,8 +2373,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the _aggroList of this Attackable contains the Creature.<BR>
|
||||
* <BR>
|
||||
* Return True if the _aggroList of this Attackable contains the Creature.
|
||||
* @param creature The Creature searched in the _aggroList of the Attackable
|
||||
* @return
|
||||
*/
|
||||
@@ -2419,8 +2383,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the _aggroList of the Attackable.<BR>
|
||||
* <BR>
|
||||
* Clear the _aggroList of the Attackable.
|
||||
*/
|
||||
public void clearAggroList()
|
||||
{
|
||||
@@ -2428,8 +2391,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if a Dwarf use Sweep on the Attackable and if item can be spoiled.<BR>
|
||||
* <BR>
|
||||
* Return True if a Dwarf use Sweep on the Attackable and if item can be spoiled.<br>
|
||||
* @return
|
||||
*/
|
||||
public boolean isSweepActive()
|
||||
@@ -2438,8 +2400,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return table containing all ItemInstance that can be spoiled.<BR>
|
||||
* <BR>
|
||||
* Return table containing all ItemInstance that can be spoiled.<br>
|
||||
* @return
|
||||
*/
|
||||
public synchronized RewardItem[] takeSweep()
|
||||
@@ -2450,8 +2411,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return table containing all ItemInstance that can be harvested.<BR>
|
||||
* <BR>
|
||||
* Return table containing all ItemInstance that can be harvested.<br>
|
||||
* @return
|
||||
*/
|
||||
public synchronized RewardItem[] takeHarvest()
|
||||
@@ -2462,8 +2422,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the over-hit flag on the Attackable.<BR>
|
||||
* <BR>
|
||||
* Set the over-hit flag on the Attackable.
|
||||
* @param status The status of the over-hit flag
|
||||
*/
|
||||
public void overhitEnabled(boolean status)
|
||||
@@ -2472,8 +2431,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the over-hit values like the attacker who did the strike and the ammount of damage done by the skill.<BR>
|
||||
* <BR>
|
||||
* Set the over-hit values like the attacker who did the strike and the ammount of damage done by the skill.
|
||||
* @param attacker The Creature who hit on the Attackable using the over-hit enabled skill
|
||||
* @param damage The ammount of damage done by the over-hit enabled skill on the Attackable
|
||||
*/
|
||||
@@ -2498,8 +2456,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Creature who hit on the Attackable using an over-hit enabled skill.<BR>
|
||||
* <BR>
|
||||
* Return the Creature who hit on the Attackable using an over-hit enabled skill.
|
||||
* @return Creature attacker
|
||||
*/
|
||||
public Creature getOverhitAttacker()
|
||||
@@ -2508,8 +2465,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ammount of damage done on the Attackable using an over-hit enabled skill.<BR>
|
||||
* <BR>
|
||||
* Return the ammount of damage done on the Attackable using an over-hit enabled skill.
|
||||
* @return double damage
|
||||
*/
|
||||
public double getOverhitDamage()
|
||||
@@ -2518,8 +2474,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the Attackable was hit by an over-hit enabled skill.<BR>
|
||||
* <BR>
|
||||
* Return True if the Attackable was hit by an over-hit enabled skill.<br>
|
||||
* @return
|
||||
*/
|
||||
public boolean isOverhit()
|
||||
@@ -2528,8 +2483,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate the absorbed soul condition on the Attackable.<BR>
|
||||
* <BR>
|
||||
* Activate the absorbed soul condition on the Attackable.
|
||||
*/
|
||||
public void absorbSoul()
|
||||
{
|
||||
@@ -2537,8 +2491,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the Attackable had his soul absorbed.<BR>
|
||||
* <BR>
|
||||
* Return True if the Attackable had his soul absorbed.<br>
|
||||
* @return
|
||||
*/
|
||||
public boolean isAbsorbed()
|
||||
@@ -2547,7 +2500,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an attacker that successfully absorbed the soul of this Attackable into the _absorbersList.<BR>
|
||||
* Adds an attacker that successfully absorbed the soul of this Attackable into the _absorbersList.
|
||||
* @param attacker - a valid PlayerInstance
|
||||
* @param crystalId
|
||||
*/
|
||||
@@ -2893,8 +2846,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the Experience and SP to distribute to attacker (PlayerInstance, SummonInstance or Party) of the Attackable.<BR>
|
||||
* <BR>
|
||||
* Calculate the Experience and SP to distribute to attacker (PlayerInstance, SummonInstance or Party) of the Attackable.
|
||||
* @param diff The difference of level between attacker (PlayerInstance, SummonInstance or Party) and the Attackable
|
||||
* @param damage The damages given by the attacker (PlayerInstance, SummonInstance or Party)
|
||||
* @return
|
||||
@@ -2968,8 +2920,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True.<BR>
|
||||
* <BR>
|
||||
* Return True.
|
||||
*/
|
||||
@Override
|
||||
public boolean isAttackable()
|
||||
@@ -3140,7 +3091,7 @@ public class Attackable extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the server allows Random Animation.<BR>
|
||||
* Check if the server allows Random Animation.<br>
|
||||
* This is located here because Monster and FriendlyMob both extend this class. The other non-pc instances extend either NpcInstance or MonsterInstance.
|
||||
*/
|
||||
@Override
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -40,12 +40,10 @@ public abstract class Playable extends Creature
|
||||
private boolean _ProtectionBlessing = false;
|
||||
|
||||
/**
|
||||
* Constructor of PlayableInstance (use Creature constructor).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Call the Creature constructor to create an empty _skills slot and link copy basic Calculator set to this PlayableInstance</li><BR>
|
||||
* <BR>
|
||||
* Constructor of PlayableInstance (use Creature constructor).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Call the Creature constructor to create an empty _skills slot and link copy basic Calculator set to this PlayableInstance</li><br>
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @param template The CreatureTemplate to apply to the PlayableInstance
|
||||
*/
|
||||
@@ -185,8 +183,7 @@ public abstract class Playable extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True.<BR>
|
||||
* <BR>
|
||||
* Return True.
|
||||
* @return true, if is attackable
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -532,8 +532,7 @@ public abstract class Summon extends Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Party object of its PlayerInstance owner or null.<BR>
|
||||
* <BR>
|
||||
* Return the Party object of its PlayerInstance owner or null.
|
||||
*/
|
||||
@Override
|
||||
public Party getParty()
|
||||
@@ -546,8 +545,7 @@ public abstract class Summon extends Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the Creature has a Party in progress.<BR>
|
||||
* <BR>
|
||||
* Return True if the Creature has a Party in progress.
|
||||
*/
|
||||
@Override
|
||||
public boolean isInParty()
|
||||
@@ -560,19 +558,15 @@ public abstract class Summon extends Playable
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the active Skill can be casted.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Check if the active Skill can be casted.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Check if the target is correct</li>
|
||||
* <li>Check if the target is in the skill cast range</li>
|
||||
* <li>Check if the summon owns enough HP and MP to cast the skill</li>
|
||||
* <li>Check if all skills are enabled and this skill is enabled</li><BR>
|
||||
* <BR>
|
||||
* <li>Check if the skill is active</li><BR>
|
||||
* <BR>
|
||||
* <li>Notify the AI with AI_INTENTION_CAST and target</li><BR>
|
||||
* <BR>
|
||||
* <li>Check if all skills are enabled and this skill is enabled</li>
|
||||
* <li>Check if the skill is active</li>
|
||||
* <li>Notify the AI with AI_INTENTION_CAST and target</li><br>
|
||||
* @param skill The Skill to use
|
||||
* @param forceUse used to force ATTACK on players
|
||||
* @param dontMove used to prevent movement, if not in range
|
||||
|
||||
+13
-18
@@ -24,21 +24,19 @@ import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||
|
||||
/**
|
||||
* This class manages all Castle Siege Artefacts.<BR>
|
||||
* <BR>
|
||||
* This class manages all Castle Siege Artefacts.<br>
|
||||
* <br>
|
||||
* @version $Revision: 1.11.2.1.2.7 $ $Date: 2005/04/06 16:13:40 $
|
||||
*/
|
||||
public class ArtefactInstance extends NpcInstance
|
||||
{
|
||||
/**
|
||||
* Constructor of ArtefactInstance (use Creature and NpcInstance constructor).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Constructor of ArtefactInstance (use Creature and NpcInstance constructor).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Call the Creature constructor to set the _template of the ArtefactInstance (copy skills from template to object and link _calculators to NPC_STD_CALCULATOR)</li>
|
||||
* <li>Set the name of the ArtefactInstance</li>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><BR>
|
||||
* <BR>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><br>
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @param template
|
||||
*/
|
||||
@@ -66,18 +64,15 @@ public class ArtefactInstance extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage actions when a player click on the ArtefactInstance.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage actions when a player click on the ArtefactInstance.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Set the NpcInstance as target of the PlayerInstance player (if necessary)</li>
|
||||
* <li>Send a Server->Client packet MyTargetSelected to the PlayerInstance player (display the select window)</li>
|
||||
* <li>Send a Server->Client packet ValidateLocation to correct the NpcInstance position and heading on the client</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Client packet : Action, AttackRequest</li><BR>
|
||||
* <BR>
|
||||
* <li>Send a Server->Client packet ValidateLocation to correct the NpcInstance position and heading on the client</li><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Client packet : Action, AttackRequest</li><br>
|
||||
* @param player The PlayerInstance that start an action on the ArtefactInstance
|
||||
*/
|
||||
@Override
|
||||
|
||||
+10
-10
@@ -96,16 +96,16 @@ public class CabaleBufferInstance extends NpcInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* For each known player in range, cast either the positive or negative buff. <BR>
|
||||
* The stats affected depend on the player type, either a fighter or a mystic. <BR>
|
||||
* <BR>
|
||||
* Curse of Destruction (Loser)<BR>
|
||||
* - Fighters: -25% Accuracy, -25% Effect Resistance<BR>
|
||||
* - Mystics: -25% Casting Speed, -25% Effect Resistance<BR>
|
||||
* <BR>
|
||||
* <BR>
|
||||
* Blessing of Prophecy (Winner) - Fighters: +25% Max Load, +25% Effect Resistance<BR>
|
||||
* - Mystics: +25% Magic Cancel Resist, +25% Effect Resistance<BR>
|
||||
* For each known player in range, cast either the positive or negative buff.<br>
|
||||
* The stats affected depend on the player type, either a fighter or a mystic.<br>
|
||||
* <br>
|
||||
* Curse of Destruction (Loser)<br>
|
||||
* - Fighters: -25% Accuracy, -25% Effect Resistance<br>
|
||||
* - Mystics: -25% Casting Speed, -25% Effect Resistance<br>
|
||||
* <br>
|
||||
* <br>
|
||||
* Blessing of Prophecy (Winner) - Fighters: +25% Max Load, +25% Effect Resistance<br>
|
||||
* - Mystics: +25% Magic Cancel Resist, +25% Effect Resistance<br>
|
||||
*/
|
||||
for (PlayerInstance player : getKnownList().getKnownPlayers().values())
|
||||
{
|
||||
|
||||
+1
-2
@@ -39,8 +39,7 @@ public class CommanderInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if a siege is in progress and the Creature attacker isn't a Defender.<BR>
|
||||
* <BR>
|
||||
* Return True if a siege is in progress and the Creature attacker isn't a Defender.
|
||||
* @param attacker The Creature that the CommanderInstance try to attack
|
||||
*/
|
||||
@Override
|
||||
|
||||
+7
-10
@@ -272,8 +272,8 @@ public class DoorInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the delay in milliseconds for automatic opening/closing of this door instance. <BR>
|
||||
* <B>Note:</B> A value of -1 cancels the auto open/close task.
|
||||
* Sets the delay in milliseconds for automatic opening/closing of this door instance.<br>
|
||||
* <b>Note:</b> A value of -1 cancels the auto open/close task.
|
||||
* @param actionDelay the new auto action delay
|
||||
*/
|
||||
public void setAutoActionDelay(int actionDelay)
|
||||
@@ -465,13 +465,11 @@ public class DoorInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the distance after which the object must be remove from _knownObject according to the type of the object.<BR>
|
||||
* <BR>
|
||||
* <B><U> Values </U> :</B><BR>
|
||||
* <BR>
|
||||
* Return the distance after which the object must be remove from _knownObject according to the type of the object.<br>
|
||||
* <br>
|
||||
* <b><u>Values</u>:</b><br>
|
||||
* <li>object is a PlayerInstance : 4000</li>
|
||||
* <li>object is not a PlayerInstance : 0</li><BR>
|
||||
* <BR>
|
||||
* <li>object is not a PlayerInstance : 0</li><br>
|
||||
* @param object the object
|
||||
* @return the distance to forget object
|
||||
*/
|
||||
@@ -485,8 +483,7 @@ public class DoorInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return null.<BR>
|
||||
* <BR>
|
||||
* Return null.
|
||||
* @return the active weapon instance
|
||||
*/
|
||||
@Override
|
||||
|
||||
+6
-9
@@ -32,14 +32,12 @@ public class FestivalMonsterInstance extends MonsterInstance
|
||||
protected int _bonusMultiplier = 1;
|
||||
|
||||
/**
|
||||
* Constructor of FestivalMonsterInstance (use Creature and NpcInstance constructor).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Constructor of FestivalMonsterInstance (use Creature and NpcInstance constructor).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Call the Creature constructor to set the _template of the FestivalMonsterInstance (copy skills from template to object and link _calculators to NPC_STD_CALCULATOR)</li>
|
||||
* <li>Set the name of the MonsterInstance</li>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><BR>
|
||||
* <BR>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><br>
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @param template the template
|
||||
*/
|
||||
@@ -58,8 +56,7 @@ public class FestivalMonsterInstance extends MonsterInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the attacker is not another FestivalMonsterInstance.<BR>
|
||||
* <BR>
|
||||
* Return True if the attacker is not another FestivalMonsterInstance.
|
||||
* @param attacker the attacker
|
||||
* @return true, if is auto attackable
|
||||
*/
|
||||
@@ -93,7 +90,7 @@ public class FestivalMonsterInstance extends MonsterInstance
|
||||
* Actions:
|
||||
* <li>Check if the killing object is a player, and then find the party they belong to.</li>
|
||||
* <li>Add a blood offering item to the leader of the party.</li>
|
||||
* <li>Update the party leader's inventory to show the new item addition.</li>
|
||||
* <li>Update the party leader's inventory to show the new item addition.</li><br>
|
||||
* @param lastAttacker the last attacker
|
||||
*/
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -139,7 +139,7 @@ public class FortMerchantInstance extends NpcWalkerInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* If siege is in progress shows the Busy HTML<BR>
|
||||
* If siege is in progress shows the Busy HTML<br>
|
||||
* else Shows the SiegeInfo window
|
||||
* @param player
|
||||
*/
|
||||
|
||||
+1
-2
@@ -68,8 +68,7 @@ public class FortSiegeGuardInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if a siege is in progress and the Creature attacker isn't a Defender.<BR>
|
||||
* <BR>
|
||||
* Return True if a siege is in progress and the Creature attacker isn't a Defender.
|
||||
* @param attacker The Creature that the SiegeGuardInstance try to attack
|
||||
*/
|
||||
@Override
|
||||
|
||||
+28
-39
@@ -33,8 +33,8 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||
|
||||
/**
|
||||
* This class manages all Guards in the world. It inherits all methods from Attackable and adds some more such as tracking PK and aggressive MonsterInstance.<BR>
|
||||
* <BR>
|
||||
* This class manages all Guards in the world. It inherits all methods from Attackable and adds some more such as tracking PK and aggressive MonsterInstance.<br>
|
||||
* <br>
|
||||
* @version $Revision: 1.11.2.1.2.7 $ $Date: 2005/04/06 16:13:40 $
|
||||
*/
|
||||
public class GuardInstance extends Attackable
|
||||
@@ -57,14 +57,12 @@ public class GuardInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor of GuardInstance (use Creature and NpcInstance constructor).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Constructor of GuardInstance (use Creature and NpcInstance constructor).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Call the Creature constructor to set the _template of the GuardInstance (copy skills from template to object and link _calculators to NPC_STD_CALCULATOR)</li>
|
||||
* <li>Set the name of the GuardInstance</li>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><BR>
|
||||
* <BR>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><br>
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @param template the template
|
||||
*/
|
||||
@@ -86,8 +84,7 @@ public class GuardInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the attacker is a MonsterInstance.<BR>
|
||||
* <BR>
|
||||
* Return True if the attacker is a MonsterInstance.
|
||||
* @param attacker the attacker
|
||||
* @return true, if is auto attackable
|
||||
*/
|
||||
@@ -98,10 +95,10 @@ public class GuardInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Set home location of the GuardInstance.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* Set home location of the GuardInstance.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* Guard will always try to return to this location after it has killed all PK's in range
|
||||
*/
|
||||
public void getHomeLocation()
|
||||
@@ -121,8 +118,7 @@ public class GuardInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify the GuardInstance to return to its home location (AI_INTENTION_MOVE_TO) and clear its _aggroList.<BR>
|
||||
* <BR>
|
||||
* Notify the GuardInstance to return to its home location (AI_INTENTION_MOVE_TO) and clear its _aggroList.
|
||||
*/
|
||||
public void returnHome()
|
||||
{
|
||||
@@ -134,8 +130,7 @@ public class GuardInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the home location of its GuardInstance.<BR>
|
||||
* <BR>
|
||||
* Set the home location of its GuardInstance.
|
||||
*/
|
||||
@Override
|
||||
public void onSpawn()
|
||||
@@ -154,13 +149,11 @@ public class GuardInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the pathfile of the selected HTML file in function of the GuardInstance Identifier and of the page number.<BR>
|
||||
* <BR>
|
||||
* <B><U> Format of the pathfile </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>if page number = 0 : <B>data/html/guard/12006.htm</B> (npcId-page number)</li>
|
||||
* <li>if page number > 0 : <B>data/html/guard/12006-1.htm</B> (npcId-page number)</li><BR>
|
||||
* <BR>
|
||||
* Return the pathfile of the selected HTML file in function of the GuardInstance Identifier and of the page number.<br>
|
||||
* <br>
|
||||
* <b><u>Format of the pathfile</u>:</b><br>
|
||||
* <li>if page number = 0 : <b>data/html/guard/12006.htm</b> (npcId-page number)</li>
|
||||
* <li>if page number > 0 : <b>data/html/guard/12006-1.htm</b> (npcId-page number)</li><br>
|
||||
* @param npcId The Identifier of the NpcInstance whose text must be display
|
||||
* @param value The number of the page to display
|
||||
* @return the html path
|
||||
@@ -181,24 +174,20 @@ public class GuardInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage actions when a player click on the GuardInstance.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions on first click on the GuardInstance (Select it)</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage actions when a player click on the GuardInstance.<br>
|
||||
* <br>
|
||||
* <b><u>Actions on first click on the GuardInstance (Select it)</u>:</b><br>
|
||||
* <li>Set the GuardInstance as target of the PlayerInstance player (if necessary)</li>
|
||||
* <li>Send a Server->Client packet MyTargetSelected to the PlayerInstance player (display the select window)</li>
|
||||
* <li>Set the PlayerInstance Intention to AI_INTENTION_IDLE</li>
|
||||
* <li>Send a Server->Client packet ValidateLocation to correct the GuardInstance position and heading on the client</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Actions on second click on the GuardInstance (Attack it/Interact with it)</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Send a Server->Client packet ValidateLocation to correct the GuardInstance position and heading on the client</li><br>
|
||||
* <br>
|
||||
* <b><u>Actions on second click on the GuardInstance (Attack it/Interact with it)</u>:</b><br>
|
||||
* <li>If PlayerInstance is in the _aggroList of the GuardInstance, set the PlayerInstance Intention to AI_INTENTION_ATTACK</li>
|
||||
* <li>If PlayerInstance is NOT in the _aggroList of the GuardInstance, set the PlayerInstance Intention to AI_INTENTION_INTERACT (after a distance verification) and show message</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Client packet : Action, AttackRequest</li><BR>
|
||||
* <BR>
|
||||
* <li>If PlayerInstance is NOT in the _aggroList of the GuardInstance, set the PlayerInstance Intention to AI_INTENTION_INTERACT (after a distance verification) and show message</li><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Client packet : Action, AttackRequest</li><br>
|
||||
* @param player The PlayerInstance that start an action on the GuardInstance
|
||||
*/
|
||||
@Override
|
||||
|
||||
+23
-32
@@ -32,8 +32,8 @@ import org.l2jmobius.gameserver.network.serverpackets.MyTargetSelected;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||
|
||||
/**
|
||||
* This class manages all Guards in the world. It inherits all methods from Attackable and adds some more such as tracking PK and aggressive MonsterInstance.<BR>
|
||||
* <BR>
|
||||
* This class manages all Guards in the world. It inherits all methods from Attackable and adds some more such as tracking PK and aggressive MonsterInstance.<br>
|
||||
* <br>
|
||||
* @version $Revision: 1.11.2.1.2.7 $ $Date: 2005/04/06 16:13:40 $
|
||||
*/
|
||||
public class GuardNoHTMLInstance extends Attackable
|
||||
@@ -56,14 +56,12 @@ public class GuardNoHTMLInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor of GuardInstance (use Creature and NpcInstance constructor).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Constructor of GuardInstance (use Creature and NpcInstance constructor).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Call the Creature constructor to set the _template of the GuardInstance (copy skills from template to object and link _calculators to NPC_STD_CALCULATOR)</li>
|
||||
* <li>Set the name of the GuardInstance</li>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li> <BR>
|
||||
* <BR>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li>
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @param template the template
|
||||
*/
|
||||
@@ -85,8 +83,7 @@ public class GuardNoHTMLInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if hte attacker is a MonsterInstance.<BR>
|
||||
* <BR>
|
||||
* Return true if hte attacker is a MonsterInstance.
|
||||
* @param attacker the attacker
|
||||
* @return true, if is auto attackable
|
||||
*/
|
||||
@@ -97,10 +94,10 @@ public class GuardNoHTMLInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Set home location of the GuardInstance.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* Set home location of the GuardInstance.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* Guard will always try to return to this location after it has killed all PK's in range
|
||||
*/
|
||||
public void getHomeLocation()
|
||||
@@ -120,8 +117,7 @@ public class GuardNoHTMLInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify the GuardInstance to return to its home location (AI_INTENTION_MOVE_TO) and clear its _aggroList.<BR>
|
||||
* <BR>
|
||||
* Notify the GuardInstance to return to its home location (AI_INTENTION_MOVE_TO) and clear its _aggroList.
|
||||
*/
|
||||
public void returnHome()
|
||||
{
|
||||
@@ -133,8 +129,7 @@ public class GuardNoHTMLInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the home location of its GuardInstance.<BR>
|
||||
* <BR>
|
||||
* Set the home location of its GuardInstance.
|
||||
*/
|
||||
@Override
|
||||
public void onSpawn()
|
||||
@@ -152,24 +147,20 @@ public class GuardNoHTMLInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage actions when a player click on the GuardInstance.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions on first click on the GuardInstance (Select it)</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage actions when a player click on the GuardInstance.<br>
|
||||
* <br>
|
||||
* <b><u>Actions on first click on the GuardInstance (Select it)</u>:</b><br>
|
||||
* <li>Set the GuardInstance as target of the PlayerInstance player (if necessary)</li>
|
||||
* <li>Send a Server->Client packet MyTargetSelected to the PlayerInstance player (display the select window)</li>
|
||||
* <li>Set the PlayerInstance Intention to AI_INTENTION_IDLE</li>
|
||||
* <li>Send a Server->Client packet ValidateLocation to correct the GuardInstance position and heading on the client</li> <BR>
|
||||
* <BR>
|
||||
* <B><U> Actions on second click on the GuardInstance (Attack it/Interact with it)</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Send a Server->Client packet ValidateLocation to correct the GuardInstance position and heading on the client</li><br>
|
||||
* <br>
|
||||
* <b><u>Actions on second click on the GuardInstance (Attack it/Interact with it)</u>:</b><br>
|
||||
* <li>If PlayerInstance is in the _aggroList of the GuardInstance, set the PlayerInstance Intention to AI_INTENTION_ATTACK</li>
|
||||
* <li>If PlayerInstance is NOT in the _aggroList of the GuardInstance, set the PlayerInstance Intention to AI_INTENTION_INTERACT (after a distance verification) and show message</li> <BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Client packet : Action, AttackRequest</li> <BR>
|
||||
* <BR>
|
||||
* <li>If PlayerInstance is NOT in the _aggroList of the GuardInstance, set the PlayerInstance Intention to AI_INTENTION_INTERACT (after a distance verification) and show message</li><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Client packet : Action, AttackRequest</li>
|
||||
* @param player The PlayerInstance that start an action on the GuardInstance
|
||||
*/
|
||||
@Override
|
||||
|
||||
+8
-14
@@ -31,14 +31,12 @@ public class MinionInstance extends MonsterInstance
|
||||
private MonsterInstance _master;
|
||||
|
||||
/**
|
||||
* Constructor of MinionInstance (use Creature and NpcInstance constructor).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Constructor of MinionInstance (use Creature and NpcInstance constructor).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Call the Creature constructor to set the _template of the MinionInstance (copy skills from template to object and link _calculators to NPC_STD_CALCULATOR)</li>
|
||||
* <li>Set the name of the MinionInstance</li>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><BR>
|
||||
* <BR>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><br>
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @param template the template
|
||||
*/
|
||||
@@ -58,8 +56,7 @@ public class MinionInstance extends MonsterInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the master of this MinionInstance.<BR>
|
||||
* <BR>
|
||||
* Return the master of this MinionInstance.
|
||||
* @return the leader
|
||||
*/
|
||||
public MonsterInstance getLeader()
|
||||
@@ -83,8 +80,7 @@ public class MinionInstance extends MonsterInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the master of this MinionInstance.<BR>
|
||||
* <BR>
|
||||
* Set the master of this MinionInstance.
|
||||
* @param leader The Creature that leads this MinionInstance
|
||||
*/
|
||||
public void setLeader(MonsterInstance leader)
|
||||
@@ -93,10 +89,8 @@ public class MinionInstance extends MonsterInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Manages the doDie event for this MinionInstance.<BR>
|
||||
* <BR>
|
||||
* @param killer The Creature that killed this MinionInstance.<BR>
|
||||
* <BR>
|
||||
* Manages the doDie event for this MinionInstance.
|
||||
* @param killer The Creature that killed this MinionInstance.<br>
|
||||
* @return true, if successful
|
||||
*/
|
||||
@Override
|
||||
|
||||
+7
-12
@@ -32,8 +32,7 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
import org.l2jmobius.gameserver.util.MinionList;
|
||||
|
||||
/**
|
||||
* This class manages all Monsters. MonsterInstance :<BR>
|
||||
* <BR>
|
||||
* This class manages all Monsters. MonsterInstance:<br>
|
||||
* <li>MinionInstance</li>
|
||||
* <li>RaidBossInstance</li>
|
||||
* <li>GrandBossInstance</li>
|
||||
@@ -45,14 +44,12 @@ public class MonsterInstance extends Attackable
|
||||
protected ScheduledFuture<?> _minionMaintainTask = null;
|
||||
|
||||
/**
|
||||
* Constructor of MonsterInstance (use Creature and NpcInstance constructor).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Constructor of MonsterInstance (use Creature and NpcInstance constructor).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Call the Creature constructor to set the _template of the MonsterInstance (copy skills from template to object and link _calculators to NPC_STD_CALCULATOR)</li>
|
||||
* <li>Set the name of the MonsterInstance</li>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><BR>
|
||||
* <BR>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><br>
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @param template the template
|
||||
*/
|
||||
@@ -86,8 +83,7 @@ public class MonsterInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the attacker is not another MonsterInstance.<BR>
|
||||
* <BR>
|
||||
* Return True if the attacker is not another MonsterInstance.
|
||||
* @param attacker the attacker
|
||||
* @return true, if is auto attackable
|
||||
*/
|
||||
@@ -102,8 +98,7 @@ public class MonsterInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the MonsterInstance is Agressive (aggroRange > 0).<BR>
|
||||
* <BR>
|
||||
* Return True if the MonsterInstance is Agressive (aggroRange > 0).
|
||||
* @return true, if is aggressive
|
||||
*/
|
||||
@Override
|
||||
|
||||
+142
-208
@@ -97,10 +97,9 @@ import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||
|
||||
/**
|
||||
* This class represents a Non-Player-Creature in the world. It can be a monster or a friendly creature. It also uses a template to fetch some static values. The templates are hardcoded in the client, so we can rely on them.<BR>
|
||||
* <BR>
|
||||
* Creature :<BR>
|
||||
* <BR>
|
||||
* This class represents a Non-Player-Creature in the world. It can be a monster or a friendly creature. It also uses a template to fetch some static values. The templates are hardcoded in the client, so we can rely on them.<br>
|
||||
* <br>
|
||||
* Creature:<br>
|
||||
* <li>Attackable</li>
|
||||
* <li>FolkInstance</li>
|
||||
* @version $Revision: 1.32.2.7.2.24 $ $Date: 2009/04/13 09:17:09 $
|
||||
@@ -153,8 +152,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the server allows Random Animation.<BR>
|
||||
* <BR>
|
||||
* Check if the server allows Random Animation.
|
||||
* @return true, if successful
|
||||
*/
|
||||
public boolean hasRandomAnimation()
|
||||
@@ -206,14 +204,12 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor of NpcInstance (use Creature constructor).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Constructor of NpcInstance (use Creature constructor).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Call the Creature constructor to set the _template of the Creature (copy skills from template to object and link _calculators to NPC_STD_CALCULATOR)</li>
|
||||
* <li>Set the name of the Creature</li>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><BR>
|
||||
* <BR>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><br>
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @param template The NpcTemplate to apply to the NPC
|
||||
*/
|
||||
@@ -305,8 +301,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the generic Identifier of this NpcInstance contained in the NpcTemplate.<BR>
|
||||
* <BR>
|
||||
* Return the generic Identifier of this NpcInstance contained in the NpcTemplate.
|
||||
* @return the npc id
|
||||
*/
|
||||
public int getNpcId()
|
||||
@@ -321,12 +316,11 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the faction Identifier of this NpcInstance contained in the NpcTemplate.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* If a NPC belows to a Faction, other NPC of the faction inside the Faction range will help it if it's attacked<BR>
|
||||
* <BR>
|
||||
* Return the faction Identifier of this NpcInstance contained in the NpcTemplate.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* If a NPC belows to a Faction, other NPC of the faction inside the Faction range will help it if it's attacked
|
||||
* @return the faction id
|
||||
*/
|
||||
public String getFactionId()
|
||||
@@ -335,8 +329,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Level of this NpcInstance contained in the NpcTemplate.<BR>
|
||||
* <BR>
|
||||
* Return the Level of this NpcInstance contained in the NpcTemplate.
|
||||
* @return the level
|
||||
*/
|
||||
@Override
|
||||
@@ -346,8 +339,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if the NpcInstance is agressive (ex : MonsterInstance in function of aggroRange).<BR>
|
||||
* <BR>
|
||||
* Return True if the NpcInstance is agressive (ex : MonsterInstance in function of aggroRange).
|
||||
* @return true, if is aggressive
|
||||
*/
|
||||
public boolean isAggressive()
|
||||
@@ -356,8 +348,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Aggro Range of this NpcInstance contained in the NpcTemplate.<BR>
|
||||
* <BR>
|
||||
* Return the Aggro Range of this NpcInstance contained in the NpcTemplate.
|
||||
* @return the aggro range
|
||||
*/
|
||||
public int getAggroRange()
|
||||
@@ -366,8 +357,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Faction Range of this NpcInstance contained in the NpcTemplate.<BR>
|
||||
* <BR>
|
||||
* Return the Faction Range of this NpcInstance contained in the NpcTemplate.
|
||||
* @return the faction range
|
||||
*/
|
||||
public int getFactionRange()
|
||||
@@ -376,8 +366,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if this NpcInstance is undead in function of the NpcTemplate.<BR>
|
||||
* <BR>
|
||||
* Return True if this NpcInstance is undead in function of the NpcTemplate.
|
||||
* @return true, if is undead
|
||||
*/
|
||||
@Override
|
||||
@@ -387,8 +376,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a packet NpcInfo with state of abnormal effect to all PlayerInstance in the _KnownPlayers of the NpcInstance.<BR>
|
||||
* <BR>
|
||||
* Send a packet NpcInfo with state of abnormal effect to all PlayerInstance in the _KnownPlayers of the NpcInstance.
|
||||
*/
|
||||
@Override
|
||||
public void updateAbnormalEffect()
|
||||
@@ -404,19 +392,17 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the distance under which the object must be add to _knownObject in function of the object type.<BR>
|
||||
* <BR>
|
||||
* <B><U> Values </U> :</B><BR>
|
||||
* <BR>
|
||||
* Return the distance under which the object must be add to _knownObject in function of the object type.<br>
|
||||
* <br>
|
||||
* <b><u>Values</u>:</b><br>
|
||||
* <li>object is a FolkInstance : 0 (don't remember it)</li>
|
||||
* <li>object is a Creature : 0 (don't remember it)</li>
|
||||
* <li>object is a PlayableInstance : 1500</li>
|
||||
* <li>others : 500</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Overriden in </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Attackable</li><BR>
|
||||
* <BR>
|
||||
* <li>others : 500</li><br>
|
||||
* <br>
|
||||
* <b><u>Overriden in</u>:</b><br>
|
||||
* <br>
|
||||
* <li>Attackable</li><br>
|
||||
* @param object The Object to add to _knownObject
|
||||
* @return the distance to watch object
|
||||
*/
|
||||
@@ -441,19 +427,17 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the distance after which the object must be remove from _knownObject in function of the object type.<BR>
|
||||
* <BR>
|
||||
* <B><U> Values </U> :</B><BR>
|
||||
* <BR>
|
||||
* Return the distance after which the object must be remove from _knownObject in function of the object type.<br>
|
||||
* <br>
|
||||
* <b><u>Values</u>:</b><br>
|
||||
* <li>object is not a Creature : 0 (don't remember it)</li>
|
||||
* <li>object is a FolkInstance : 0 (don't remember it)</li>
|
||||
* <li>object is a PlayableInstance : 3000</li>
|
||||
* <li>others : 1000</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Overriden in </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Attackable</li><BR>
|
||||
* <BR>
|
||||
* <li>others : 1000</li><br>
|
||||
* <br>
|
||||
* <b><u>Overriden in</u>:</b><br>
|
||||
* <br>
|
||||
* <li>Attackable</li><br>
|
||||
* @param object The Object to remove from _knownObject
|
||||
* @return the distance to forget object
|
||||
*/
|
||||
@@ -463,13 +447,12 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return False.<BR>
|
||||
* <BR>
|
||||
* <B><U> Overriden in </U> :</B><BR>
|
||||
* <BR>
|
||||
* Return False.<br>
|
||||
* <br>
|
||||
* <b><u>Overriden in</u>:</b><br>
|
||||
* <br>
|
||||
* <li>MonsterInstance : Check if the attacker is not another MonsterInstance</li>
|
||||
* <li>PlayerInstance</li><BR>
|
||||
* <BR>
|
||||
* <li>PlayerInstance</li><br>
|
||||
* @param attacker the attacker
|
||||
* @return true, if is auto attackable
|
||||
*/
|
||||
@@ -480,8 +463,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Identifier of the item in the left hand of this NpcInstance contained in the NpcTemplate.<BR>
|
||||
* <BR>
|
||||
* Return the Identifier of the item in the left hand of this NpcInstance contained in the NpcTemplate.
|
||||
* @return the left hand item
|
||||
*/
|
||||
public int getLeftHandItem()
|
||||
@@ -490,8 +472,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Identifier of the item in the right hand of this NpcInstance contained in the NpcTemplate.<BR>
|
||||
* <BR>
|
||||
* Return the Identifier of the item in the right hand of this NpcInstance contained in the NpcTemplate.
|
||||
* @return the right hand item
|
||||
*/
|
||||
public int getRightHandItem()
|
||||
@@ -500,8 +481,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if this NpcInstance has drops that can be sweeped.<BR>
|
||||
* <BR>
|
||||
* Return True if this NpcInstance has drops that can be sweeped.
|
||||
* @return true, if is spoil
|
||||
*/
|
||||
public boolean isSpoil()
|
||||
@@ -510,8 +490,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the spoil state of this NpcInstance.<BR>
|
||||
* <BR>
|
||||
* Set the spoil state of this NpcInstance.
|
||||
* @param isSpoil the new spoil
|
||||
*/
|
||||
public void setSpoil(boolean isSpoil)
|
||||
@@ -538,8 +517,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the busy status of this NpcInstance.<BR>
|
||||
* <BR>
|
||||
* Return the busy status of this NpcInstance.
|
||||
* @return true, if is busy
|
||||
*/
|
||||
public boolean isBusy()
|
||||
@@ -548,8 +526,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the busy status of this NpcInstance.<BR>
|
||||
* <BR>
|
||||
* Set the busy status of this NpcInstance.
|
||||
* @param isBusy the new busy
|
||||
*/
|
||||
public void setBusy(boolean isBusy)
|
||||
@@ -558,8 +535,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the busy message of this NpcInstance.<BR>
|
||||
* <BR>
|
||||
* Return the busy message of this NpcInstance.
|
||||
* @return the busy message
|
||||
*/
|
||||
public String getBusyMessage()
|
||||
@@ -568,8 +544,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the busy message of this NpcInstance.<BR>
|
||||
* <BR>
|
||||
* Set the busy message of this NpcInstance.
|
||||
* @param message the new busy message
|
||||
*/
|
||||
public void setBusyMessage(String message)
|
||||
@@ -627,33 +602,27 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage actions when a player click on the NpcInstance.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions on first click on the NpcInstance (Select it)</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage actions when a player click on the NpcInstance.<br>
|
||||
* <br>
|
||||
* <b><u>Actions on first click on the NpcInstance (Select it)</u>:</b><br>
|
||||
* <li>Set the NpcInstance as target of the PlayerInstance player (if necessary)</li>
|
||||
* <li>Send a Server->Client packet MyTargetSelected to the PlayerInstance player (display the select window)</li>
|
||||
* <li>If NpcInstance is autoAttackable, send a Server->Client packet StatusUpdate to the PlayerInstance in order to update NpcInstance HP bar</li>
|
||||
* <li>Send a Server->Client packet ValidateLocation to correct the NpcInstance position and heading on the client</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Actions on second click on the NpcInstance (Attack it/Intercat with it)</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Send a Server->Client packet ValidateLocation to correct the NpcInstance position and heading on the client</li><br>
|
||||
* <br>
|
||||
* <b><u>Actions on second click on the NpcInstance (Attack it/Intercat with it)</u>:</b><br>
|
||||
* <li>Send a Server->Client packet MyTargetSelected to the PlayerInstance player (display the select window)</li>
|
||||
* <li>If NpcInstance is autoAttackable, notify the PlayerInstance AI with AI_INTENTION_ATTACK (after a height verification)</li>
|
||||
* <li>If NpcInstance is NOT autoAttackable, notify the PlayerInstance AI with AI_INTENTION_INTERACT (after a distance verification) and show message</li><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Each group of Server->Client packet must be terminated by a ActionFailed packet in order to avoid that client wait an other packet</B></FONT><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Client packet : Action, AttackRequest</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Overriden in </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>ArtefactInstance : Manage only fisrt click to select Artefact</li><BR>
|
||||
* <BR>
|
||||
* <li>GuardInstance :</li><BR>
|
||||
* <BR>
|
||||
* <li>If NpcInstance is NOT autoAttackable, notify the PlayerInstance AI with AI_INTENTION_INTERACT (after a distance verification) and show message</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Each group of Server->Client packet must be terminated by a ActionFailed packet in order to avoid that client wait an other packet</b></font><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Client packet : Action, AttackRequest</li><br>
|
||||
* <br>
|
||||
* <b><u>Overriden in</u>:</b><br>
|
||||
* <br>
|
||||
* <li>ArtefactInstance : Manage only fisrt click to select Artefact</li>
|
||||
* <li>GuardInstance :</li><br>
|
||||
* @param player The PlayerInstance that start an action on the NpcInstance
|
||||
*/
|
||||
@Override
|
||||
@@ -794,21 +763,17 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage and Display the GM console to modify the NpcInstance (GM only).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions (If the PlayerInstance is a GM only)</U> :</B><BR>
|
||||
* <BR>
|
||||
* Manage and Display the GM console to modify the NpcInstance (GM only).<br>
|
||||
* <br>
|
||||
* <b><u>Actions (If the PlayerInstance is a GM only)</u>:</b><br>
|
||||
* <li>Set the NpcInstance as target of the PlayerInstance player (if necessary)</li>
|
||||
* <li>Send a Server->Client packet MyTargetSelected to the PlayerInstance player (display the select window)</li>
|
||||
* <li>If NpcInstance is autoAttackable, send a Server->Client packet StatusUpdate to the PlayerInstance in order to update NpcInstance HP bar</li>
|
||||
* <li>Send a Server->Client NpcHtmlMessage() containing the GM console about this NpcInstance</li><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Each group of Server->Client packet must be terminated by a ActionFailed packet in order to avoid that client wait an other packet</B></FONT><BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Client packet : Action</li><BR>
|
||||
* <BR>
|
||||
* <li>Send a Server->Client NpcHtmlMessage() containing the GM console about this NpcInstance</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: Each group of Server->Client packet must be terminated by a ActionFailed packet in order to avoid that client wait an other packet</b></font><br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Client packet : Action</li><br>
|
||||
* @param client The thread that manage the player that pessed Shift and click on the NpcInstance
|
||||
*/
|
||||
@Override
|
||||
@@ -1190,12 +1155,10 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a quest or chat window on client with the text of the NpcInstance in function of the command.<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Client packet : RequestBypassToServer</li><BR>
|
||||
* <BR>
|
||||
* Open a quest or chat window on client with the text of the NpcInstance in function of the command.<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Client packet : RequestBypassToServer</li><br>
|
||||
* @param player the player
|
||||
* @param command The command string received from client
|
||||
*/
|
||||
@@ -1555,8 +1518,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return null (regular NPCs don't have weapons instancies).<BR>
|
||||
* <BR>
|
||||
* Return null (regular NPCs don't have weapons instancies).
|
||||
* @return the active weapon instance
|
||||
*/
|
||||
@Override
|
||||
@@ -1567,21 +1529,20 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the weapon item equiped in the right hand of the NpcInstance or null.<BR>
|
||||
* <BR>
|
||||
* Return the weapon item equipped in the right hand of the NpcInstance or null.
|
||||
* @return the active weapon item
|
||||
*/
|
||||
@Override
|
||||
public Weapon getActiveWeaponItem()
|
||||
{
|
||||
// Get the weapon identifier equiped in the right hand of the NpcInstance
|
||||
// Get the weapon identifier equipped in the right hand of the NpcInstance
|
||||
final int weaponId = getTemplate().getRhand();
|
||||
if (weaponId < 1)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Get the weapon item equiped in the right hand of the NpcInstance
|
||||
// Get the weapon item equipped in the right hand of the NpcInstance
|
||||
final Item item = ItemTable.getInstance().getTemplate(getTemplate().getRhand());
|
||||
if (!(item instanceof Weapon))
|
||||
{
|
||||
@@ -1623,8 +1584,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return null (regular NPCs don't have weapons instancies).<BR>
|
||||
* <BR>
|
||||
* Return null (regular NPCs don't have weapons instancies).
|
||||
* @return the secondary weapon instance
|
||||
*/
|
||||
@Override
|
||||
@@ -1635,21 +1595,20 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the weapon item equiped in the left hand of the NpcInstance or null.<BR>
|
||||
* <BR>
|
||||
* Return the weapon item equipped in the left hand of the NpcInstance or null.
|
||||
* @return the secondary weapon item
|
||||
*/
|
||||
@Override
|
||||
public Weapon getSecondaryWeaponItem()
|
||||
{
|
||||
// Get the weapon identifier equiped in the right hand of the NpcInstance
|
||||
// Get the weapon identifier equipped in the right hand of the NpcInstance
|
||||
final int weaponId = getTemplate().getLhand();
|
||||
if (weaponId < 1)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Get the weapon item equiped in the right hand of the NpcInstance
|
||||
// Get the weapon item equipped in the right hand of the NpcInstance
|
||||
final Item item = ItemTable.getInstance().getTemplate(getTemplate().getLhand());
|
||||
if (!(item instanceof Weapon))
|
||||
{
|
||||
@@ -1660,8 +1619,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a Server->Client packet NpcHtmlMessage to the PlayerInstance in order to display the message of the NpcInstance.<BR>
|
||||
* <BR>
|
||||
* Send a Server->Client packet NpcHtmlMessage to the PlayerInstance in order to display the message of the NpcInstance.
|
||||
* @param player The PlayerInstance who talks with the NpcInstance
|
||||
* @param content The text of the NpcMessage
|
||||
*/
|
||||
@@ -1675,18 +1633,16 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the pathfile of the selected HTML file in function of the npcId and of the page number.<BR>
|
||||
* <BR>
|
||||
* <B><U> Format of the pathfile </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>if the file exists on the server (page number = 0) : <B>data/html/default/12006.htm</B> (npcId-page number)</li>
|
||||
* <li>if the file exists on the server (page number > 0) : <B>data/html/default/12006-1.htm</B> (npcId-page number)</li>
|
||||
* <li>if the file doesn't exist on the server : <B>data/html/npcdefault.htm</B> (message : "I have nothing to say to you")</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Overriden in </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>GuardInstance : Set the pathfile to data/html/guard/12006-1.htm (npcId-page number)</li><BR>
|
||||
* <BR>
|
||||
* Return the pathfile of the selected HTML file in function of the npcId and of the page number.<br>
|
||||
* <br>
|
||||
* <b><u>Format of the pathfile</u>:</b><br>
|
||||
* <li>if the file exists on the server (page number = 0) : <b>data/html/default/12006.htm</b> (npcId-page number)</li>
|
||||
* <li>if the file exists on the server (page number > 0) : <b>data/html/default/12006-1.htm</b> (npcId-page number)</li>
|
||||
* <li>if the file doesn't exist on the server : <b>data/html/npcdefault.htm</b> (message : "I have nothing to say to you")</li><br>
|
||||
* <br>
|
||||
* <b><u>Overriden in</u>:</b><br>
|
||||
* <br>
|
||||
* <li>GuardInstance : Set the pathfile to data/html/guard/12006-1.htm (npcId-page number)</li><br>
|
||||
* @param npcId The Identifier of the NpcInstance whose text must be display
|
||||
* @param value The number of the page to display
|
||||
* @return the html path
|
||||
@@ -1722,12 +1678,10 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a choose quest window on client with all quests available of the NpcInstance.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Send a Server->Client NpcHtmlMessage containing the text of the NpcInstance to the PlayerInstance</li><BR>
|
||||
* <BR>
|
||||
* Open a choose quest window on client with all quests available of the NpcInstance.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Send a Server->Client NpcHtmlMessage containing the text of the NpcInstance to the PlayerInstance</li><br>
|
||||
* @param player The PlayerInstance that talk with the NpcInstance
|
||||
* @param quests The table containing quests of the NpcInstance
|
||||
*/
|
||||
@@ -1767,14 +1721,12 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a quest window on client with the text of the NpcInstance.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Open a quest window on client with the text of the NpcInstance.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Get the text of the quest state in the folder data/scripts/quests/questId/stateId.htm</li>
|
||||
* <li>Send a Server->Client NpcHtmlMessage containing the text of the NpcInstance to the PlayerInstance</li>
|
||||
* <li>Send a Server->Client ActionFailed to the PlayerInstance in order to avoid that the client wait another packet</li><BR>
|
||||
* <BR>
|
||||
* <li>Send a Server->Client ActionFailed to the PlayerInstance in order to avoid that the client wait another packet</li><br>
|
||||
* @param player The PlayerInstance that talk with the NpcInstance
|
||||
* @param questId The Identifier of the quest to display the message
|
||||
*/
|
||||
@@ -1850,8 +1802,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect awaiting quests/start points and display a QuestChooseWindow (if several available) or QuestWindow.<BR>
|
||||
* <BR>
|
||||
* Collect awaiting quests/start points and display a QuestChooseWindow (if several available) or QuestWindow.
|
||||
* @param player The PlayerInstance that talk with the NpcInstance
|
||||
*/
|
||||
public void showQuestWindow(PlayerInstance player)
|
||||
@@ -1910,13 +1861,12 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a Loto window on client with the text of the NpcInstance.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Open a Loto window on client with the text of the NpcInstance.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Get the text of the selected HTML file in function of the npcId and of the page number</li>
|
||||
* <li>Send a Server->Client NpcHtmlMessage containing the text of the NpcInstance to the PlayerInstance</li>
|
||||
* <li>Send a Server->Client ActionFailed to the PlayerInstance in order to avoid that the client wait another packet</li><BR>
|
||||
* <li>Send a Server->Client ActionFailed to the PlayerInstance in order to avoid that the client wait another packet</li><br>
|
||||
* @param player The PlayerInstance that talk with the NpcInstance
|
||||
* @param value The number of the page of the NpcInstance to display
|
||||
*/
|
||||
@@ -2217,16 +2167,13 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Newbie helper buffs to Player according to its level.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Add Newbie helper buffs to Player according to its level.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Get the range level in wich player must be to obtain buff</li>
|
||||
* <li>If player level is out of range, display a message and return</li>
|
||||
* <li>According to player level cast buff</li><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> Newbie Helper Buff list is define in sql table helper_buff_list</B></FONT><BR>
|
||||
* <BR>
|
||||
* <li>According to player level cast buff</li><br>
|
||||
* <font color=#FF0000><b> Newbie Helper Buff list is define in sql table helper_buff_list</b></font>
|
||||
* @param player The PlayerInstance that talk with the NpcInstance if (!FloodProtector.getInstance().tryPerformAction(player.getObjectId(), FloodProtector.PROTECTED_USEITEM)) return;
|
||||
*/
|
||||
public void makeSupportMagic(PlayerInstance player)
|
||||
@@ -2324,13 +2271,12 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a chat window on client with the text of the NpcInstance.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Open a chat window on client with the text of the NpcInstance.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Get the text of the selected HTML file in function of the npcId and of the page number</li>
|
||||
* <li>Send a Server->Client NpcHtmlMessage containing the text of the NpcInstance to the PlayerInstance</li>
|
||||
* <li>Send a Server->Client ActionFailed to the PlayerInstance in order to avoid that the client wait another packet</li><BR>
|
||||
* <li>Send a Server->Client ActionFailed to the PlayerInstance in order to avoid that the client wait another packet</li><br>
|
||||
* @param player The PlayerInstance that talk with the NpcInstance
|
||||
* @param value The number of the page of the NpcInstance to display
|
||||
*/
|
||||
@@ -2860,9 +2806,8 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a chat window on client with the text specified by the given file name and path,<BR>
|
||||
* relative to the datapack root. <BR>
|
||||
* <BR>
|
||||
* Open a chat window on client with the text specified by the given file name and path,<br>
|
||||
* relative to the datapack root.<br>
|
||||
* Added by Tempy
|
||||
* @param player The PlayerInstance that talk with the NpcInstance
|
||||
* @param filename The filename that contains the text to send
|
||||
@@ -2880,8 +2825,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Exp Reward of this NpcInstance contained in the NpcTemplate (modified by RATE_XP).<BR>
|
||||
* <BR>
|
||||
* Return the Exp Reward of this NpcInstance contained in the NpcTemplate (modified by RATE_XP).
|
||||
* @return the exp reward
|
||||
*/
|
||||
public int getExpReward()
|
||||
@@ -2891,8 +2835,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the SP Reward of this NpcInstance contained in the NpcTemplate (modified by RATE_SP).<BR>
|
||||
* <BR>
|
||||
* Return the SP Reward of this NpcInstance contained in the NpcTemplate (modified by RATE_SP).
|
||||
* @return the sp reward
|
||||
*/
|
||||
public int getSpReward()
|
||||
@@ -2902,22 +2845,20 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Kill the NpcInstance (the corpse disappeared after 7 seconds).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Kill the NpcInstance (the corpse disappeared after 7 seconds).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Create a DecayTask to remove the corpse of the NpcInstance after 7 seconds</li>
|
||||
* <li>Set target to null and cancel Attack or Cast</li>
|
||||
* <li>Stop movement</li>
|
||||
* <li>Stop HP/MP/CP Regeneration task</li>
|
||||
* <li>Stop all active skills effects in progress on the Creature</li>
|
||||
* <li>Send the Server->Client packet StatusUpdate with current HP and MP to all other PlayerInstance to inform</li>
|
||||
* <li>Notify Creature AI</li><BR>
|
||||
* <BR>
|
||||
* <B><U> Overriden in </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Attackable</li><BR>
|
||||
* <BR>
|
||||
* <li>Notify Creature AI</li><br>
|
||||
* <br>
|
||||
* <b><u>Overriden in</u>:</b><br>
|
||||
* <br>
|
||||
* <li>Attackable</li><br>
|
||||
* @param killer The Creature who killed it
|
||||
* @return true, if successful
|
||||
*/
|
||||
@@ -2953,17 +2894,14 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the NpcInstance from the world and update its spawn object (for a complete removal use the deleteMe method).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Remove the NpcInstance from the world and update its spawn object (for a complete removal use the deleteMe method).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Remove the NpcInstance from the world when the decay task is launched</li>
|
||||
* <li>Decrease its spawn counter</li>
|
||||
* <li>Manage Siege task (killFlag, killCT)</li><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of World </B></FONT><BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packets to players</B></FONT><BR>
|
||||
* <BR>
|
||||
* <li>Manage Siege task (killFlag, killCT)</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T REMOVE the object from _allObjects of World </b></font><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||
*/
|
||||
@Override
|
||||
public void onDecay()
|
||||
@@ -2994,16 +2932,13 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove PROPERLY the NpcInstance from the world.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Remove PROPERLY the NpcInstance from the world.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Remove the NpcInstance from the world and update its spawn object</li>
|
||||
* <li>Remove all WorldObject from _knownObjects and _knownPlayer of the NpcInstance then cancel Attak or Cast and notify AI</li>
|
||||
* <li>Remove WorldObject object from _allObjects of World</li><BR>
|
||||
* <BR>
|
||||
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packets to players</B></FONT><BR>
|
||||
* <BR>
|
||||
* <li>Remove WorldObject object from _allObjects of World</li><br>
|
||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||
*/
|
||||
public void deleteMe()
|
||||
{
|
||||
@@ -3037,8 +2972,7 @@ public class NpcInstance extends Creature
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Spawn object that manage this NpcInstance.<BR>
|
||||
* <BR>
|
||||
* Return the Spawn object that manage this NpcInstance.
|
||||
* @return the spawn
|
||||
*/
|
||||
public Spawn getSpawn()
|
||||
|
||||
+3
-4
@@ -26,8 +26,8 @@ import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
|
||||
/**
|
||||
* This class manages some npcs can walk in the city. <br>
|
||||
* It inherits all methods from NpcInstance. <br>
|
||||
* This class manages some npcs can walk in the city.<br>
|
||||
* It inherits all methods from NpcInstance.<br>
|
||||
* <br>
|
||||
* @original author Rayan RPG
|
||||
* @since 819
|
||||
@@ -35,8 +35,7 @@ import org.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
public class NpcWalkerInstance extends NpcInstance
|
||||
{
|
||||
/**
|
||||
* Constructor of NpcWalkerInstance (use Creature and NpcInstance constructor).<BR>
|
||||
* <BR>
|
||||
* Constructor of NpcWalkerInstance (use Creature and NpcInstance constructor).
|
||||
* @param objectId the object id
|
||||
* @param template the template
|
||||
*/
|
||||
|
||||
+8
-10
@@ -96,13 +96,12 @@ public class PetInstance extends Summon
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage Feeding Task.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* Manage Feeding Task.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Feed or kill the pet depending on hunger level</li>
|
||||
* <li>If pet has food in inventory and feed level drops below 55% then consume food from inventory</li>
|
||||
* <li>Send a broadcastStatusUpdate packet for this PetInstance</li> <BR>
|
||||
* <BR>
|
||||
* <li>Send a broadcastStatusUpdate packet for this PetInstance</li>
|
||||
*/
|
||||
|
||||
class FeedTask implements Runnable
|
||||
@@ -178,7 +177,7 @@ public class PetInstance extends Summon
|
||||
* @param template the template
|
||||
* @param owner the owner
|
||||
* @param control the control
|
||||
* @return the l2 pet instance
|
||||
* @return the pet instance
|
||||
*/
|
||||
public static synchronized PetInstance spawnPet(NpcTemplate template, PlayerInstance owner, ItemInstance control)
|
||||
{
|
||||
@@ -415,7 +414,7 @@ public class PetInstance extends Summon
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy item from inventory by using its <B>itemId</B> and send a Server->Client InventoryUpdate packet to the PlayerInstance.
|
||||
* Destroy item from inventory by using its <b>itemId</b> and send a Server->Client InventoryUpdate packet to the PlayerInstance.
|
||||
* @param process : String Identifier of process triggering this action
|
||||
* @param itemId : int Item identifier of the item to be destroyed
|
||||
* @param count : int Quantity of items to be destroyed
|
||||
@@ -820,7 +819,7 @@ public class PetInstance extends Summon
|
||||
* @param control the control
|
||||
* @param template the template
|
||||
* @param owner the owner
|
||||
* @return the l2 pet instance
|
||||
* @return the pet instance
|
||||
*/
|
||||
private static PetInstance restore(ItemInstance control, NpcTemplate template, PlayerInstance owner)
|
||||
{
|
||||
@@ -980,8 +979,7 @@ public class PetInstance extends Summon
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the specified % of experience this PetInstance has lost.<BR>
|
||||
* <BR>
|
||||
* Restore the specified % of experience this PetInstance has lost.
|
||||
* @param restorePercent the restore percent
|
||||
*/
|
||||
public void restoreExp(double restorePercent)
|
||||
|
||||
+288
-481
File diff suppressed because it is too large
Load Diff
+4
-6
@@ -38,14 +38,12 @@ public class RaidBossInstance extends MonsterInstance
|
||||
private RaidBossStatus _raidStatus;
|
||||
|
||||
/**
|
||||
* Constructor of RaidBossInstance (use Creature and NpcInstance constructor).<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Constructor of RaidBossInstance (use Creature and NpcInstance constructor).<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Call the Creature constructor to set the _template of the RaidBossInstance (copy skills from template to object and link _calculators to NPC_STD_CALCULATOR)</li>
|
||||
* <li>Set the name of the RaidBossInstance</li>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><BR>
|
||||
* <BR>
|
||||
* <li>Create a RandomAnimation Task that will be launched after the calculated delay if the server allow it</li><br>
|
||||
* @param objectId Identifier of the object to initialized
|
||||
* @param template the template
|
||||
*/
|
||||
|
||||
+3
-6
@@ -25,8 +25,7 @@ public class RecipeInstance
|
||||
private final int _quantity;
|
||||
|
||||
/**
|
||||
* Constructor of RecipeInstance (create a new line in a RecipeList).<BR>
|
||||
* <BR>
|
||||
* Constructor of RecipeInstance (create a new line in a RecipeList).
|
||||
* @param itemId the item id
|
||||
* @param quantity the quantity
|
||||
*/
|
||||
@@ -37,8 +36,7 @@ public class RecipeInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Identifier of the RecipeInstance Item needed.<BR>
|
||||
* <BR>
|
||||
* Return the Identifier of the RecipeInstance Item needed.
|
||||
* @return the item id
|
||||
*/
|
||||
public int getItemId()
|
||||
@@ -47,8 +45,7 @@ public class RecipeInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Item quantity needed of the RecipeInstance.<BR>
|
||||
* <BR>
|
||||
* Return the Item quantity needed of the RecipeInstance.
|
||||
* @return the quantity
|
||||
*/
|
||||
public int getQuantity()
|
||||
|
||||
+1
-2
@@ -72,8 +72,7 @@ public class SiegeGuardInstance extends Attackable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return True if a siege is in progress and the Creature attacker isn't a Defender.<BR>
|
||||
* <BR>
|
||||
* Return True if a siege is in progress and the Creature attacker isn't a Defender.
|
||||
* @param attacker The Creature that the SiegeGuardInstance try to attack
|
||||
*/
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ public class SiegeNpcInstance extends FolkInstance
|
||||
}
|
||||
|
||||
/**
|
||||
* If siege is in progress shows the Busy HTML<BR>
|
||||
* If siege is in progress shows the Busy HTML<br>
|
||||
* else Shows the SiegeInfo window
|
||||
* @param player
|
||||
*/
|
||||
|
||||
+17
-24
@@ -58,33 +58,27 @@ public class PlayerKnownList extends PlayableKnownList
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a visible WorldObject to PlayerInstance _knownObjects and _knownPlayer (if necessary) and send Server-Client Packets needed to inform the PlayerInstance of its state and actions in progress.<BR>
|
||||
* <BR>
|
||||
* <B><U> object is a ItemInstance </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Send Server-Client Packet DropItem/SpawnItem to the PlayerInstance</li><BR>
|
||||
* <BR>
|
||||
* <B><U> object is a DoorInstance </U> :</B><BR>
|
||||
* <BR>
|
||||
* Add a visible WorldObject to PlayerInstance _knownObjects and _knownPlayer (if necessary) and send Server-Client Packets needed to inform the PlayerInstance of its state and actions in progress.<br>
|
||||
* <br>
|
||||
* <b><u>object is a ItemInstance</u>:</b><br>
|
||||
* <li>Send Server-Client Packet DropItem/SpawnItem to the PlayerInstance</li><br>
|
||||
* <br>
|
||||
* <b><u>object is a DoorInstance</u>:</b><br>
|
||||
* <li>Send Server-Client Packets DoorInfo and DoorStatusUpdate to the PlayerInstance</li>
|
||||
* <li>Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance</li><BR>
|
||||
* <BR>
|
||||
* <B><U> object is a NpcInstance </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance</li><br>
|
||||
* <br>
|
||||
* <b><u>object is a NpcInstance</u>:</b><br>
|
||||
* <li>Send Server-Client Packet NpcInfo to the PlayerInstance</li>
|
||||
* <li>Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance</li><BR>
|
||||
* <BR>
|
||||
* <B><U> object is a Summon </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance</li><br>
|
||||
* <br>
|
||||
* <b><u>object is a Summon</u>:</b><br>
|
||||
* <li>Send Server-Client Packet NpcInfo/PetItemList (if the PlayerInstance is the owner) to the PlayerInstance</li>
|
||||
* <li>Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance</li><BR>
|
||||
* <BR>
|
||||
* <B><U> object is a PlayerInstance </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance</li><br>
|
||||
* <br>
|
||||
* <b><u>object is a PlayerInstance</u>:</b><br>
|
||||
* <li>Send Server-Client Packet CharInfo to the PlayerInstance</li>
|
||||
* <li>If the object has a private store, Send Server-Client Packet PrivateStoreMsgSell to the PlayerInstance</li>
|
||||
* <li>Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance</li><BR>
|
||||
* <BR>
|
||||
* <li>Send Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the PlayerInstance</li><br>
|
||||
* @param object The WorldObject to add to _knownObjects and _knownPlayer
|
||||
*/
|
||||
@Override
|
||||
@@ -252,8 +246,7 @@ public class PlayerKnownList extends PlayableKnownList
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a WorldObject from PlayerInstance _knownObjects and _knownPlayer (if necessary) and send Server-Client Packet DeleteObject to the PlayerInstance.<BR>
|
||||
* <BR>
|
||||
* Remove a WorldObject from PlayerInstance _knownObjects and _knownPlayer (if necessary) and send Server-Client Packet DeleteObject to the PlayerInstance.
|
||||
* @param object The WorldObject to remove from _knownObjects and _knownPlayer
|
||||
*/
|
||||
@Override
|
||||
|
||||
+4
-6
@@ -92,14 +92,12 @@ public class WorldObjectKnownList
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the _knownObject and _knowPlayers of the Creature and of its already known WorldObject.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Update the _knownObject and _knowPlayers of the Creature and of its already known WorldObject.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Remove invisible and too far WorldObject from _knowObject and if necessary from _knownPlayers of the Creature</li>
|
||||
* <li>Add visible WorldObject near the Creature to _knowObject and if necessary to _knownPlayers of the Creature</li>
|
||||
* <li>Add Creature to _knowObject and if necessary to _knownPlayers of WorldObject alreday known by the Creature</li><BR>
|
||||
* <BR>
|
||||
* <li>Add Creature to _knowObject and if necessary to _knownPlayers of WorldObject alreday known by the Creature</li>
|
||||
*/
|
||||
public synchronized void updateKnownObjects()
|
||||
{
|
||||
|
||||
+22
-28
@@ -44,17 +44,14 @@ public class CreatureStat
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the new value of the state with modifiers that will be applied on the targeted Creature.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* A Creature owns a table of Calculators called <B>_calculators</B>. Each Calculator (a calculator per state) own a table of Func object. A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...) : <BR>
|
||||
* <BR>
|
||||
* FuncAtkAccuracy -> Math.sqrt(_player.getDEX())*6+_player.getLevel()<BR>
|
||||
* <BR>
|
||||
* When the calc method of a calculator is launched, each mathematic function is called according to its priority <B>_order</B>. Indeed, Func with lowest priority order is executed firsta and Funcs with the same order are executed in unspecified order. The result of the calculation is stored in
|
||||
* the value property of an Env class instance.<BR>
|
||||
* <BR>
|
||||
* Calculate the new value of the state with modifiers that will be applied on the targeted Creature.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* A Creature owns a table of Calculators called <b>_calculators</b>. Each Calculator (a calculator per state) own a table of Func object. A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...) :<br>
|
||||
* FuncAtkAccuracy -> Math.sqrt(_player.getDEX())*6+_player.getLevel()<br>
|
||||
* When the calc method of a calculator is launched, each mathematic function is called according to its priority <b>_order</b>. Indeed, Func with lowest priority order is executed firsta and Funcs with the same order are executed in unspecified order. The result of the calculation is stored in
|
||||
* the value property of an Env class instance.
|
||||
* @param stat The stat to calculate the new value with modifiers
|
||||
* @param init The initial value of the stat before applying modifiers
|
||||
* @param target The Creature whose properties will be used in the calculation (ex : CON, INT...)
|
||||
@@ -154,7 +151,7 @@ public class CreatureStat
|
||||
|
||||
/**
|
||||
* Return the CON of the Creature (base+modifier).
|
||||
* @return the cON
|
||||
* @return the CON
|
||||
*/
|
||||
public int getCON()
|
||||
{
|
||||
@@ -203,7 +200,7 @@ public class CreatureStat
|
||||
|
||||
/**
|
||||
* Return the DEX of the Creature (base+modifier).
|
||||
* @return the dEX
|
||||
* @return the DEX
|
||||
*/
|
||||
public int getDEX()
|
||||
{
|
||||
@@ -248,7 +245,7 @@ public class CreatureStat
|
||||
|
||||
/**
|
||||
* Return the INT of the Creature (base+modifier).
|
||||
* @return the iNT
|
||||
* @return the INT
|
||||
*/
|
||||
public int getINT()
|
||||
{
|
||||
@@ -337,12 +334,10 @@ public class CreatureStat
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the MAtk (base+modifier) of the Creature for a skill used in function of abnormal effects in progress.<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Calculate Magic damage</li> <BR>
|
||||
* <BR>
|
||||
* Return the MAtk (base+modifier) of the Creature for a skill used in function of abnormal effects in progress.<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Calculate Magic damage</li>
|
||||
* @param target The Creature targeted by the skill
|
||||
* @param skill The Skill used against the target
|
||||
* @return the m atk
|
||||
@@ -501,11 +496,10 @@ public class CreatureStat
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the MDef (base+modifier) of the Creature against a skill in function of abnormal effects in progress.<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Calculate Magic damage</li> <BR>
|
||||
* Return the MDef (base+modifier) of the Creature against a skill in function of abnormal effects in progress.<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Calculate Magic damage</li>
|
||||
* @param target The Creature targeted by the skill
|
||||
* @param skill The Skill used against the target
|
||||
* @return the m def
|
||||
@@ -532,7 +526,7 @@ public class CreatureStat
|
||||
|
||||
/**
|
||||
* Return the MEN of the Creature (base+modifier).
|
||||
* @return the mEN
|
||||
* @return the MEN
|
||||
*/
|
||||
public int getMEN()
|
||||
{
|
||||
@@ -912,7 +906,7 @@ public class CreatureStat
|
||||
|
||||
/**
|
||||
* Return the STR of the Creature (base+modifier).
|
||||
* @return the sTR
|
||||
* @return the STR
|
||||
*/
|
||||
public int getSTR()
|
||||
{
|
||||
@@ -943,7 +937,7 @@ public class CreatureStat
|
||||
|
||||
/**
|
||||
* Return the WIT of the Creature (base+modifier).
|
||||
* @return the wIT
|
||||
* @return the WIT
|
||||
*/
|
||||
public int getWIT()
|
||||
{
|
||||
|
||||
+6
-8
@@ -52,7 +52,7 @@ public class PlayerStat extends PlayableStat
|
||||
{
|
||||
final PlayerInstance player = getActiveChar();
|
||||
|
||||
// Player is Gm and access level is below or equal to canGainExp and is in party, don't give XP
|
||||
// Player is GM and access level is below or equal to canGainExp and is in party, don't give XP
|
||||
if (!getActiveChar().getAccessLevel().canGainExp() && getActiveChar().isInParty())
|
||||
{
|
||||
return false;
|
||||
@@ -78,17 +78,15 @@ public class PlayerStat extends PlayableStat
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Experience and SP rewards to the PlayerInstance, remove its Karma (if necessary) and Launch increase level task.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions </U> :</B><BR>
|
||||
* <BR>
|
||||
* Add Experience and SP rewards to the PlayerInstance, remove its Karma (if necessary) and Launch increase level task.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Remove Karma when the player kills MonsterInstance</li>
|
||||
* <li>Send a Server->Client packet StatusUpdate to the PlayerInstance</li>
|
||||
* <li>Send a Server->Client System Message to the PlayerInstance</li>
|
||||
* <li>If the PlayerInstance increases it's level, send a Server->Client packet SocialAction (broadcast)</li>
|
||||
* <li>If the PlayerInstance increases it's level, manage the increase level task (Max MP, Max MP, Recommendation, Expertise and beginner skills...)</li>
|
||||
* <li>If the PlayerInstance increases it's level, send a Server->Client packet UserInfo to the PlayerInstance</li><BR>
|
||||
* <BR>
|
||||
* <li>If the PlayerInstance increases it's level, send a Server->Client packet UserInfo to the PlayerInstance</li><br>
|
||||
* @param addToExp The Experience value to add
|
||||
* @param addToSp The SP value to add
|
||||
*/
|
||||
@@ -97,7 +95,7 @@ public class PlayerStat extends PlayableStat
|
||||
{
|
||||
float ratioTakenByPet = 0;
|
||||
|
||||
// Player is Gm and acces level is below or equal to GM_DONT_TAKE_EXPSP and is in party, don't give Xp/Sp
|
||||
// Player is GM and access level is below or equal to GM_DONT_TAKE_EXPSP and is in party, don't give Xp/Sp
|
||||
final PlayerInstance player = getActiveChar();
|
||||
if (!player.getAccessLevel().canGainExp() && player.isInParty())
|
||||
{
|
||||
|
||||
+37
-47
@@ -60,17 +60,15 @@ public class CreatureStatus
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the object to the list of Creature that must be informed of HP/MP updates of this Creature.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* Each Creature owns a list called <B>_statusListener</B> that contains all PlayerInstance to inform of HP/MP updates. Players who must be informed are players that target this Creature. When a RegenTask is in progress sever just need to go through this list to send Server->Client packet
|
||||
* StatusUpdate.<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Target a PC or NPC</li><BR>
|
||||
* <BR>
|
||||
* Add the object to the list of Creature that must be informed of HP/MP updates of this Creature.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* Each Creature owns a list called <b>_statusListener</b> that contains all PlayerInstance to inform of HP/MP updates. Players who must be informed are players that target this Creature. When a RegenTask is in progress sever just need to go through this list to send Server->Client packet
|
||||
* StatusUpdate.<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Target a PC or NPC</li><br>
|
||||
* @param object Creature to add to the listener
|
||||
*/
|
||||
public void addStatusListener(Creature object)
|
||||
@@ -103,12 +101,11 @@ public class CreatureStatus
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduce the current HP of the Creature and launch the doDie Task if necessary.<BR>
|
||||
* <BR>
|
||||
* <B><U> Overriden in </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Attackable : Update the attacker AggroInfo of the Attackable _aggroList</li><BR>
|
||||
* <BR>
|
||||
* Reduce the current HP of the Creature and launch the doDie Task if necessary.<br>
|
||||
* <br>
|
||||
* <b><u>Overriden in</u>:</b><br>
|
||||
* <br>
|
||||
* <li>Attackable : Update the attacker AggroInfo of the Attackable _aggroList</li><br>
|
||||
* @param value the value
|
||||
* @param attacker The Creature who attacks
|
||||
*/
|
||||
@@ -273,17 +270,15 @@ public class CreatureStatus
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the object from the list of Creature that must be informed of HP/MP updates of this Creature.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* Each Creature owns a list called <B>_statusListener</B> that contains all PlayerInstance to inform of HP/MP updates. Players who must be informed are players that target this Creature. When a RegenTask is in progress sever just need to go through this list to send Server->Client packet
|
||||
* StatusUpdate.<BR>
|
||||
* <BR>
|
||||
* <B><U> Example of use </U> :</B><BR>
|
||||
* <BR>
|
||||
* <li>Untarget a PC or NPC</li><BR>
|
||||
* <BR>
|
||||
* Remove the object from the list of Creature that must be informed of HP/MP updates of this Creature.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* Each Creature owns a list called <b>_statusListener</b> that contains all PlayerInstance to inform of HP/MP updates. Players who must be informed are players that target this Creature. When a RegenTask is in progress sever just need to go through this list to send Server->Client packet
|
||||
* StatusUpdate.<br>
|
||||
* <br>
|
||||
* <b><u>Example of use</u>:</b><br>
|
||||
* <li>Untarget a PC or NPC</li><br>
|
||||
* @param object Creature to add to the listener
|
||||
*/
|
||||
public void removeStatusListener(Creature object)
|
||||
@@ -295,13 +290,11 @@ public class CreatureStatus
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the HP/MP/CP Regeneration task.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Start the HP/MP/CP Regeneration task.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Calculate the regen task period</li>
|
||||
* <li>Launch the HP/MP/CP Regeneration task with Medium priority</li><BR>
|
||||
* <BR>
|
||||
* <li>Launch the HP/MP/CP Regeneration task with Medium priority</li>
|
||||
*/
|
||||
public synchronized void startHpMpRegeneration()
|
||||
{
|
||||
@@ -316,13 +309,11 @@ public class CreatureStatus
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the HP/MP/CP Regeneration task.<BR>
|
||||
* <BR>
|
||||
* <B><U> Actions</U> :</B><BR>
|
||||
* <BR>
|
||||
* Stop the HP/MP/CP Regeneration task.<br>
|
||||
* <br>
|
||||
* <b><u>Actions</u>:</b><br>
|
||||
* <li>Set the RegenActive flag to False</li>
|
||||
* <li>Stop the HP/MP/CP Regeneration task</li><BR>
|
||||
* <BR>
|
||||
* <li>Stop the HP/MP/CP Regeneration task</li>
|
||||
*/
|
||||
public synchronized void stopHpMpRegeneration()
|
||||
{
|
||||
@@ -605,13 +596,12 @@ public class CreatureStatus
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the list of Creature that must be informed of HP/MP updates of this Creature.<BR>
|
||||
* <BR>
|
||||
* <B><U> Concept</U> :</B><BR>
|
||||
* <BR>
|
||||
* Each Creature owns a list called <B>_statusListener</B> that contains all PlayerInstance to inform of HP/MP updates. Players who must be informed are players that target this Creature. When a RegenTask is in progress sever just need to go through this list to send Server->Client packet
|
||||
* StatusUpdate.<BR>
|
||||
* <BR>
|
||||
* Return the list of Creature that must be informed of HP/MP updates of this Creature.<br>
|
||||
* <br>
|
||||
* <b><u>Concept</u>:</b><br>
|
||||
* <br>
|
||||
* Each Creature owns a list called <b>_statusListener</b> that contains all PlayerInstance to inform of HP/MP updates. Players who must be informed are players that target this Creature. When a RegenTask is in progress sever just need to go through this list to send Server->Client packet
|
||||
* StatusUpdate.
|
||||
* @return The list of Creature to inform or null if empty
|
||||
*/
|
||||
public Set<Creature> getStatusListener()
|
||||
|
||||
+7
-8
@@ -35,10 +35,9 @@ import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.skills.Stat;
|
||||
|
||||
/**
|
||||
* This cl contains all generic data of a Spawn object.<BR>
|
||||
* <BR>
|
||||
* <B><U> Data</U> :</B><BR>
|
||||
* <BR>
|
||||
* This cl contains all generic data of a Spawn object.<br>
|
||||
* <br>
|
||||
* <b><u>Data</u>:</b><br>
|
||||
* <li>npcId, type, name, sex</li>
|
||||
* <li>rewardExp, rewardSp</li>
|
||||
* <li>aggroRange, factionId, factionRange</li>
|
||||
@@ -48,8 +47,8 @@ import org.l2jmobius.gameserver.model.skills.Stat;
|
||||
* <li>_minions</li>
|
||||
* <li>_teachInfo</li>
|
||||
* <li>_skills</li>
|
||||
* <li>_questsStart</li><BR>
|
||||
* <BR>
|
||||
* <li>_questsStart</li><br>
|
||||
* <br>
|
||||
* @version $Revision: 1.1.2.4 $ $Date: 2005/04/02 15:57:51 $
|
||||
*/
|
||||
public class NpcTemplate extends CreatureTemplate
|
||||
@@ -257,8 +256,8 @@ public class NpcTemplate extends CreatureTemplate
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the list of all possible item drops of this NpcTemplate.<BR>
|
||||
* (ie full drops and part drops, mats, miscellaneous & UNCATEGORIZED)<BR>
|
||||
* Return the list of all possible item drops of this NpcTemplate.<br>
|
||||
* (ie full drops and part drops, mats, miscellaneous & UNCATEGORIZED)<br>
|
||||
* @return
|
||||
*/
|
||||
public List<DropData> getAllDropData()
|
||||
|
||||
@@ -2609,7 +2609,7 @@ public class TvT implements EventTask
|
||||
/**
|
||||
* Find best killer.
|
||||
* @param players the players
|
||||
* @return the l2 pc instance
|
||||
* @return the pc instance
|
||||
*/
|
||||
public static PlayerInstance findBestKiller(List<PlayerInstance> players)
|
||||
{
|
||||
@@ -2631,7 +2631,7 @@ public class TvT implements EventTask
|
||||
/**
|
||||
* Find looser.
|
||||
* @param players the players
|
||||
* @return the l2 pc instance
|
||||
* @return the pc instance
|
||||
*/
|
||||
public static PlayerInstance findLooser(List<PlayerInstance> players)
|
||||
{
|
||||
|
||||
@@ -429,7 +429,7 @@ public class VIP
|
||||
try
|
||||
{
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
|
||||
final StringBuilder replyMSG = new StringBuilder("<html><head><body>");
|
||||
final StringBuilder replyMSG = new StringBuilder("<html><body>");
|
||||
replyMSG.append("VIP (End NPC)<br><br>");
|
||||
replyMSG.append("Current event...<br1>");
|
||||
replyMSG.append("Team: <font color=\"FFFFFF\">" + _teamName + "</font><br><br>");
|
||||
@@ -449,7 +449,7 @@ public class VIP
|
||||
replyMSG.append("I am the character the VIP has to reach in order to win the event.<br>");
|
||||
}
|
||||
|
||||
replyMSG.append("</head></body></html>");
|
||||
replyMSG.append("</body></html>");
|
||||
adminReply.setHtml(replyMSG.toString());
|
||||
eventPlayer.sendPacket(adminReply);
|
||||
}
|
||||
@@ -514,7 +514,7 @@ public class VIP
|
||||
|
||||
final NpcHtmlMessage nhm = new NpcHtmlMessage(5);
|
||||
final StringBuilder replyMSG = new StringBuilder("");
|
||||
replyMSG.append("<html><head><body>Your team has won the event. Your inventory now contains your reward.</body></html>");
|
||||
replyMSG.append("<html><body>Your team has won the event. Your inventory now contains your reward.</body></html>");
|
||||
nhm.setHtml(replyMSG.toString());
|
||||
player.sendPacket(nhm);
|
||||
}
|
||||
@@ -561,7 +561,7 @@ public class VIP
|
||||
|
||||
final NpcHtmlMessage nhm = new NpcHtmlMessage(5);
|
||||
final StringBuilder replyMSG = new StringBuilder("");
|
||||
replyMSG.append("<html><head><body>Your team has won the event. Your inventory now contains your reward.</body></html>");
|
||||
replyMSG.append("<html><body>Your team has won the event. Your inventory now contains your reward.</body></html>");
|
||||
nhm.setHtml(replyMSG.toString());
|
||||
player.sendPacket(nhm);
|
||||
}
|
||||
@@ -601,7 +601,7 @@ public class VIP
|
||||
|
||||
final NpcHtmlMessage nhm = new NpcHtmlMessage(5);
|
||||
final StringBuilder replyMSG = new StringBuilder("");
|
||||
replyMSG.append("<html><head><body>You team have won the event. Your inventory now contains your reward.</body></html>");
|
||||
replyMSG.append("<html><body>You team have won the event. Your inventory now contains your reward.</body></html>");
|
||||
nhm.setHtml(replyMSG.toString());
|
||||
player.sendPacket(nhm);
|
||||
}
|
||||
@@ -783,7 +783,7 @@ public class VIP
|
||||
try
|
||||
{
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
|
||||
final StringBuilder replyMSG = new StringBuilder("<html><head><body>");
|
||||
final StringBuilder replyMSG = new StringBuilder("<html><body>");
|
||||
replyMSG.append("VIP (Join NPC)<br><br>");
|
||||
replyMSG.append("Current event...<br1>");
|
||||
replyMSG.append(" ... Team: <font color=\"FFFFFF\">" + _teamName + "</font><br><br>");
|
||||
@@ -858,7 +858,7 @@ public class VIP
|
||||
replyMSG.append("<center>The event is already taking place. Please sign up for the next event.</center>");
|
||||
}
|
||||
|
||||
replyMSG.append("</head></body></html>");
|
||||
replyMSG.append("</body></html>");
|
||||
adminReply.setHtml(replyMSG.toString());
|
||||
eventPlayer.sendPacket(adminReply);
|
||||
}
|
||||
|
||||
+9
-11
@@ -910,7 +910,7 @@ public class SevenSigns
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves all Seven Signs data, both to the database and properties file (if updateSettings = True). Often called to preserve data integrity and synchronization with DB, in case of errors. <BR>
|
||||
* Saves all Seven Signs data, both to the database and properties file (if updateSettings = True). Often called to preserve data integrity and synchronization with DB, in case of errors.<br>
|
||||
* If player != null, just that player's data is updated in the database, otherwise all player's data is sequentially updated.
|
||||
* @param player the player
|
||||
* @param updateSettings the update settings
|
||||
@@ -986,7 +986,7 @@ public class SevenSigns
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to reset the cabal details of all players, and update the database.<BR>
|
||||
* Used to reset the cabal details of all players, and update the database.<br>
|
||||
* Primarily used when beginning a new cycle, and should otherwise never be called.
|
||||
*/
|
||||
protected void resetPlayerData()
|
||||
@@ -1015,7 +1015,7 @@ public class SevenSigns
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to specify cabal-related details for the specified player. This method checks to see if the player has registered before and will update the database if necessary. <BR>
|
||||
* Used to specify cabal-related details for the specified player. This method checks to see if the player has registered before and will update the database if necessary.<br>
|
||||
* Returns the cabal ID the player has joined.
|
||||
* @param player the player
|
||||
* @param chosenCabal the chosen cabal
|
||||
@@ -1078,7 +1078,7 @@ public class SevenSigns
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the amount of ancient adena the specified player can claim, if any.<BR>
|
||||
* Returns the amount of ancient adena the specified player can claim, if any.<br>
|
||||
* If removeReward = True, all the ancient adena owed to them is removed, then DB is updated.
|
||||
* @param player the player
|
||||
* @param removeReward the remove reward
|
||||
@@ -1101,7 +1101,7 @@ public class SevenSigns
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to add the specified player's seal stone contribution points to the current total for their cabal. Returns the point score the contribution was worth. Each stone count <B>must be</B> broken down and specified by the stone's color.
|
||||
* Used to add the specified player's seal stone contribution points to the current total for their cabal. Returns the point score the contribution was worth. Each stone count <b>must be</b> broken down and specified by the stone's color.
|
||||
* @param player the player
|
||||
* @param blueCount the blue count
|
||||
* @param greenCount the green count
|
||||
@@ -1145,7 +1145,7 @@ public class SevenSigns
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the specified number of festival points to the specified cabal. Remember, the same number of points are <B>deducted from the rival cabal</B> to maintain proportionality.
|
||||
* Adds the specified number of festival points to the specified cabal. Remember, the same number of points are <b>deducted from the rival cabal</b> to maintain proportionality.
|
||||
* @param cabal the cabal
|
||||
* @param amount the amount
|
||||
*/
|
||||
@@ -1220,7 +1220,7 @@ public class SevenSigns
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to initialize the seals for each cabal. (Used at startup or at beginning of a new cycle). This method should be called after <B>resetSeals()</B> and <B>calcNewSealOwners()</B> on a new cycle.
|
||||
* Used to initialize the seals for each cabal. (Used at startup or at beginning of a new cycle). This method should be called after <b>resetSeals()</b> and <b>calcNewSealOwners()</b> on a new cycle.
|
||||
*/
|
||||
protected void initializeSeals()
|
||||
{
|
||||
@@ -1260,8 +1260,7 @@ public class SevenSigns
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the ownership of the three Seals of the Seven Signs, based on various criterion. <BR>
|
||||
* <BR>
|
||||
* Calculates the ownership of the three Seals of the Seven Signs, based on various criterion.<br>
|
||||
* Should only ever called at the beginning of a new cycle.
|
||||
*/
|
||||
protected void calcNewSealOwners()
|
||||
@@ -1460,8 +1459,7 @@ public class SevenSigns
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called to remove all players from catacombs and necropolises, who belong to the losing cabal. <BR>
|
||||
* <BR>
|
||||
* This method is called to remove all players from catacombs and necropolises, who belong to the losing cabal.<br>
|
||||
* Should only ever called at the beginning of Seal Validation.
|
||||
* @param compWinner the comp winner
|
||||
*/
|
||||
|
||||
+7
-7
@@ -4384,8 +4384,8 @@ public class SevenSignsFestival implements SpawnListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the running instance of a festival for the given Oracle and festivalID. <BR>
|
||||
* A <B>null</B> value is returned if there are no participants in that festival.
|
||||
* Returns the running instance of a festival for the given Oracle and festivalID.<br>
|
||||
* A <b>null</b> value is returned if there are no participants in that festival.
|
||||
* @param oracle the oracle
|
||||
* @param festivalId the festival id
|
||||
* @return DarknessFestival festivalInst
|
||||
@@ -4584,11 +4584,11 @@ public class SevenSignsFestival implements SpawnListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to spawn monsters unique to the festival. <BR>
|
||||
* Valid SpawnTypes:<BR>
|
||||
* 0 - All Primary Monsters (starting monsters) <BR>
|
||||
* 1 - Same as 0, but without archers/marksmen. (used for challenge increase) <BR>
|
||||
* 2 - Secondary Monsters (archers) <BR>
|
||||
* Used to spawn monsters unique to the festival.<br>
|
||||
* Valid SpawnTypes:<br>
|
||||
* 0 - All Primary Monsters (starting monsters)<br>
|
||||
* 1 - Same as 0, but without archers/marksmen. (used for challenge increase)<br>
|
||||
* 2 - Secondary Monsters (archers)<br>
|
||||
* 3 - Festival Chests
|
||||
* @param respawnDelay the respawn delay
|
||||
* @param spawnType the spawn type
|
||||
|
||||
+2
-4
@@ -222,8 +222,7 @@ public class Castle
|
||||
}
|
||||
|
||||
/**
|
||||
* Move non clan members off castle area and to nearest town.<BR>
|
||||
* <BR>
|
||||
* Move non clan members off castle area and to nearest town.
|
||||
*/
|
||||
public void banishForeigners()
|
||||
{
|
||||
@@ -425,8 +424,7 @@ public class Castle
|
||||
}
|
||||
|
||||
/**
|
||||
* Respawn all doors on castle grounds<BR>
|
||||
* <BR>
|
||||
* Respawn all doors on castle grounds.
|
||||
*/
|
||||
public void spawnDoor()
|
||||
{
|
||||
|
||||
@@ -97,8 +97,7 @@ public class Fort
|
||||
}
|
||||
|
||||
/**
|
||||
* Move non clan members off fort area and to nearest town.<BR>
|
||||
* <BR>
|
||||
* Move non clan members off fort area and to nearest town.
|
||||
*/
|
||||
public void banishForeigners()
|
||||
{
|
||||
@@ -262,8 +261,7 @@ public class Fort
|
||||
}
|
||||
|
||||
/**
|
||||
* Respawn all doors on fort grounds<BR>
|
||||
* <BR>
|
||||
* Respawn all doors on fort grounds.
|
||||
*/
|
||||
public void spawnDoor()
|
||||
{
|
||||
|
||||
+18
-50
@@ -235,9 +235,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* When siege ends<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* When siege ends
|
||||
*/
|
||||
public void endSiege()
|
||||
{
|
||||
@@ -343,9 +341,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* When control of fort changed during siege<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* When control of fort changed during siege
|
||||
*/
|
||||
public void midVictory()
|
||||
{
|
||||
@@ -370,9 +366,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* When siege starts<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* When siege starts
|
||||
*/
|
||||
public void startSiege()
|
||||
{
|
||||
@@ -433,8 +427,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Announce to player.<BR>
|
||||
* <BR>
|
||||
* Announce to player.
|
||||
* @param message The String of the message to send to player
|
||||
* @param inAreaOnly The boolean flag to show message to players in area only.
|
||||
*/
|
||||
@@ -506,9 +499,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Approve clan as defender for siege<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Approve clan as defender for siege.
|
||||
* @param clanId The int of player's clan id
|
||||
*/
|
||||
public void approveSiegeDefenderClan(int clanId)
|
||||
@@ -797,9 +788,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Register clan as attacker<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Register clan as attacker.
|
||||
* @param player The PlayerInstance of the player trying to register
|
||||
*/
|
||||
public void registerAttacker(PlayerInstance player)
|
||||
@@ -853,9 +842,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Register clan as defender<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Register clan as defender.
|
||||
* @param player The PlayerInstance of the player trying to register
|
||||
*/
|
||||
public void registerDefender(PlayerInstance player)
|
||||
@@ -881,9 +868,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove clan from siege<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Remove clan from siege.
|
||||
* @param clanId The int of player's clan id
|
||||
*/
|
||||
public void removeSiegeClan(int clanId)
|
||||
@@ -918,9 +903,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove clan from siege<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Remove clan from siege.
|
||||
* @param clan the clan
|
||||
*/
|
||||
public void removeSiegeClan(Clan clan)
|
||||
@@ -934,9 +917,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove clan from siege<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Remove clan from siege.
|
||||
* @param player The PlayerInstance of player/clan being removed
|
||||
*/
|
||||
public void removeSiegeClan(PlayerInstance player)
|
||||
@@ -945,9 +926,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the auto tasks<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Start the auto tasks
|
||||
*/
|
||||
public void checkAutoTask()
|
||||
{
|
||||
@@ -963,9 +942,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the auto tasks<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Start the auto tasks.
|
||||
* @param setTime the set time
|
||||
*/
|
||||
public void startAutoTask(boolean setTime)
|
||||
@@ -1036,9 +1013,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Add clan as attacker<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Add clan as attacker.
|
||||
* @param clanId The int of clan's id
|
||||
*/
|
||||
private void addAttacker(int clanId)
|
||||
@@ -1047,9 +1022,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Add clan as defender<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Add clan as defender.
|
||||
* @param clanId The int of clan's id
|
||||
*/
|
||||
private void addDefender(int clanId)
|
||||
@@ -1071,9 +1044,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Add clan as defender waiting approval<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Add clan as defender waiting approval.
|
||||
* @param clanId The int of clan's id
|
||||
*/
|
||||
private void addDefenderWaiting(int clanId)
|
||||
@@ -1082,8 +1053,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the player can register.<BR>
|
||||
* <BR>
|
||||
* Return true if the player can register.
|
||||
* @param player The PlayerInstance of the player trying to register
|
||||
* @return true, if successful
|
||||
*/
|
||||
@@ -1246,8 +1216,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Save registration to database.<BR>
|
||||
* <BR>
|
||||
* Save registration to database.
|
||||
* @param clan The Clan of player
|
||||
* @param typeId -1 = owner 0 = defender, 1 = attacker, 2 = defender waiting
|
||||
* @param isUpdateRegistration the is update registration
|
||||
@@ -1380,8 +1349,7 @@ public class FortSiege
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawn siege guard.<BR>
|
||||
* <BR>
|
||||
* Spawn siege guard.
|
||||
*/
|
||||
private void spawnSiegeGuard()
|
||||
{
|
||||
|
||||
+22
-60
@@ -297,9 +297,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* When siege ends<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* When siege ends
|
||||
*/
|
||||
public void endSiege()
|
||||
{
|
||||
@@ -418,9 +416,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* When control of castle changed during siege<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* When control of castle changed during siege
|
||||
*/
|
||||
public void midVictory()
|
||||
{
|
||||
@@ -526,9 +522,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* When siege starts<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* When siege starts
|
||||
*/
|
||||
public void startSiege()
|
||||
{
|
||||
@@ -603,8 +597,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Announce to player.<BR>
|
||||
* <BR>
|
||||
* Announce to player.
|
||||
* @param message The String of the message to send to player
|
||||
* @param inAreaOnly The boolean flag to show message to players in area only.
|
||||
*/
|
||||
@@ -675,9 +668,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Approve clan as defender for siege<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Approve clan as defender for siege.
|
||||
* @param clanId The int of player's clan id
|
||||
*/
|
||||
public void approveSiegeDefenderClan(int clanId)
|
||||
@@ -714,9 +705,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if clan is attacker<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Return true if clan is attacker.
|
||||
* @param clan The Clan of the player
|
||||
* @return true, if successful
|
||||
*/
|
||||
@@ -726,9 +715,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if clan is defender<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Return true if clan is defender.
|
||||
* @param clan The Clan of the player
|
||||
* @return true, if successful
|
||||
*/
|
||||
@@ -738,9 +725,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if clan is defender waiting approval<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Return true if clan is defender waiting approval.
|
||||
* @param clan The Clan of the player
|
||||
* @return true, if successful
|
||||
*/
|
||||
@@ -965,9 +950,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Register clan as attacker<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Register clan as attacker.
|
||||
* @param player The PlayerInstance of the player trying to register
|
||||
*/
|
||||
public void registerAttacker(PlayerInstance player)
|
||||
@@ -1006,9 +989,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Register clan as defender<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Register clan as defender.
|
||||
* @param player The PlayerInstance of the player trying to register
|
||||
*/
|
||||
public void registerDefender(PlayerInstance player)
|
||||
@@ -1034,9 +1015,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove clan from siege<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Remove clan from siege.
|
||||
* @param clanId The int of player's clan id
|
||||
*/
|
||||
public void removeSiegeClan(int clanId)
|
||||
@@ -1063,9 +1042,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove clan from siege<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Remove clan from siege.
|
||||
* @param clan the clan
|
||||
*/
|
||||
public void removeSiegeClan(Clan clan)
|
||||
@@ -1079,9 +1056,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove clan from siege<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Remove clan from siege.
|
||||
* @param player The PlayerInstance of player/clan being removed
|
||||
*/
|
||||
public void removeSiegeClan(PlayerInstance player)
|
||||
@@ -1090,9 +1065,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the auto tasks<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Start the auto tasks
|
||||
*/
|
||||
public void startAutoTask()
|
||||
{
|
||||
@@ -1158,9 +1131,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Add clan as attacker<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Add clan as attacker.
|
||||
* @param clanId The int of clan's id
|
||||
*/
|
||||
private void addAttacker(int clanId)
|
||||
@@ -1170,9 +1141,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Add clan as defender<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Add clan as defender.
|
||||
* @param clanId The int of clan's id
|
||||
*/
|
||||
private void addDefender(int clanId)
|
||||
@@ -1195,9 +1164,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Add clan as defender waiting approval<BR>
|
||||
* <BR>
|
||||
* .
|
||||
* Add clan as defender waiting approval.
|
||||
* @param clanId The int of clan's id
|
||||
*/
|
||||
private void addDefenderWaiting(int clanId)
|
||||
@@ -1207,8 +1174,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the player can register.<BR>
|
||||
* <BR>
|
||||
* Return true if the player can register.
|
||||
* @param player The PlayerInstance of the player trying to register
|
||||
* @return true, if successful
|
||||
*/
|
||||
@@ -1254,8 +1220,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the clan has already registered to a siege for the same day.<BR>
|
||||
* <BR>
|
||||
* Return true if the clan has already registered to a siege for the same day.
|
||||
* @param clan The Clan of the player trying to register
|
||||
* @return true, if successful
|
||||
*/
|
||||
@@ -1284,8 +1249,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the correct siege date as Calendar.<BR>
|
||||
* <BR>
|
||||
* Return the correct siege date as Calendar.
|
||||
*/
|
||||
private void correctSiegeDateTime()
|
||||
{
|
||||
@@ -1457,8 +1421,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Save registration to database.<BR>
|
||||
* <BR>
|
||||
* Save registration to database.
|
||||
* @param clan The Clan of player
|
||||
* @param typeId -1 = owner 0 = defender, 1 = attacker, 2 = defender waiting
|
||||
* @param isUpdateRegistration the is update registration
|
||||
@@ -1591,8 +1554,7 @@ public class Siege
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawn siege guard.<BR>
|
||||
* <BR>
|
||||
* Spawn siege guard.
|
||||
*/
|
||||
private void spawnSiegeGuard()
|
||||
{
|
||||
|
||||
+2
-3
@@ -36,14 +36,13 @@ public class HelperBuffHolder
|
||||
private int _skillLevel;
|
||||
|
||||
/**
|
||||
* If True only Magus class will obtain this Buff <BR>
|
||||
* If True only Magus class will obtain this Buff<br>
|
||||
* If False only Fighter class will obtain this Buff
|
||||
*/
|
||||
private boolean _isMagicClass;
|
||||
|
||||
/**
|
||||
* Constructor of HelperBuff.<BR>
|
||||
* <BR>
|
||||
* Constructor of HelperBuff.
|
||||
* @param set
|
||||
*/
|
||||
public HelperBuffHolder(StatSet set)
|
||||
|
||||
@@ -43,12 +43,11 @@ public class Armor extends Item
|
||||
private Skill _itemSkill = null; // for passive skill
|
||||
|
||||
/**
|
||||
* Constructor for Armor.<BR>
|
||||
* <BR>
|
||||
* <U><I>Variables filled :</I></U><BR>
|
||||
* <LI>_avoidModifier</LI>
|
||||
* <LI>_pDef & _mDef</LI>
|
||||
* <LI>_mpBonus & _hpBonus</LI>
|
||||
* Constructor for Armor.<br>
|
||||
* <u><i>Variables filled :</i></u><br>
|
||||
* <li>_avoidModifier</li>
|
||||
* <li>_pDef & _mDef</li>
|
||||
* <li>_mpBonus & _hpBonus</li><br>
|
||||
* @param type : ArmorType designating the type of armor
|
||||
* @param set : StatSet designating the set of couples (key,value) caracterizing the armor
|
||||
* @see Item constructor
|
||||
|
||||
@@ -32,11 +32,11 @@ import org.l2jmobius.gameserver.model.skills.funcs.Func;
|
||||
import org.l2jmobius.gameserver.model.skills.funcs.FuncTemplate;
|
||||
|
||||
/**
|
||||
* This class contains all informations concerning the item (weapon, armor, etc).<BR>
|
||||
* This class contains all informations concerning the item (weapon, armor, etc).<br>
|
||||
* Mother class of :
|
||||
* <LI>Armor</LI>
|
||||
* <LI>EtcItem</LI>
|
||||
* <LI>Weapon</LI>
|
||||
* <li>Armor</li>
|
||||
* <li>EtcItem</li>
|
||||
* <li>Weapon</li>
|
||||
* @version $Revision: 1.7.2.2.2.5 $ $Date: 2005/04/06 18:25:18 $
|
||||
*/
|
||||
public abstract class Item
|
||||
@@ -143,21 +143,20 @@ public abstract class Item
|
||||
protected static final Effect[] _emptyEffectSet = new Effect[0];
|
||||
|
||||
/**
|
||||
* Constructor of the Item that fill class variables.<BR>
|
||||
* <BR>
|
||||
* <U><I>Variables filled :</I></U><BR>
|
||||
* <LI>type</LI>
|
||||
* <LI>_itemId</LI>
|
||||
* <LI>_name</LI>
|
||||
* <LI>_type1 & _type2</LI>
|
||||
* <LI>_weight</LI>
|
||||
* <LI>_crystallizable</LI>
|
||||
* <LI>_stackable</LI>
|
||||
* <LI>_crystalType & _crystlaCount</LI>
|
||||
* <LI>_duration</LI>
|
||||
* <LI>_bodypart</LI>
|
||||
* <LI>_referencePrice</LI>
|
||||
* <LI>_sellable</LI>
|
||||
* Constructor of the Item that fill class variables.<br>
|
||||
* <u><i>Variables filled :</i></u><br>
|
||||
* <li>type</li>
|
||||
* <li>_itemId</li>
|
||||
* <li>_name</li>
|
||||
* <li>_type1 & _type2</li>
|
||||
* <li>_weight</li>
|
||||
* <li>_crystallizable</li>
|
||||
* <li>_stackable</li>
|
||||
* <li>_crystalType & _crystlaCount</li>
|
||||
* <li>_duration</li>
|
||||
* <li>_bodypart</li>
|
||||
* <li>_referencePrice</li>
|
||||
* <li>_sellable</li><br>
|
||||
* @param type : Enum designating the type of the item
|
||||
* @param set : StatSet corresponding to a set of couples (key,value) for description of the item
|
||||
*/
|
||||
@@ -414,9 +413,8 @@ public abstract class Item
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the grade of the item.<BR>
|
||||
* <BR>
|
||||
* <U><I>Concept :</I></U><BR>
|
||||
* Returns the grade of the item.<br>
|
||||
* <u><i>Concept :</i></u><br>
|
||||
* In fact, this fucntion returns the type of crystal of the item.
|
||||
* @return int
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user