Interrupt fix.

Contributed by Sahar.
This commit is contained in:
MobiusDev 2015-08-30 08:01:36 +00:00
parent 40baf02531
commit 2ccc3a155a

View File

@ -523,7 +523,8 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
/**
* Remove the L2Character 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 L2World </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 L2World </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()
{
@ -3582,7 +3583,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
* A L2Character 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 L2PcInstance</B></FONT><br> <B><U>Example of use</U>:</B> <ul> <li>Equip an item from inventory</li> <li>Learn a new passive skill</li> <li>Use an active skill</li> </ul>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method is ONLY for L2PcInstance</B></FONT><br>
* <B><U>Example of use</U>:</B>
* <ul>
* <li>Equip an item from inventory</li>
* <li>Learn a new passive skill</li>
* <li>Use an active skill</li>
* </ul>
* @param functions The list of Func objects to add to the Calculator corresponding to the state affected
*/
public final void addStatFuncs(List<AbstractFunction> functions)
@ -3672,7 +3679,12 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
* A L2Character 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 L2PcInstance</B></FONT><br> <B><U>Example of use</U>:</B> <ul> <li>Unequip an item from inventory</li> <li>Stop an active skill</li> </ul>
* <FONT COLOR=#FF0000><B> <U>Caution</U> : This method is ONLY for L2PcInstance</B></FONT><br>
* <B><U>Example of use</U>:</B>
* <ul>
* <li>Unequip an item from inventory</li>
* <li>Stop an active skill</li>
* </ul>
* @param functions The list of Func objects to add to the Calculator corresponding to the state affected
*/
public final void removeStatFuncs(AbstractFunction[] functions)
@ -4125,7 +4137,8 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
* 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 L2Character 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()
@ -4207,7 +4220,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
double delta = (dx * dx) + (dy * dy);
if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided
&& !isFloating)
&& !isFloating)
{
delta = Math.sqrt(delta);
}
@ -4416,7 +4429,11 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
* <li>Add the L2Character to movingObjects of the GameTimeController</li>
* <li>Create a task to notify the AI that L2Character 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> <ul> <li>AI : onIntentionMoveTo(Location), onIntentionPickUp(L2Object), onIntentionInteract(L2Object)</li> <li>FollowTask</li>
* <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>
* <ul>
* <li>AI : onIntentionMoveTo(Location), onIntentionPickUp(L2Object), onIntentionInteract(L2Object)</li>
* <li>FollowTask</li>
* </ul>
* @param x The X position of the destination
* @param y The Y position of the destination
@ -4523,7 +4540,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
m.disregardingGeodata = false;
if (!isFlying() // flying chars not checked - even canSeeTarget doesn't work yet
&& (!isInsideZone(ZoneId.WATER) || isInsideZone(ZoneId.SIEGE))) // swimming also not checked unless in siege zone - but distance is limited
&& (!isInsideZone(ZoneId.WATER) || isInsideZone(ZoneId.SIEGE))) // swimming also not checked unless in siege zone - but distance is limited
{
final boolean isInVehicle = isPlayer() && (getActingPlayer().getVehicle() != null);
if (isInVehicle)
@ -4541,7 +4558,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Movement checks:
// when PATHFINDING > 0, for all characters except mobs returning home (could be changed later to teleport if pathfinding fails)
if (((Config.PATHFINDING > 0) && (!(isAttackable() && ((L2Attackable) this).isReturningToSpawnPoint()))) //
|| (isPlayer() && !(isInVehicle && (distance > 1500))))
|| (isPlayer() && !(isInVehicle && (distance > 1500))))
{
if (isOnGeodataPath())
{
@ -4845,8 +4862,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
/**
* <B><U> Overridden in </U> :</B>
* <li>L2PcInstance</li>
* <B><U> Overridden in </U> :</B> <li>L2PcInstance</li>
* @return True if arrows are available.
*/
protected boolean checkAndEquipArrows()
@ -4855,8 +4871,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
/**
* <B><U> Overridden in </U> :</B>
* <li>L2PcInstance</li>
* <B><U> Overridden in </U> :</B> <li>L2PcInstance</li>
* @return True if bolts are available.
*/
protected boolean checkAndEquipBolts()
@ -4866,9 +4881,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
/**
* Add Exp and Sp to the L2Character.<br>
* <B><U> Overridden in </U> :</B>
* <li>L2PcInstance</li>
* <li>L2PetInstance</li>
* <B><U> Overridden in </U> :</B> <li>L2PcInstance</li> <li>L2PetInstance</li>
* @param addToExp
* @param addToSp
*/
@ -4878,29 +4891,25 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
}
/**
* <B><U> Overridden in </U> :</B>
* <li>L2PcInstance</li>
* <B><U> Overridden in </U> :</B> <li>L2PcInstance</li>
* @return the active weapon instance (always equiped in the right hand).
*/
public abstract L2ItemInstance getActiveWeaponInstance();
/**
* <B><U> Overridden in </U> :</B>
* <li>L2PcInstance</li>
* <B><U> Overridden in </U> :</B> <li>L2PcInstance</li>
* @return the active weapon item (always equiped in the right hand).
*/
public abstract L2Weapon getActiveWeaponItem();
/**
* <B><U> Overridden in </U> :</B>
* <li>L2PcInstance</li>
* <B><U> Overridden in </U> :</B> <li>L2PcInstance</li>
* @return the secondary weapon instance (always equiped in the left hand).
*/
public abstract L2ItemInstance getSecondaryWeaponInstance();
/**
* <B><U> Overridden in </U> :</B>
* <li>L2PcInstance</li>
* <B><U> Overridden in </U> :</B> <li>L2PcInstance</li>
* @return the secondary {@link L2Item} item (always equiped in the left hand).
*/
public abstract L2Item getSecondaryWeaponItem();
@ -5152,8 +5161,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
/**
* Reduce the arrow number of the L2Character.<br>
* <B><U> Overridden in </U> :</B>
* <li>L2PcInstance</li>
* <B><U> Overridden in </U> :</B> <li>L2PcInstance</li>
* @param bolts
*/
protected void reduceArrowCount(boolean bolts)
@ -5515,7 +5523,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
{
switch (skill.getTargetType())
{
// only AURA-type skills can be cast without target
// only AURA-type skills can be cast without target
case AURA:
case FRONT_AURA:
case BEHIND_AURA:
@ -5556,7 +5564,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Healing party members should ignore LOS.
if (((skill.getTargetType() != L2TargetType.PARTY) || !skill.hasEffectType(L2EffectType.HEAL)) //
&& !GeoData.getInstance().canSeeTarget(this, target))
&& (mut.getSkillTime() > 550) && !GeoData.getInstance().canSeeTarget(this, target))
{
skipLOS++;
continue;
@ -5841,7 +5849,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
// Quest event ON_SPELL_FNISHED
protected void notifyQuestEventSkillFinished(Skill skill, L2Object target)
{
}
/**
@ -6591,7 +6599,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
*/
public void sendDamageMessage(L2Character target, int damage, boolean mcrit, boolean pcrit, boolean miss)
{
}
public byte getAttackElement()