Unified javadoc format and related cleanups.

This commit is contained in:
MobiusDevelopment
2020-03-03 23:04:44 +00:00
parent 6d8addc784
commit 18b3e6d3f2
1830 changed files with 14879 additions and 14883 deletions
@@ -223,17 +223,17 @@ public class CabaleBuffer extends AbstractNpcAI
}
/**
* 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>
* 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)<br>
* - Fighters: +25% Max Load, +25% Effect Resistance<BR>
* - Mystics: +25% Magic Cancel Resist, +25% Effect Resistance<BR>
* - Fighters: +25% Max Load, +25% Effect Resistance<br>
* - Mystics: +25% Magic Cancel Resist, +25% Effect Resistance<br>
* @param player
* @param skillId
* @return
@@ -26,18 +26,15 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
public class ArtefactInstanceAction implements IActionHandler
{
/**
* 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>
*/
@Override
public boolean action(PlayerInstance player, WorldObject target, boolean interact)
@@ -36,27 +36,22 @@ import org.l2jmobius.gameserver.network.serverpackets.MoveToPawn;
public class NpcAction implements IActionHandler
{
/**
* Manage actions when a player click on the Npc.<BR>
* <BR>
* <B><U> Actions on first click on the Npc (Select it)</U> :</B><BR>
* <BR>
* Manage actions when a player click on the Npc.<br>
* <br>
* <b><u>Actions on first click on the Npc (Select it)</u>:</b><br>
* <li>Set the Npc 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 Npc is autoAttackable, send a Server->Client packet StatusUpdate to the PlayerInstance in order to update Npc HP bar</li>
* <li>Send a Server->Client packet ValidateLocation to correct the Npc position and heading on the client</li><BR>
* <BR>
* <B><U> Actions on second click on the Npc (Attack it/Intercat with it)</U> :</B><BR>
* <BR>
* <li>Send a Server->Client packet ValidateLocation to correct the Npc position and heading on the client</li><br>
* <br>
* <b><u>Actions on second click on the Npc (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 Npc is autoAttackable, notify the PlayerInstance AI with AI_INTENTION_ATTACK (after a height verification)</li>
* <li>If Npc 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>
* <li>If Npc 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>
* @param player The PlayerInstance that start an action on the Npc
*/
@Override
@@ -32,25 +32,20 @@ public class PlayerInstanceAction implements IActionHandler
private static final int CURSED_WEAPON_VICTIM_MIN_LEVEL = 21;
/**
* Manage actions when a player click on this PlayerInstance.<BR>
* <BR>
* <B><U> Actions on first click on the PlayerInstance (Select it)</U> :</B><BR>
* <BR>
* Manage actions when a player click on this PlayerInstance.<br>
* <br>
* <b><u>Actions on first click on the PlayerInstance (Select it)</u>:</b><br>
* <li>Set the target of the player</li>
* <li>Send a Server->Client packet MyTargetSelected to the player (display the select window)</li><BR>
* <BR>
* <B><U> Actions on second click on the PlayerInstance (Follow it/Attack it/Intercat with it)</U> :</B><BR>
* <BR>
* <li>Send a Server->Client packet MyTargetSelected to the player (display the select window)</li><br>
* <br>
* <b><u>Actions on second click on the PlayerInstance (Follow it/Attack it/Intercat with it)</u>:</b><br>
* <li>Send a Server->Client packet MyTargetSelected to the player (display the select window)</li>
* <li>If target PlayerInstance has a Private Store, notify the player AI with AI_INTENTION_INTERACT</li>
* <li>If target PlayerInstance is autoAttackable, notify the player AI with AI_INTENTION_ATTACK</li> <BR>
* <BR>
* <li>If target PlayerInstance is NOT autoAttackable, notify the player AI with AI_INTENTION_FOLLOW</li><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR>
* <BR>
* <li>Client packet : Action, AttackRequest</li><BR>
* <BR>
* <li>If target PlayerInstance is autoAttackable, notify the player AI with AI_INTENTION_ATTACK</li>
* <li>If target PlayerInstance is NOT autoAttackable, notify the player AI with AI_INTENTION_FOLLOW</li><br>
* <br>
* <b><u>Example of use</u>:</b><br>
* <li>Client packet : Action, AttackRequest</li><br>
* @param player The player that start an action on target PlayerInstance
*/
@Override
@@ -38,21 +38,17 @@ import handlers.bypasshandlers.NpcViewMod;
public class NpcActionShift implements IActionShiftHandler
{
/**
* 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>
*/
@Override
public boolean action(PlayerInstance player, WorldObject target, boolean interact)
@@ -29,7 +29,7 @@ public class PlayerInstanceActionShift implements IActionShiftHandler
{
if (player.isGM())
{
// Check if the gm already target this l2pcinstance
// Check if the GM already target this l2pcinstance
if (player.getTarget() != target)
{
// Set the target of the PlayerInstance player
@@ -78,13 +78,13 @@ public class AdminAdmin implements IAdminCommandHandler
else if (command.startsWith("admin_gmliston"))
{
AdminData.getInstance().showGm(activeChar);
BuilderUtil.sendSysMessage(activeChar, "Registered into gm list");
BuilderUtil.sendSysMessage(activeChar, "Registered into GM list");
AdminHtml.showAdminHtml(activeChar, "gm_menu.htm");
}
else if (command.startsWith("admin_gmlistoff"))
{
AdminData.getInstance().hideGm(activeChar);
BuilderUtil.sendSysMessage(activeChar, "Removed from gm list");
BuilderUtil.sendSysMessage(activeChar, "Removed from GM list");
AdminHtml.showAdminHtml(activeChar, "gm_menu.htm");
}
else if (command.startsWith("admin_silence"))
@@ -494,7 +494,7 @@ public class AdminEventEngine implements IAdminCommandHandler
sb.append("<td><edit var=\"event_npcid\" width=100 height=20></td></tr>");
sb.append("<tr><td><button value=\"Set number of teams\" action=\"bypass -h admin_event_change_teams_number $event_teams_number\" width=140 height=32 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td>");
sb.append("<td><edit var=\"event_teams_number\" width=100 height=20></td></tr>");
sb.append("</table><br><center> <br><br>");
sb.append("</table><br><center><br><br>");
sb.append("<font color=\"LEVEL\">Teams' names:</font><br><table width=100% cellspacing=8>");
for (int i = 1; (i - 1) < teamnumbers; i++) // Team names params
{
@@ -30,7 +30,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
@@ -24,7 +24,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 off
* This class handles following admin commands: - GM = turns GM mode off
* @version $Revision: 1.2.4.4 $ $Date: 2005/04/11 10:06:06 $
*/
public class AdminGm implements IAdminCommandHandler
@@ -34,7 +34,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, HorridoJoho
*/
public class AdminPForge implements IAdminCommandHandler
@@ -30,14 +30,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
{
@@ -71,13 +71,12 @@ public class Loto implements IBypassHandler
}
/**
* 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 npc Npc loto instance
* @param value The number of the page of the NpcInstance to display
@@ -84,8 +84,9 @@ public class QuestLink implements IBypassHandler
/**
* 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>
* <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 npc The table containing quests of the NpcInstance
* @param quests
@@ -202,6 +203,7 @@ public class QuestLink implements IBypassHandler
/**
* Open a quest window on client with the text of the NpcInstance.<br>
* <br>
* <b><u>Actions</u>:</b><br>
* <ul>
* <li>Get the text of the quest state in the folder data/scripts/quests/questId/stateId.htm</li>
@@ -38,7 +38,7 @@ import org.l2jmobius.gameserver.util.Util;
* <li>Fly Radius means the distance between starting point and final point, it must be an integer.</li>
* <li>Fly Course means the movement direction: imagine a compass above player's head, making north player's heading. So if fly course is 180, player will go backwards (good for blink, e.g.).</li>
* </ul>
* By the way, if flyCourse = 360 or 0, player will be moved in in front of him. <br>
* By the way, if flyCourse = 360 or 0, player will be moved in in front of him.<br>
* If target is effector, put in XML self="1", this will make _actor = getEffector(). This, combined with target type, allows more complex actions like flying target's backwards or player's backwards.
* @author DrHouse
*/
@@ -98,7 +98,7 @@ public class Fishing extends AbstractEffect
return;
}
// check for equiped fishing rod
// check for equipped fishing rod
final Weapon equipedWeapon = player.getActiveWeaponItem();
if (((equipedWeapon == null) || (equipedWeapon.getItemType() != WeaponType.FISHINGROD)))
{
@@ -106,7 +106,7 @@ public class Fishing extends AbstractEffect
return;
}
// check for equiped lure
// check for equipped lure
final ItemInstance equipedLeftHand = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);
if ((equipedLeftHand == null) || (equipedLeftHand.getItemType() != EtcItemType.LURE))
{
@@ -691,7 +691,7 @@ public class CrystalCaverns extends AbstractInstance
{
if (player.getParty() == null)
{
// This can happen only if gm enters solo.
// This can happen only if GM enters solo.
player.sendMessage("Welcome to Crystal Caverns.");
teleportPlayer(player, START_LOC, world.getInstanceId());
world.addAllowed(player);
@@ -1232,8 +1232,7 @@ public class BlowfishEngine
/**
* Method to encrypt the block at the given index.<br>
* The encrypted block goes to the destination array at the given index.<br>
* <br>
* The encrypted block goes to the destination array at the given index.
* @param src source array with the plain data
* @param srcIndex index where the block to encrypt is located
* @param dst destination array the encryption will go to
@@ -114,10 +114,13 @@ public class GameTimeController extends Thread
}
/**
* Move all Creatures contained in movingObjects of GameTimeController.<BR>
* <B><U> Concept</U> :</B><BR>
* All Creature in movement are identified in <B>movingObjects</B> of GameTimeController.<BR>
* <B><U> Actions</U> :</B><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>
* <ul>
* <li>Update the position of each Creature</li>
* <li>If movement is finished, the Creature is removed from movingObjects</li>
@@ -95,7 +95,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>
* login server during the handshake. This new key is stored<br>
* in blowfishKey
@@ -979,7 +979,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()
@@ -1060,7 +1060,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 objectId
* @param removeReward
@@ -1089,7 +1089,7 @@ public class SevenSigns
/**
* Used to add the specified player's seal stone contribution points to the current total for their cabal.<br>
* Returns the point score the contribution was worth.<br>
* Each stone count <B>must be</B> broken down and specified by the stone's color.
* Each stone count <b>must be</b> broken down and specified by the stone's color.
* @param objectId
* @param blueCount
* @param greenCount
@@ -1210,7 +1210,7 @@ public class SevenSigns
}
/**
* Used to initialize the seals for each cabal.<bR>
* Used to initialize the seals for each cabal.<br>
* (Used at startup or at beginning of a new cycle).<br>
* This method should be called after <b>resetSeals()</b> and <b>calcNewSealOwners()</b> on a new cycle.
*/
@@ -1250,8 +1250,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()
@@ -122,7 +122,7 @@ public class SevenSignsFestival implements SpawnListener
* <li>Chests</li>
* </ul>
* All data is given by: X, Y, Z (coords), Heading, NPC ID (if necessary).<br>
* This may be moved externally in time, but the data should not change.<br>
* This may be moved externally in time, but the data should not change.
*/
// @formatter:off
public static final int[][] FESTIVAL_DAWN_PLAYER_SPAWNS =
@@ -1977,8 +1977,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
* @param festivalId
* @return DarknessFestival festivalInst
@@ -2171,11 +2171,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
* @param spawnType
@@ -234,7 +234,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();
// last point where logging is operational :(
LOGGER.warning("GM shutdown countdown is over. " + MODE_TEXT[_shutdownMode] + " NOW!");
@@ -563,7 +563,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()
@@ -44,7 +44,7 @@ import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
/**
* Mother class of all objects AI in the world.<br>
* AbastractAI :<br>
* AbastractAI:<br>
* <li>CreatureAI</li>
*/
public abstract class AbstractAI implements Ctrl
@@ -212,10 +212,10 @@ public abstract class AbstractAI implements Ctrl
/**
* Set the Intention of this AbstractAI.<br>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method is USED by AI classes</B></FONT><B><U><br>
* Overridden 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.
* <font color=#FF0000><b><u>Caution</u>: This method is USED by AI classes</b></font><b><u><br>
* Overridden 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.
* @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
@@ -229,7 +229,7 @@ public abstract class AbstractAI implements Ctrl
/**
* 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>
* <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
@@ -240,7 +240,7 @@ public abstract class AbstractAI implements Ctrl
/**
* 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>
* <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)
*/
@@ -318,7 +318,7 @@ public abstract class AbstractAI implements Ctrl
/**
* 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 period)</B></FONT>
* <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 period)</b></font>
* @param evt The event whose the AI must be notified
*/
@Override
@@ -328,7 +328,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
* Launch the CreatureAI onEvt method corresponding to the Event. <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 period)</B></FONT>
* Launch the CreatureAI onEvt method corresponding to the Event. <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 period)</b></font>
* @param evt The event whose the AI must be notified
* @param arg0 The first parameter of the Event (optional target)
*/
@@ -339,7 +339,7 @@ public abstract class AbstractAI implements Ctrl
}
/**
* Launch the CreatureAI onEvt method corresponding to the Event. <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 period)</B></FONT>
* Launch the CreatureAI onEvt method corresponding to the Event. <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 period)</b></font>
* @param evt The event whose the AI must be notified
*/
@Override
@@ -538,7 +538,7 @@ public abstract class AbstractAI implements Ctrl
protected abstract void onEvtAfraid(Creature effector, boolean start);
/**
* Cancel action client side by sending Server->Client packet ActionFailed to the PlayerInstance actor. <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT>
* Cancel action client side by sending Server->Client packet ActionFailed to the PlayerInstance actor. <font color=#FF0000><b><u>Caution</u>: Low level function, used by AI subclasses</b></font>
*/
protected void clientActionFailed()
{
@@ -549,8 +549,8 @@ public 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>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT>
* 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
*/
@@ -634,8 +634,8 @@ public 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>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT>
* 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
@@ -662,8 +662,8 @@ public 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>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT>
* 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 loc
*/
protected void clientStopMoving(Location loc)
@@ -726,8 +726,8 @@ public abstract class AbstractAI implements Ctrl
}
/**
* 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>
* 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()
{
@@ -754,8 +754,8 @@ public abstract class AbstractAI implements Ctrl
}
/**
* 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>
* 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()
{
@@ -783,8 +783,8 @@ public abstract class AbstractAI implements Ctrl
}
/**
* 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>
* 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()
{
@@ -803,7 +803,7 @@ public 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>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : Low level function, used by AI subclasses</B></FONT>
* <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)
@@ -133,7 +133,7 @@ public class AttackableAI extends CreatureAI
}
/**
* <B><U> Actor is a GuardInstance</U> :</B>
* <b><u>Actor is a GuardInstance</u>:</b>
* <ul>
* <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>
@@ -141,7 +141,8 @@ public class AttackableAI extends CreatureAI
* <li>The PlayerInstance target has karma (=PK)</li>
* <li>The MonsterInstance target is aggressive</li>
* </ul>
* <B><U> Actor is a SiegeGuardInstance</U> :</B>
* <br>
* <b><u>Actor is a SiegeGuardInstance</u>:</b>
* <ul>
* <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>
@@ -149,14 +150,16 @@ public class AttackableAI extends CreatureAI
* <li>A siege is in progress</li>
* <li>The PlayerInstance target isn't a Defender</li>
* </ul>
* <B><U> Actor is a FriendlyMobInstance</U> :</B>
* <br>
* <b><u>Actor is a FriendlyMobInstance</u>:</b>
* <ul>
* <li>The target isn't a Folk, a Door or another Npc</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>
* </ul>
* <B><U> Actor is a MonsterInstance</U> :</B>
* <br>
* <b><u>Actor is a MonsterInstance</u>:</b>
* <ul>
* <li>The target isn't a Folk, a Door or another Npc</li>
* <li>The target isn't dead, isn't invulnerable, isn't in silent moving mode AND too far (>100)</li>
@@ -333,7 +336,7 @@ 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>
* <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>
* <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
@@ -449,7 +452,7 @@ public class AttackableAI extends CreatureAI
}
/**
* Manage AI standard thinks of a Attackable (called by onEvtThink). <B><U> Actions</U> :</B>
* Manage AI standard thinks of a Attackable (called by onEvtThink). <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -743,6 +746,7 @@ public class AttackableAI extends CreatureAI
/**
* Manage AI attack thinks of a Attackable (called by onEvtThink).<br>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Update the attack timeout if actor is running</li>
@@ -2277,7 +2281,8 @@ public class AttackableAI extends CreatureAI
/**
* Launch actions corresponding to the Event Attacked.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -2338,7 +2343,8 @@ public class AttackableAI extends CreatureAI
/**
* Launch actions corresponding to the Event Aggression.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -145,7 +145,8 @@ public class CreatureAI extends AbstractAI
/**
* Manage the Idle Intention : Stop Attack, Movement and Stand Up the actor.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Set the AI Intention to AI_INTENTION_IDLE</li>
* <li>Init cast and attack target</li>
@@ -173,7 +174,8 @@ public class CreatureAI extends AbstractAI
/**
* Manage the Active Intention : Stop Attack, Movement and Launch Think Event.<br>
* <B><U> Actions</U> : <I>if the Intention is not already Active</I></B>
* <br>
* <b><u>Actions</u> : <i>if the Intention is not already Active</i></b>
* <ul>
* <li>Set the AI Intention to AI_INTENTION_ACTIVE</li>
* <li>Init cast and attack target</li>
@@ -209,7 +211,8 @@ public class CreatureAI extends AbstractAI
/**
* Manage the Rest Intention.<br>
* <B><U> Actions</U> : </B>
* <br>
* <b><u>Actions</u> : </b>
* <ul>
* <li>Set the AI Intention to AI_INTENTION_IDLE</li>
* </ul>
@@ -223,7 +226,8 @@ public class CreatureAI extends AbstractAI
/**
* Manage the Attack Intention : Stop current Attack (if necessary), Start a new Attack and Launch Think Event.<br>
* <B><U> Actions</U> : </B>
* <br>
* <b><u>Actions</u> : </b>
* <ul>
* <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>
@@ -231,7 +235,8 @@ public class CreatureAI extends AbstractAI
* <li>Start the actor Auto Attack client side by sending Server->Client packet AutoAttackStart (broadcast)</li>
* <li>Launch the Think Event</li>
* </ul>
* <B><U> Overridden in</U> :</B>
* <br>
* <b><u>Overridden in</u>:</b>
* <ul>
* <li>AttackableAI : Calculate attack timeout</li>
* </ul>
@@ -282,7 +287,8 @@ public class CreatureAI extends AbstractAI
/**
* Manage the Cast Intention : Stop current Attack, Init the AI in order to cast and Launch Think Event.<br>
* <B><U> Actions</U> : </B>
* <br>
* <b><u>Actions</u> : </b>
* <ul>
* <li>Set the AI cast target</li>
* <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
@@ -327,7 +333,8 @@ public class CreatureAI extends AbstractAI
/**
* Manage the Move To Intention : Stop current Attack and Launch a Move to Location Task.<br>
* <B><U> Actions</U> : </B>
* <br>
* <b><u>Actions</u> : </b>
* <ul>
* <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>
@@ -359,7 +366,8 @@ public class CreatureAI extends AbstractAI
/**
* Manage the Follow Intention : Stop current Attack and Launch a Follow Task.<br>
* <B><U> Actions</U> : </B>
* <br>
* <b><u>Actions</u> : </b>
* <ul>
* <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>
@@ -387,7 +395,8 @@ public class CreatureAI extends AbstractAI
/**
* Manage the PickUp Intention : Set the pick up target and Launch a Move To Pawn Task (offset=20).<br>
* <B><U> Actions</U> : </B>
* <br>
* <b><u>Actions</u> : </b>
* <ul>
* <li>Set the AI pick up target</li>
* <li>Set the Intention of this AI to AI_INTENTION_PICK_UP</li>
@@ -429,7 +438,8 @@ public class CreatureAI extends AbstractAI
/**
* Manage the Interact Intention : Set the interact target and Launch a Move To Pawn Task (offset=60).<br>
* <B><U> Actions</U> : </B>
* <br>
* <b><u>Actions</u> : </b>
* <ul>
* <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop (broadcast)</li>
* <li>Set the AI interact target</li>
@@ -485,7 +495,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event Stunned then onAttacked Event.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -536,7 +547,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event Sleeping.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -563,7 +575,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event Rooted.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -586,7 +599,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event Confused.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -604,7 +618,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event Muted.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Break a cast and send Server->Client ActionFailed packet and a System Message to the Creature</li>
* </ul>
@@ -627,7 +642,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event ReadyToAct.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Launch actions corresponding to the Event Think</li>
* </ul>
@@ -650,7 +666,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event Arrived.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -693,7 +710,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event ArrivedRevalidate.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Launch actions corresponding to the Event Think</li>
* </ul>
@@ -707,7 +725,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event ArrivedBlocked.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -732,7 +751,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event ForgetObject.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -811,7 +831,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event Cancel.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Stop an AI Follow Task</li>
* <li>Launch actions corresponding to the Event Think</li>
@@ -836,7 +857,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event Dead.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Stop an AI Follow Task</li>
* <li>Kill the actor client side by sending Server->Client packet AutoAttackStop, StopMove/StopRotation, Die (broadcast)</li>
@@ -859,7 +881,8 @@ public class CreatureAI extends AbstractAI
/**
* Launch actions corresponding to the Event Fake Death.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Stop an AI Follow Task</li>
* </ul>
@@ -958,13 +981,15 @@ public class CreatureAI extends AbstractAI
/**
* Manage the Move to Pawn action in function of the distance and of the Interact area.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
* </ul>
* <B><U> Example of use </U> :</B>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>PLayerAI, SummonAI</li>
* </ul>
@@ -1065,13 +1090,15 @@ public class CreatureAI extends AbstractAI
/**
* Modify current Intention and actions if the target is lost or dead.<br>
* <B><U> Actions</U> : <I>If the target is lost or dead</I></B>
* <br>
* <b><u>Actions</u> : <i>If the target is lost or dead</i></b>
* <ul>
* <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>
* </ul>
* <B><U> Example of use </U> :</B>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>PLayerAI, SummonAI</li>
* </ul>
@@ -1098,13 +1125,15 @@ public class CreatureAI extends AbstractAI
/**
* Modify current Intention and actions if the target is lost.<br>
* <B><U> Actions</U> : <I>If the target is lost</I></B>
* <br>
* <b><u>Actions</u> : <i>If the target is lost</i></b>
* <ul>
* <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>
* </ul>
* <B><U> Example of use </U> :</B>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>PLayerAI, SummonAI</li>
* </ul>
@@ -86,7 +86,7 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
}
/**
* <B><U> Actor is a GuardInstance</U> :</B>
* <b><u>Actor is a GuardInstance</u>:</b>
* <ul>
* <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>
@@ -94,7 +94,8 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
* <li>The PlayerInstance target has karma (=PK)</li>
* <li>The MonsterInstance target is aggressive</li>
* </ul>
* <B><U> Actor is a SiegeGuardInstance</U> :</B>
* <br>
* <b><u>Actor is a SiegeGuardInstance</u>:</b>
* <ul>
* <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>
@@ -102,14 +103,16 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
* <li>A siege is in progress</li>
* <li>The PlayerInstance target isn't a Defender</li>
* </ul>
* <B><U> Actor is a FriendlyMobInstance</U> :</B>
* <br>
* <b><u>Actor is a FriendlyMobInstance</u>:</b>
* <ul>
* <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>
* </ul>
* <B><U> Actor is a MonsterInstance</U> :</B>
* <br>
* <b><u>Actor is a MonsterInstance</u>:</b>
* <ul>
* <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>
@@ -162,7 +165,7 @@ 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>
* <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>
* <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
@@ -234,7 +237,8 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
/**
* Manage AI standard thinks of a Attackable (called by onEvtThink).<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -302,7 +306,8 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
/**
* Manage AI attack thinks of a Attackable (called by onEvtThink).<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -660,7 +665,8 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
/**
* Launch actions corresponding to the Event Attacked.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -700,7 +706,8 @@ public class FortSiegeGuardAI extends CreatureAI implements Runnable
/**
* Launch actions corresponding to the Event Aggression.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -88,7 +88,8 @@ public class PlayerAI extends PlayableAI
/**
* Launch actions corresponding to the Event ReadyToAct.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Launch actions corresponding to the Event Think</li>
* </ul>
@@ -118,7 +119,8 @@ public class PlayerAI extends PlayableAI
/**
* Launch actions corresponding to the Event Cancel.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Stop an AI Follow Task</li>
* <li>Launch actions corresponding to the Event Think</li>
@@ -133,7 +135,7 @@ public class PlayerAI extends PlayableAI
/**
* Finalize the casting of a skill. This method overrides CreatureAI method.<br>
* <B>What it does:</B><br>
* <b>What it does:</b><br>
* 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
@@ -185,7 +187,8 @@ public class PlayerAI extends PlayableAI
/**
* Manage the Move To Intention : Stop current Attack and Launch a Move to Location Task.<br>
* <B><U> Actions</U> : </B>
* <br>
* <b><u>Actions</u> : </b>
* <ul>
* <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>
@@ -86,7 +86,7 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
}
/**
* <B><U> Actor is a GuardInstance</U> :</B>
* <b><u>Actor is a GuardInstance</u>:</b>
* <ul>
* <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>
@@ -94,7 +94,8 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
* <li>The PlayerInstance target has karma (=PK)</li>
* <li>The MonsterInstance target is aggressive</li>
* </ul>
* <B><U> Actor is a SiegeGuardInstance</U> :</B>
* <br>
* <b><u>Actor is a SiegeGuardInstance</u>:</b>
* <ul>
* <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>
@@ -102,14 +103,16 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
* <li>A siege is in progress</li>
* <li>The PlayerInstance target isn't a Defender</li>
* </ul>
* <B><U> Actor is a FriendlyMobInstance</U> :</B>
* <br>
* <b><u>Actor is a FriendlyMobInstance</u>:</b>
* <ul>
* <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>
* </ul>
* <B><U> Actor is a MonsterInstance</U> :</B>
* <br>
* <b><u>Actor is a MonsterInstance</u>:</b>
* <ul>
* <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>
@@ -155,7 +158,7 @@ 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>
* <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>
* <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
@@ -227,7 +230,8 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
/**
* Manage AI standard thinks of a Attackable (called by onEvtThink).<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -292,7 +296,8 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
/**
* Manage AI attack thinks of a Attackable (called by onEvtThink).<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -663,7 +668,8 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
/**
* Launch actions corresponding to the Event Attacked.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -703,7 +709,8 @@ public class SiegeGuardAI extends CreatureAI implements Runnable
/**
* Launch actions corresponding to the Event Aggression.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -158,7 +158,7 @@ public class AdminData implements IXmlReader
AdminCommandAccessRight acar = _adminCommandAccessRights.get(adminCommand);
if (acar == null)
{
// Trying to avoid the spam for next time when the gm would try to use the same command
// Trying to avoid the spam for next time when the GM would try to use the same command
if ((accessLevel.getLevel() > 0) && (accessLevel.getLevel() == _highestLevel))
{
acar = new AdminCommandAccessRight(adminCommand, true, accessLevel.getLevel());
@@ -339,7 +339,7 @@ public class AdminData implements IXmlReader
/**
* Gets the single instance of AdminTable.
* @return AccessLevels: the one and only instance of this class<br>
* @return AccessLevels: the one and only instance of this class
*/
public static AdminData getInstance()
{
@@ -57,7 +57,7 @@ import org.l2jmobius.gameserver.model.skills.Skill;
* Here can be found the following skill trees:<br>
* <ul>
* <li>Class skill trees: player skill trees for each class.</li>
* <li>Transfer skill trees: player skill trees for each healer class.</lI>
* <li>Transfer skill trees: player skill trees for each healer class.</li>
* <li>Collect skill tree: player skill tree for Gracia related skills.</li>
* <li>Fishing skill tree: player skill tree for fishing related skills.</li>
* <li>Transform skill tree: player skill tree for transformation related skills.</li>
@@ -207,7 +207,7 @@ public class BotReportTable
}
/**
* Attempts to perform a bot report. R/W to ip and char id registry is synchronized. Triggers bot punish management<br>
* Attempts to perform a bot report. R/W to ip and char id registry is synchronized. Triggers bot punish management
* @param reporter (PlayerInstance who issued the report)
* @return True, if the report was registered, False otherwise
*/
@@ -190,10 +190,10 @@ public class ItemTable
}
/**
* Create the ItemInstance corresponding to the Item Identifier and quantitiy add logs the activity. <B><U> Actions</U> :</B>
* Create the ItemInstance corresponding to the Item Identifier and quantitiy add logs the activity. <b><u>Actions</u>:</b>
* <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 log settings</li>
* <li>Logs Item creation according to log 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
@@ -296,7 +296,8 @@ public class ItemTable
/**
* Destroys the ItemInstance.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Sets ItemInstance parameters to be unusable</li>
* <li>Removes the ItemInstance object to _allObjects of L2world</li>
@@ -38,10 +38,9 @@ public class ItemHandler implements IHandler<IItemHandler, EtcItem>
}
/**
* 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 &lt;String ; IItemHandler &gt; 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 &lt;String ; IItemHandler &gt; for each ID corresponding to an item type (existing in classes of package itemhandlers) sets as key of the Map.
* @param handler (IItemHandler)
*/
@Override
@@ -87,9 +87,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()
{
@@ -97,9 +96,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()
{
@@ -107,9 +105,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()
{
@@ -117,9 +114,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()
{
@@ -127,9 +123,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()
{
@@ -137,9 +132,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()
{
@@ -147,9 +141,8 @@ public class AccessLevel
}
/**
* Retruns if the access level is allowed to use fixed res or not<br>
* <br>
* @return true if the access level is allowed to use fixed res, otherwise false<br>
* Retruns if the access level is allowed to use fixed res or not
* @return true if the access level is allowed to use fixed res, otherwise false
*/
public boolean allowFixedRes()
{
@@ -157,9 +150,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()
{
@@ -167,9 +159,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()
{
@@ -177,9 +168,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()
{
@@ -187,9 +177,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()
{
@@ -197,9 +186,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()
{
@@ -207,9 +195,9 @@ public class AccessLevel
}
/**
* Returns if the access level contains allowedAccess as child<br>
* @param accessLevel as AccessLevel<br>
* @return boolean: true if a child access level is equals to allowedAccess, otherwise false<br>
* Returns if the access level contains allowedAccess as child
* @param accessLevel as AccessLevel
* @return boolean: true if a child access level is equals to allowedAccess, otherwise false
*/
public boolean hasChildAccess(AccessLevel accessLevel)
{
@@ -203,7 +203,7 @@ public class AutoSpawnHandler
/**
* Registers a spawn with the given parameters with the spawner, and marks it as active.<br>
* Returns a AutoSpawnInstance containing info about the spawn.<br>
* <B>Warning:</B> Spawn locations must be specified separately using addSpawnLocation().
* <b>Warning:</b> Spawn locations must be specified separately using addSpawnLocation().
* @param npcId
* @param initialDelay (If < 0 = default value)
* @param respawnDelay (If < 0 = default value)
@@ -120,7 +120,7 @@ public class Party extends AbstractPlayerGroup
}
/**
* Set invitation process flag and store time for expiration. <br>
* Set invitation process flag and store time for expiration.<br>
* Happens when a player joins party or declines to join.
* @param value the pending invitation state to set
*/
@@ -251,8 +251,7 @@ public class Party extends AbstractPlayerGroup
}
/**
* Send a Server->Client packet to all other PlayerInstance of the Party.<BR>
* <BR>
* Send a Server->Client packet to all other PlayerInstance of the Party.
* @param player
* @param msg
*/
@@ -702,12 +701,12 @@ public class Party extends AbstractPlayerGroup
}
/**
* Distribute Experience and SP rewards to PlayerInstance Party members in the known area of the last attacker.<BR>
* <BR>
* <B><U> Actions</U> :</B>
* Distribute Experience and SP rewards to PlayerInstance Party members in the known area of the last attacker.<br>
* <br>
* <b><u>Actions</u>:</b>
* <li>Get the PlayerInstance owner of the ServitorInstance (if necessary)</li>
* <li>Calculate the Experience and SP reward distribution rate</li>
* <li>Add Experience and SP to the PlayerInstance</li><BR>
* <li>Add Experience and SP to the PlayerInstance</li><br>
* @param xpReward The Experience reward to distribute
* @param spReward The SP reward to distribute
* @param rewardedMembers The list of PlayerInstance to reward
@@ -43,7 +43,7 @@ import org.l2jmobius.gameserver.util.Util;
/**
* This class manages the spawn and respawn of a group of NpcInstance that are in the same are and have the same type.<br>
* <B><U>Concept</U>:</B><br>
* <b><u>Concept</u>:</b><br>
* NpcInstance can be spawned either in a random position into a location area (if Lox=0 and Locy=0), either at an exact position.<br>
* The heading of the NpcInstance can be a random heading if not defined (value= -1) or an exact heading (ex : merchant...).
* @author Nightmare
@@ -81,13 +81,16 @@ public class Spawn extends Location implements IIdentifiable, INamable
/**
* Constructor of Spawn.<br>
* <B><U>Concept</U>:</B><br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* Each Spawn owns generic and static properties (ex : RewardExp, RewardSP, AggroRange...).<br>
* All of those properties are stored in a different NpcTemplate for each type of Spawn. Each template is loaded once in the server cache memory (reduce memory use).<br>
* When a new instance of Spawn is created, server just create a link between the instance and the template.<br>
* This link is stored in <B>_template</B> Each NpcInstance is linked to a Spawn that manages its spawn and respawn (delay, location...).<br>
* This link is stored in <B>_spawn</B> of the NpcInstance.<br>
* <B><U> Actions</U>:</B><br>
* This link is stored in <b>_template</b> Each NpcInstance is linked to a Spawn that manages its spawn and respawn (delay, location...).<br>
* This link is stored in <b>_spawn</b> of the NpcInstance.<br>
* <br>
* <b><u>Actions</u>:</b><br>
* <ul>
* <li>Set the _template of the Spawn</li>
* <li>Calculate the implementationName used to generate the generic constructor of NpcInstance managed by this Spawn</li>
@@ -221,11 +224,11 @@ public class Spawn extends Location implements IIdentifiable, INamable
}
/**
* Decrease the current number of NpcInstance of this Spawn and if necessary create a SpawnTask to launch after the respawn Delay. <B><U> Actions</U> :</B>
* Decrease the current number of NpcInstance of this Spawn and if necessary create a SpawnTask to launch after the respawn Delay. <b><u>Actions</u>:</b>
* <li>Decrease the current number of NpcInstance of this Spawn</li>
* <li>Check if respawn is possible to prevent multiple respawning caused by lag</li>
* <li>Update the current number of SpawnTask in progress or stand by of this Spawn</li>
* <li>Create a new SpawnTask to launch after the respawn Delay</li> <FONT COLOR=#FF0000><B> <U>Caution</U> : A respawn is possible ONLY if _doRespawn=True and _scheduledCount + _currentCount < _maximumCount</B></FONT>
* <li>Create a new SpawnTask to launch after the respawn Delay</li> <font color=#FF0000><b><u>Caution</u>: A respawn is possible ONLY if _doRespawn=True and _scheduledCount + _currentCount < _maximumCount</b></font>
* @param oldNpc
*/
public void decreaseCount(Npc oldNpc)
@@ -299,10 +302,13 @@ public class Spawn extends Location implements IIdentifiable, INamable
/**
* Create the NpcInstance, add it to the world and lauch its OnSpawn action.<br>
* <B><U>Concept</U>:</B><br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* NpcInstance can be spawned either in a random position into a location area (if Lox=0 and Locy=0), either at an exact position.<br>
* The heading of the NpcInstance can be a random heading if not defined (value= -1) or an exact heading (ex : merchant...).<br>
* <B><U>Actions for an random spawn into location area</U>:<I> (if Locx=0 and Locy=0)</I></B>
* <br>
* <b><u>Actions for an random spawn into location area</u>:<i> (if Locx=0 and Locy=0)</i></b>
* <ul>
* <li>Get NpcInstance Init parameters and its generate an Identifier</li>
* <li>Call the constructor of the NpcInstance</li>
@@ -128,7 +128,8 @@ public class World
/**
* Adds an object to the world.<br>
* <B><U>Example of use</U>:</B>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>Withdraw an item from the warehouse, create an item</li>
* <li>Spawn a Creature (PC, NPC, Pet)</li>
@@ -168,7 +169,8 @@ public class World
/**
* Removes an object from the world.<br>
* <B><U>Example of use</U>:</B>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>Delete item from inventory, transfer Item from inventory to warehouse</li>
* <li>Crystallize item</li>
@@ -205,7 +207,7 @@ public class World
}
/**
* <B><U> Example of use</U>:</B>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>Client packets : Action, AttackRequest, RequestJoinParty, RequestJoinPledge...</li>
* </ul>
@@ -247,7 +249,7 @@ public class World
}
/**
* <B>If you have access to player objectId use {@link #getPlayer(int playerObjId)}</B>
* <b>If you have access to player objectId use {@link #getPlayer(int playerObjId)}</b>
* @param name Name of the player to get Instance
* @return the player instance corresponding to the given name.
*/
@@ -295,18 +297,18 @@ public class World
}
/**
* Add a WorldObject in the world. <B><U> Concept</U> :</B> 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 <B><U> Actions</U> :</B>
* Add a WorldObject in the world. <b><u>Concept</u>:</b> 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 <b><u> Actions</u>:</b>
* <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> <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> <B><U> Example of use </U> :</B>
* <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> <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> <b><u> Example of use</u>:</b>
* <li>Drop an Item</li>
* <li>Spawn a Creature</li>
* <li>Apply Death Penalty of a PlayerInstance</li>
* <li>Apply Death Penalty of a PlayerInstance</li><br>
* @param object L2object to add in the world
* @param newRegion WorldRegion in wich the object will be add (not used)
*/
@@ -378,16 +380,16 @@ public class World
}
/**
* Remove a WorldObject from the world. <B><U> Concept</U> :</B> 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 <B><U> Actions</U> :</B>
* Remove a WorldObject from the world. <b><u>Concept</u>:</b> 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 <b><u> Actions</u>:</b>
* <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> <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T REMOVE the object from _allObjects of World</B></FONT> <I>* only if object is a PlayerInstance</I><BR>
* <I>** only if object is a GM PlayerInstance</I> <B><U> Example of use </U> :</B>
* <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> <font color=#FF0000><b><u>Caution</u>: This method DOESN'T REMOVE the object from _allObjects of World</b></font> <i>* only if object is a PlayerInstance</i><br>
* <i>** only if object is a GM PlayerInstance</i> <b><u> Example of use</u>:</b>
* <li>Pickup an Item</li>
* <li>Decay a Creature</li>
* <li>Decay a Creature</li><br>
* @param object L2object to remove from the world
* @param oldRegion WorldRegion in which the object was before removing
*/
@@ -686,9 +688,9 @@ public class World
}
/**
* Calculate the current WorldRegions of the object according to its position (x,y). <B><U> Example of use </U> :</B>
* Calculate the current WorldRegions of the object according to its position (x,y). <b><u>Example of use</u>:</b>
* <li>Set position of a new WorldObject (drop, spawn...)</li>
* <li>Update position of a WorldObject after a movement</li><BR>
* <li>Update position of a WorldObject after a movement</li><br>
* @param object the object
* @return
*/
@@ -666,7 +666,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif
/**
* Sets the instance ID of object.<br>
* 0 - Global<br>
* 0 - Global
* @param instanceId the ID of the instance
*/
@Override
@@ -195,8 +195,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
* @param object
*/
public void addVisibleObject(WorldObject object)
@@ -216,7 +216,7 @@ public class WorldRegion
}
/**
* Remove the WorldObject from the WorldObjectHashSet(WorldObject) _visibleObjects in this WorldRegion. 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. If WorldObject is a PlayerInstance, remove it from the WorldObjectHashSet(PlayerInstance) _allPlayable of this WorldRegion
* @param object
*/
public void removeVisibleObject(WorldObject object)
@@ -1027,7 +1027,7 @@ public class Attackable extends Npc
* During a Special Event all Attackable can drop extra Items.<br>
* Those extra Items are defined in the table allNpcDateDrops of the EventDroplist.<br>
* Each Special Event has a start and end date to stop to drop extra Items automatically.<br>
* Actions: <I>If an extra drop must be generated</I><br>
* Actions: <i>If an extra drop must be generated</i><br>
* Get an Item Identifier (random) from the DateDrop Item table of this Event.<br>
* Get the Item quantity dropped (random).<br>
* Create this or these ItemInstance corresponding to this Item Identifier.<br>
@@ -168,7 +168,6 @@ import org.l2jmobius.gameserver.util.Util;
* <li>Trap</li>
* <li>Vehicle</li>
* </ul>
* <br>
* <b>Concept of CreatureTemplate:</b><br>
* Each Creature owns generic and static properties (ex : all Keltir have the same number of HP...).<br>
* All of those properties are stored in a different template for each type of Creature.<br>
@@ -294,11 +293,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Constructor of Creature.<br>
* <B><U>Concept</U>:</B><br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* Each Creature owns generic and static properties (ex : all Keltir have the same number of HP...).<br>
* All of those properties are stored in a different template for each type of Creature. Each template is loaded once in the server cache memory (reduce memory use).<br>
* When a new instance of Creature is spawned, server just create a link between the instance and the template This link is stored in <B>_template</B><br>
* <B><U> Actions</U>:</B>
* When a new instance of Creature is spawned, server just create a link between the instance and the template This link is stored in <b>_template</b><br>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Set the _template of the Creature</li>
* <li>Set _overloaded to false (the character can take more items)</li>
@@ -489,8 +491,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Remove the Creature from the world when the decay task is launched.<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>
* <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>
*/
public void onDecay()
{
@@ -531,8 +533,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Send a packet to the Creature AND to all PlayerInstance in the _KnownPlayers of the Creature.<br>
* <B><U>Concept</U>:</B><br>
* PlayerInstance in the detection area of the Creature are identified in <B>_knownPlayers</B>.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* PlayerInstance in the detection area of the Creature are identified in <b>_knownPlayers</b>.<br>
* In order to inform other players of state modification on the Creature, server just need to go through _knownPlayers to send Server->Client Packet
* @param mov
*/
@@ -549,8 +553,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Send a packet to the Creature AND to all PlayerInstance in the radius (max knownlist radius) from the Creature.<br>
* <B><U>Concept</U>:</B><br>
* PlayerInstance in the detection area of the Creature are identified in <B>_knownPlayers</B>.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* PlayerInstance in the detection area of the Creature are identified in <b>_knownPlayers</b>.<br>
* In order to inform other players of state modification on the Creature, server just need to go through _knownPlayers to send Server->Client Packet
* @param mov
* @param radiusInKnownlist
@@ -601,12 +607,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Send the Server->Client packet StatusUpdate with current HP and MP to all other PlayerInstance to inform.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Create the Server->Client packet StatusUpdate with current HP and MP</li>
* <li>Send the Server->Client packet StatusUpdate with current HP and MP to all Creature called _statusListener that must be informed of HP/MP updates of this Creature</li>
* </ul>
* <FONT COLOR=#FF0000><B><U>Caution</U>: This method DOESN'T SEND CP information</B></FONT>
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND CP information</b></font>
*/
public void broadcastStatusUpdate()
{
@@ -641,7 +648,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Teleport a Creature and its pet if necessary.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Stop the movement of the Creature</li>
* <li>Set the x,y,z position of the WorldObject and if necessary modify its _worldRegion</li>
@@ -834,7 +842,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Launch a physical attack against a target (Simple, Bow, Pole or Dual).<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Get the active weapon (always equipped in the right hand)</li>
* <li>If weapon is a bow, check for arrows, MP and bow re-use delay (if necessary, equip the PlayerInstance with arrows in left hand)</li>
@@ -1104,7 +1113,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Launch a Bow attack.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Calculate if hit is missed or not</li>
* <li>Consume arrows</li>
@@ -1174,7 +1184,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Launch a CrossBow attack.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Calculate if hit is missed or not</li>
* <li>Consume bolts</li>
@@ -1184,7 +1195,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* <li>If the Creature is a PlayerInstance, Send a Server->Client packet SetupGauge</li>
* <li>Create a new hit task with Medium priority</li>
* <li>Calculate and set the disable delay of the crossbow in function of the Attack Speed</li>
* <li>Add this hit to the Server-Client packet Attack</li>
* <li>Add this hit to the Server-Client packet Attack</li><br>
* @param attack Server->Client packet Attack in which the hit will be added
* @param target The Creature targeted
* @param sAtk The Attack Speed of the attacker
@@ -1243,7 +1254,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Launch a Dual attack.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Calculate if hits are missed or not</li>
* <li>If hits aren't missed, calculate if shield defense is efficient</li>
@@ -1314,7 +1326,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Launch a Pole attack.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Get all visible objects in a spherical area near the Creature to obtain possible targets</li>
* <li>If possible target is the Creature targeted, launch a simple attack against it</li>
@@ -1395,7 +1408,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Launch a simple attack.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Calculate if hit is missed or not</li>
* <li>If hit isn't missed, calculate if shield defense is efficient</li>
@@ -1452,7 +1466,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Manage the casting task (casting and interrupt time, re-use delay...) and display the casting bar and animation on client.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Verify the possibility of the the cast : skill is a spell, caster isn't muted...</li>
* <li>Get the list of all targets (ex : area effects) and define the Creature targeted (its stats will be used in calculation)</li>
@@ -2305,7 +2320,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Kill the Creature.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Set target to null and cancel Attack or Cast</li>
* <li>Stop movement</li>
@@ -2924,11 +2940,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Set the template of the Creature.<br>
* <B><U>Concept</U>:</B><br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* Each Creature owns generic and static properties (ex : all Keltir have the same number of HP...).<br>
* All of those properties are stored in a different template for each type of Creature.<br>
* Each template is loaded once in the server cache memory (reduce memory use).<br>
* When a new instance of Creature is spawned, server just create a link between the instance and the template This link is stored in <B>_template</B>.
* When a new instance of Creature is spawned, server just create a link between the instance and the template This link is stored in <b>_template</b>.
* @param template
*/
protected final void setTemplate(CreatureTemplate template)
@@ -3104,7 +3122,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Launch a Stun Abnormal Effect on the Creature.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Calculate the success rate of the Stun Abnormal Effect on this Creature</li>
* <li>If Stun succeed, active the abnormal effect Stun flag, notify the Creature AI and send Server->Client UserInfo/CharInfo packet</li>
@@ -3186,7 +3205,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Stop a specified/all Fake Death abnormal Effect.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Delete a specified/all (if effect=null) Fake Death abnormal Effect from Creature and update client magic icon</li>
* <li>Set the abnormal effect flag _fake_death to False</li>
@@ -3216,7 +3236,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Stop a specified/all Stun abnormal Effect.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Delete a specified/all (if effect=null) Stun abnormal Effect from Creature and update client magic icon</li>
* <li>Set the abnormal effect flag _stuned to False</li>
@@ -3241,7 +3262,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Stop Effect: Transformation.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Remove Transformation Effect</li>
* <li>Notify the Creature AI</li>
@@ -3273,9 +3295,11 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Update active skills in progress (In Use and Not In Use because stacked) icons on client.<br>
* <B><U>Concept</U>:</B><br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* All active skills effects in progress (In Use and Not In Use because stacked) are represented by an icon on the client.<br>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method ONLY UPDATE the client of the player and not clients of all players in the party.</B></FONT>
* <font color=#FF0000><b><u>Caution</u>: This method ONLY UPDATE the client of the player and not clients of all players in the party.</b></font>
*/
public void updateEffectIcons()
{
@@ -3298,7 +3322,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* This class group all movement data.<br>
* <B><U> Data</U> :</B>
* <br>
* <b><u>Data</u>:</b>
* <ul>
* <li>_moveTimestamp : Last time position update</li>
* <li>_xDestination, _yDestination, _zDestination : Position of the destination</li>
@@ -3334,11 +3359,13 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Add a Func to the Calculator set of the Creature.<br>
* <br>
* <b><u>Concept</u>:</b> A Creature owns a table of Calculators called <b>_calculators</b>.<br>
* Each Calculator (a calculator per state) own a table of Func object.<br>
* A Func object is a mathematical function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).<br>
* To reduce cache memory use, NPCInstances who don't have skills share the same Calculator set called <b>NPC_STD_CALCULATOR</b>.<br>
* That's why, if a NPCInstance is under a skill/spell effect that modify one of its state, a copy of the NPC_STD_CALCULATOR must be create in its _calculators before adding new Func object.<br>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>If _calculators is linked to NPC_STD_CALCULATOR, create a copy of NPC_STD_CALCULATOR in _calculators</li>
@@ -3383,12 +3410,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Add a list of Funcs to the Calculator set of the Creature.<br>
* <B><U>Concept</U>:</B><br>
* A Creature owns a table of Calculators called <B>_calculators</B>.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* A Creature owns a table of Calculators called <b>_calculators</b>.<br>
* Each Calculator (a calculator per state) own a table of Func object.<br>
* A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).<br>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method is ONLY for PlayerInstance</B></FONT><br>
* <B><U>Example of use</U>:</B>
* <font color=#FF0000><b><u>Caution</u>: This method is ONLY for PlayerInstance</b></font><br>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>Equip an item from inventory</li>
* <li>Learn a new passive skill</li>
@@ -3409,13 +3439,16 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Remove a Func from the Calculator set of the Creature.<br>
* <B><U>Concept</U>:</B><br>
* A Creature owns a table of Calculators called <B>_calculators</B>.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* A Creature owns a table of Calculators called <b>_calculators</b>.<br>
* Each Calculator (a calculator per state) own a table of Func object.<br>
* A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).<br>
* To reduce cache memory use, NPCInstances who don't have skills share the same Calculator set called <B>NPC_STD_CALCULATOR</B>.<br>
* To reduce cache memory use, NPCInstances who don't have skills share the same Calculator set called <b>NPC_STD_CALCULATOR</b>.<br>
* That's why, if a NPCInstance is under a skill/spell effect that modify one of its state, a copy of the NPC_STD_CALCULATOR must be create in its _calculators before addind new Func object.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Remove the Func object from _calculators</li>
* <li>If Creature is a NPCInstance and _calculators is equal to NPC_STD_CALCULATOR, free cache memory and just create a link on NPC_STD_CALCULATOR in _calculators</li>
@@ -3469,12 +3502,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Remove a list of Funcs from the Calculator set of the PlayerInstance.<br>
* <B><U>Concept</U>:</B><br>
* A Creature owns a table of Calculators called <B>_calculators</B>.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* A Creature owns a table of Calculators called <b>_calculators</b>.<br>
* Each Calculator (a calculator per state) own a table of Func object.<br>
* A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).<br>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method is ONLY for PlayerInstance</B></FONT><br>
* <B><U>Example of use</U>:</B>
* <font color=#FF0000><b><u>Caution</u>: This method is ONLY for PlayerInstance</b></font><br>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>Unequip an item from inventory</li>
* <li>Stop an active skill</li>
@@ -3495,18 +3531,22 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Remove all Func objects with the selected owner from the Calculator set of the Creature.<br>
* <B><U>Concept</U>:</B><br>
* A Creature owns a table of Calculators called <B>_calculators</B>.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* A Creature owns a table of Calculators called <b>_calculators</b>.<br>
* Each Calculator (a calculator per state) own a table of Func object.<br>
* A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).<br>
* To reduce cache memory use, NPCInstances who don't have skills share the same Calculator set called <B>NPC_STD_CALCULATOR</B>.<br>
* To reduce cache memory use, NPCInstances who don't have skills share the same Calculator set called <b>NPC_STD_CALCULATOR</b>.<br>
* That's why, if a NPCInstance is under a skill/spell effect that modify one of its state, a copy of the NPC_STD_CALCULATOR must be create in its _calculators before addind new Func object.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Remove all Func objects of the selected owner from _calculators</li>
* <li>If Creature is a NPCInstance and _calculators is equal to NPC_STD_CALCULATOR, free cache memory and just create a link on NPC_STD_CALCULATOR in _calculators</li>
* </ul>
* <B><U>Example of use</U>:</B>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>Unequip an item from inventory</li>
* <li>Stop an active skill</li>
@@ -3713,7 +3753,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
/**
* @return True if the Creature is travelling a calculated path.
* @return True if the Creature is traveling a calculated path.
*/
public boolean isOnGeodataPath()
{
@@ -3835,16 +3875,18 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Update the position of the Creature during a movement and return True if the movement is finished.<br>
* <B><U>Concept</U>:</B><br>
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <B>_move</B> of the Creature.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
* When the movement is started (ex : by MovetoLocation), this method will be called each 0.1 sec to estimate and update the Creature position on the server.<br>
* Note, that the current server position can differe from the current client position even if each movement is straight foward.<br>
* That's why, client send regularly a Client->Server ValidatePosition packet to eventually correct the gap on the server.<br>
* But, it's always the server position that is used in range calculation. At the end of the estimated movement time,<br>
* the Creature position is automatically set to the destination position even if the movement is not finished.<br>
* <FONT COLOR=#FF0000><B><U>Caution</U>: The current Z position is obtained FROM THE CLIENT by the Client->Server ValidatePosition Packet.<br>
* But x and y positions must be calculated to avoid that players try to modify their movement speed.</B></FONT>
* <font color=#FF0000><b><u>Caution</u>: The current Z position is obtained FROM THE CLIENT by the Client->Server ValidatePosition Packet.<br>
* But x and y positions must be calculated to avoid that players try to modify their movement speed.</b></font>
* @return True if the movement is finished
*/
public boolean updatePosition()
@@ -4012,14 +4054,15 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Stop movement of the Creature (Called by AI Accessor only).<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Delete movement data of the Creature</li>
* <li>Set the current position (x,y,z), its current WorldRegion if necessary and its heading</li>
* <li>Remove the WorldObject object from _gmList of GmListTable</li>
* <li>Remove object from _knownObjects and _knownPlayer of all surrounding WorldRegion Creatures</li>
* </ul>
* <FONT COLOR=#FF0000><B><U>Caution</U>: This method DOESN'T send Server->Client packet StopMove/StopRotation</B></FONT>
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet StopMove/StopRotation</b></font>
* @param loc
*/
public void stopMove(Location loc)
@@ -4056,9 +4099,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Target a WorldObject (add the target to the Creature _target, _knownObject and Creature to _KnownObject of the WorldObject).<br>
* <B><U>Concept</U>:</B><br>
* The WorldObject (including Creature) targeted is identified in <B>_target</B> of the Creature.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* The WorldObject (including Creature) targeted is identified in <b>_target</b> of the Creature.<br>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Set the _target of Creature to WorldObject</li>
* <li>If necessary, add WorldObject to _knownObject of the Creature</li>
@@ -4099,11 +4145,14 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Calculate movement data for a move to location action and add the Creature to movingObjects of GameTimeController (only called by AI Accessor).<br>
* <B><U>Concept</U>:</B><br>
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <B>_move</B> of the Creature.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* At the beginning of the move action, all properties of the movement are stored in the MoveData object called <b>_move</b> of the Creature.<br>
* The position of the start point and of the destination permit to estimated in function of the movement speed the time to achieve the destination.<br>
* All Creature in movement are identified in <B>movingObjects</B> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
* <B><U>Actions</U>:</B>
* All Creature in movement are identified in <b>movingObjects</b> of GameTimeController that will call the updatePosition method of those Creature each 0.1s.<br>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Get current position of the Creature</li>
* <li>Calculate distance (dx,dy) between current position and destination including offset</li>
@@ -4112,8 +4161,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* <li>Add the Creature to movingObjects of the GameTimeController</li>
* <li>Create a task to notify the AI that Creature arrives at a check point of the movement</li>
* </ul>
* <FONT COLOR=#FF0000><B><U>Caution</U>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</B></FONT><br>
* <B><U>Example of use</U>:</B>
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.</b></font><br>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>AI : onIntentionMoveTo(Location), onIntentionPickUp(WorldObject), onIntentionInteract(WorldObject)</li>
* <li>FollowTask</li>
@@ -4517,7 +4567,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
/**
* <B><U> Overridden in </U> :</B>
* <b><u>Overridden in</u>:</b>
* <li>PlayerInstance</li>
* @return True if arrows are available.
*/
@@ -4527,7 +4577,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
/**
* <B><U> Overridden in </U> :</B>
* <b><u>Overridden in</u>:</b>
* <li>PlayerInstance</li>
* @return True if bolts are available.
*/
@@ -4538,9 +4588,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Add Exp and Sp to the Creature.<br>
* <B><U> Overridden in </U> :</B>
* <br>
* <b><u>Overridden in</u>:</b>
* <li>PlayerInstance</li>
* <li>PetInstance</li>
* <li>PetInstance</li><br>
* @param addToExp
* @param addToSp
*/
@@ -4550,36 +4601,37 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
/**
* <B><U> Overridden in </U> :</B>
* <b><u>Overridden in</u>:</b>
* <li>PlayerInstance</li>
* @return the active weapon instance (always equiped in the right hand).
* @return the active weapon instance (always equipped in the right hand).
*/
public abstract ItemInstance getActiveWeaponInstance();
/**
* <B><U> Overridden in </U> :</B>
* <b><u>Overridden in</u>:</b>
* <li>PlayerInstance</li>
* @return the active weapon item (always equiped in the right hand).
* @return the active weapon item (always equipped in the right hand).
*/
public abstract Weapon getActiveWeaponItem();
/**
* <B><U> Overridden in </U> :</B>
* <b><u>Overridden in</u>:</b>
* <li>PlayerInstance</li>
* @return the secondary weapon instance (always equiped in the left hand).
* @return the secondary weapon instance (always equipped in the left hand).
*/
public abstract ItemInstance getSecondaryWeaponInstance();
/**
* <B><U> Overridden in </U> :</B>
* <b><u>Overridden in</u>:</b>
* <li>PlayerInstance</li>
* @return the secondary {@link Item} item (always equiped in the left hand).
* @return the secondary {@link Item} item (always equipped in the left hand).
*/
public abstract Item getSecondaryWeaponItem();
/**
* Manage hit process (called by Hit Task).<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>If the attacker/target is dead or use fake death, notify the AI with EVT_CANCEL and send a Server->Client packet ActionFailed (if attacker is a PlayerInstance)</li>
* <li>If attack isn't aborted, send a message system (critical hit, missed...) to attacker/target if they are PlayerInstance</li>
@@ -4812,8 +4864,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Reduce the arrow number of the Creature.<br>
* <B><U> Overridden in </U> :</B>
* <li>PlayerInstance</li>
* <br>
* <b><u>Overridden in</u>:</b>
* <li>PlayerInstance</li><br>
* @param bolts
*/
protected void reduceArrowCount(boolean bolts)
@@ -4823,7 +4876,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Manage Forced attack (shift + select target).<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>If Creature or target is in a town area, send a system message TARGET_IN_PEACEZONE a Server->Client packet ActionFailed</li>
* <li>If target is confused, send a Server->Client packet ActionFailed</li>
@@ -4996,15 +5050,19 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Add a skill to the Creature _skills and its Func objects to the calculator set of the Creature.<br>
* <B><U>Concept</U>:</B><br>
* All skills own by a Creature are identified in <B>_skills</B><br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* All skills own by a Creature are identified in <b>_skills</b><br>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Replace oldSkill by newSkill or Add the newSkill</li>
* <li>If an old skill has been replaced, remove all its Func objects of Creature calculator set</li>
* <li>Add Func objects of newSkill to the calculator set of the Creature</li>
* </ul>
* <B><U>Overridden in</U>:</B>
* <br>
* <b><u>Overridden in</u>:</b>
* <ul>
* <li>PlayerInstance : Save update in the character_skills table of the database</li>
* </ul>
@@ -5078,8 +5136,9 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
}
/**
* <B><U>Concept</U>:</B><br>
* All skills own by a Creature are identified in <B>_skills</B> the Creature
* <b><u>Concept</u>:</b><br>
* <br>
* All skills own by a Creature are identified in <b>_skills</b> the Creature
* @return all skills own by the Creature in a table of Skill.
*/
public Collection<Skill> getAllSkills()
@@ -5134,7 +5193,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
/**
* Manage the magic skill launching task (MP, HP, Item consumation...) and display the magic skill animation on client.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Send a Server->Client packet MagicSkillLaunched (to display magic skill animation) to all PlayerInstance of Creature _knownPlayers</li>
* <li>Consumme MP, HP and Item if necessary</li>
@@ -5143,7 +5203,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
* <li>If the skill type is PDAM, notify the AI of the target with AI_INTENTION_ATTACK</li>
* <li>Notify the AI of the Creature with EVT_FINISH_CASTING</li>
* </ul>
* <FONT COLOR=#FF0000><B><U>Caution</U>: A magic skill casting MUST BE in progress</B></FONT>
* <font color=#FF0000><b><u>Caution</u>: A magic skill casting MUST BE in progress</b></font>
* @param mut
*/
public void onMagicLaunchedTimer(MagicUseTask mut)
@@ -656,7 +656,8 @@ public class Npc extends Creature
/**
* Open a quest or chat window on client with the text of the NpcInstance in function of the command.<br>
* <B><U> Example of use </U> :</B>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>Client packet : RequestBypassToServer</li>
* </ul>
@@ -770,11 +771,11 @@ public class Npc extends Creature
}
/**
* <B><U Format of the pathfile</U>:</B>
* <b><U Format of the pathfile</u>:</b>
* <ul>
* <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>
* <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>
* </ul>
* @param npcId The Identifier of the NpcInstance whose text must be display
* @param value The number of the page to display
@@ -835,7 +836,8 @@ public class Npc extends Creature
/**
* Open a chat window on client with the text of the NpcInstance.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -1144,7 +1146,8 @@ public class Npc extends Creature
/**
* Kill the NpcInstance (the corpse disappeared after 7 seconds).<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
@@ -1282,14 +1285,15 @@ public class Npc extends Creature
/**
* Remove the NpcInstance from the world and update its spawn object (for a complete removal use the deleteMe method).<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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>
* </ul>
* <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>
* <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()
@@ -1325,13 +1329,14 @@ public class Npc extends Creature
/**
* Remove PROPERLY the NpcInstance from the world.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <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 Attack or Cast and notify AI</li>
* <li>Remove WorldObject object from _allObjects of World</li>
* </ul>
* <FONT COLOR=#FF0000><B><U>Caution</U>: This method DOESN'T SEND Server->Client packets to players</B></FONT><br>
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font><br>
* UnAfraid: TODO: Add Listener here
*/
@Override
@@ -546,7 +546,8 @@ public abstract class Summon extends Playable
/**
* Check if the active Skill can be casted.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Check if the target is correct</li>
* <li>Check if the target is in the skill cast range</li>
@@ -95,10 +95,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>
* <B><U> Format of the pathfile </U> :</B>
* <br>
* <b><u>Format of the pathfile</u>:</b>
* <ul>
* <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>
* <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>
* </ul>
* @param npcId The Identifier of the NpcInstance whose text must be display
* @param value The number of the page to display
@@ -120,19 +121,22 @@ public class GuardInstance extends Attackable
/**
* Manage actions when a player click on the GuardInstance.<br>
* <B><U> Actions on first click on the GuardInstance (Select it)</U> :</B>
* <br>
* <b><u>Actions on first click on the GuardInstance (Select it)</u>:</b>
* <ul>
* <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>
* </ul>
* <B><U> Actions on second click on the GuardInstance (Attack it/Interact with it)</U> :</B>
* <br>
* <b><u>Actions on second click on the GuardInstance (Attack it/Interact with it)</u>:</b>
* <ul>
* <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>
* </ul>
* <B><U> Example of use </U> :</B>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>Client packet : Action, AttackRequest</li>
* </ul>
@@ -150,7 +150,7 @@ public class PetInstance extends Summon
}
/**
* Manage Feeding Task.<BR>
* Manage Feeding Task.<br>
* Feed or kill the pet depending on hunger level.<br>
* If pet has food in inventory and feed level drops below 55% then consume food from inventory.<br>
* Send a broadcastStatusUpdate packet for this PetInstance
@@ -395,7 +395,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
@@ -1106,8 +1106,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
*/
public void restoreExp(double restorePercent)
@@ -930,7 +930,8 @@ public class PlayerInstance extends Playable
/**
* Create a new PlayerInstance and add it in the characters table of the database.<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Create a new PlayerInstance with an account name</li>
* <li>Set the name, the Hair Style, the Hair Color and the Face type of the PlayerInstance</li>
@@ -1104,7 +1105,8 @@ public class PlayerInstance extends Playable
/**
* Retrieve a PlayerInstance from the characters table of the database and add it in _allObjects of the L2world (call restore method).<br>
* <B><U> Actions</U> :</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Retrieve the PlayerInstance from the characters table of the database</li>
* <li>Add the PlayerInstance object in _allObjects</li>
@@ -2618,7 +2620,7 @@ public class PlayerInstance extends Playable
}
/**
* Re-give all skills which aren't saved to database, like Noble, Hero, Clan Skills.<br>
* Re-give all skills which aren't saved to database, like Noble, Hero, Clan Skills.
*/
public void regiveTemporarySkills()
{
@@ -3532,7 +3534,7 @@ public class PlayerInstance extends Playable
}
/**
* 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
@@ -3803,7 +3805,7 @@ public class PlayerInstance extends Playable
}
/**
* Drop item from inventory by using its <B>objectID</B> and send a Server->Client InventoryUpdate packet to the PlayerInstance.
* Drop item from inventory by using its <b>objectID</b> and send a Server->Client InventoryUpdate packet to the PlayerInstance.
* @param process : String Identifier of process triggering this action
* @param objectId : int Item Instance identifier of the item to be dropped
* @param count : long Quantity of items to be dropped
@@ -4105,9 +4107,9 @@ public class PlayerInstance extends Playable
}
/**
* Send packet StatusUpdate with current HP,MP and CP to the PlayerInstance and only current HP, MP and Level to all other PlayerInstance of the Party. <B><U> Actions</U> :</B>
* <li>Send the Server->Client packet StatusUpdate with current HP, MP and CP to this PlayerInstance</li><BR>
* <li>Send the Server->Client packet PartySmallWindowUpdate with current HP, MP and Level to all other PlayerInstance of the Party</li> <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND current HP and MP to all PlayerInstance of the _statusListener</B></FONT>
* Send packet StatusUpdate with current HP,MP and CP to the PlayerInstance and only current HP, MP and Level to all other PlayerInstance of the Party. <b><u>Actions</u>:</b>
* <li>Send the Server->Client packet StatusUpdate with current HP, MP and CP to this PlayerInstance</li>
* <li>Send the Server->Client packet PartySmallWindowUpdate with current HP, MP and Level to all other PlayerInstance of the Party</li> <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND current HP and MP to all PlayerInstance of the _statusListener</b></font>
*/
@Override
public void broadcastStatusUpdate()
@@ -4174,11 +4176,11 @@ public class PlayerInstance extends Playable
}
/**
* Send a Server->Client packet UserInfo to this PlayerInstance and CharInfo to all PlayerInstance in its _KnownPlayers. <B><U> Concept</U> :</B> Others PlayerInstance in the detection area of the PlayerInstance are identified in <B>_knownPlayers</B>. In order to inform other players of this
* PlayerInstance state modifications, server just need to go through _knownPlayers to send Server->Client Packet <B><U> Actions</U> :</B>
* Send a Server->Client packet UserInfo to this PlayerInstance and CharInfo to all PlayerInstance in its _KnownPlayers. <b><u>Concept</u>:</b> Others PlayerInstance in the detection area of the PlayerInstance are identified in <b>_knownPlayers</b>. In order to inform other players of this
* PlayerInstance state modifications, server just need to go through _knownPlayers to send Server->Client Packet <b><u> Actions</u>:</b>
* <li>Send a Server->Client packet UserInfo to this PlayerInstance (Public and Private Data)</li>
* <li>Send a Server->Client packet CharInfo to all PlayerInstance in _KnownPlayers of the PlayerInstance (Public data only)</li> <FONT COLOR=#FF0000><B> <U>Caution</U> : DON'T SEND UserInfo packet to other players instead of CharInfo packet. Indeed, UserInfo packet contains PRIVATE DATA as
* MaxHP, STR, DEX...</B></FONT>
* <li>Send a Server->Client packet CharInfo to all PlayerInstance in _KnownPlayers of the PlayerInstance (Public data only)</li> <font color=#FF0000><b><u>Caution</u>: DON'T SEND UserInfo packet to other players instead of CharInfo packet. Indeed, UserInfo packet contains PRIVATE DATA as MaxHP,
* STR, DEX...</b></font>
*/
public void broadcastUserInfo()
{
@@ -4326,10 +4328,10 @@ public class PlayerInstance extends Playable
}
/**
* Manage Interact Task with another PlayerInstance. <B><U> Actions</U> :</B>
* Manage Interact Task with another PlayerInstance. <b><u>Actions</u>:</b>
* <li>If the private store is a STORE_PRIVATE_SELL, send a Server->Client PrivateBuyListSell packet to the PlayerInstance</li>
* <li>If the private store is a STORE_PRIVATE_BUY, send a Server->Client PrivateBuyListBuy packet to the PlayerInstance</li>
* <li>If the private store is a STORE_PRIVATE_MANUFACTURE, send a Server->Client RecipeShopSellList packet to the PlayerInstance</li>
* <li>If the private store is a STORE_PRIVATE_MANUFACTURE, send a Server->Client RecipeShopSellList packet to the PlayerInstance</li><br>
* @param target The Creature targeted
*/
public void doInteract(Creature target)
@@ -4371,7 +4373,7 @@ public class PlayerInstance extends Playable
* <li>Send a Server->Client packet InventoryUpdate to this player with NewItem (use a new slot) or ModifiedItem (increase amount).</li>
* <li>Send a Server->Client packet StatusUpdate to this player with current weight.</li>
* </ul>
* <font color=#FF0000><B><U>Caution</U>: If a party is in progress, distribute the items between the party members!</b></font>
* <font color=#FF0000><b><u>Caution</u>: If a party is in progress, distribute the items between the party members!</b></font>
* @param target the NPC dropping the item
* @param itemId the item ID
* @param itemCount the item count
@@ -4403,13 +4405,13 @@ public class PlayerInstance extends Playable
}
/**
* Manage Pickup Task. <B><U> Actions</U> :</B>
* Manage Pickup Task. <b><u>Actions</u>:</b>
* <li>Send a Server->Client packet StopMove to this PlayerInstance</li>
* <li>Remove the ItemInstance from the world and send server->client GetItem packets</li>
* <li>Send a System Message to the PlayerInstance : YOU_PICKED_UP_S1_ADENA or YOU_PICKED_UP_S1_S2</li>
* <li>Add the Item to the PlayerInstance inventory</li>
* <li>Send a Server->Client packet InventoryUpdate to this PlayerInstance with NewItem (use a new slot) or ModifiedItem (increase amount)</li>
* <li>Send a Server->Client packet StatusUpdate to this PlayerInstance with current weight</li> <FONT COLOR=#FF0000><B> <U>Caution</U> : If a Party is in progress, distribute Items between party members</B></FONT>
* <li>Send a Server->Client packet StatusUpdate to this PlayerInstance with current weight</li> <font color=#FF0000><b><u>Caution</u>: If a Party is in progress, distribute Items between party members</b></font>
* @param object The ItemInstance to pick up
*/
@Override
@@ -4793,7 +4795,7 @@ public class PlayerInstance extends Playable
}
/**
* Set a target. <B><U> Actions</U> :</B>
* Set a target. <b><u>Actions</u>:</b>
* <ul>
* <li>Remove the PlayerInstance from the _statusListener of the old target if it was a Creature</li>
* <li>Add the PlayerInstance to the _statusListener of the new target if it's a Creature</li>
@@ -4882,7 +4884,7 @@ public class PlayerInstance extends Playable
}
/**
* Return the active weapon instance (always equiped in the right hand).
* Return the active weapon instance (always equipped in the right hand).
*/
@Override
public ItemInstance getActiveWeaponInstance()
@@ -4891,7 +4893,7 @@ public class PlayerInstance extends Playable
}
/**
* Return the active weapon item (always equiped in the right hand).
* Return the active weapon item (always equipped in the right hand).
*/
@Override
public Weapon getActiveWeaponItem()
@@ -5057,7 +5059,7 @@ public class PlayerInstance extends Playable
}
/**
* Return the secondary weapon instance (always equiped in the left hand).
* Return the secondary weapon instance (always equipped in the left hand).
*/
@Override
public ItemInstance getSecondaryWeaponInstance()
@@ -5066,8 +5068,8 @@ public class PlayerInstance extends Playable
}
/**
* Return the secondary Item item (always equiped in the left hand).<BR>
* Arrows, Shield..<BR>
* Return the secondary Item item (always equipped in the left hand).<br>
* Arrows, Shield..
*/
@Override
public Item getSecondaryWeaponItem()
@@ -5077,12 +5079,12 @@ public class PlayerInstance extends Playable
}
/**
* Kill the Creature, Apply Death Penalty, Manage gain/loss Karma and Item Drop. <B><U> Actions</U> :</B>
* Kill the Creature, Apply Death Penalty, Manage gain/loss Karma and Item Drop. <b><u>Actions</u>:</b>
* <li>Reduce the Experience of the PlayerInstance in function of the calculated Death Penalty</li>
* <li>If necessary, unsummon the Pet of the killed PlayerInstance</li>
* <li>Manage Karma gain for attacker and Karam loss for the killed PlayerInstance</li>
* <li>If the killed PlayerInstance has Karma, manage Drop Item</li>
* <li>Kill the PlayerInstance</li>
* <li>Kill the PlayerInstance</li><br>
* @param killer
*/
@Override
@@ -5624,12 +5626,13 @@ public class PlayerInstance extends Playable
}
/**
* Reduce the Experience (and level if necessary) of the PlayerInstance in function of the calculated Death Penalty.<BR>
* <B><U> Actions</U> :</B>
* Reduce the Experience (and level if necessary) of the PlayerInstance in function of the calculated Death Penalty.<br>
* <br>
* <b><u>Actions</u>:</b>
* <li>Calculate the Experience loss</li>
* <li>Set the value of _expBeforeDeath</li>
* <li>Set the new Experience value of the PlayerInstance and Decrease its level if necessary</li>
* <li>Send a Server->Client StatusUpdate packet with its new Experience</li>
* <li>Send a Server->Client StatusUpdate packet with its new Experience</li><br>
* @param killer
* @param atWar
*/
@@ -5703,7 +5706,7 @@ public class PlayerInstance extends Playable
}
/**
* Stop the HP/MP/CP Regeneration task. <B><U> Actions</U> :</B>
* Stop the HP/MP/CP Regeneration task. <b><u>Actions</u>:</b>
* <li>Set the RegenActive flag to False</li>
* <li>Stop the HP/MP/CP Regeneration task</li>
*/
@@ -6028,13 +6031,13 @@ public class PlayerInstance extends Playable
}
/**
* Set the Private Store type of the PlayerInstance. <B><U> Values </U> :</B>
* Set the Private Store type of the PlayerInstance. <b><u>Values</u>:</b>
* <li>0 : STORE_PRIVATE_NONE</li>
* <li>1 : STORE_PRIVATE_SELL</li>
* <li>2 : sellmanage</li><BR>
* <li>3 : STORE_PRIVATE_BUY</li><BR>
* <li>4 : buymanage</li><BR>
* <li>5 : STORE_PRIVATE_MANUFACTURE</li><BR>
* <li>2 : sellmanage</li>
* <li>3 : STORE_PRIVATE_BUY</li>
* <li>4 : buymanage</li>
* <li>5 : STORE_PRIVATE_MANUFACTURE</li><br>
* @param privateStoreType
*/
public void setPrivateStoreType(PrivateStoreType privateStoreType)
@@ -6047,13 +6050,13 @@ public class PlayerInstance extends Playable
}
/**
* <B><U> Values </U> :</B>
* <b><u>Values</u>:</b>
* <li>0 : STORE_PRIVATE_NONE</li>
* <li>1 : STORE_PRIVATE_SELL</li>
* <li>2 : sellmanage</li><BR>
* <li>3 : STORE_PRIVATE_BUY</li><BR>
* <li>4 : buymanage</li><BR>
* <li>5 : STORE_PRIVATE_MANUFACTURE</li><BR>
* <li>2 : sellmanage</li>
* <li>3 : STORE_PRIVATE_BUY</li>
* <li>4 : buymanage</li>
* <li>5 : STORE_PRIVATE_MANUFACTURE</li>
* @return the Private Store type of the PlayerInstance.
*/
public PrivateStoreType getPrivateStoreType()
@@ -6183,7 +6186,7 @@ public class PlayerInstance extends Playable
@Override
protected boolean checkAndEquipArrows()
{
// Check if nothing is equiped in left hand
// Check if nothing is equipped in left hand
if (_inventory.getPaperdollItem(Inventory.PAPERDOLL_LHAND) == null)
{
// Get the ItemInstance of the arrows needed for this bow
@@ -6199,7 +6202,7 @@ public class PlayerInstance extends Playable
}
else
{
// Get the ItemInstance of arrows equiped in left hand
// Get the ItemInstance of arrows equipped in left hand
_arrowItem = _inventory.getPaperdollItem(Inventory.PAPERDOLL_LHAND);
}
return _arrowItem != null;
@@ -6211,7 +6214,7 @@ public class PlayerInstance extends Playable
@Override
protected boolean checkAndEquipBolts()
{
// Check if nothing is equiped in left hand
// Check if nothing is equipped in left hand
if (_inventory.getPaperdollItem(Inventory.PAPERDOLL_LHAND) == null)
{
// Get the ItemInstance of the arrows needed for this bow
@@ -6227,7 +6230,7 @@ public class PlayerInstance extends Playable
}
else
{
// Get the ItemInstance of arrows equiped in left hand
// Get the ItemInstance of arrows equipped in left hand
_boltItem = _inventory.getPaperdollItem(Inventory.PAPERDOLL_LHAND);
}
return _boltItem != null;
@@ -6829,11 +6832,11 @@ public class PlayerInstance extends Playable
}
/**
* Retrieve a PlayerInstance from the characters table of the database and add it in _allObjects of the L2world. <B><U> Actions</U> :</B>
* Retrieve a PlayerInstance from the characters table of the database and add it in _allObjects of the L2world. <b><u>Actions</u>:</b>
* <li>Retrieve the PlayerInstance from the characters table of the database</li>
* <li>Add the PlayerInstance object in _allObjects</li>
* <li>Set the x,y,z position of the PlayerInstance and make it invisible</li>
* <li>Update the overloaded status of the PlayerInstance</li>
* <li>Update the overloaded status of the PlayerInstance</li><br>
* @param objectId Identifier of the object to initialized
* @return The PlayerInstance loaded from the database
*/
@@ -7690,10 +7693,10 @@ public class PlayerInstance extends Playable
}
/**
* Add a skill to the PlayerInstance _skills and its Func objects to the calculator set of the PlayerInstance and save update in the character_skills table of the database. <B><U> Concept</U> :</B> All skills own by a PlayerInstance are identified in <B>_skills</B> <B><U> Actions</U> :</B>
* Add a skill to the PlayerInstance _skills and its Func objects to the calculator set of the PlayerInstance and save update in the character_skills table of the database. <b><u>Concept</u>:</b> All skills own by a PlayerInstance are identified in <b>_skills</b> <b><u> Actions</u>:</b>
* <li>Replace oldSkill by newSkill or Add the newSkill</li>
* <li>If an old skill has been replaced, remove all its Func objects of Creature calculator set</li>
* <li>Add Func objects of newSkill to the calculator set of the Creature</li>
* <li>Add Func objects of newSkill to the calculator set of the Creature</li><br>
* @param newSkill The Skill to add to the Creature
* @param store
* @return The Skill replaced or null if just added a new Skill
@@ -7724,10 +7727,10 @@ public class PlayerInstance extends Playable
}
/**
* Remove a skill from the Creature and its Func objects from calculator set of the Creature and save update in the character_skills table of the database. <B><U> Concept</U> :</B> All skills own by a Creature are identified in <B>_skills</B> <B><U> Actions</U> :</B>
* Remove a skill from the Creature and its Func objects from calculator set of the Creature and save update in the character_skills table of the database. <b><u>Concept</u>:</b> All skills own by a Creature are identified in <b>_skills</b> <b><u> Actions</u>:</b>
* <li>Remove the skill from the Creature _skills</li>
* <li>Remove all its Func objects from the Creature calculator set</li> <B><U> Overridden in </U> :</B>
* <li>PlayerInstance : Save update in the character_skills table of the database</li>
* <li>Remove all its Func objects from the Creature calculator set</li> <b><u> Overridden in</u>:</b>
* <li>PlayerInstance : Save update in the character_skills table of the database</li><br>
* @param skill The Skill to remove from the Creature
* @return The Skill removed
*/
@@ -8381,7 +8384,8 @@ public class PlayerInstance extends Playable
/**
* Return True if the PlayerInstance is autoAttackable.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Check if the attacker isn't the PlayerInstance Pet</li>
* <li>Check if the attacker is MonsterInstance</li>
@@ -8532,7 +8536,8 @@ public class PlayerInstance extends Playable
/**
* Check if the active Skill can be casted.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Check if the skill isn't toggle and is offensive</li>
* <li>Check if the target is in the skill cast range</li>
@@ -9237,15 +9242,18 @@ public class PlayerInstance extends Playable
/**
* Send a Server->Client packet UserInfo to this PlayerInstance and CharInfo to all PlayerInstance in its _KnownPlayers.<br>
* <B><U>Concept</U>:</B><br>
* Others PlayerInstance in the detection area of the PlayerInstance are identified in <B>_knownPlayers</B>.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* Others PlayerInstance in the detection area of the PlayerInstance are identified in <b>_knownPlayers</b>.<br>
* In order to inform other players of this PlayerInstance state modifications, server just need to go through _knownPlayers to send Server->Client Packet<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Send a Server->Client packet UserInfo to this PlayerInstance (Public and Private Data)</li>
* <li>Send a Server->Client packet CharInfo to all PlayerInstance in _KnownPlayers of the PlayerInstance (Public data only)</li>
* </ul>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : DON'T SEND UserInfo packet to other players instead of CharInfo packet. Indeed, UserInfo packet contains PRIVATE DATA as MaxHP, STR, DEX...</B></FONT>
* <font color=#FF0000><b><u>Caution</u>: DON'T SEND UserInfo packet to other players instead of CharInfo packet. Indeed, UserInfo packet contains PRIVATE DATA as MaxHP, STR, DEX...</b></font>
*/
@Override
public void updateAbnormalEffect()
@@ -10068,7 +10076,7 @@ public class PlayerInstance extends Playable
}
/**
* 1. Add the specified class ID as a subclass (up to the maximum number of <b>three</b>) for this character.<BR>
* 1. Add the specified class ID as a subclass (up to the maximum number of <b>three</b>) for this character.<br>
* 2. This method no longer changes the active _classIndex of the player. This is only done by the calling of setActiveClass() method as that should be the only way to do so.
* @param classId
* @param classIndex
@@ -11159,7 +11167,8 @@ public class PlayerInstance extends Playable
/**
* Manage the delete task of a PlayerInstance (Leave Party, Unsummon pet, Save its inventory in the database, Remove it from the world...).<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>If the PlayerInstance is in observer mode, set its position to its position before entering in observer mode</li>
* <li>Set the online Flag to True or False and update the characters table of the database with online status and lastAccess</li>
@@ -153,7 +153,8 @@ public class StaticObjectInstance extends Creature
/**
* Set the meshIndex of the object.<br>
* <B><U> Values </U> :</B>
* <br>
* <b><u>Values</u>:</b>
* <ul>
* <li>default textures : 0</li>
* <li>alternate textures : 1</li>
@@ -167,7 +168,7 @@ public class StaticObjectInstance extends Creature
}
/**
* <B><U> Values </U> :</B>
* <b><u>Values</u>:</b>
* <ul>
* <li>default textures : 0</li>
* <li>alternate textures : 1</li>
@@ -63,12 +63,14 @@ public class CreatureStat
}
/**
* Calculate the new value of the state with modifiers that will be applied on the targeted Creature.<BR>
* <B><U> Concept</U> :</B><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 mathematical function is called according to its priority <B>_order</B>.<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>
* 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 mathematical function is called according to its priority <b>_order</b>.<br>
* Indeed, Func with lowest priority order is executed firsta and Funcs with the same order are executed in unspecified order.<br>
* The result of the calculation is stored in the value property of an Env class instance.<br>
* 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 initVal The initial value of the stat before applying modifiers
* @param target The Creature whose properties will be used in the calculation (ex : CON, INT...)
@@ -270,7 +272,8 @@ public class CreatureStat
/**
* Return the MAtk (base+modifier) of the Creature.<br>
* <B><U>Example of use</U>: Calculate Magic damage
* <br>
* <b><u>Example of use</u>: Calculate Magic damage
* @param target The Creature targeted by the skill
* @param skill The Skill used against the target
* @return
@@ -327,7 +330,7 @@ public class CreatureStat
}
/**
* <B><U>Example of use </U>: Calculate Magic damage.
* <b><u>Example of use </u>: Calculate Magic damage.
* @param target The Creature targeted by the skill
* @param skill The Skill used against the target
* @return the MDef (base+modifier) of the Creature against a skill in function of abnormal effects in progress.
@@ -54,11 +54,14 @@ public class CreatureStatus
/**
* Add the object to the list of Creature that must be informed of HP/MP updates of this Creature.<br>
* <B><U>Concept</U>:</B><br>
* Each Creature owns a list called <B>_statusListener</B> that contains all PlayerInstance to inform of HP/MP updates.<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.<br>
* Players who must be informed are players that target this Creature.<br>
* When a RegenTask is in progress sever just need to go through this list to send Server->Client packet StatusUpdate.<br>
* <B><U>Example of use</U>:</B>
* <br>
* <b><u>Example of use</u>:</b>
* <ul>
* <li>Target a PC or NPC</li>
* <ul>
@@ -76,11 +79,14 @@ public class CreatureStatus
/**
* Remove the object from the list of Creature that must be informed of HP/MP updates of this Creature.<br>
* <B><U>Concept</U>:</B><br>
* Each Creature owns a list called <B>_statusListener</B> that contains all PlayerInstance to inform of HP/MP updates.<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.<br>
* Players who must be informed are players that target this Creature.<br>
* When a RegenTask is in progress sever just need to go through this list to send Server->Client packet StatusUpdate.<br>
* <B><U>Example of use </U>:</B>
* <br>
* <b><u>Example of use </u>:</b>
* <ul>
* <li>Untarget a PC or NPC</li>
* </ul>
@@ -93,8 +99,10 @@ public class CreatureStatus
/**
* Return the list of Creature that must be informed of HP/MP updates of this Creature.<br>
* <B><U>Concept</U>:</B><br>
* Each Creature owns a list called <B>_statusListener</B> that contains all PlayerInstance to inform of HP/MP updates.<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.<br>
* Players who must be informed are players that target this Creature.<br>
* 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
@@ -180,7 +188,8 @@ public class CreatureStatus
/**
* Start the HP/MP/CP Regeneration task.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Calculate the regen task period</li>
* <li>Launch the HP/MP/CP Regeneration task with Medium priority</li>
@@ -200,7 +209,8 @@ public class CreatureStatus
/**
* Stop the HP/MP/CP Regeneration task.<br>
* <B><U>Actions</U>:</B>
* <br>
* <b><u>Actions</u>:</b>
* <ul>
* <li>Set the RegenActive flag to False</li>
* <li>Stop the HP/MP/CP Regeneration task</li>
@@ -20,7 +20,7 @@ import org.l2jmobius.gameserver.model.actor.Creature;
/**
* Task launching the function onHitTimer().<br>
* <B><U>Actions</U>:</B>
* <b><u>Actions</u>:</b>
* <ul>
* <li>If the attacker/target is dead or use fake death, notify the AI with EVT_CANCEL and send a Server->Client packet ActionFailed (if attacker is a PlayerInstance)</li>
* <li>If attack isn't aborted, send a message system (critical hit, missed...) to attacker/target if they are PlayerInstance</li>
@@ -20,7 +20,7 @@ import org.l2jmobius.Config;
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
/**
* Character Sub-Class Definition <BR>
* Character Sub-Class Definition<br>
* Used to store key information about a character's sub-class.
* @author Tempy
*/
@@ -159,7 +159,7 @@ public abstract class AbstractEffect
/**
* Calculates whether this effects land or not.<br>
* If it lands will be scheduled and added to the character effect list.<br>
* Override in effect implementation to change behavior. <br>
* Override in effect implementation to change behavior.<br>
* <b>Warning:</b> Must be used only for instant effects continuous effects will not call this they have their success handled by activate_rate.
* @param info the buff info
* @return {@code true} if this effect land, {@code false} otherwise
@@ -170,7 +170,7 @@ public abstract class AbstractEffect
}
/**
* Get this effect's type.<br>
* Get this effect's type.
* @return the effect type
*/
public EffectType getEffectType()
@@ -597,8 +597,7 @@ public class Castle extends AbstractResidence
}
/**
* Respawn all doors on castle grounds<BR>
* <BR>
* Respawn all doors on castle grounds
* @param isDoorWeak
*/
public void spawnDoor(boolean isDoorWeak)
@@ -273,8 +273,7 @@ public class Fort extends AbstractResidence
}
/**
* 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()
{
@@ -516,8 +515,7 @@ public class Fort extends AbstractResidence
}
/**
* Respawn all doors on fort grounds<BR>
* <BR>
* Respawn all doors on fort grounds.
*/
public void resetDoors()
{
@@ -968,11 +966,10 @@ public class Fort extends AbstractResidence
}
/**
* @return Returns state of fortress.<BR>
* <BR>
* 0 - not decided yet<BR>
* 1 - independent<BR>
* 2 - contracted with castle<BR>
* @return Returns state of fortress.<br>
* 0 - not decided yet<br>
* 1 - independent<br>
* 2 - contracted with castle
*/
public int getFortState()
{
@@ -690,14 +690,14 @@ public class FortSiege implements Siegable
}
/**
* Register clan as attacker.<BR>
* Register clan as attacker.
* @param player The PlayerInstance of the player trying to register.
* @param checkConditions True if should be checked conditions, false otherwise
* @return Number that defines what happened. <BR>
* 0 - Player don't have clan.<BR>
* 1 - Player don't have enough adena to register.<BR>
* 2 - Is not right time to register Fortress now.<BR>
* 3 - Players clan is already registered to siege.<BR>
* @return Number that defines what happened.<br>
* 0 - Player don't have clan.<br>
* 1 - Player don't have enough adena to register.<br>
* 2 - Is not right time to register Fortress now.<br>
* 3 - Players clan is already registered to siege.<br>
* 4 - Players clan is successfully registered to siege.
*/
public int addAttacker(PlayerInstance player, boolean checkConditions)
@@ -865,7 +865,7 @@ public class Hero
}
/**
* Saving task for {@link Hero}<BR>
* Saving task for {@link Hero}<br>
* Save all hero messages to DB.
*/
public void shutdown()
@@ -374,8 +374,7 @@ public class Siege implements Siegable
}
/**
* When control of castle changed during siege<BR>
* <BR>
* When control of castle changed during siege.
*/
public void midVictory()
{
@@ -461,8 +460,7 @@ public class Siege implements Siegable
}
/**
* When siege starts<BR>
* <BR>
* When siege starts.
*/
@Override
public void startSiege()
@@ -520,8 +518,7 @@ public class Siege implements Siegable
}
/**
* Announce to player.<BR>
* <BR>
* Announce to player.
* @param message The SystemMessage to send to player
* @param bothSides True - broadcast to both attackers and defenders. False - only to defenders.
*/
@@ -648,8 +645,7 @@ public class Siege implements Siegable
}
/**
* 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)
@@ -683,8 +679,7 @@ public class Siege implements Siegable
}
/**
* Return true if clan is attacker<BR>
* <BR>
* Return true if clan is attacker
* @param clan The Clan of the player
*/
@Override
@@ -694,8 +689,7 @@ public class Siege implements Siegable
}
/**
* Return true if clan is defender<BR>
* <BR>
* Return true if clan is defender
* @param clan The Clan of the player
*/
@Override
@@ -873,8 +867,7 @@ public class Siege implements Siegable
}
/**
* 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)
@@ -951,8 +944,7 @@ public class Siege implements Siegable
}
/**
* Remove clan from siege<BR>
* <BR>
* Remove clan from siege
* @param clanId The int of player's clan id
*/
public void removeSiegeClan(int clanId)
@@ -978,8 +970,7 @@ public class Siege implements Siegable
}
/**
* Remove clan from siege<BR>
* <BR>
* Remove clan from siege
* @param clan clan being removed
*/
public void removeSiegeClan(Clan clan)
@@ -992,8 +983,7 @@ public class Siege implements Siegable
}
/**
* Remove clan from siege<BR>
* <BR>
* Remove clan from siege
* @param player The PlayerInstance of player/clan being removed
*/
public void removeSiegeClan(PlayerInstance player)
@@ -1002,8 +992,7 @@ public class Siege implements Siegable
}
/**
* Start the auto tasks<BR>
* <BR>
* Start the auto tasks.
*/
public void startAutoTask()
{
@@ -1076,8 +1065,7 @@ public class Siege implements Siegable
}
/**
* Add clan as attacker<BR>
* <BR>
* Add clan as attacker
* @param clanId The int of clan's id
*/
private void addAttacker(int clanId)
@@ -1086,8 +1074,7 @@ public class Siege implements Siegable
}
/**
* Add clan as defender<BR>
* <BR>
* Add clan as defender
* @param clanId The int of clan's id
*/
private void addDefender(int clanId)
@@ -1108,8 +1095,7 @@ public class Siege implements Siegable
}
/**
* 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)
@@ -1201,8 +1187,7 @@ public class Siege implements Siegable
}
/**
* Return the correct siege date as Calendar.<BR>
* <BR>
* Return the correct siege date as Calendar.
*/
public void correctSiegeDateTime()
{
@@ -1351,8 +1336,7 @@ public class Siege implements Siegable
}
/**
* 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
@@ -1497,8 +1481,7 @@ public class Siege implements Siegable
}
/**
* Spawn siege guard.<BR>
* <BR>
* Spawn siege guard.
*/
private void spawnSiegeGuard()
{
@@ -86,7 +86,7 @@ public class TvTEvent
}
/**
* Teams initializing<br>
* Teams initializing
*/
public static void init()
{
@@ -98,9 +98,8 @@ public class TvTEvent
/**
* Starts the participation of the TvTEvent<br>
* 1. Get NpcTemplate by Config.TVT_EVENT_PARTICIPATION_NPC_ID<br>
* 2. Try to spawn a new npc of it<br>
* <br>
* @return boolean: true if success, otherwise false<br>
* 2. Try to spawn a new npc of it
* @return boolean: true if success, otherwise false
*/
public static boolean startParticipation()
{
@@ -154,9 +153,8 @@ public class TvTEvent
* 2. Close doors specified in configs<br>
* 3. Abort if not enough participants(return false)<br>
* 4. Set state EventState.STARTED<br>
* 5. Teleport all participants to team spot<br>
* <br>
* @return boolean: true if success, otherwise false<br>
* 5. Teleport all participants to team spot
* @return boolean: true if success, otherwise false
*/
public static boolean startFight()
{
@@ -297,9 +295,8 @@ public class TvTEvent
* 2. Wait till teams are not at a tie anymore<br>
* 3. Set state EvcentState.REWARDING<br>
* 4. Reward team with more points<br>
* 5. Show win html to wining team participants<br>
* <br>
* @return String: winning team name<br>
* 5. Show win html to wining team participants
* @return String: winning team name
*/
public static String calculateRewards()
{
@@ -401,7 +398,7 @@ public class TvTEvent
* 3. Open doors specified in configs<br>
* 4. Teleport all participants back to participation npc location<br>
* 5. Teams cleaning<br>
* 6. Set state EventState.INACTIVE<br>
* 6. Set state EventState.INACTIVE
*/
public static void stopFight()
{
@@ -441,10 +438,9 @@ public class TvTEvent
/**
* Adds a player to a TvTEvent team<br>
* 1. Calculate the id of the team in which the player should be added<br>
* 2. Add the player to the calculated team<br>
* <br>
* @param playerInstance as PlayerInstance<br>
* @return boolean: true if success, otherwise false<br>
* 2. Add the player to the calculated team
* @param playerInstance as PlayerInstance
* @return boolean: true if success, otherwise false
*/
public static synchronized boolean addParticipant(PlayerInstance playerInstance)
{
@@ -472,8 +468,7 @@ public class TvTEvent
/**
* Removes a TvTEvent player from it's team<br>
* 1. Get team id of the player<br>
* 2. Remove player from it's team<br>
* <br>
* 2. Remove player from it's team
* @param playerObjectId
* @return boolean: true if success, otherwise false
*/
@@ -527,9 +522,8 @@ public class TvTEvent
/**
* Send a SystemMessage to all participated players<br>
* 1. Send the message to all players of team number one<br>
* 2. Send the message to all players of team number two<br>
* <br>
* @param message as String<br>
* 2. Send the message to all players of team number two
* @param message as String
*/
public static void sysMsgToAllParticipants(String message)
{
@@ -615,9 +609,8 @@ public class TvTEvent
}
/**
* Called when a player logs in<br>
* <br>
* @param playerInstance as PlayerInstance<br>
* Called when a player logs in
* @param playerInstance as PlayerInstance
*/
public static void onLogin(PlayerInstance playerInstance)
{
@@ -637,9 +630,8 @@ public class TvTEvent
}
/**
* Called when a player logs out<br>
* <br>
* @param playerInstance as PlayerInstance<br>
* Called when a player logs out
* @param playerInstance as PlayerInstance
*/
public static void onLogout(PlayerInstance playerInstance)
{
@@ -650,8 +642,7 @@ public class TvTEvent
}
/**
* Called on every onAction in PlayerIstance<br>
* <br>
* Called on every onAction in PlayerIstance
* @param playerInstance
* @param targetedPlayerObjectId
* @return boolean: true if player is allowed to target, otherwise false
@@ -684,8 +675,7 @@ public class TvTEvent
}
/**
* Called on every scroll use<br>
* <br>
* Called on every scroll use
* @param playerObjectId
* @return boolean: true if player is allowed to use scroll, otherwise false
*/
@@ -765,10 +755,9 @@ public class TvTEvent
}
/**
* Is called when a player is killed<br>
* <br>
* @param killerCharacter as Creature<br>
* @param killedPlayerInstance as PlayerInstance<br>
* Is called when a player is killed
* @param killerCharacter as Creature
* @param killedPlayerInstance as PlayerInstance
*/
public static void onKill(Creature killerCharacter, PlayerInstance killedPlayerInstance)
{
@@ -902,9 +891,8 @@ public class TvTEvent
}
/**
* Sets the TvTEvent state<br>
* <br>
* @param state as EventState<br>
* Sets the TvTEvent state
* @param state as EventState
*/
private static void setState(EventState state)
{
@@ -915,9 +903,8 @@ public class TvTEvent
}
/**
* Is TvTEvent inactive?<br>
* <br>
* @return boolean: true if event is inactive(waiting for next event cycle), otherwise false<br>
* Is TvTEvent inactive?
* @return boolean: true if event is inactive(waiting for next event cycle), otherwise false
*/
public static boolean isInactive()
{
@@ -931,9 +918,8 @@ public class TvTEvent
}
/**
* Is TvTEvent in inactivating?<br>
* <br>
* @return boolean: true if event is in inactivating progress, otherwise false<br>
* Is TvTEvent in inactivating?
* @return boolean: true if event is in inactivating progress, otherwise false
*/
public static boolean isInactivating()
{
@@ -947,9 +933,8 @@ public class TvTEvent
}
/**
* Is TvTEvent in participation?<br>
* <br>
* @return boolean: true if event is in participation progress, otherwise false<br>
* Is TvTEvent in participation?
* @return boolean: true if event is in participation progress, otherwise false
*/
public static boolean isParticipating()
{
@@ -963,9 +948,8 @@ public class TvTEvent
}
/**
* Is TvTEvent starting?<br>
* <br>
* @return boolean: true if event is starting up(setting up fighting spot, teleport players etc.), otherwise false<br>
* Is TvTEvent starting?
* @return boolean: true if event is starting up(setting up fighting spot, teleport players etc.), otherwise false
*/
public static boolean isStarting()
{
@@ -979,9 +963,8 @@ public class TvTEvent
}
/**
* Is TvTEvent started?<br>
* <br>
* @return boolean: true if event is started, otherwise false<br>
* Is TvTEvent started?
* @return boolean: true if event is started, otherwise false
*/
public static boolean isStarted()
{
@@ -995,9 +978,8 @@ public class TvTEvent
}
/**
* Is TvTEvent rewarding?<br>
* <br>
* @return boolean: true if event is currently rewarding, otherwise false<br>
* Is TvTEvent rewarding?
* @return boolean: true if event is currently rewarding, otherwise false
*/
public static boolean isRewarding()
{
@@ -1061,9 +1043,8 @@ public class TvTEvent
}
/**
* Returns participated player count<br>
* <br>
* @return int: amount of players registered in the event<br>
* Returns participated player count
* @return int: amount of players registered in the event
*/
public static int getParticipatedPlayersCount()
{
@@ -1071,9 +1052,8 @@ public class TvTEvent
}
/**
* Returns teams names<br>
* <br>
* @return String[]: names of teams, 2 elements, index 0 for team 1 and index 1 for team 2<br>
* Returns teams names
* @return String[]: names of teams, 2 elements, index 0 for team 1 and index 1 for team 2
*/
public static String[] getTeamNames()
{
@@ -1085,9 +1065,8 @@ public class TvTEvent
}
/**
* Returns player count of both teams<br>
* <br>
* @return int[]: player count of teams, 2 elements, index 0 for team 1 and index 1 for team 2<br>
* Returns player count of both teams
* @return int[]: player count of teams, 2 elements, index 0 for team 1 and index 1 for team 2
*/
public static int[] getTeamsPlayerCounts()
{
@@ -1100,7 +1079,7 @@ public class TvTEvent
/**
* Returns points count of both teams
* @return int[]: points of teams, 2 elements, index 0 for team 1 and index 1 for team 2<br>
* @return int[]: points of teams, 2 elements, index 0 for team 1 and index 1 for team 2
*/
public static int[] getTeamsPoints()
{
@@ -27,25 +27,24 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
public class TvTEventTeam
{
/**
* The name of the team<br>
* The name of the team
*/
private final String _name;
/**
* The team spot coordinated<br>
* The team spot coordinated
*/
private int[] _coordinates = new int[3];
/**
* The points of the team<br>
* The points of the team
*/
private short _points;
/** Name and instance of all participated players in map. */
private final Map<Integer, PlayerInstance> _participatedPlayers = new ConcurrentHashMap<>();
/**
* C'tor initialize the team<br>
* <br>
* @param name as String<br>
* @param coordinates as int[]<br>
* C'tor initialize the team
* @param name as String
* @param coordinates as int[]
*/
public TvTEventTeam(String name, int[] coordinates)
{
@@ -55,10 +54,9 @@ public class TvTEventTeam
}
/**
* Adds a player to the team<br>
* <br>
* @param playerInstance as PlayerInstance<br>
* @return boolean: true if success, otherwise false<br>
* Adds a player to the team
* @param playerInstance as PlayerInstance
* @return boolean: true if success, otherwise false
*/
public boolean addPlayer(PlayerInstance playerInstance)
{
@@ -82,7 +80,7 @@ public class TvTEventTeam
}
/**
* Increases the points of the team<br>
* Increases the points of the team
*/
public void increasePoints()
{
@@ -90,7 +88,7 @@ public class TvTEventTeam
}
/**
* Cleanup the team and make it ready for adding players again<br>
* Cleanup the team and make it ready for adding players again
*/
public void cleanMe()
{
@@ -109,9 +107,8 @@ public class TvTEventTeam
}
/**
* Returns the name of the team<br>
* <br>
* @return String: name of the team<br>
* Returns the name of the team
* @return String: name of the team
*/
public String getName()
{
@@ -119,9 +116,8 @@ public class TvTEventTeam
}
/**
* Returns the coordinates of the team spot<br>
* <br>
* @return int[]: team coordinates<br>
* Returns the coordinates of the team spot
* @return int[]: team coordinates
*/
public int[] getCoordinates()
{
@@ -129,9 +125,8 @@ public class TvTEventTeam
}
/**
* Returns the points of the team<br>
* <br>
* @return short: team points<br>
* Returns the points of the team
* @return short: team points
*/
public short getPoints()
{
@@ -139,9 +134,8 @@ public class TvTEventTeam
}
/**
* Returns name and instance of all participated players in Map<br>
* <br>
* @return Map<String, PlayerInstance>: map of players in this team<br>
* Returns name and instance of all participated players in Map
* @return Map<String, PlayerInstance>: map of players in this team
*/
public Map<Integer, PlayerInstance> getParticipatedPlayers()
{
@@ -149,9 +143,8 @@ public class TvTEventTeam
}
/**
* Returns player count of this team<br>
* <br>
* @return int: number of players in team<br>
* Returns player count of this team
* @return int: number of players in team
*/
public int getParticipatedPlayerCount()
{
@@ -32,12 +32,12 @@ public class TvTManager
protected static final Logger LOGGER = Logger.getLogger(TvTManager.class.getName());
/**
* Task for event cycles<br>
* Task for event cycles
*/
private TvTStartTask _task;
/**
* New instance only by getInstance()<br>
* New instance only by getInstance()
*/
protected TvTManager()
{
@@ -55,9 +55,8 @@ public class TvTManager
}
/**
* Initialize new/Returns the one and only instance<br>
* <br>
* @return TvTManager<br>
* Initialize new/Returns the one and only instance
* @return TvTManager
*/
public static TvTManager getInstance()
{
@@ -2620,7 +2620,7 @@ public abstract class AbstractScript extends ManagedScript
}
/**
* Get a random entry.<br>
* Get a random entry.
* @param <T>
* @param array of values.
* @return one value from array.
@@ -2636,7 +2636,7 @@ public abstract class AbstractScript extends ManagedScript
}
/**
* Get a random entry.<br>
* Get a random entry.
* @param <T>
* @param list of values.
* @return one value from list.
@@ -2651,7 +2651,7 @@ public abstract class AbstractScript extends ManagedScript
}
/**
* Get a random entry.<br>
* Get a random entry.
* @param array of Integers.
* @return one Integer from array.
*/
@@ -53,7 +53,7 @@ public class PlayerSkillHolder implements ISkillsHolder
}
/**
* Add a skill to the skills map.<br>
* Add a skill to the skills map.
* @param skill
*/
@Override
@@ -792,7 +792,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
@@ -1057,7 +1057,7 @@ public abstract class Inventory extends ItemContainer
/**
* Equips an item in the given slot of the paperdoll.<br>
* <U><I>Remark :</I></U> The item <B>must be</B> in the inventory already.
* <u><i>Remark :</i></u> The item <b>must be</b> in the inventory already.
* @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
@@ -1242,8 +1242,8 @@ public abstract class Inventory extends ItemContainer
}
/**
* Unequips item in body slot and returns alterations.<BR>
* <B>If you dont need return value use {@link Inventory#unEquipItemInBodySlot(int)} instead</B>
* Unequips item in body slot and returns alterations.<br>
* <b>If you dont need return value use {@link Inventory#unEquipItemInBodySlot(int)} instead</b>
* @param slot : int designating the slot of the paperdoll
* @return ItemInstance[] : list of changes
*/
@@ -1273,8 +1273,8 @@ public abstract class Inventory extends ItemContainer
}
/**
* Unequips item in slot and returns alterations<BR>
* <B>If you dont need return value use {@link Inventory#unEquipItemInSlot(int)} instead</B>
* Unequips item in slot and returns alterations<br>
* <b>If you dont need return value use {@link Inventory#unEquipItemInSlot(int)} instead</b>
* @param slot : int designating the slot
* @return ItemInstance[] : list of items altered
*/
@@ -1436,8 +1436,8 @@ public abstract class Inventory extends ItemContainer
}
/**
* Equips item and returns list of alterations<BR>
* <B>If you don't need return value use {@link Inventory#equipItem(ItemInstance)} instead</B>
* Equips item and returns list of alterations<br>
* <b>If you don't need return value use {@link Inventory#equipItem(ItemInstance)} instead</b>
* @param item : ItemInstance corresponding to the item
* @return ItemInstance[] : list of alterations
*/
@@ -498,7 +498,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
@@ -513,7 +513,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
@@ -113,7 +113,7 @@ public class PetInventory extends Inventory
public void restore()
{
super.restore();
// check for equiped items from other pets
// check for equipped items from other pets
for (ItemInstance item : _items)
{
if (item.isEquipped() && !item.getItem().checkCondition(_owner, _owner, false))
@@ -57,11 +57,11 @@ public class PlayerInventory extends Inventory
/**
* Block modes:
* <UL>
* <LI>-1 - no block
* <LI>0 - block items from _invItems, allow usage of other items
* <LI>1 - allow usage of items from _invItems, block other items
* </UL>
* <ul>
* <li>-1 - no block
* <li>0 - block items from _invItems, allow usage of other items
* <li>1 - allow usage of items from _invItems, block other items
* </ul>
*/
private int _blockMode = -1;
@@ -608,7 +608,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
@@ -655,7 +655,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
@@ -47,7 +47,7 @@ import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
/**
* 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 :
* <ul>
* <li>Armor</li>
@@ -153,8 +153,7 @@ public abstract class Item extends ListenersContainer implements IIdentifiable
private int _sharedReuseGroup;
/**
* Constructor of the Item that fill class variables.<BR>
* <BR>
* Constructor of the Item that fill class variables.
* @param set : StatSet corresponding to a set of couples (key,value) for description of the item
*/
protected Item(StatSet set)
@@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.model.items.type.CrystalType;
import org.l2jmobius.gameserver.model.items.type.ItemType;
/**
* This class contains ItemInstance<BR>
* This class contains ItemInstance<br>
* Use to sort ItemInstance of :
* <ul>
* <li>Armor</li>
@@ -225,19 +225,15 @@ public class ItemInstance extends 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> Example of use </U> :</B><BR>
* <BR>
* <li>Do Pickup Item : PCInstance and Pet</li><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>Example of use</u>:</b><br>
* <li>Do Pickup Item : PCInstance and Pet</li><br>
* @param creature Character that pick up the item
*/
public void pickupMe(Creature creature)
@@ -382,9 +378,8 @@ public class ItemInstance extends WorldObject
}
/**
* Sets the location of the item.<BR>
* <BR>
* <U><I>Remark :</I></U> If loc and loc_data different from database, say datas not up-to-date
* Sets the location of the item.<br>
* <u><i>Remark :</i></u> If loc and loc_data different from database, say datas not up-to-date
* @param loc : ItemLocation (enumeration)
* @param locData : int designating the slot where the item is stored or the village for freights
*/
@@ -413,8 +408,7 @@ public class ItemInstance extends WorldObject
}
/**
* Sets the quantity of the item.<BR>
* <BR>
* Sets the quantity of the item.
* @param count the new count to set
*/
public void setCount(long count)
@@ -437,9 +431,8 @@ public class ItemInstance extends WorldObject
}
/**
* Sets the quantity of the item.<BR>
* <BR>
* <U><I>Remark :</I></U> If loc and loc_data different from database, say datas not up-to-date
* Sets the quantity of the item.<br>
* <u><i>Remark :</i></u> If loc and loc_data different from database, say datas not up-to-date
* @param process : String Identifier of process triggering this action
* @param count : int
* @param creator : PlayerInstance Player requesting the item creation
@@ -1420,7 +1413,7 @@ public class ItemInstance extends WorldObject
}
/**
* Updates the database.<BR>
* Updates the database.
*/
public void updateDatabase()
{
@@ -1428,7 +1421,7 @@ public class ItemInstance extends WorldObject
}
/**
* Updates the database.<BR>
* Updates the database.
* @param force if the update should necessarily be done.
*/
public void updateDatabase(boolean force)
@@ -1531,20 +1524,17 @@ public class ItemInstance extends WorldObject
}
/**
* Init a dropped ItemInstance and add it in the world as a visible object.<BR>
* <BR>
* <B><U> Actions</U> :</B><BR>
* <BR>
* Init a dropped ItemInstance 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 ItemInstance dropped and update its _worldregion</li>
* <li>Add the ItemInstance dropped to _visibleObjects of its WorldRegion</li>
* <li>Add the ItemInstance dropped in the world as a <B>visible</B> object</li><BR>
* <BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T ADD the object to _allObjects of World </B></FONT><BR>
* <BR>
* <B><U> Example of use </U> :</B><BR>
* <BR>
* <li>Add the ItemInstance dropped in the world as a <b>visible</b> object</li><br>
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T ADD the object to _allObjects of World </b></font><br>
* <br>
* <b><u>Example of use</u>:</b><br>
* <li>Drop item</li>
* <li>Call Pet</li><BR>
* <li>Call Pet</li>
*/
public class ItemDropTask implements Runnable
{
@@ -946,7 +946,7 @@ public class Quest extends AbstractScript implements IIdentifiable
/**
* This function is called whenever a player attacks an NPC that is registered for the quest.<br>
* If is not overridden by a subclass, then default to the returned value of the simpler (and older) {@link #onAttack(Npc, PlayerInstance, int, boolean)} override.<br>
* If is not overridden by a subclass, then default to the returned value of the simpler (and older) {@link #onAttack(Npc, PlayerInstance, int, boolean)} override.
* @param npc this parameter contains a reference to the exact instance of the NPC that got attacked.
* @param attacker this parameter contains a reference to the exact instance of the player who attacked the NPC.
* @param damage this parameter represents the total damage that this attack has inflicted to the NPC.
@@ -1061,7 +1061,7 @@ public class Quest extends AbstractScript implements IIdentifiable
* The coder of the script may need to create a new quest state (if necessary).<br>
* <b>Note 3:</b><br>
* The returned value of onFirstTalk replaces the default HTML that would have otherwise been loaded from a sub-folder of DatapackRoot/game/data/html/.<br>
* If you wish to show the default HTML, within onFirstTalk do npc.showChatWindow(player) and then return ""<br>
* If you wish to show the default HTML, within onFirstTalk do npc.showChatWindow(player) and then return ""
* @param npc this parameter contains a reference to the exact instance of the NPC that the player is talking with.
* @param player this parameter contains a reference to the exact instance of the player who is talking to the NPC.
* @return the text returned by the event (may be {@code null}, a filename or just text)
@@ -1188,7 +1188,7 @@ public class Quest extends AbstractScript implements IIdentifiable
}
/**
* This function is called whenever an NPC is teleport.<br>
* This function is called whenever an NPC is teleport.
* @param npc this parameter contains a reference to the exact instance of the NPC who just teleport.
*/
protected void onTeleport(Npc npc)
@@ -1198,7 +1198,7 @@ public class Quest extends AbstractScript implements IIdentifiable
/**
* This function is called whenever an NPC is called by another NPC in the same faction.
* @param npc this parameter contains a reference to the exact instance of the NPC who is being asked for help.
* @param caller this parameter contains a reference to the exact instance of the NPC who is asking for help.<br>
* @param caller this parameter contains a reference to the exact instance of the NPC who is asking for help.
* @param attacker this parameter contains a reference to the exact instance of the player who attacked.
* @param isSummon this parameter if it's {@code false} it denotes that the attacker was indeed the player, else it specifies that the attacker was the player's summon.
* @return
@@ -97,7 +97,7 @@ public class BuffInfo
}
/**
* Adds an effect task to this buff info.<br>
* Adds an effect task to this buff info.
* @param effect the effect that owns the task
* @param effectTaskInfo the task info
*/
@@ -1018,7 +1018,8 @@ public class Skill implements IIdentifiable
/**
* Return all targets of the skill in a table in function a the skill type.<br>
* <B><U>Values of skill type</U>:</B>
* <br>
* <b><u>Values of skill type</u>:</b>
* <ul>
* <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>
@@ -27,7 +27,7 @@ import org.l2jmobius.gameserver.model.stats.functions.AbstractFunction;
* A calculator is created to manage and dynamically calculate the effect of a character property (ex : MAX_HP, REGENERATE_HP_RATE...).<br>
* In fact, each calculator is a table of Func object in which each Func represents a mathematical function:<br>
* FuncAtkAccuracy -> Math.sqrt(_player.getDEX())*6+_player.getLevel()<br>
* When the calc method of a calculator is launched, each mathematical function is called according to its priority <B>_order</B>.<br>
* When the calc method of a calculator is launched, each mathematical function is called according to its priority <b>_order</b>.<br>
* Indeed, Func with lowest priority order is executed first and Funcs with the same order are executed in unspecified order.<br>
* The result of the calculation is stored in the value property of an Env class instance.<br>
* Method addFunc and removeFunc permit to add and remove a Func object from a Calculator.
@@ -103,10 +103,12 @@ public class Formulas
/**
* Return the standard NPC Calculator set containing ACCURACY_COMBAT and EVASION_RATE.<br>
* <B><U>Concept</U>:</B><br>
* A calculator is created to manage and dynamically calculate the effect of a character property (ex : MAX_HP, REGENERATE_HP_RATE...). In fact, each calculator is a table of Func object in which each Func represents a mathematic function : <br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* A calculator is created to manage and dynamically calculate the effect of a character property (ex : MAX_HP, REGENERATE_HP_RATE...). In fact, each calculator is a table of Func object in which each Func represents a mathematic function :<br>
* FuncAtkAccuracy -> Math.sqrt(_player.getDEX())*6+_player.getLevel()<br>
* To reduce cache memory use, NPCInstances who don't have skills share the same Calculator set called <B>NPC_STD_CALCULATOR</B>.<br>
* To reduce cache memory use, NPCInstances who don't have skills share the same Calculator set called <b>NPC_STD_CALCULATOR</b>.<br>
* @return
*/
public static Calculator[] getStdNPCCalculators()
@@ -180,9 +182,11 @@ public class Formulas
/**
* Add basics Func objects to PlayerInstance and Summon.<br>
* <B><U>Concept</U>:</B><br>
* A calculator is created to manage and dynamically calculate the effect of a character property (ex : MAX_HP, REGENERATE_HP_RATE...). In fact, each calculator is a table of Func object in which each Func represents a mathematic function : <br>
* FuncAtkAccuracy -> Math.sqrt(_player.getDEX())*6+_player.getLevel()<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* A calculator is created to manage and dynamically calculate the effect of a character property (ex : MAX_HP, REGENERATE_HP_RATE...). In fact, each calculator is a table of Func object in which each Func represents a mathematic function :<br>
* FuncAtkAccuracy -> Math.sqrt(_player.getDEX())*6+_player.getLevel()
* @param creature PlayerInstance or Summon that must obtain basic Func objects
*/
public static void addFuncsToNewCharacter(Creature creature)
@@ -1152,7 +1156,7 @@ public class Formulas
* Returns:<br>
* 0 = shield defense doesn't succeed<br>
* 1 = shield defense succeed<br>
* 2 = perfect block<br>
* 2 = perfect block
* @param attacker
* @param target
* @param skill
@@ -1266,7 +1270,7 @@ public class Formulas
}
/**
* Calculates the effect landing success.<br>
* Calculates the effect landing success.
* @param attacker the attacker
* @param target the target
* @param skill the skill
@@ -1969,7 +1973,7 @@ public class Formulas
* RandomizeHate,<br>
* DeleteHateOfMe,<br>
* TransferHate,<br>
* Confuse<br>
* Confuse
* @param baseChance chance from effect parameter
* @param attacker
* @param target
@@ -27,7 +27,7 @@ import org.l2jmobius.gameserver.model.stats.Stat;
* A Function object is a component of a Calculator created to manage and dynamically calculate the effect of a character property (ex : MAX_HP, REGENERATE_HP_RATE...).<br>
* In fact, each calculator is a table of functions object in which each function represents a mathematics function:<br>
* FuncAtkAccuracy -> Math.sqrt(_player.getDEX())*6+_player.getLevel()<br>
* When the calc method of a calculator is launched, each mathematics function is called according to its priority <B>_order</B>.<br>
* When the calc method of a calculator is launched, each mathematics function is called according to its priority <b>_order</b>.<br>
* Indeed, functions with lowest priority order is executed first and functions with the same order are executed in unspecified order.<br>
* @author Zoey76
*/
@@ -55,8 +55,8 @@ public class BlowFishKeygen
}
/**
* Returns a key from this keygen pool, the logical ownership is retained by this keygen.<BR>
* Thus when getting a key with interests other then read-only a copy must be performed.<BR>
* Returns a key from this keygen pool, the logical ownership is retained by this keygen.<br>
* Thus when getting a key with interests other then read-only a copy must be performed.
* @return A key from this keygen pool.
*/
public static byte[] getRandomKey()
@@ -405,7 +405,7 @@ public class RequestAcquireSkill implements IClientIncomingPacket
/**
* Perform a simple check for current player and skill.<br>
* Takes the needed SP if the skill require it and all requirements are meet.<br>
* Consume required items if the skill require it and all requirements are meet.<br>
* Consume required items if the skill require it and all requirements are meet.
* @param player the skill learning player.
* @param trainer the skills teaching Npc.
* @param skillLearn the skill to be learn.
@@ -50,7 +50,7 @@ public class RequestGMCommand implements IClientIncomingPacket
@Override
public void run(GameClient client)
{
// prevent non gm or low level GMs from vieweing player stuff
// prevent non GM or low level GMs from vieweing player stuff
if (!client.getPlayer().isGM() || !client.getPlayer().getAccessLevel().allowAltG())
{
return;
@@ -99,7 +99,7 @@ public class RequestGMCommand implements IClientIncomingPacket
}
case 6: // player warehouse
{
// gm warehouse view to be implemented
// GM warehouse view to be implemented
if (player != null)
{
client.sendPacket(new GMViewWarehouseWithdrawList(player));
@@ -26,7 +26,7 @@ import org.l2jmobius.gameserver.network.OutgoingPackets;
import org.l2jmobius.gameserver.network.clientpackets.RequestAllyInfo;
/**
* Sent in response to {@link RequestAllyInfo}, if applicable.<BR>
* Sent in response to {@link RequestAllyInfo}, if applicable.<br>
* @author afk5min
*/
public class AllianceInfo implements IClientOutgoingPacket
@@ -20,9 +20,9 @@ import org.l2jmobius.commons.network.PacketWriter;
import org.l2jmobius.gameserver.network.OutgoingPackets;
/**
* Eva's Inferno event packet. info params: <br>
* type (1 - %, 2 - npcId), <br>
* value (depending on type: for type 1 - % value; for type 2 - 20573-20575), <br>
* Eva's Inferno event packet. info params:<br>
* type (1 - %, 2 - npcId),<br>
* value (depending on type: for type 1 - % value; for type 2 - 20573-20575),<br>
* state (0-1), endtime (only when type 2)
*/
public class ExBrBuffEventState implements IClientOutgoingPacket
@@ -66,7 +66,7 @@ public interface IClientOutgoingPacket extends IOutgoingPacket
}
/**
* Sends this packet to the target player, useful for lambda operations like <br>
* Sends this packet to the target player, useful for lambda operations like<br>
* {@code World.getInstance().getPlayers().forEach(packet::sendTo)}
* @param player
*/
@@ -27,25 +27,25 @@ import org.l2jmobius.gameserver.model.entity.clanhall.SiegableHall;
import org.l2jmobius.gameserver.network.OutgoingPackets;
/**
* Populates the Siege Attacker List in the SiegeInfo Window<BR>
* <BR>
* c = ca<BR>
* d = CastleID<BR>
* d = unknow (0x00)<BR>
* d = unknow (0x01)<BR>
* d = unknow (0x00)<BR>
* d = Number of Attackers Clans?<BR>
* d = Number of Attackers Clans<BR>
* { //repeats<BR>
* d = ClanID<BR>
* S = ClanName<BR>
* S = ClanLeaderName<BR>
* d = ClanCrestID<BR>
* d = signed time (seconds)<BR>
* d = AllyID<BR>
* S = AllyName<BR>
* S = AllyLeaderName<BR>
* d = AllyCrestID<BR>
* Populates the Siege Attacker List in the SiegeInfo Window<br>
* <br>
* c = ca<br>
* d = CastleID<br>
* d = unknow (0x00)<br>
* d = unknow (0x01)<br>
* d = unknow (0x00)<br>
* d = Number of Attackers Clans?<br>
* d = Number of Attackers Clans<br>
* { //repeats<br>
* d = ClanID<br>
* S = ClanName<br>
* S = ClanLeaderName<br>
* d = ClanCrestID<br>
* d = signed time (seconds)<br>
* d = AllyID<br>
* S = AllyName<br>
* S = AllyLeaderName<br>
* d = AllyCrestID<br>
* @author KenM
*/
public class SiegeAttackerList implements IClientOutgoingPacket
@@ -24,26 +24,26 @@ import org.l2jmobius.gameserver.model.entity.Castle;
import org.l2jmobius.gameserver.network.OutgoingPackets;
/**
* Populates the Siege Defender List in the SiegeInfo Window<BR>
* <BR>
* c = 0xcb<BR>
* d = CastleID<BR>
* d = unknow (0x00)<BR>
* d = unknow (0x01)<BR>
* d = unknow (0x00)<BR>
* d = Number of Defending Clans?<BR>
* d = Number of Defending Clans<BR>
* { //repeats<BR>
* d = ClanID<BR>
* S = ClanName<BR>
* S = ClanLeaderName<BR>
* d = ClanCrestID<BR>
* d = signed time (seconds)<BR>
* d = Type -> Owner = 0x01 || Waiting = 0x02 || Accepted = 0x03<BR>
* d = AllyID<BR>
* S = AllyName<BR>
* S = AllyLeaderName<BR>
* d = AllyCrestID<BR>
* Populates the Siege Defender List in the SiegeInfo Window<br>
* <br>
* c = 0xcb<br>
* d = CastleID<br>
* d = unknow (0x00)<br>
* d = unknow (0x01)<br>
* d = unknow (0x00)<br>
* d = Number of Defending Clans?<br>
* d = Number of Defending Clans<br>
* { //repeats<br>
* d = ClanID<br>
* S = ClanName<br>
* S = ClanLeaderName<br>
* d = ClanCrestID<br>
* d = signed time (seconds)<br>
* d = Type -> Owner = 0x01 || Waiting = 0x02 || Accepted = 0x03<br>
* d = AllyID<br>
* S = AllyName<br>
* S = AllyLeaderName<br>
* d = AllyCrestID<br>
* @author KenM
*/
public class SiegeDefenderList implements IClientOutgoingPacket
@@ -29,18 +29,18 @@ import org.l2jmobius.gameserver.model.entity.ClanHall;
import org.l2jmobius.gameserver.network.OutgoingPackets;
/**
* Shows the Siege Info<BR>
* <BR>
* c = c9<BR>
* d = CastleID<BR>
* d = Show Owner Controls (0x00 default || >=0x02(mask?) owner)<BR>
* d = Owner ClanID<BR>
* S = Owner ClanName<BR>
* S = Owner Clan LeaderName<BR>
* d = Owner AllyID<BR>
* S = Owner AllyName<BR>
* d = current time (seconds)<BR>
* d = Siege time (seconds) (0 for selectable)<BR>
* Shows the Siege Info<br>
* <br>
* c = c9<br>
* d = CastleID<br>
* d = Show Owner Controls (0x00 default || >=0x02(mask?) owner)<br>
* d = Owner ClanID<br>
* S = Owner ClanName<br>
* S = Owner Clan LeaderName<br>
* d = Owner AllyID<br>
* S = Owner AllyName<br>
* d = current time (seconds)<br>
* d = Siege time (seconds) (0 for selectable)<br>
* d = (UNKNOW) Siege Time Select Related?
* @author KenM
*/
@@ -450,7 +450,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
* This method is used to limit the given Warehouse List to:
* <li>Weapon</li>
* <li>Arrow</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -470,7 +470,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
/**
* This method is used to limit the given Warehouse List to:
* <li>Armor</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -490,7 +490,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
/**
* This method is used to limit the given Warehouse List to:
* <li>Everything which is no Weapon/Armor</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -510,7 +510,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
/**
* This method is used to limit the given Warehouse List to:
* <li>Materials</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -530,7 +530,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
/**
* This method is used to limit the given Warehouse List to:
* <li>Recipes</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -550,7 +550,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
/**
* This method is used to limit the given Warehouse List to:
* <li>Amulett</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -570,7 +570,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
/**
* This method is used to limit the given Warehouse List to:
* <li>Spellbook & Dwarven Drafts</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -590,7 +590,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
/**
* This method is used to limit the given Warehouse List to:
* <li>Consumables (Potions, Shots, ...)</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -610,7 +610,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
/**
* This method is used to limit the given Warehouse List to:
* <li>Shots</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -630,7 +630,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
/**
* This method is used to limit the given Warehouse List to:
* <li>Scrolls/Potions</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -650,7 +650,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
/**
* This method is used to limit the given Warehouse List to:
* <li>Seeds</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -670,7 +670,7 @@ public class SortedWareHouseWithdrawalList implements IClientOutgoingPacket
/**
* This method is used to limit the given Warehouse List to:
* <li>Everything which is no Weapon/Armor, Material, Recipe, Spellbook, Scroll or Shot</li>
* <li>Money</li>
* <li>Money</li><br>
* @param items complete Warehouse List
* @return limited Item List
*/
@@ -21,7 +21,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Abstract class for classes that are meant to be implemented by scripts.<BR>
* Abstract class for classes that are meant to be implemented by scripts.<br>
* @author KenM
*/
public abstract class ManagedScript
@@ -41,7 +41,7 @@ public abstract class ManagedScript
public abstract Path getScriptPath();
/**
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<BR>
* Attempts to reload this script and to refresh the necessary bindings with it ScriptControler.<br>
* Subclasses of this class should override this method to properly refresh their bindings when necessary.
* @return true if and only if the script was reloaded, false otherwise.
*/
@@ -88,7 +88,7 @@ public class AttackStanceTaskManager
}
/**
* Checks for attack stance task.<br>
* Checks for attack stance task.
* @param actor the actor
* @return {@code true} if the character has an attack stance task, {@code false} otherwise
*/
@@ -83,7 +83,7 @@ public class frmAbout
frmAbout.getContentPane().add(lblProtocols);
final JLabel site = new JLabel(URL);
site.setText("<HTML><FONT color=\"#000099\"><U>" + URL + "</U></FONT></HTML>");
site.setText("<html><font color=\"#000099\"><u>" + URL + "</u></font></html>");
site.setHorizontalAlignment(SwingConstants.CENTER);
site.setBounds(76, 128, 140, 14);
site.addMouseListener(new MouseAdapter()
@@ -40,11 +40,13 @@ public class Broadcast
private static final Logger LOGGER = Logger.getLogger(Broadcast.class.getName());
/**
* Send a packet to all PlayerInstance in the _KnownPlayers of the Creature that have the Character targeted.<BR>
* <B><U> Concept</U> :</B><BR>
* PlayerInstance in the detection area of the Creature are identified in <B>_knownPlayers</B>.<BR>
* In order to inform other players of state modification on the Creature, server just need to go through _knownPlayers to send Server->Client Packet<BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packet to this Creature (to do this use method toSelfAndKnownPlayers)</B></FONT><BR>
* Send a packet to all PlayerInstance in the _KnownPlayers of the Creature that have the Character targeted.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* PlayerInstance in the detection area of the Creature are identified in <b>_knownPlayers</b>.<br>
* In order to inform other players of state modification on the Creature, server just need to go through _knownPlayers to send Server->Client Packet<br>
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packet to this Creature (to do this use method toSelfAndKnownPlayers)</b></font>
* @param creature
* @param mov
*/
@@ -60,11 +62,13 @@ public class Broadcast
}
/**
* Send a packet to all PlayerInstance in the _KnownPlayers of the Creature.<BR>
* <B><U> Concept</U> :</B><BR>
* PlayerInstance in the detection area of the Creature are identified in <B>_knownPlayers</B>.<BR>
* In order to inform other players of state modification on the Creature, server just need to go through _knownPlayers to send Server->Client Packet<BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packet to this Creature (to do this use method toSelfAndKnownPlayers)</B></FONT><BR>
* Send a packet to all PlayerInstance in the _KnownPlayers of the Creature.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* PlayerInstance in the detection area of the Creature are identified in <b>_knownPlayers</b>.<br>
* In order to inform other players of state modification on the Creature, server just need to go through _knownPlayers to send Server->Client Packet<br>
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packet to this Creature (to do this use method toSelfAndKnownPlayers)</b></font>
* @param creature
* @param mov
*/
@@ -99,11 +103,13 @@ public class Broadcast
}
/**
* Send a packet to all PlayerInstance in the _KnownPlayers (in the specified radius) of the Creature.<BR>
* <B><U> Concept</U> :</B><BR>
* PlayerInstance in the detection area of the Creature are identified in <B>_knownPlayers</B>.<BR>
* In order to inform other players of state modification on the Creature, server just needs to go through _knownPlayers to send Server->Client Packet and check the distance between the targets.<BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packet to this Creature (to do this use method toSelfAndKnownPlayers)</B></FONT><BR>
* Send a packet to all PlayerInstance in the _KnownPlayers (in the specified radius) of the Creature.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* PlayerInstance in the detection area of the Creature are identified in <b>_knownPlayers</b>.<br>
* In order to inform other players of state modification on the Creature, server just needs to go through _knownPlayers to send Server->Client Packet and check the distance between the targets.<br>
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packet to this Creature (to do this use method toSelfAndKnownPlayers)</b></font>
* @param creature
* @param mov
* @param radius
@@ -119,10 +125,12 @@ public class Broadcast
}
/**
* Send a packet to all PlayerInstance in the _KnownPlayers of the Creature and to the specified character.<BR>
* <B><U> Concept</U> :</B><BR>
* PlayerInstance in the detection area of the Creature are identified in <B>_knownPlayers</B>.<BR>
* In order to inform other players of state modification on the Creature, server just need to go through _knownPlayers to send Server->Client Packet<BR>
* Send a packet to all PlayerInstance in the _KnownPlayers of the Creature and to the specified character.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* PlayerInstance in the detection area of the Creature are identified in <b>_knownPlayers</b>.<br>
* In order to inform other players of state modification on the Creature, server just need to go through _knownPlayers to send Server->Client Packet
* @param creature
* @param mov
*/
@@ -153,10 +161,12 @@ public class Broadcast
}
/**
* Send a packet to all PlayerInstance present in the world.<BR>
* <B><U> Concept</U> :</B><BR>
* In order to inform other players of state modification on the Creature, server just need to go through _allPlayers to send Server->Client Packet<BR>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method DOESN'T SEND Server->Client packet to this Creature (to do this use method toSelfAndKnownPlayers)</B></FONT><BR>
* Send a packet to all PlayerInstance present in the world.<br>
* <br>
* <b><u>Concept</u>:</b><br>
* <br>
* In order to inform other players of state modification on the Creature, server just need to go through _allPlayers to send Server->Client Packet<br>
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packet to this Creature (to do this use method toSelfAndKnownPlayers)</b></font>
* @param packet
*/
public static void toAllOnlinePlayers(IClientOutgoingPacket packet)
@@ -58,13 +58,11 @@ public class MinionList
}
/**
* Manage the spawn of Minions.<BR>
* <BR>
* <B><U> Actions</U> :</B><BR>
* <BR>
* Manage the spawn of Minions.<br>
* <br>
* <b><u>Actions</u>:</b><br>
* <li>Get the Minion data of all Minions that must be spawn</li>
* <li>For each Minion type, spawn the amount of Minion needed</li><BR>
* <BR>
* <li>For each Minion type, spawn the amount of Minion needed</li><br>
* @param minions
*/
public void spawnMinions(List<MinionHolder> minions)
@@ -260,16 +258,14 @@ public class MinionList
}
/**
* Init a Minion and add it in the world as a visible object.<BR>
* <BR>
* <B><U> Actions</U> :</B><BR>
* <BR>
* Init a Minion and add it in the world as a visible object.<br>
* <br>
* <b><u>Actions</u>:</b><br>
* <li>Get the template of the Minion to spawn</li>
* <li>Create and Init the Minion and generate its Identifier</li>
* <li>Set the Minion HP, MP and Heading</li>
* <li>Set the Minion leader to this RaidBoss</li>
* <li>Init the position of the Minion and add it in the world as a visible object</li><BR>
* <BR>
* <li>Init the position of the Minion and add it in the world as a visible object</li><br>
* @param master MonsterInstance used as master for this minion
* @param minionId The NpcTemplate Identifier of the Minion to spawn
* @return
@@ -33,7 +33,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.
@@ -67,8 +67,7 @@ public class TimeAmountInterpreter
}
/**
* Appends an user-friendly description of the given amount of time to the specified text builder.<BR>
* <BR>
* Appends an user-friendly description of the given amount of time to the specified text builder.<br>
* Please keep in mind, that this method is primarily designed to be used with heap text builders. Therefore, if the given text builder throws an {@link IOException}, this exception will be wrapped in a {@link RuntimeException} and returned to the caller as an unchecked exception.
* @param <T>
* @param textBuilder a character sequence builder
@@ -75,7 +75,7 @@ public class frmAbout
frmAbout.getContentPane().add(lblLoginServer);
final JLabel site = new JLabel(URL);
site.setText("<HTML><FONT color=\"#000099\"><U>" + URL + "</U></FONT></HTML>");
site.setText("<html><font color=\"#000099\"><u>" + URL + "</u></font></html>");
site.setHorizontalAlignment(SwingConstants.CENTER);
site.setBounds(76, 148, 140, 14);
site.addMouseListener(new MouseAdapter()