Support for Blessed Soulshots.

This commit is contained in:
MobiusDev
2017-06-29 19:14:30 +00:00
parent 57b647f5fd
commit 9d3c1fd5cc
45 changed files with 639 additions and 39 deletions

View File

@@ -23,6 +23,7 @@ public enum ShotType
{
SOULSHOTS,
SPIRITSHOTS,
BLESSED_SOULSHOTS,
BLESSED_SPIRITSHOTS,
FISH_SOULSHOTS;

View File

@@ -1134,7 +1134,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
setCurrentCp(getCurrentCp() - 10);
}
final boolean wasSSCharged = isChargedShot(ShotType.SOULSHOTS); // Verify if soulshots are charged.
final boolean wasSSCharged = isChargedShot(ShotType.SOULSHOTS) || isChargedShot(ShotType.BLESSED_SOULSHOTS); // Verify if soulshots are charged.
final int timeAtk = Formulas.calculateTimeBetweenAttacks(this, weaponType); // Get the Attack Speed of the L2Character (delay (in milliseconds) before next attack)
final int timeToHit = timeAtk / 2; // the hit is calculated to happen halfway to the animation - might need further tuning e.g. in bow case
final int ssGrade = (weaponItem != null) ? weaponItem.getItemGrade().ordinal() : 0;
@@ -4013,7 +4013,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
else
{
// If we didn't miss the hit, discharge the shoulshots, if any
setChargedShot(ShotType.SOULSHOTS, false);
setChargedShot(isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
}
// Check Raidboss attack

View File

@@ -1467,7 +1467,7 @@ public final class Skill implements IIdentifiable
}
else if (useSoulShot())
{
caster.setChargedShot(ShotType.SOULSHOTS, false);
caster.setChargedShot(caster.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
}
}

View File

@@ -221,7 +221,7 @@ public class SkillChannelizer implements Runnable
}
else
{
_channelizer.setChargedShot(ShotType.SOULSHOTS, false);
_channelizer.setChargedShot(_channelizer.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
}
// Shots are re-charged every cast.