Removed soulshot recharge task.
This commit is contained in:
@@ -1085,16 +1085,14 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
setCurrentCp(getStatus().getCurrentCp() - 10);
|
||||
}
|
||||
|
||||
final int timeAtk = calculateTimeBetweenAttacks(target, weaponItem);
|
||||
|
||||
// Recharge any active auto soulshot tasks for player (or player's summon if one exists).
|
||||
if (this instanceof L2PcInstance)
|
||||
{
|
||||
((L2PcInstance) this).rechargeAutoSoulShot(true, false, false, timeAtk);
|
||||
((L2PcInstance) this).rechargeAutoSoulShot(true, false, false);
|
||||
}
|
||||
else if (this instanceof L2Summon)
|
||||
{
|
||||
((L2Summon) this).getOwner().rechargeAutoSoulShot(true, false, true, timeAtk);
|
||||
((L2Summon) this).getOwner().rechargeAutoSoulShot(true, false, true);
|
||||
}
|
||||
|
||||
// Verify if soulshots are charged.
|
||||
@@ -1111,6 +1109,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
|
||||
// Get the Attack Speed of the L2Character (delay (in milliseconds) before next attack)
|
||||
// the hit is calculated to happen halfway to the animation - might need further tuning e.g. in bow case
|
||||
final int timeAtk = calculateTimeBetweenAttacks(target, weaponItem);
|
||||
final int timeToHit = timeAtk / 2;
|
||||
_attackEndTime = GameTimeController.getGameTicks();
|
||||
_attackEndTime += (timeAtk / GameTimeController.MILLIS_IN_TICK);
|
||||
@@ -1646,16 +1645,15 @@ public abstract class L2Character extends L2Object implements ISkillsHolder
|
||||
}
|
||||
|
||||
// Recharge AutoSoulShot
|
||||
final int atkTime = Formulas.getInstance().calcMAtkSpd(activeChar, skill, skill.getHitTime());
|
||||
if (skill.useSoulShot())
|
||||
{
|
||||
if (activeChar instanceof L2PcInstance)
|
||||
{
|
||||
((L2PcInstance) activeChar).rechargeAutoSoulShot(true, false, false, atkTime);
|
||||
((L2PcInstance) activeChar).rechargeAutoSoulShot(true, false, false);
|
||||
}
|
||||
else if (this instanceof L2Summon)
|
||||
{
|
||||
((L2Summon) activeChar).getOwner().rechargeAutoSoulShot(true, false, true, atkTime);
|
||||
((L2Summon) activeChar).getOwner().rechargeAutoSoulShot(true, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12331,18 +12331,6 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recharge auto soul shot.
|
||||
* @param physical the physical
|
||||
* @param magic the magic
|
||||
* @param summon the summon
|
||||
* @param atkTime TODO
|
||||
*/
|
||||
public void rechargeAutoSoulShot(boolean physical, boolean magic, boolean summon, int atkTime)
|
||||
{
|
||||
ThreadPool.schedule(() -> rechargeAutoSoulShot(physical, magic, summon), atkTime);
|
||||
}
|
||||
|
||||
class WarnUserTakeBreak implements Runnable
|
||||
{
|
||||
@Override
|
||||
|
@@ -116,7 +116,7 @@ public final class RequestAutoSoulShot extends L2GameClientPacket
|
||||
sm.addString(item.getItemName());
|
||||
activeChar.sendPacket(sm);
|
||||
|
||||
activeChar.rechargeAutoSoulShot(true, true, true, 0);
|
||||
activeChar.rechargeAutoSoulShot(true, true, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -155,7 +155,7 @@ public final class RequestAutoSoulShot extends L2GameClientPacket
|
||||
activeChar.sendPacket(SystemMessageId.SOULSHOTS_GRADE_MISMATCH);
|
||||
}
|
||||
|
||||
activeChar.rechargeAutoSoulShot(true, true, false, 0);
|
||||
activeChar.rechargeAutoSoulShot(true, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -632,7 +632,7 @@ public final class UseItem extends L2GameClientPacket
|
||||
if (item.getItem() instanceof L2Weapon)
|
||||
{
|
||||
// charge Soulshot/Spiritshot like L2OFF
|
||||
activeChar.rechargeAutoSoulShot(true, true, false, 0);
|
||||
activeChar.rechargeAutoSoulShot(true, true, false);
|
||||
item.setChargedSoulshot(L2ItemInstance.CHARGED_NONE);
|
||||
item.setChargedSpiritshot(L2ItemInstance.CHARGED_NONE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user