Here is another minor/cosmetic contribution regarding -> More retail like gameplay.
On L2Off shots getting used AFTER an attack/cast.
On L2j they getting used DURING an attack/cast.
This one bugged me for a while now.
Other differences i noticed :
The following code fixes the "after attack/cast recharge" part.
L2Charakter.java
On L2Off shots getting used AFTER an attack/cast.
On L2j they getting used DURING an attack/cast.
This one bugged me for a while now.
Other differences i noticed :
Retail/L2Off -> activate auto-ss/sps -> ss/sps gets used -> attack mob -> shot consumed (if you don't miss) -> ss/sps gets used again. (even if you´re not attacking anymore).
L2j -> activate auto-ss/sps -> nothing happens -> attack mob -> ss/sps gets used -> ss/sps gets consumed (if you don't miss) -> nothing happens. (only consumes again if you start attacking again.)
The following code fixes the "after attack/cast recharge" part.
L2Charakter.java
- Code:
@@ -746,14 +742,14 @@
}
- // 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);
- }
- else if (this instanceof L2Summon)
- {
- ((L2Summon) this).getOwner().rechargeAutoSoulShot(true, false, true);
- }
@@ -1234,32 +1414,32 @@
}
- // Recharge AutoSoulShot
- if (skill.useSoulShot())
- {
- if (this instanceof L2PcInstance)
- {
- ((L2PcInstance) this).rechargeAutoSoulShot(true, false, false);
- }
- else if (this instanceof L2Summon)
- {
- ((L2Summon) this).getOwner().rechargeAutoSoulShot(true, false, true);
- }
- else if (this instanceof L2NpcInstance)
- {
- ((L2NpcInstance) this).rechargeAutoSoulShot(true, false);
- }
- }
- else if (skill.useSpiritShot())
- {
- if (this instanceof L2PcInstance)
- {
- ((L2PcInstance) this).rechargeAutoSoulShot(false, true, false);
- }
- else if (this instanceof L2Summon)
- {
- ((L2Summon) this).getOwner().rechargeAutoSoulShot(false, true, true);
- }
- }
// Get all possible targets of the skill in a table in function of the skill target type
L2Object[] targets = skill.getTargetList(this);
@@ -5031,52 +5217,81 @@
// Launch weapon Special ability effect if available
L2Weapon activeWeapon = getActiveWeaponItem();
if (activeWeapon != null)
{
activeWeapon.getSkillEffects(this, target);
}
}
+
+ // 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);
+ }
+ else if (this instanceof L2Summon)
+ {
+ ((L2Summon) this).getOwner().rechargeAutoSoulShot(true, false, true);
+ }
@@ -5692,7 +5907,35 @@
{
consumeItem(skill.getItemConsumeId(), skill.getItemConsume());
}
+
+ // Recharge AutoSoulShot
+ if (skill.useSoulShot())
+ {
+ if (this instanceof L2PcInstance)
+ {
+ ((L2PcInstance) this).rechargeAutoSoulShot(true, false, false);
+ }
+ else if (this instanceof L2Summon)
+ {
+ ((L2Summon) this).getOwner().rechargeAutoSoulShot(true, false, true);
+ }
+ else if (this instanceof L2NpcInstance)
+ {
+ ((L2NpcInstance) this).rechargeAutoSoulShot(true, false);
+ }
+ }
+ else if (skill.useSpiritShot())
+ {
+ if (this instanceof L2PcInstance)
+ {
+ ((L2PcInstance) this).rechargeAutoSoulShot(false, true, false);
+ }
+ else if (this instanceof L2Summon)
+ {
+ ((L2Summon) this).getOwner().rechargeAutoSoulShot(false, true, true);
+ }
+ }
+
// Launch the magic skill in order to calculate its effects
callSkill(skill, targets, status);
Last edited by Karakan on 12th July 2019, 15:31; edited 1 time in total