Proper soulshot toggle.

Contributed by gigilo1968.
This commit is contained in:
MobiusDev
2017-09-23 14:51:18 +00:00
parent 013b789b40
commit 74f1bdbf36
77 changed files with 262 additions and 829 deletions

View File

@@ -806,10 +806,6 @@ ExpertisePenalty = True
# Default: True
StoreCharUiSettings = True
# Enable automatic Shot usage on player login or weapon equipped.
# Default: True
EnableAutoShots = True
# Character name restriction
# Disallow characters to have a name which contains the words.
# Split them with ",". Example: announcements,announce...

View File

@@ -112,7 +112,5 @@ public final class Summon extends AbstractEffect
summon.setShowSummonAnimation(true);
summon.setRunning();
summon.spawnMe();
player.handleAutoShots(false);
}
}

View File

@@ -103,7 +103,5 @@ public final class SummonMulti extends AbstractEffect
summon.setShowSummonAnimation(true);
summon.setRunning();
summon.spawnMe();
player.handleAutoShots(false);
}
}

View File

@@ -63,7 +63,6 @@ public class BeastSoulShot implements IItemHandler
final List<L2Summon> aliveServitor = playable.getServitors().values().stream().filter(s -> !s.isDead()).collect(Collectors.toList());
if ((pet == null) && aliveServitor.isEmpty())
{
activeOwner.sendMessage("asdas");
activeOwner.sendPacket(SystemMessageId.SOULSHOTS_AND_SPIRITSHOTS_ARE_NOT_AVAILABLE_FOR_A_DEAD_PET_OR_SERVITOR_SAD_ISN_T_IT);
return false;
}
@@ -121,7 +120,7 @@ public class BeastSoulShot implements IItemHandler
{
if (!pet.isChargedShot(ShotType.SOULSHOTS))
{
pet.setChargedShot(ShotType.SOULSHOTS, true);
pet.chargeShot(ShotType.SOULSHOTS);
// Visual effect change if player has equipped Ruby lvl 3 or higher
if (activeOwner.getActiveRubyJewel() != null)
{
@@ -138,7 +137,7 @@ public class BeastSoulShot implements IItemHandler
{
if (!s.isChargedShot(ShotType.SOULSHOTS))
{
s.setChargedShot(ShotType.SOULSHOTS, true);
s.chargeShot(ShotType.SOULSHOTS);
// Visual effect change if player has equipped Ruby lvl 3 or higher
if (activeOwner.getActiveRubyJewel() != null)
{

View File

@@ -122,7 +122,7 @@ public class BeastSpiritShot implements IItemHandler
{
if (!pet.isChargedShot(shotType))
{
pet.setChargedShot(shotType, true);
pet.chargeShot(shotType);
// Visual effect change if player has equipped Sapphire lvl 3 or higher
if (activeOwner.getActiveShappireJewel() != null)
{
@@ -139,7 +139,7 @@ public class BeastSpiritShot implements IItemHandler
{
if (!s.isChargedShot(shotType))
{
s.setChargedShot(shotType, true);
s.chargeShot(shotType);
// Visual effect change if player has equipped Sapphire lvl 3 or higher
if (activeOwner.getActiveShappireJewel() != null)
{

View File

@@ -104,7 +104,7 @@ public class BlessedSoulShots implements IItemHandler
return false;
}
// Charge soul shot
weaponInst.setChargedShot(ShotType.BLESSED_SOULSHOTS, true);
activeChar.chargeShot(ShotType.BLESSED_SOULSHOTS);
}
finally
{

View File

@@ -94,7 +94,7 @@ public class BlessedSpiritShot implements IItemHandler
}
// Charge Spirit shot
activeChar.setChargedShot(ShotType.SPIRITSHOTS, true);
activeChar.chargeShot(ShotType.SPIRITSHOTS);
// Send message to client
if (!activeChar.getAutoSoulShot().contains(item.getId()))

View File

@@ -75,7 +75,7 @@ public class FishShots implements IItemHandler
return false;
}
activeChar.setChargedShot(ShotType.FISH_SOULSHOTS, true);
activeChar.chargeShot(ShotType.FISH_SOULSHOTS);
activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
final L2Object oldTarget = activeChar.getTarget();
activeChar.setTarget(activeChar);

View File

@@ -101,7 +101,7 @@ public class SoulShots implements IItemHandler
return false;
}
// Charge soul shot
weaponInst.setChargedShot(ShotType.SOULSHOTS, true);
activeChar.chargeShot(ShotType.SOULSHOTS);
}
finally
{

View File

@@ -94,7 +94,7 @@ public class SpiritShot implements IItemHandler
}
// Charge Spirit shot
activeChar.setChargedShot(ShotType.SPIRITSHOTS, true);
activeChar.chargeShot(ShotType.SPIRITSHOTS);
// Send message to client
if (!activeChar.getAutoSoulShot().contains(item.getId()))