Proper soulshot toggle.
Contributed by gigilo1968.
This commit is contained in:
parent
013b789b40
commit
74f1bdbf36
@ -63,7 +63,6 @@ public class BeastSoulShot implements IItemHandler
|
|||||||
final List<L2Summon> aliveServitor = playable.getServitors().values().stream().filter(s -> !s.isDead()).collect(Collectors.toList());
|
final List<L2Summon> aliveServitor = playable.getServitors().values().stream().filter(s -> !s.isDead()).collect(Collectors.toList());
|
||||||
if ((pet == null) && aliveServitor.isEmpty())
|
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);
|
activeOwner.sendPacket(SystemMessageId.SOULSHOTS_AND_SPIRITSHOTS_ARE_NOT_AVAILABLE_FOR_A_DEAD_PET_OR_SERVITOR_SAD_ISN_T_IT);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -245,14 +245,18 @@ public class Fishing
|
|||||||
}
|
}
|
||||||
|
|
||||||
double chance = baitData.getChance();
|
double chance = baitData.getChance();
|
||||||
if (_player.isChargedShot(ShotType.FISH_SOULSHOTS))
|
final boolean isCharged = _player.isChargedShot(ShotType.FISH_SOULSHOTS);
|
||||||
|
if (isCharged)
|
||||||
{
|
{
|
||||||
chance *= 1.25; // +25 % chance to win
|
chance *= 1.50; // +50 % chance to win
|
||||||
_player.setChargedShot(ShotType.FISH_SOULSHOTS, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Rnd.get(0, 100) <= chance)
|
if (Rnd.get(0, 100) <= chance)
|
||||||
{
|
{
|
||||||
|
if (isCharged)
|
||||||
|
{
|
||||||
|
_player.setChargedShot(ShotType.FISH_SOULSHOTS, false);
|
||||||
|
}
|
||||||
reelIn(FishingEndReason.WIN, true);
|
reelIn(FishingEndReason.WIN, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -806,10 +806,6 @@ ExpertisePenalty = True
|
|||||||
# Default: True
|
# Default: True
|
||||||
StoreCharUiSettings = True
|
StoreCharUiSettings = True
|
||||||
|
|
||||||
# Enable automatic Shot usage on player login or weapon equipped.
|
|
||||||
# Default: True
|
|
||||||
EnableAutoShots = True
|
|
||||||
|
|
||||||
# Character name restriction
|
# Character name restriction
|
||||||
# Disallow characters to have a name which contains the words.
|
# Disallow characters to have a name which contains the words.
|
||||||
# Split them with ",". Example: announcements,announce...
|
# Split them with ",". Example: announcements,announce...
|
||||||
|
@ -112,7 +112,5 @@ public final class Summon extends AbstractEffect
|
|||||||
summon.setShowSummonAnimation(true);
|
summon.setShowSummonAnimation(true);
|
||||||
summon.setRunning();
|
summon.setRunning();
|
||||||
summon.spawnMe();
|
summon.spawnMe();
|
||||||
|
|
||||||
player.handleAutoShots(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,5 @@ public final class SummonMulti extends AbstractEffect
|
|||||||
summon.setShowSummonAnimation(true);
|
summon.setShowSummonAnimation(true);
|
||||||
summon.setRunning();
|
summon.setRunning();
|
||||||
summon.spawnMe();
|
summon.spawnMe();
|
||||||
|
|
||||||
player.handleAutoShots(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,6 @@ public class BeastSoulShot implements IItemHandler
|
|||||||
final List<L2Summon> aliveServitor = playable.getServitors().values().stream().filter(s -> !s.isDead()).collect(Collectors.toList());
|
final List<L2Summon> aliveServitor = playable.getServitors().values().stream().filter(s -> !s.isDead()).collect(Collectors.toList());
|
||||||
if ((pet == null) && aliveServitor.isEmpty())
|
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);
|
activeOwner.sendPacket(SystemMessageId.SOULSHOTS_AND_SPIRITSHOTS_ARE_NOT_AVAILABLE_FOR_A_DEAD_PET_OR_SERVITOR_SAD_ISN_T_IT);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -121,7 +120,7 @@ public class BeastSoulShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!pet.isChargedShot(ShotType.SOULSHOTS))
|
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
|
// Visual effect change if player has equipped Ruby lvl 3 or higher
|
||||||
if (activeOwner.getActiveRubyJewel() != null)
|
if (activeOwner.getActiveRubyJewel() != null)
|
||||||
{
|
{
|
||||||
@ -138,7 +137,7 @@ public class BeastSoulShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!s.isChargedShot(ShotType.SOULSHOTS))
|
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
|
// Visual effect change if player has equipped Ruby lvl 3 or higher
|
||||||
if (activeOwner.getActiveRubyJewel() != null)
|
if (activeOwner.getActiveRubyJewel() != null)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ public class BeastSpiritShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!pet.isChargedShot(shotType))
|
if (!pet.isChargedShot(shotType))
|
||||||
{
|
{
|
||||||
pet.setChargedShot(shotType, true);
|
pet.chargeShot(shotType);
|
||||||
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
||||||
if (activeOwner.getActiveShappireJewel() != null)
|
if (activeOwner.getActiveShappireJewel() != null)
|
||||||
{
|
{
|
||||||
@ -139,7 +139,7 @@ public class BeastSpiritShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!s.isChargedShot(shotType))
|
if (!s.isChargedShot(shotType))
|
||||||
{
|
{
|
||||||
s.setChargedShot(shotType, true);
|
s.chargeShot(shotType);
|
||||||
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
||||||
if (activeOwner.getActiveShappireJewel() != null)
|
if (activeOwner.getActiveShappireJewel() != null)
|
||||||
{
|
{
|
||||||
|
@ -104,7 +104,7 @@ public class BlessedSoulShots implements IItemHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Charge soul shot
|
// Charge soul shot
|
||||||
weaponInst.setChargedShot(ShotType.BLESSED_SOULSHOTS, true);
|
activeChar.chargeShot(ShotType.BLESSED_SOULSHOTS);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ public class BlessedSpiritShot implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Charge Spirit shot
|
// Charge Spirit shot
|
||||||
activeChar.setChargedShot(ShotType.SPIRITSHOTS, true);
|
activeChar.chargeShot(ShotType.SPIRITSHOTS);
|
||||||
|
|
||||||
// Send message to client
|
// Send message to client
|
||||||
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
||||||
|
@ -75,7 +75,7 @@ public class FishShots implements IItemHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
activeChar.setChargedShot(ShotType.FISH_SOULSHOTS, true);
|
activeChar.chargeShot(ShotType.FISH_SOULSHOTS);
|
||||||
activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
|
activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
|
||||||
final L2Object oldTarget = activeChar.getTarget();
|
final L2Object oldTarget = activeChar.getTarget();
|
||||||
activeChar.setTarget(activeChar);
|
activeChar.setTarget(activeChar);
|
||||||
|
@ -101,7 +101,7 @@ public class SoulShots implements IItemHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Charge soul shot
|
// Charge soul shot
|
||||||
weaponInst.setChargedShot(ShotType.SOULSHOTS, true);
|
activeChar.chargeShot(ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ public class SpiritShot implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Charge Spirit shot
|
// Charge Spirit shot
|
||||||
activeChar.setChargedShot(ShotType.SPIRITSHOTS, true);
|
activeChar.chargeShot(ShotType.SPIRITSHOTS);
|
||||||
|
|
||||||
// Send message to client
|
// Send message to client
|
||||||
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
||||||
|
@ -283,7 +283,6 @@ public final class Config
|
|||||||
public static boolean EXPERTISE_PENALTY;
|
public static boolean EXPERTISE_PENALTY;
|
||||||
public static boolean STORE_RECIPE_SHOPLIST;
|
public static boolean STORE_RECIPE_SHOPLIST;
|
||||||
public static boolean STORE_UI_SETTINGS;
|
public static boolean STORE_UI_SETTINGS;
|
||||||
public static boolean ENABLE_AUTO_SHOTS;
|
|
||||||
public static String[] FORBIDDEN_NAMES;
|
public static String[] FORBIDDEN_NAMES;
|
||||||
public static boolean SILENCE_MODE_EXCLUDE;
|
public static boolean SILENCE_MODE_EXCLUDE;
|
||||||
public static boolean SHOW_GOD_VIDEO_INTRO;
|
public static boolean SHOW_GOD_VIDEO_INTRO;
|
||||||
@ -1680,7 +1679,6 @@ public final class Config
|
|||||||
EXPERTISE_PENALTY = Character.getBoolean("ExpertisePenalty", true);
|
EXPERTISE_PENALTY = Character.getBoolean("ExpertisePenalty", true);
|
||||||
STORE_RECIPE_SHOPLIST = Character.getBoolean("StoreRecipeShopList", false);
|
STORE_RECIPE_SHOPLIST = Character.getBoolean("StoreRecipeShopList", false);
|
||||||
STORE_UI_SETTINGS = Character.getBoolean("StoreCharUiSettings", true);
|
STORE_UI_SETTINGS = Character.getBoolean("StoreCharUiSettings", true);
|
||||||
ENABLE_AUTO_SHOTS = Character.getBoolean("EnableAutoShots", true);
|
|
||||||
FORBIDDEN_NAMES = Character.getString("ForbiddenNames", "").split(",");
|
FORBIDDEN_NAMES = Character.getString("ForbiddenNames", "").split(",");
|
||||||
SILENCE_MODE_EXCLUDE = Character.getBoolean("SilenceModeExclude", false);
|
SILENCE_MODE_EXCLUDE = Character.getBoolean("SilenceModeExclude", false);
|
||||||
SHOW_GOD_VIDEO_INTRO = Character.getBoolean("GoDVideoIntro", true);
|
SHOW_GOD_VIDEO_INTRO = Character.getBoolean("GoDVideoIntro", true);
|
||||||
|
@ -247,8 +247,7 @@ public class Fishing
|
|||||||
double chance = baitData.getChance();
|
double chance = baitData.getChance();
|
||||||
if (_player.isChargedShot(ShotType.FISH_SOULSHOTS))
|
if (_player.isChargedShot(ShotType.FISH_SOULSHOTS))
|
||||||
{
|
{
|
||||||
chance *= 1.25; // +25 % chance to win
|
chance *= 1.5; // +50 % chance to win
|
||||||
_player.setChargedShot(ShotType.FISH_SOULSHOTS, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Rnd.get(0, 100) <= chance)
|
if (Rnd.get(0, 100) <= chance)
|
||||||
|
@ -21,7 +21,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.handler.ActionHandler;
|
import com.l2jmobius.gameserver.handler.ActionHandler;
|
||||||
import com.l2jmobius.gameserver.handler.ActionShiftHandler;
|
import com.l2jmobius.gameserver.handler.ActionShiftHandler;
|
||||||
import com.l2jmobius.gameserver.handler.IActionHandler;
|
import com.l2jmobius.gameserver.handler.IActionHandler;
|
||||||
@ -454,35 +453,6 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if current object has charged shot.
|
|
||||||
* @param type of the shot to be checked.
|
|
||||||
* @return {@code true} if the object has charged shot
|
|
||||||
*/
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Charging shot into the current object.
|
|
||||||
* @param type of the shot to be charged.
|
|
||||||
* @param charged
|
|
||||||
*/
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Try to recharge a shot.
|
|
||||||
* @param physical skill are using Soul shots.
|
|
||||||
* @param magical skill are using Spirit shots.
|
|
||||||
* @param fish
|
|
||||||
*/
|
|
||||||
public void rechargeShots(boolean physical, boolean magical, boolean fish)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param <T>
|
* @param <T>
|
||||||
* @param script
|
* @param script
|
||||||
|
@ -21,6 +21,7 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
|||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.EnumSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -269,6 +270,9 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
/** A map holding info about basic property mesmerizing system. */
|
/** A map holding info about basic property mesmerizing system. */
|
||||||
private volatile Map<BasicProperty, BasicPropertyResist> _basicPropertyResists;
|
private volatile Map<BasicProperty, BasicPropertyResist> _basicPropertyResists;
|
||||||
|
|
||||||
|
/** A set containing the shot types currently charged. */
|
||||||
|
private Set<ShotType> _chargedShots = EnumSet.noneOf(ShotType.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a creature.
|
* Creates a creature.
|
||||||
* @param template the creature template
|
* @param template the creature template
|
||||||
@ -3861,7 +3865,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If we didn't miss the hit, discharge the shoulshots, if any
|
// If we didn't miss the hit, discharge the shoulshots, if any
|
||||||
setChargedShot(isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
|
unchargeShot(isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Raidboss attack
|
// Check Raidboss attack
|
||||||
@ -5533,4 +5537,37 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
return calculateDistance(target, true, false);
|
return calculateDistance(target, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isChargedShot(ShotType type)
|
||||||
|
{
|
||||||
|
return _chargedShots.contains(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param type of the shot to charge
|
||||||
|
* @return {@code true} if there was no shot of this type charged before, {@code false} otherwise.
|
||||||
|
*/
|
||||||
|
public boolean chargeShot(ShotType type)
|
||||||
|
{
|
||||||
|
return _chargedShots.add(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param type of the shot to uncharge
|
||||||
|
* @return {@code true} if there was a charged shot of this type, {@code false} otherwise.
|
||||||
|
*/
|
||||||
|
public boolean unchargeShot(ShotType type)
|
||||||
|
{
|
||||||
|
return _chargedShots.remove(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unchargeAllShots()
|
||||||
|
{
|
||||||
|
_chargedShots = EnumSet.noneOf(ShotType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
||||||
|
{
|
||||||
|
// Dummy method to be overriden.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,6 @@ public class L2Npc extends L2Character
|
|||||||
private int _spiritshotamount = 0;
|
private int _spiritshotamount = 0;
|
||||||
private int _displayEffect = 0;
|
private int _displayEffect = 0;
|
||||||
|
|
||||||
private int _shotsMask = 0;
|
|
||||||
private int _killingBlowWeaponId;
|
private int _killingBlowWeaponId;
|
||||||
|
|
||||||
private int _cloneObjId; // Used in NpcInfo packet to clone the specified player.
|
private int _cloneObjId; // Used in NpcInfo packet to clone the specified player.
|
||||||
@ -1301,25 +1300,6 @@ public class L2Npc extends L2Character
|
|||||||
return WalkingManager.getInstance().isRegistered(this);
|
return WalkingManager.getInstance().isRegistered(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return (_shotsMask & type.getMask()) == type.getMask();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
if (charged)
|
|
||||||
{
|
|
||||||
_shotsMask |= type.getMask();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_shotsMask &= ~type.getMask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
||||||
{
|
{
|
||||||
@ -1331,7 +1311,7 @@ public class L2Npc extends L2Character
|
|||||||
}
|
}
|
||||||
_soulshotamount--;
|
_soulshotamount--;
|
||||||
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2154, 1, 0, 0), 600);
|
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2154, 1, 0, 0), 600);
|
||||||
setChargedShot(ShotType.SOULSHOTS, true);
|
chargeShot(ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (magic && (_spiritshotamount > 0))
|
if (magic && (_spiritshotamount > 0))
|
||||||
@ -1342,7 +1322,7 @@ public class L2Npc extends L2Character
|
|||||||
}
|
}
|
||||||
_spiritshotamount--;
|
_spiritshotamount--;
|
||||||
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2061, 1, 0, 0), 600);
|
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2061, 1, 0, 0), 600);
|
||||||
setChargedShot(ShotType.SPIRITSHOTS, true);
|
chargeShot(ShotType.SPIRITSHOTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
|||||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.enums.Team;
|
import com.l2jmobius.gameserver.enums.Team;
|
||||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
import com.l2jmobius.gameserver.handler.ItemHandler;
|
import com.l2jmobius.gameserver.handler.ItemHandler;
|
||||||
@ -77,7 +76,6 @@ public abstract class L2Summon extends L2Playable
|
|||||||
private boolean _follow = true;
|
private boolean _follow = true;
|
||||||
private boolean _previousFollowStatus = true;
|
private boolean _previousFollowStatus = true;
|
||||||
protected boolean _restoreSummon = true;
|
protected boolean _restoreSummon = true;
|
||||||
private int _shotsMask = 0;
|
|
||||||
private int _summonPoints = 0;
|
private int _summonPoints = 0;
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
@ -1026,25 +1024,6 @@ public abstract class L2Summon extends L2Playable
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return (_shotsMask & type.getMask()) == type.getMask();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
if (charged)
|
|
||||||
{
|
|
||||||
_shotsMask |= type.getMask();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_shotsMask &= ~type.getMask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,6 @@ import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
|||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.enums.Sex;
|
import com.l2jmobius.gameserver.enums.Sex;
|
||||||
import com.l2jmobius.gameserver.enums.ShortcutType;
|
import com.l2jmobius.gameserver.enums.ShortcutType;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.enums.StatusUpdateType;
|
import com.l2jmobius.gameserver.enums.StatusUpdateType;
|
||||||
import com.l2jmobius.gameserver.enums.SubclassInfoType;
|
import com.l2jmobius.gameserver.enums.SubclassInfoType;
|
||||||
import com.l2jmobius.gameserver.enums.Team;
|
import com.l2jmobius.gameserver.enums.Team;
|
||||||
@ -13006,23 +13005,6 @@ public final class L2PcInstance extends L2Playable
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
final L2ItemInstance weapon = getActiveWeaponInstance();
|
|
||||||
return (weapon != null) && weapon.isChargedShot(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
final L2ItemInstance weapon = getActiveWeaponInstance();
|
|
||||||
if (weapon != null)
|
|
||||||
{
|
|
||||||
weapon.setChargedShot(type, charged);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param skillId the display skill Id
|
* @param skillId the display skill Id
|
||||||
* @return the custom skill
|
* @return the custom skill
|
||||||
@ -13874,93 +13856,6 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleAutoShots(boolean force)
|
|
||||||
{
|
|
||||||
if (getAutoSoulShot().isEmpty() && !force)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final L2ItemInstance weapon = getActiveWeaponInstance();
|
|
||||||
int soulShotId = 0;
|
|
||||||
int spiritShotId = 0;
|
|
||||||
int summonSoulShotId = 0;
|
|
||||||
int summonSpiritShotId = 0;
|
|
||||||
|
|
||||||
for (L2ItemInstance item : getInventory().getItems(L2ItemInstance::isEtcItem, i -> i.getItemType() == EtcItemType.SOULSHOT))
|
|
||||||
{
|
|
||||||
switch (item.getEtcItem().getDefaultAction())
|
|
||||||
{
|
|
||||||
case SOULSHOT:
|
|
||||||
{
|
|
||||||
if ((weapon != null) && (weapon.getItemType() != WeaponType.FISHINGROD) && (weapon.getItem().getCrystalTypePlus() == item.getItem().getCrystalType()))
|
|
||||||
{
|
|
||||||
soulShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SPIRITSHOT:
|
|
||||||
{
|
|
||||||
if ((weapon != null) && (weapon.getItem().getCrystalTypePlus() == item.getItem().getCrystalType()))
|
|
||||||
{
|
|
||||||
spiritShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SUMMON_SOULSHOT:
|
|
||||||
{
|
|
||||||
if (hasSummon())
|
|
||||||
{
|
|
||||||
summonSoulShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SUMMON_SPIRITSHOT:
|
|
||||||
{
|
|
||||||
if (hasSummon())
|
|
||||||
{
|
|
||||||
summonSpiritShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case FISHINGSHOT:
|
|
||||||
{
|
|
||||||
if ((weapon != null) && (weapon.getItemType() == WeaponType.FISHINGROD) && (weapon.getItem().getCrystalType() == item.getItem().getCrystalType()))
|
|
||||||
{
|
|
||||||
soulShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_activeSoulShots.clear();
|
|
||||||
|
|
||||||
if (soulShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(soulShotId);
|
|
||||||
}
|
|
||||||
if (spiritShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(spiritShotId);
|
|
||||||
}
|
|
||||||
if (summonSoulShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(summonSoulShotId);
|
|
||||||
}
|
|
||||||
if (summonSpiritShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(summonSpiritShotId);
|
|
||||||
}
|
|
||||||
|
|
||||||
sendPacket(new ExAutoSoulShot(soulShotId, true, 0));
|
|
||||||
sendPacket(new ExAutoSoulShot(spiritShotId, true, 1));
|
|
||||||
sendPacket(new ExAutoSoulShot(summonSoulShotId, true, 2));
|
|
||||||
sendPacket(new ExAutoSoulShot(summonSpiritShotId, true, 3));
|
|
||||||
|
|
||||||
rechargeShots(true, true, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GroupType getGroupType()
|
public GroupType getGroupType()
|
||||||
{
|
{
|
||||||
return isInParty() ? (getParty().isInCommandChannel() ? GroupType.COMMAND_CHANNEL : GroupType.PARTY) : GroupType.NONE;
|
return isInParty() ? (getParty().isInCommandChannel() ? GroupType.COMMAND_CHANNEL : GroupType.PARTY) : GroupType.NONE;
|
||||||
|
@ -370,11 +370,6 @@ public abstract class Inventory extends ItemContainer
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isWeapon())
|
|
||||||
{
|
|
||||||
player.handleAutoShots(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply skill, if weapon have "skills on unequip"
|
// Apply skill, if weapon have "skills on unequip"
|
||||||
@ -388,6 +383,11 @@ public abstract class Inventory extends ItemContainer
|
|||||||
{
|
{
|
||||||
player.sendPacket(new SkillCoolTime(player));
|
player.sendPacket(new SkillCoolTime(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.isWeapon())
|
||||||
|
{
|
||||||
|
player.unchargeAllShots();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -399,6 +399,13 @@ public abstract class Inventory extends ItemContainer
|
|||||||
}
|
}
|
||||||
|
|
||||||
final L2PcInstance player = (L2PcInstance) inventory.getOwner();
|
final L2PcInstance player = (L2PcInstance) inventory.getOwner();
|
||||||
|
|
||||||
|
// Any items equipped that result in expertise penalty do not give any skills at all.
|
||||||
|
if (item.getItem().getCrystalType().getId() > player.getExpertiseLevel())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final AtomicBoolean update = new AtomicBoolean();
|
final AtomicBoolean update = new AtomicBoolean();
|
||||||
final AtomicBoolean updateTimestamp = new AtomicBoolean();
|
final AtomicBoolean updateTimestamp = new AtomicBoolean();
|
||||||
|
|
||||||
@ -466,11 +473,6 @@ public abstract class Inventory extends ItemContainer
|
|||||||
{
|
{
|
||||||
player.sendPacket(new SkillCoolTime(player));
|
player.sendPacket(new SkillCoolTime(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isWeapon())
|
|
||||||
{
|
|
||||||
player.handleAutoShots(Config.ENABLE_AUTO_SHOTS);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,6 +502,12 @@ public abstract class Inventory extends ItemContainer
|
|||||||
update = true;
|
update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Very and apply visual set
|
||||||
|
if (verifyAndApply(player, item, L2ItemInstance::getVisualId))
|
||||||
|
{
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (update)
|
if (update)
|
||||||
{
|
{
|
||||||
player.sendSkillList();
|
player.sendSkillList();
|
||||||
@ -619,6 +627,12 @@ public abstract class Inventory extends ItemContainer
|
|||||||
remove = true;
|
remove = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// verify and remove visual set bonus
|
||||||
|
if (verifyAndRemove(player, item, L2ItemInstance::getVisualId))
|
||||||
|
{
|
||||||
|
remove = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (remove)
|
if (remove)
|
||||||
{
|
{
|
||||||
player.checkItemRestriction();
|
player.checkItemRestriction();
|
||||||
|
@ -460,11 +460,6 @@ public class PcInventory extends Inventory
|
|||||||
actor.sendItemList(false);
|
actor.sendItemList(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isEtcItem() && (item.getItemType() == EtcItemType.SOULSHOT))
|
|
||||||
{
|
|
||||||
actor.handleAutoShots(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Notify to scripts
|
// Notify to scripts
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
||||||
}
|
}
|
||||||
@ -516,11 +511,6 @@ public class PcInventory extends Inventory
|
|||||||
actor.sendItemList(false);
|
actor.sendItemList(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isEtcItem() && (item.getItemType() == EtcItemType.SOULSHOT))
|
|
||||||
{
|
|
||||||
actor.handleAutoShots(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Notify to scripts
|
// Notify to scripts
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.enums.AttributeType;
|
|||||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||||
import com.l2jmobius.gameserver.enums.ItemLocation;
|
import com.l2jmobius.gameserver.enums.ItemLocation;
|
||||||
import com.l2jmobius.gameserver.enums.ItemSkillType;
|
import com.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.enums.UserInfoType;
|
import com.l2jmobius.gameserver.enums.UserInfoType;
|
||||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||||
@ -176,8 +175,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
|
|
||||||
private final DropProtection _dropProtection = new DropProtection();
|
private final DropProtection _dropProtection = new DropProtection();
|
||||||
|
|
||||||
private int _shotsMask = 0;
|
|
||||||
|
|
||||||
private final List<Options> _enchantOptions = new ArrayList<>();
|
private final List<Options> _enchantOptions = new ArrayList<>();
|
||||||
private final Map<Integer, EnsoulOption> _ensoulOptions = new LinkedHashMap<>(3);
|
private final Map<Integer, EnsoulOption> _ensoulOptions = new LinkedHashMap<>(3);
|
||||||
private final Map<Integer, EnsoulOption> _ensoulSpecialOptions = new LinkedHashMap<>(3);
|
private final Map<Integer, EnsoulOption> _ensoulSpecialOptions = new LinkedHashMap<>(3);
|
||||||
@ -1369,7 +1366,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
final InventoryUpdate iu = new InventoryUpdate();
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
for (L2ItemInstance item : unequiped)
|
for (L2ItemInstance item : unequiped)
|
||||||
{
|
{
|
||||||
item.unChargeAllShots();
|
|
||||||
iu.addModifiedItem(item);
|
iu.addModifiedItem(item);
|
||||||
}
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
@ -1797,7 +1793,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
final InventoryUpdate iu = new InventoryUpdate();
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
for (L2ItemInstance item : unequiped)
|
for (L2ItemInstance item : unequiped)
|
||||||
{
|
{
|
||||||
item.unChargeAllShots();
|
|
||||||
iu.addModifiedItem(item);
|
iu.addModifiedItem(item);
|
||||||
}
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
@ -2047,30 +2042,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return (_shotsMask & type.getMask()) == type.getMask();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
if (charged)
|
|
||||||
{
|
|
||||||
_shotsMask |= type.getMask();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_shotsMask &= ~type.getMask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void unChargeAllShots()
|
|
||||||
{
|
|
||||||
_shotsMask = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns enchant effect object for this item
|
* Returns enchant effect object for this item
|
||||||
* @return enchanteffect
|
* @return enchanteffect
|
||||||
|
@ -272,11 +272,7 @@ public abstract class AbstractOlympiadGame
|
|||||||
player.disableAutoShotsAll();
|
player.disableAutoShotsAll();
|
||||||
|
|
||||||
// Discharge any active shots
|
// Discharge any active shots
|
||||||
final L2ItemInstance item = player.getActiveWeaponInstance();
|
player.unchargeAllShots();
|
||||||
if (item != null)
|
|
||||||
{
|
|
||||||
item.unChargeAllShots();
|
|
||||||
}
|
|
||||||
|
|
||||||
// enable skills with cool time <= 15 minutes
|
// enable skills with cool time <= 15 minutes
|
||||||
for (Skill skill : player.getAllSkills())
|
for (Skill skill : player.getAllSkills())
|
||||||
|
@ -1495,11 +1495,11 @@ public final class Skill implements IIdentifiable
|
|||||||
{
|
{
|
||||||
if (useSpiritShot())
|
if (useSpiritShot())
|
||||||
{
|
{
|
||||||
caster.setChargedShot(caster.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS, false);
|
caster.unchargeShot(caster.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS);
|
||||||
}
|
}
|
||||||
else if (useSoulShot())
|
else if (useSoulShot())
|
||||||
{
|
{
|
||||||
caster.setChargedShot(caster.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
|
caster.unchargeShot(caster.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,11 +217,11 @@ public class SkillChannelizer implements Runnable
|
|||||||
// Reduce shots.
|
// Reduce shots.
|
||||||
if (skill.useSpiritShot())
|
if (skill.useSpiritShot())
|
||||||
{
|
{
|
||||||
_channelizer.setChargedShot(_channelizer.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS, false);
|
_channelizer.unchargeShot(_channelizer.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_channelizer.setChargedShot(_channelizer.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
|
_channelizer.unchargeShot(_channelizer.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shots are re-charged every cast.
|
// Shots are re-charged every cast.
|
||||||
|
@ -646,17 +646,11 @@ public class EnterWorld implements IClientIncomingPacket
|
|||||||
activeChar.sendPacket(new ExOneDayReceiveRewardList(activeChar));
|
activeChar.sendPacket(new ExOneDayReceiveRewardList(activeChar));
|
||||||
activeChar.sendPacket(ExConnectedTimeAndGettableReward.STATIC_PACKET);
|
activeChar.sendPacket(ExConnectedTimeAndGettableReward.STATIC_PACKET);
|
||||||
|
|
||||||
if (Config.ENABLE_AUTO_SHOTS)
|
// Handle soulshots, disable all on EnterWorld
|
||||||
{
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 0));
|
||||||
activeChar.handleAutoShots(true);
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 1));
|
||||||
}
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 2));
|
||||||
else
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 3));
|
||||||
{
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 0));
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 1));
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 2));
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 3));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Config.HARDWARE_INFO_ENABLED)
|
if (Config.HARDWARE_INFO_ENABLED)
|
||||||
{
|
{
|
||||||
|
@ -180,11 +180,7 @@ public final class RequestDropItem implements IClientIncomingPacket
|
|||||||
|
|
||||||
if (item.isEquipped())
|
if (item.isEquipped())
|
||||||
{
|
{
|
||||||
final L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInSlotAndRecord(item.getLocationSlot());
|
activeChar.getInventory().unEquipItemInSlot(item.getLocationSlot());
|
||||||
for (L2ItemInstance itm : unequiped)
|
|
||||||
{
|
|
||||||
itm.unChargeAllShots();
|
|
||||||
}
|
|
||||||
activeChar.broadcastUserInfo();
|
activeChar.broadcastUserInfo();
|
||||||
activeChar.sendItemList(true);
|
activeChar.sendItemList(true);
|
||||||
}
|
}
|
||||||
|
@ -806,10 +806,6 @@ ExpertisePenalty = True
|
|||||||
# Default: True
|
# Default: True
|
||||||
StoreCharUiSettings = True
|
StoreCharUiSettings = True
|
||||||
|
|
||||||
# Enable automatic Shot usage on player login or weapon equipped.
|
|
||||||
# Default: True
|
|
||||||
EnableAutoShots = True
|
|
||||||
|
|
||||||
# Character name restriction
|
# Character name restriction
|
||||||
# Disallow characters to have a name which contains the words.
|
# Disallow characters to have a name which contains the words.
|
||||||
# Split them with ",". Example: announcements,announce...
|
# Split them with ",". Example: announcements,announce...
|
||||||
|
@ -112,7 +112,5 @@ public final class Summon extends AbstractEffect
|
|||||||
summon.setShowSummonAnimation(true);
|
summon.setShowSummonAnimation(true);
|
||||||
summon.setRunning();
|
summon.setRunning();
|
||||||
summon.spawnMe();
|
summon.spawnMe();
|
||||||
|
|
||||||
player.handleAutoShots(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,5 @@ public final class SummonMulti extends AbstractEffect
|
|||||||
summon.setShowSummonAnimation(true);
|
summon.setShowSummonAnimation(true);
|
||||||
summon.setRunning();
|
summon.setRunning();
|
||||||
summon.spawnMe();
|
summon.spawnMe();
|
||||||
|
|
||||||
player.handleAutoShots(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,6 @@ public class BeastSoulShot implements IItemHandler
|
|||||||
final List<L2Summon> aliveServitor = playable.getServitors().values().stream().filter(s -> !s.isDead()).collect(Collectors.toList());
|
final List<L2Summon> aliveServitor = playable.getServitors().values().stream().filter(s -> !s.isDead()).collect(Collectors.toList());
|
||||||
if ((pet == null) && aliveServitor.isEmpty())
|
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);
|
activeOwner.sendPacket(SystemMessageId.SOULSHOTS_AND_SPIRITSHOTS_ARE_NOT_AVAILABLE_FOR_A_DEAD_PET_OR_SERVITOR_SAD_ISN_T_IT);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -121,7 +120,7 @@ public class BeastSoulShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!pet.isChargedShot(ShotType.SOULSHOTS))
|
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
|
// Visual effect change if player has equipped Ruby lvl 3 or higher
|
||||||
if (activeOwner.getActiveRubyJewel() != null)
|
if (activeOwner.getActiveRubyJewel() != null)
|
||||||
{
|
{
|
||||||
@ -138,7 +137,7 @@ public class BeastSoulShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!s.isChargedShot(ShotType.SOULSHOTS))
|
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
|
// Visual effect change if player has equipped Ruby lvl 3 or higher
|
||||||
if (activeOwner.getActiveRubyJewel() != null)
|
if (activeOwner.getActiveRubyJewel() != null)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ public class BeastSpiritShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!pet.isChargedShot(shotType))
|
if (!pet.isChargedShot(shotType))
|
||||||
{
|
{
|
||||||
pet.setChargedShot(shotType, true);
|
pet.chargeShot(shotType);
|
||||||
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
||||||
if (activeOwner.getActiveShappireJewel() != null)
|
if (activeOwner.getActiveShappireJewel() != null)
|
||||||
{
|
{
|
||||||
@ -139,7 +139,7 @@ public class BeastSpiritShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!s.isChargedShot(shotType))
|
if (!s.isChargedShot(shotType))
|
||||||
{
|
{
|
||||||
s.setChargedShot(shotType, true);
|
s.chargeShot(shotType);
|
||||||
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
||||||
if (activeOwner.getActiveShappireJewel() != null)
|
if (activeOwner.getActiveShappireJewel() != null)
|
||||||
{
|
{
|
||||||
|
@ -104,7 +104,7 @@ public class BlessedSoulShots implements IItemHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Charge soul shot
|
// Charge soul shot
|
||||||
weaponInst.setChargedShot(ShotType.BLESSED_SOULSHOTS, true);
|
activeChar.chargeShot(ShotType.BLESSED_SOULSHOTS);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ public class BlessedSpiritShot implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Charge Spirit shot
|
// Charge Spirit shot
|
||||||
activeChar.setChargedShot(ShotType.SPIRITSHOTS, true);
|
activeChar.chargeShot(ShotType.SPIRITSHOTS);
|
||||||
|
|
||||||
// Send message to client
|
// Send message to client
|
||||||
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
||||||
|
@ -75,7 +75,7 @@ public class FishShots implements IItemHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
activeChar.setChargedShot(ShotType.FISH_SOULSHOTS, true);
|
activeChar.chargeShot(ShotType.FISH_SOULSHOTS);
|
||||||
activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
|
activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
|
||||||
final L2Object oldTarget = activeChar.getTarget();
|
final L2Object oldTarget = activeChar.getTarget();
|
||||||
activeChar.setTarget(activeChar);
|
activeChar.setTarget(activeChar);
|
||||||
|
@ -101,7 +101,7 @@ public class SoulShots implements IItemHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Charge soul shot
|
// Charge soul shot
|
||||||
weaponInst.setChargedShot(ShotType.SOULSHOTS, true);
|
activeChar.chargeShot(ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ public class SpiritShot implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Charge Spirit shot
|
// Charge Spirit shot
|
||||||
activeChar.setChargedShot(ShotType.SPIRITSHOTS, true);
|
activeChar.chargeShot(ShotType.SPIRITSHOTS);
|
||||||
|
|
||||||
// Send message to client
|
// Send message to client
|
||||||
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
||||||
|
@ -283,7 +283,6 @@ public final class Config
|
|||||||
public static boolean EXPERTISE_PENALTY;
|
public static boolean EXPERTISE_PENALTY;
|
||||||
public static boolean STORE_RECIPE_SHOPLIST;
|
public static boolean STORE_RECIPE_SHOPLIST;
|
||||||
public static boolean STORE_UI_SETTINGS;
|
public static boolean STORE_UI_SETTINGS;
|
||||||
public static boolean ENABLE_AUTO_SHOTS;
|
|
||||||
public static String[] FORBIDDEN_NAMES;
|
public static String[] FORBIDDEN_NAMES;
|
||||||
public static boolean SILENCE_MODE_EXCLUDE;
|
public static boolean SILENCE_MODE_EXCLUDE;
|
||||||
public static boolean SHOW_GOD_VIDEO_INTRO;
|
public static boolean SHOW_GOD_VIDEO_INTRO;
|
||||||
@ -1680,7 +1679,6 @@ public final class Config
|
|||||||
EXPERTISE_PENALTY = Character.getBoolean("ExpertisePenalty", true);
|
EXPERTISE_PENALTY = Character.getBoolean("ExpertisePenalty", true);
|
||||||
STORE_RECIPE_SHOPLIST = Character.getBoolean("StoreRecipeShopList", false);
|
STORE_RECIPE_SHOPLIST = Character.getBoolean("StoreRecipeShopList", false);
|
||||||
STORE_UI_SETTINGS = Character.getBoolean("StoreCharUiSettings", true);
|
STORE_UI_SETTINGS = Character.getBoolean("StoreCharUiSettings", true);
|
||||||
ENABLE_AUTO_SHOTS = Character.getBoolean("EnableAutoShots", true);
|
|
||||||
FORBIDDEN_NAMES = Character.getString("ForbiddenNames", "").split(",");
|
FORBIDDEN_NAMES = Character.getString("ForbiddenNames", "").split(",");
|
||||||
SILENCE_MODE_EXCLUDE = Character.getBoolean("SilenceModeExclude", false);
|
SILENCE_MODE_EXCLUDE = Character.getBoolean("SilenceModeExclude", false);
|
||||||
SHOW_GOD_VIDEO_INTRO = Character.getBoolean("GoDVideoIntro", true);
|
SHOW_GOD_VIDEO_INTRO = Character.getBoolean("GoDVideoIntro", true);
|
||||||
|
@ -247,8 +247,7 @@ public class Fishing
|
|||||||
double chance = baitData.getChance();
|
double chance = baitData.getChance();
|
||||||
if (_player.isChargedShot(ShotType.FISH_SOULSHOTS))
|
if (_player.isChargedShot(ShotType.FISH_SOULSHOTS))
|
||||||
{
|
{
|
||||||
chance *= 1.25; // +25 % chance to win
|
chance *= 1.5; // +50 % chance to win
|
||||||
_player.setChargedShot(ShotType.FISH_SOULSHOTS, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Rnd.get(0, 100) <= chance)
|
if (Rnd.get(0, 100) <= chance)
|
||||||
|
@ -21,7 +21,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.handler.ActionHandler;
|
import com.l2jmobius.gameserver.handler.ActionHandler;
|
||||||
import com.l2jmobius.gameserver.handler.ActionShiftHandler;
|
import com.l2jmobius.gameserver.handler.ActionShiftHandler;
|
||||||
import com.l2jmobius.gameserver.handler.IActionHandler;
|
import com.l2jmobius.gameserver.handler.IActionHandler;
|
||||||
@ -454,35 +453,6 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if current object has charged shot.
|
|
||||||
* @param type of the shot to be checked.
|
|
||||||
* @return {@code true} if the object has charged shot
|
|
||||||
*/
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Charging shot into the current object.
|
|
||||||
* @param type of the shot to be charged.
|
|
||||||
* @param charged
|
|
||||||
*/
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Try to recharge a shot.
|
|
||||||
* @param physical skill are using Soul shots.
|
|
||||||
* @param magical skill are using Spirit shots.
|
|
||||||
* @param fish
|
|
||||||
*/
|
|
||||||
public void rechargeShots(boolean physical, boolean magical, boolean fish)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param <T>
|
* @param <T>
|
||||||
* @param script
|
* @param script
|
||||||
|
@ -21,6 +21,7 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
|||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.EnumSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -269,6 +270,9 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
/** A map holding info about basic property mesmerizing system. */
|
/** A map holding info about basic property mesmerizing system. */
|
||||||
private volatile Map<BasicProperty, BasicPropertyResist> _basicPropertyResists;
|
private volatile Map<BasicProperty, BasicPropertyResist> _basicPropertyResists;
|
||||||
|
|
||||||
|
/** A set containing the shot types currently charged. */
|
||||||
|
private Set<ShotType> _chargedShots = EnumSet.noneOf(ShotType.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a creature.
|
* Creates a creature.
|
||||||
* @param template the creature template
|
* @param template the creature template
|
||||||
@ -3861,7 +3865,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If we didn't miss the hit, discharge the shoulshots, if any
|
// If we didn't miss the hit, discharge the shoulshots, if any
|
||||||
setChargedShot(isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
|
unchargeShot(isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Raidboss attack
|
// Check Raidboss attack
|
||||||
@ -5533,4 +5537,37 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
return calculateDistance(target, true, false);
|
return calculateDistance(target, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isChargedShot(ShotType type)
|
||||||
|
{
|
||||||
|
return _chargedShots.contains(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param type of the shot to charge
|
||||||
|
* @return {@code true} if there was no shot of this type charged before, {@code false} otherwise.
|
||||||
|
*/
|
||||||
|
public boolean chargeShot(ShotType type)
|
||||||
|
{
|
||||||
|
return _chargedShots.add(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param type of the shot to uncharge
|
||||||
|
* @return {@code true} if there was a charged shot of this type, {@code false} otherwise.
|
||||||
|
*/
|
||||||
|
public boolean unchargeShot(ShotType type)
|
||||||
|
{
|
||||||
|
return _chargedShots.remove(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unchargeAllShots()
|
||||||
|
{
|
||||||
|
_chargedShots = EnumSet.noneOf(ShotType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
||||||
|
{
|
||||||
|
// Dummy method to be overriden.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,6 @@ public class L2Npc extends L2Character
|
|||||||
private int _spiritshotamount = 0;
|
private int _spiritshotamount = 0;
|
||||||
private int _displayEffect = 0;
|
private int _displayEffect = 0;
|
||||||
|
|
||||||
private int _shotsMask = 0;
|
|
||||||
private int _killingBlowWeaponId;
|
private int _killingBlowWeaponId;
|
||||||
|
|
||||||
private int _cloneObjId; // Used in NpcInfo packet to clone the specified player.
|
private int _cloneObjId; // Used in NpcInfo packet to clone the specified player.
|
||||||
@ -1301,25 +1300,6 @@ public class L2Npc extends L2Character
|
|||||||
return WalkingManager.getInstance().isRegistered(this);
|
return WalkingManager.getInstance().isRegistered(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return (_shotsMask & type.getMask()) == type.getMask();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
if (charged)
|
|
||||||
{
|
|
||||||
_shotsMask |= type.getMask();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_shotsMask &= ~type.getMask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
||||||
{
|
{
|
||||||
@ -1331,7 +1311,7 @@ public class L2Npc extends L2Character
|
|||||||
}
|
}
|
||||||
_soulshotamount--;
|
_soulshotamount--;
|
||||||
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2154, 1, 0, 0), 600);
|
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2154, 1, 0, 0), 600);
|
||||||
setChargedShot(ShotType.SOULSHOTS, true);
|
chargeShot(ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (magic && (_spiritshotamount > 0))
|
if (magic && (_spiritshotamount > 0))
|
||||||
@ -1342,7 +1322,7 @@ public class L2Npc extends L2Character
|
|||||||
}
|
}
|
||||||
_spiritshotamount--;
|
_spiritshotamount--;
|
||||||
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2061, 1, 0, 0), 600);
|
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2061, 1, 0, 0), 600);
|
||||||
setChargedShot(ShotType.SPIRITSHOTS, true);
|
chargeShot(ShotType.SPIRITSHOTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
|||||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.enums.Team;
|
import com.l2jmobius.gameserver.enums.Team;
|
||||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
import com.l2jmobius.gameserver.handler.ItemHandler;
|
import com.l2jmobius.gameserver.handler.ItemHandler;
|
||||||
@ -77,7 +76,6 @@ public abstract class L2Summon extends L2Playable
|
|||||||
private boolean _follow = true;
|
private boolean _follow = true;
|
||||||
private boolean _previousFollowStatus = true;
|
private boolean _previousFollowStatus = true;
|
||||||
protected boolean _restoreSummon = true;
|
protected boolean _restoreSummon = true;
|
||||||
private int _shotsMask = 0;
|
|
||||||
private int _summonPoints = 0;
|
private int _summonPoints = 0;
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
@ -1026,25 +1024,6 @@ public abstract class L2Summon extends L2Playable
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return (_shotsMask & type.getMask()) == type.getMask();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
if (charged)
|
|
||||||
{
|
|
||||||
_shotsMask |= type.getMask();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_shotsMask &= ~type.getMask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
||||||
{
|
{
|
||||||
|
@ -93,7 +93,6 @@ import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
|||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.enums.Sex;
|
import com.l2jmobius.gameserver.enums.Sex;
|
||||||
import com.l2jmobius.gameserver.enums.ShortcutType;
|
import com.l2jmobius.gameserver.enums.ShortcutType;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.enums.StatusUpdateType;
|
import com.l2jmobius.gameserver.enums.StatusUpdateType;
|
||||||
import com.l2jmobius.gameserver.enums.SubclassInfoType;
|
import com.l2jmobius.gameserver.enums.SubclassInfoType;
|
||||||
import com.l2jmobius.gameserver.enums.Team;
|
import com.l2jmobius.gameserver.enums.Team;
|
||||||
@ -13018,23 +13017,6 @@ public final class L2PcInstance extends L2Playable
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
final L2ItemInstance weapon = getActiveWeaponInstance();
|
|
||||||
return (weapon != null) && weapon.isChargedShot(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
final L2ItemInstance weapon = getActiveWeaponInstance();
|
|
||||||
if (weapon != null)
|
|
||||||
{
|
|
||||||
weapon.setChargedShot(type, charged);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param skillId the display skill Id
|
* @param skillId the display skill Id
|
||||||
* @return the custom skill
|
* @return the custom skill
|
||||||
@ -13886,93 +13868,6 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleAutoShots(boolean force)
|
|
||||||
{
|
|
||||||
if (getAutoSoulShot().isEmpty() && !force)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final L2ItemInstance weapon = getActiveWeaponInstance();
|
|
||||||
int soulShotId = 0;
|
|
||||||
int spiritShotId = 0;
|
|
||||||
int summonSoulShotId = 0;
|
|
||||||
int summonSpiritShotId = 0;
|
|
||||||
|
|
||||||
for (L2ItemInstance item : getInventory().getItems(L2ItemInstance::isEtcItem, i -> i.getItemType() == EtcItemType.SOULSHOT))
|
|
||||||
{
|
|
||||||
switch (item.getEtcItem().getDefaultAction())
|
|
||||||
{
|
|
||||||
case SOULSHOT:
|
|
||||||
{
|
|
||||||
if ((weapon != null) && (weapon.getItemType() != WeaponType.FISHINGROD) && (weapon.getItem().getCrystalTypePlus() == item.getItem().getCrystalType()))
|
|
||||||
{
|
|
||||||
soulShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SPIRITSHOT:
|
|
||||||
{
|
|
||||||
if ((weapon != null) && (weapon.getItem().getCrystalTypePlus() == item.getItem().getCrystalType()))
|
|
||||||
{
|
|
||||||
spiritShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SUMMON_SOULSHOT:
|
|
||||||
{
|
|
||||||
if (hasSummon())
|
|
||||||
{
|
|
||||||
summonSoulShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SUMMON_SPIRITSHOT:
|
|
||||||
{
|
|
||||||
if (hasSummon())
|
|
||||||
{
|
|
||||||
summonSpiritShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case FISHINGSHOT:
|
|
||||||
{
|
|
||||||
if ((weapon != null) && (weapon.getItemType() == WeaponType.FISHINGROD) && (weapon.getItem().getCrystalType() == item.getItem().getCrystalType()))
|
|
||||||
{
|
|
||||||
soulShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_activeSoulShots.clear();
|
|
||||||
|
|
||||||
if (soulShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(soulShotId);
|
|
||||||
}
|
|
||||||
if (spiritShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(spiritShotId);
|
|
||||||
}
|
|
||||||
if (summonSoulShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(summonSoulShotId);
|
|
||||||
}
|
|
||||||
if (summonSpiritShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(summonSpiritShotId);
|
|
||||||
}
|
|
||||||
|
|
||||||
sendPacket(new ExAutoSoulShot(soulShotId, true, 0));
|
|
||||||
sendPacket(new ExAutoSoulShot(spiritShotId, true, 1));
|
|
||||||
sendPacket(new ExAutoSoulShot(summonSoulShotId, true, 2));
|
|
||||||
sendPacket(new ExAutoSoulShot(summonSpiritShotId, true, 3));
|
|
||||||
|
|
||||||
rechargeShots(true, true, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GroupType getGroupType()
|
public GroupType getGroupType()
|
||||||
{
|
{
|
||||||
return isInParty() ? (getParty().isInCommandChannel() ? GroupType.COMMAND_CHANNEL : GroupType.PARTY) : GroupType.NONE;
|
return isInParty() ? (getParty().isInCommandChannel() ? GroupType.COMMAND_CHANNEL : GroupType.PARTY) : GroupType.NONE;
|
||||||
|
@ -370,11 +370,6 @@ public abstract class Inventory extends ItemContainer
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isWeapon())
|
|
||||||
{
|
|
||||||
player.handleAutoShots(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply skill, if weapon have "skills on unequip"
|
// Apply skill, if weapon have "skills on unequip"
|
||||||
@ -388,6 +383,11 @@ public abstract class Inventory extends ItemContainer
|
|||||||
{
|
{
|
||||||
player.sendPacket(new SkillCoolTime(player));
|
player.sendPacket(new SkillCoolTime(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.isWeapon())
|
||||||
|
{
|
||||||
|
player.unchargeAllShots();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -399,6 +399,13 @@ public abstract class Inventory extends ItemContainer
|
|||||||
}
|
}
|
||||||
|
|
||||||
final L2PcInstance player = (L2PcInstance) inventory.getOwner();
|
final L2PcInstance player = (L2PcInstance) inventory.getOwner();
|
||||||
|
|
||||||
|
// Any items equipped that result in expertise penalty do not give any skills at all.
|
||||||
|
if (item.getItem().getCrystalType().getId() > player.getExpertiseLevel())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final AtomicBoolean update = new AtomicBoolean();
|
final AtomicBoolean update = new AtomicBoolean();
|
||||||
final AtomicBoolean updateTimestamp = new AtomicBoolean();
|
final AtomicBoolean updateTimestamp = new AtomicBoolean();
|
||||||
|
|
||||||
@ -466,11 +473,6 @@ public abstract class Inventory extends ItemContainer
|
|||||||
{
|
{
|
||||||
player.sendPacket(new SkillCoolTime(player));
|
player.sendPacket(new SkillCoolTime(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isWeapon())
|
|
||||||
{
|
|
||||||
player.handleAutoShots(Config.ENABLE_AUTO_SHOTS);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,6 +502,12 @@ public abstract class Inventory extends ItemContainer
|
|||||||
update = true;
|
update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Very and apply visual set
|
||||||
|
if (verifyAndApply(player, item, L2ItemInstance::getVisualId))
|
||||||
|
{
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (update)
|
if (update)
|
||||||
{
|
{
|
||||||
player.sendSkillList();
|
player.sendSkillList();
|
||||||
@ -619,6 +627,12 @@ public abstract class Inventory extends ItemContainer
|
|||||||
remove = true;
|
remove = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// verify and remove visual set bonus
|
||||||
|
if (verifyAndRemove(player, item, L2ItemInstance::getVisualId))
|
||||||
|
{
|
||||||
|
remove = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (remove)
|
if (remove)
|
||||||
{
|
{
|
||||||
player.checkItemRestriction();
|
player.checkItemRestriction();
|
||||||
|
@ -460,11 +460,6 @@ public class PcInventory extends Inventory
|
|||||||
actor.sendItemList(false);
|
actor.sendItemList(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isEtcItem() && (item.getItemType() == EtcItemType.SOULSHOT))
|
|
||||||
{
|
|
||||||
actor.handleAutoShots(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Notify to scripts
|
// Notify to scripts
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
||||||
}
|
}
|
||||||
@ -516,11 +511,6 @@ public class PcInventory extends Inventory
|
|||||||
actor.sendItemList(false);
|
actor.sendItemList(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isEtcItem() && (item.getItemType() == EtcItemType.SOULSHOT))
|
|
||||||
{
|
|
||||||
actor.handleAutoShots(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Notify to scripts
|
// Notify to scripts
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.enums.AttributeType;
|
|||||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||||
import com.l2jmobius.gameserver.enums.ItemLocation;
|
import com.l2jmobius.gameserver.enums.ItemLocation;
|
||||||
import com.l2jmobius.gameserver.enums.ItemSkillType;
|
import com.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.enums.UserInfoType;
|
import com.l2jmobius.gameserver.enums.UserInfoType;
|
||||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||||
@ -176,8 +175,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
|
|
||||||
private final DropProtection _dropProtection = new DropProtection();
|
private final DropProtection _dropProtection = new DropProtection();
|
||||||
|
|
||||||
private int _shotsMask = 0;
|
|
||||||
|
|
||||||
private final List<Options> _enchantOptions = new ArrayList<>();
|
private final List<Options> _enchantOptions = new ArrayList<>();
|
||||||
private final Map<Integer, EnsoulOption> _ensoulOptions = new LinkedHashMap<>(3);
|
private final Map<Integer, EnsoulOption> _ensoulOptions = new LinkedHashMap<>(3);
|
||||||
private final Map<Integer, EnsoulOption> _ensoulSpecialOptions = new LinkedHashMap<>(3);
|
private final Map<Integer, EnsoulOption> _ensoulSpecialOptions = new LinkedHashMap<>(3);
|
||||||
@ -1369,7 +1366,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
final InventoryUpdate iu = new InventoryUpdate();
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
for (L2ItemInstance item : unequiped)
|
for (L2ItemInstance item : unequiped)
|
||||||
{
|
{
|
||||||
item.unChargeAllShots();
|
|
||||||
iu.addModifiedItem(item);
|
iu.addModifiedItem(item);
|
||||||
}
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
@ -1797,7 +1793,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
final InventoryUpdate iu = new InventoryUpdate();
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
for (L2ItemInstance item : unequiped)
|
for (L2ItemInstance item : unequiped)
|
||||||
{
|
{
|
||||||
item.unChargeAllShots();
|
|
||||||
iu.addModifiedItem(item);
|
iu.addModifiedItem(item);
|
||||||
}
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
@ -2047,30 +2042,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return (_shotsMask & type.getMask()) == type.getMask();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
if (charged)
|
|
||||||
{
|
|
||||||
_shotsMask |= type.getMask();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_shotsMask &= ~type.getMask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void unChargeAllShots()
|
|
||||||
{
|
|
||||||
_shotsMask = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns enchant effect object for this item
|
* Returns enchant effect object for this item
|
||||||
* @return enchanteffect
|
* @return enchanteffect
|
||||||
|
@ -272,11 +272,7 @@ public abstract class AbstractOlympiadGame
|
|||||||
player.disableAutoShotsAll();
|
player.disableAutoShotsAll();
|
||||||
|
|
||||||
// Discharge any active shots
|
// Discharge any active shots
|
||||||
final L2ItemInstance item = player.getActiveWeaponInstance();
|
player.unchargeAllShots();
|
||||||
if (item != null)
|
|
||||||
{
|
|
||||||
item.unChargeAllShots();
|
|
||||||
}
|
|
||||||
|
|
||||||
// enable skills with cool time <= 15 minutes
|
// enable skills with cool time <= 15 minutes
|
||||||
for (Skill skill : player.getAllSkills())
|
for (Skill skill : player.getAllSkills())
|
||||||
|
@ -1495,11 +1495,11 @@ public final class Skill implements IIdentifiable
|
|||||||
{
|
{
|
||||||
if (useSpiritShot())
|
if (useSpiritShot())
|
||||||
{
|
{
|
||||||
caster.setChargedShot(caster.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS, false);
|
caster.unchargeShot(caster.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS);
|
||||||
}
|
}
|
||||||
else if (useSoulShot())
|
else if (useSoulShot())
|
||||||
{
|
{
|
||||||
caster.setChargedShot(caster.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
|
caster.unchargeShot(caster.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,11 +217,11 @@ public class SkillChannelizer implements Runnable
|
|||||||
// Reduce shots.
|
// Reduce shots.
|
||||||
if (skill.useSpiritShot())
|
if (skill.useSpiritShot())
|
||||||
{
|
{
|
||||||
_channelizer.setChargedShot(_channelizer.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS, false);
|
_channelizer.unchargeShot(_channelizer.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_channelizer.setChargedShot(_channelizer.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
|
_channelizer.unchargeShot(_channelizer.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shots are re-charged every cast.
|
// Shots are re-charged every cast.
|
||||||
|
@ -646,17 +646,11 @@ public class EnterWorld implements IClientIncomingPacket
|
|||||||
activeChar.sendPacket(new ExOneDayReceiveRewardList(activeChar));
|
activeChar.sendPacket(new ExOneDayReceiveRewardList(activeChar));
|
||||||
activeChar.sendPacket(ExConnectedTimeAndGettableReward.STATIC_PACKET);
|
activeChar.sendPacket(ExConnectedTimeAndGettableReward.STATIC_PACKET);
|
||||||
|
|
||||||
if (Config.ENABLE_AUTO_SHOTS)
|
// Handle soulshots, disable all on EnterWorld
|
||||||
{
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 0));
|
||||||
activeChar.handleAutoShots(true);
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 1));
|
||||||
}
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 2));
|
||||||
else
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 3));
|
||||||
{
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 0));
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 1));
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 2));
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 3));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Config.HARDWARE_INFO_ENABLED)
|
if (Config.HARDWARE_INFO_ENABLED)
|
||||||
{
|
{
|
||||||
|
@ -180,11 +180,7 @@ public final class RequestDropItem implements IClientIncomingPacket
|
|||||||
|
|
||||||
if (item.isEquipped())
|
if (item.isEquipped())
|
||||||
{
|
{
|
||||||
final L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInSlotAndRecord(item.getLocationSlot());
|
activeChar.getInventory().unEquipItemInSlot(item.getLocationSlot());
|
||||||
for (L2ItemInstance itm : unequiped)
|
|
||||||
{
|
|
||||||
itm.unChargeAllShots();
|
|
||||||
}
|
|
||||||
activeChar.broadcastUserInfo();
|
activeChar.broadcastUserInfo();
|
||||||
activeChar.sendItemList(true);
|
activeChar.sendItemList(true);
|
||||||
}
|
}
|
||||||
|
@ -771,10 +771,6 @@ ExpertisePenalty = True
|
|||||||
# Default: True
|
# Default: True
|
||||||
StoreCharUiSettings = True
|
StoreCharUiSettings = True
|
||||||
|
|
||||||
# Enable automatic Shot usage on player login or weapon equipped.
|
|
||||||
# Default: True
|
|
||||||
EnableAutoShots = True
|
|
||||||
|
|
||||||
# Character name restriction
|
# Character name restriction
|
||||||
# Disallow characters to have a name which contains the words.
|
# Disallow characters to have a name which contains the words.
|
||||||
# Split them with ",". Example: announcements,announce...
|
# Split them with ",". Example: announcements,announce...
|
||||||
|
@ -112,7 +112,5 @@ public final class Summon extends AbstractEffect
|
|||||||
summon.setShowSummonAnimation(true);
|
summon.setShowSummonAnimation(true);
|
||||||
summon.setRunning();
|
summon.setRunning();
|
||||||
summon.spawnMe();
|
summon.spawnMe();
|
||||||
|
|
||||||
player.handleAutoShots(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,5 @@ public final class SummonMulti extends AbstractEffect
|
|||||||
summon.setShowSummonAnimation(true);
|
summon.setShowSummonAnimation(true);
|
||||||
summon.setRunning();
|
summon.setRunning();
|
||||||
summon.spawnMe();
|
summon.spawnMe();
|
||||||
|
|
||||||
player.handleAutoShots(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,6 @@ public class BeastSoulShot implements IItemHandler
|
|||||||
final List<L2Summon> aliveServitor = playable.getServitors().values().stream().filter(s -> !s.isDead()).collect(Collectors.toList());
|
final List<L2Summon> aliveServitor = playable.getServitors().values().stream().filter(s -> !s.isDead()).collect(Collectors.toList());
|
||||||
if ((pet == null) && aliveServitor.isEmpty())
|
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);
|
activeOwner.sendPacket(SystemMessageId.SOULSHOTS_AND_SPIRITSHOTS_ARE_NOT_AVAILABLE_FOR_A_DEAD_PET_OR_SERVITOR_SAD_ISN_T_IT);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -121,7 +120,7 @@ public class BeastSoulShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!pet.isChargedShot(ShotType.SOULSHOTS))
|
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
|
// Visual effect change if player has equipped Ruby lvl 3 or higher
|
||||||
if (activeOwner.getActiveRubyJewel() != null)
|
if (activeOwner.getActiveRubyJewel() != null)
|
||||||
{
|
{
|
||||||
@ -138,7 +137,7 @@ public class BeastSoulShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!s.isChargedShot(ShotType.SOULSHOTS))
|
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
|
// Visual effect change if player has equipped Ruby lvl 3 or higher
|
||||||
if (activeOwner.getActiveRubyJewel() != null)
|
if (activeOwner.getActiveRubyJewel() != null)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ public class BeastSpiritShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!pet.isChargedShot(shotType))
|
if (!pet.isChargedShot(shotType))
|
||||||
{
|
{
|
||||||
pet.setChargedShot(shotType, true);
|
pet.chargeShot(shotType);
|
||||||
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
||||||
if (activeOwner.getActiveShappireJewel() != null)
|
if (activeOwner.getActiveShappireJewel() != null)
|
||||||
{
|
{
|
||||||
@ -139,7 +139,7 @@ public class BeastSpiritShot implements IItemHandler
|
|||||||
{
|
{
|
||||||
if (!s.isChargedShot(shotType))
|
if (!s.isChargedShot(shotType))
|
||||||
{
|
{
|
||||||
s.setChargedShot(shotType, true);
|
s.chargeShot(shotType);
|
||||||
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
// Visual effect change if player has equipped Sapphire lvl 3 or higher
|
||||||
if (activeOwner.getActiveShappireJewel() != null)
|
if (activeOwner.getActiveShappireJewel() != null)
|
||||||
{
|
{
|
||||||
|
@ -104,7 +104,7 @@ public class BlessedSoulShots implements IItemHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Charge soul shot
|
// Charge soul shot
|
||||||
weaponInst.setChargedShot(ShotType.BLESSED_SOULSHOTS, true);
|
activeChar.chargeShot(ShotType.BLESSED_SOULSHOTS);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ public class BlessedSpiritShot implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Charge Spirit shot
|
// Charge Spirit shot
|
||||||
activeChar.setChargedShot(ShotType.SPIRITSHOTS, true);
|
activeChar.chargeShot(ShotType.SPIRITSHOTS);
|
||||||
|
|
||||||
// Send message to client
|
// Send message to client
|
||||||
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
||||||
|
@ -75,7 +75,7 @@ public class FishShots implements IItemHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
activeChar.setChargedShot(ShotType.FISH_SOULSHOTS, true);
|
activeChar.chargeShot(ShotType.FISH_SOULSHOTS);
|
||||||
activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
|
activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
|
||||||
final L2Object oldTarget = activeChar.getTarget();
|
final L2Object oldTarget = activeChar.getTarget();
|
||||||
activeChar.setTarget(activeChar);
|
activeChar.setTarget(activeChar);
|
||||||
|
@ -101,7 +101,7 @@ public class SoulShots implements IItemHandler
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Charge soul shot
|
// Charge soul shot
|
||||||
weaponInst.setChargedShot(ShotType.SOULSHOTS, true);
|
activeChar.chargeShot(ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ public class SpiritShot implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Charge Spirit shot
|
// Charge Spirit shot
|
||||||
activeChar.setChargedShot(ShotType.SPIRITSHOTS, true);
|
activeChar.chargeShot(ShotType.SPIRITSHOTS);
|
||||||
|
|
||||||
// Send message to client
|
// Send message to client
|
||||||
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
if (!activeChar.getAutoSoulShot().contains(item.getId()))
|
||||||
|
@ -285,7 +285,6 @@ public final class Config
|
|||||||
public static boolean EXPERTISE_PENALTY;
|
public static boolean EXPERTISE_PENALTY;
|
||||||
public static boolean STORE_RECIPE_SHOPLIST;
|
public static boolean STORE_RECIPE_SHOPLIST;
|
||||||
public static boolean STORE_UI_SETTINGS;
|
public static boolean STORE_UI_SETTINGS;
|
||||||
public static boolean ENABLE_AUTO_SHOTS;
|
|
||||||
public static String[] FORBIDDEN_NAMES;
|
public static String[] FORBIDDEN_NAMES;
|
||||||
public static boolean SILENCE_MODE_EXCLUDE;
|
public static boolean SILENCE_MODE_EXCLUDE;
|
||||||
public static boolean SHOW_GOD_VIDEO_INTRO;
|
public static boolean SHOW_GOD_VIDEO_INTRO;
|
||||||
@ -1618,7 +1617,6 @@ public final class Config
|
|||||||
EXPERTISE_PENALTY = Character.getBoolean("ExpertisePenalty", true);
|
EXPERTISE_PENALTY = Character.getBoolean("ExpertisePenalty", true);
|
||||||
STORE_RECIPE_SHOPLIST = Character.getBoolean("StoreRecipeShopList", false);
|
STORE_RECIPE_SHOPLIST = Character.getBoolean("StoreRecipeShopList", false);
|
||||||
STORE_UI_SETTINGS = Character.getBoolean("StoreCharUiSettings", true);
|
STORE_UI_SETTINGS = Character.getBoolean("StoreCharUiSettings", true);
|
||||||
ENABLE_AUTO_SHOTS = Character.getBoolean("EnableAutoShots", true);
|
|
||||||
FORBIDDEN_NAMES = Character.getString("ForbiddenNames", "").split(",");
|
FORBIDDEN_NAMES = Character.getString("ForbiddenNames", "").split(",");
|
||||||
SILENCE_MODE_EXCLUDE = Character.getBoolean("SilenceModeExclude", false);
|
SILENCE_MODE_EXCLUDE = Character.getBoolean("SilenceModeExclude", false);
|
||||||
SHOW_GOD_VIDEO_INTRO = Character.getBoolean("GoDVideoIntro", true);
|
SHOW_GOD_VIDEO_INTRO = Character.getBoolean("GoDVideoIntro", true);
|
||||||
|
@ -247,8 +247,7 @@ public class Fishing
|
|||||||
double chance = baitData.getChance();
|
double chance = baitData.getChance();
|
||||||
if (_player.isChargedShot(ShotType.FISH_SOULSHOTS))
|
if (_player.isChargedShot(ShotType.FISH_SOULSHOTS))
|
||||||
{
|
{
|
||||||
chance *= 1.25; // +25 % chance to win
|
chance *= 1.5; // +50 % chance to win
|
||||||
_player.setChargedShot(ShotType.FISH_SOULSHOTS, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Rnd.get(0, 100) <= chance)
|
if (Rnd.get(0, 100) <= chance)
|
||||||
|
@ -21,7 +21,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.handler.ActionHandler;
|
import com.l2jmobius.gameserver.handler.ActionHandler;
|
||||||
import com.l2jmobius.gameserver.handler.ActionShiftHandler;
|
import com.l2jmobius.gameserver.handler.ActionShiftHandler;
|
||||||
import com.l2jmobius.gameserver.handler.IActionHandler;
|
import com.l2jmobius.gameserver.handler.IActionHandler;
|
||||||
@ -454,35 +453,6 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if current object has charged shot.
|
|
||||||
* @param type of the shot to be checked.
|
|
||||||
* @return {@code true} if the object has charged shot
|
|
||||||
*/
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Charging shot into the current object.
|
|
||||||
* @param type of the shot to be charged.
|
|
||||||
* @param charged
|
|
||||||
*/
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Try to recharge a shot.
|
|
||||||
* @param physical skill are using Soul shots.
|
|
||||||
* @param magical skill are using Spirit shots.
|
|
||||||
* @param fish
|
|
||||||
*/
|
|
||||||
public void rechargeShots(boolean physical, boolean magical, boolean fish)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param <T>
|
* @param <T>
|
||||||
* @param script
|
* @param script
|
||||||
|
@ -21,6 +21,7 @@ import static com.l2jmobius.gameserver.ai.CtrlIntention.AI_INTENTION_ACTIVE;
|
|||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.EnumSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -269,6 +270,9 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
/** A map holding info about basic property mesmerizing system. */
|
/** A map holding info about basic property mesmerizing system. */
|
||||||
private volatile Map<BasicProperty, BasicPropertyResist> _basicPropertyResists;
|
private volatile Map<BasicProperty, BasicPropertyResist> _basicPropertyResists;
|
||||||
|
|
||||||
|
/** A set containing the shot types currently charged. */
|
||||||
|
private Set<ShotType> _chargedShots = EnumSet.noneOf(ShotType.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a creature.
|
* Creates a creature.
|
||||||
* @param template the creature template
|
* @param template the creature template
|
||||||
@ -3861,7 +3865,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If we didn't miss the hit, discharge the shoulshots, if any
|
// If we didn't miss the hit, discharge the shoulshots, if any
|
||||||
setChargedShot(isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
|
unchargeShot(isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Raidboss attack
|
// Check Raidboss attack
|
||||||
@ -5533,4 +5537,37 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
|||||||
{
|
{
|
||||||
return calculateDistance(target, true, false);
|
return calculateDistance(target, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isChargedShot(ShotType type)
|
||||||
|
{
|
||||||
|
return _chargedShots.contains(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param type of the shot to charge
|
||||||
|
* @return {@code true} if there was no shot of this type charged before, {@code false} otherwise.
|
||||||
|
*/
|
||||||
|
public boolean chargeShot(ShotType type)
|
||||||
|
{
|
||||||
|
return _chargedShots.add(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param type of the shot to uncharge
|
||||||
|
* @return {@code true} if there was a charged shot of this type, {@code false} otherwise.
|
||||||
|
*/
|
||||||
|
public boolean unchargeShot(ShotType type)
|
||||||
|
{
|
||||||
|
return _chargedShots.remove(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unchargeAllShots()
|
||||||
|
{
|
||||||
|
_chargedShots = EnumSet.noneOf(ShotType.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
||||||
|
{
|
||||||
|
// Dummy method to be overriden.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,6 @@ public class L2Npc extends L2Character
|
|||||||
private int _spiritshotamount = 0;
|
private int _spiritshotamount = 0;
|
||||||
private int _displayEffect = 0;
|
private int _displayEffect = 0;
|
||||||
|
|
||||||
private int _shotsMask = 0;
|
|
||||||
private int _killingBlowWeaponId;
|
private int _killingBlowWeaponId;
|
||||||
|
|
||||||
private int _cloneObjId; // Used in NpcInfo packet to clone the specified player.
|
private int _cloneObjId; // Used in NpcInfo packet to clone the specified player.
|
||||||
@ -1301,25 +1300,6 @@ public class L2Npc extends L2Character
|
|||||||
return WalkingManager.getInstance().isRegistered(this);
|
return WalkingManager.getInstance().isRegistered(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return (_shotsMask & type.getMask()) == type.getMask();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
if (charged)
|
|
||||||
{
|
|
||||||
_shotsMask |= type.getMask();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_shotsMask &= ~type.getMask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
||||||
{
|
{
|
||||||
@ -1331,7 +1311,7 @@ public class L2Npc extends L2Character
|
|||||||
}
|
}
|
||||||
_soulshotamount--;
|
_soulshotamount--;
|
||||||
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2154, 1, 0, 0), 600);
|
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2154, 1, 0, 0), 600);
|
||||||
setChargedShot(ShotType.SOULSHOTS, true);
|
chargeShot(ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (magic && (_spiritshotamount > 0))
|
if (magic && (_spiritshotamount > 0))
|
||||||
@ -1342,7 +1322,7 @@ public class L2Npc extends L2Character
|
|||||||
}
|
}
|
||||||
_spiritshotamount--;
|
_spiritshotamount--;
|
||||||
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2061, 1, 0, 0), 600);
|
Broadcast.toSelfAndKnownPlayersInRadius(this, new MagicSkillUse(this, this, 2061, 1, 0, 0), 600);
|
||||||
setChargedShot(ShotType.SPIRITSHOTS, true);
|
chargeShot(ShotType.SPIRITSHOTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
|||||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.enums.Team;
|
import com.l2jmobius.gameserver.enums.Team;
|
||||||
import com.l2jmobius.gameserver.handler.IItemHandler;
|
import com.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
import com.l2jmobius.gameserver.handler.ItemHandler;
|
import com.l2jmobius.gameserver.handler.ItemHandler;
|
||||||
@ -77,7 +76,6 @@ public abstract class L2Summon extends L2Playable
|
|||||||
private boolean _follow = true;
|
private boolean _follow = true;
|
||||||
private boolean _previousFollowStatus = true;
|
private boolean _previousFollowStatus = true;
|
||||||
protected boolean _restoreSummon = true;
|
protected boolean _restoreSummon = true;
|
||||||
private int _shotsMask = 0;
|
|
||||||
private int _summonPoints = 0;
|
private int _summonPoints = 0;
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
@ -1026,25 +1024,6 @@ public abstract class L2Summon extends L2Playable
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return (_shotsMask & type.getMask()) == type.getMask();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
if (charged)
|
|
||||||
{
|
|
||||||
_shotsMask |= type.getMask();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_shotsMask &= ~type.getMask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
public void rechargeShots(boolean physical, boolean magic, boolean fish)
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,6 @@ import com.l2jmobius.gameserver.enums.PrivateStoreType;
|
|||||||
import com.l2jmobius.gameserver.enums.Race;
|
import com.l2jmobius.gameserver.enums.Race;
|
||||||
import com.l2jmobius.gameserver.enums.Sex;
|
import com.l2jmobius.gameserver.enums.Sex;
|
||||||
import com.l2jmobius.gameserver.enums.ShortcutType;
|
import com.l2jmobius.gameserver.enums.ShortcutType;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.enums.StatusUpdateType;
|
import com.l2jmobius.gameserver.enums.StatusUpdateType;
|
||||||
import com.l2jmobius.gameserver.enums.SubclassInfoType;
|
import com.l2jmobius.gameserver.enums.SubclassInfoType;
|
||||||
import com.l2jmobius.gameserver.enums.Team;
|
import com.l2jmobius.gameserver.enums.Team;
|
||||||
@ -12980,23 +12979,6 @@ public final class L2PcInstance extends L2Playable
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
final L2ItemInstance weapon = getActiveWeaponInstance();
|
|
||||||
return (weapon != null) && weapon.isChargedShot(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
final L2ItemInstance weapon = getActiveWeaponInstance();
|
|
||||||
if (weapon != null)
|
|
||||||
{
|
|
||||||
weapon.setChargedShot(type, charged);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param skillId the display skill Id
|
* @param skillId the display skill Id
|
||||||
* @return the custom skill
|
* @return the custom skill
|
||||||
@ -13848,93 +13830,6 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleAutoShots(boolean force)
|
|
||||||
{
|
|
||||||
if (getAutoSoulShot().isEmpty() && !force)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final L2ItemInstance weapon = getActiveWeaponInstance();
|
|
||||||
int soulShotId = 0;
|
|
||||||
int spiritShotId = 0;
|
|
||||||
int summonSoulShotId = 0;
|
|
||||||
int summonSpiritShotId = 0;
|
|
||||||
|
|
||||||
for (L2ItemInstance item : getInventory().getItems(L2ItemInstance::isEtcItem, i -> i.getItemType() == EtcItemType.SOULSHOT))
|
|
||||||
{
|
|
||||||
switch (item.getEtcItem().getDefaultAction())
|
|
||||||
{
|
|
||||||
case SOULSHOT:
|
|
||||||
{
|
|
||||||
if ((weapon != null) && (weapon.getItemType() != WeaponType.FISHINGROD) && (weapon.getItem().getCrystalTypePlus() == item.getItem().getCrystalType()))
|
|
||||||
{
|
|
||||||
soulShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SPIRITSHOT:
|
|
||||||
{
|
|
||||||
if ((weapon != null) && (weapon.getItem().getCrystalTypePlus() == item.getItem().getCrystalType()))
|
|
||||||
{
|
|
||||||
spiritShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SUMMON_SOULSHOT:
|
|
||||||
{
|
|
||||||
if (hasSummon())
|
|
||||||
{
|
|
||||||
summonSoulShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SUMMON_SPIRITSHOT:
|
|
||||||
{
|
|
||||||
if (hasSummon())
|
|
||||||
{
|
|
||||||
summonSpiritShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case FISHINGSHOT:
|
|
||||||
{
|
|
||||||
if ((weapon != null) && (weapon.getItemType() == WeaponType.FISHINGROD) && (weapon.getItem().getCrystalType() == item.getItem().getCrystalType()))
|
|
||||||
{
|
|
||||||
soulShotId = item.getId();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_activeSoulShots.clear();
|
|
||||||
|
|
||||||
if (soulShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(soulShotId);
|
|
||||||
}
|
|
||||||
if (spiritShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(spiritShotId);
|
|
||||||
}
|
|
||||||
if (summonSoulShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(summonSoulShotId);
|
|
||||||
}
|
|
||||||
if (summonSpiritShotId != 0)
|
|
||||||
{
|
|
||||||
addAutoSoulShot(summonSpiritShotId);
|
|
||||||
}
|
|
||||||
|
|
||||||
sendPacket(new ExAutoSoulShot(soulShotId, true, 0));
|
|
||||||
sendPacket(new ExAutoSoulShot(spiritShotId, true, 1));
|
|
||||||
sendPacket(new ExAutoSoulShot(summonSoulShotId, true, 2));
|
|
||||||
sendPacket(new ExAutoSoulShot(summonSpiritShotId, true, 3));
|
|
||||||
|
|
||||||
rechargeShots(true, true, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GroupType getGroupType()
|
public GroupType getGroupType()
|
||||||
{
|
{
|
||||||
return isInParty() ? (getParty().isInCommandChannel() ? GroupType.COMMAND_CHANNEL : GroupType.PARTY) : GroupType.NONE;
|
return isInParty() ? (getParty().isInCommandChannel() ? GroupType.COMMAND_CHANNEL : GroupType.PARTY) : GroupType.NONE;
|
||||||
|
@ -370,11 +370,6 @@ public abstract class Inventory extends ItemContainer
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isWeapon())
|
|
||||||
{
|
|
||||||
player.handleAutoShots(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply skill, if weapon have "skills on unequip"
|
// Apply skill, if weapon have "skills on unequip"
|
||||||
@ -388,6 +383,11 @@ public abstract class Inventory extends ItemContainer
|
|||||||
{
|
{
|
||||||
player.sendPacket(new SkillCoolTime(player));
|
player.sendPacket(new SkillCoolTime(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.isWeapon())
|
||||||
|
{
|
||||||
|
player.unchargeAllShots();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -399,6 +399,13 @@ public abstract class Inventory extends ItemContainer
|
|||||||
}
|
}
|
||||||
|
|
||||||
final L2PcInstance player = (L2PcInstance) inventory.getOwner();
|
final L2PcInstance player = (L2PcInstance) inventory.getOwner();
|
||||||
|
|
||||||
|
// Any items equipped that result in expertise penalty do not give any skills at all.
|
||||||
|
if (item.getItem().getCrystalType().getId() > player.getExpertiseLevel())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final AtomicBoolean update = new AtomicBoolean();
|
final AtomicBoolean update = new AtomicBoolean();
|
||||||
final AtomicBoolean updateTimestamp = new AtomicBoolean();
|
final AtomicBoolean updateTimestamp = new AtomicBoolean();
|
||||||
|
|
||||||
@ -466,11 +473,6 @@ public abstract class Inventory extends ItemContainer
|
|||||||
{
|
{
|
||||||
player.sendPacket(new SkillCoolTime(player));
|
player.sendPacket(new SkillCoolTime(player));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isWeapon())
|
|
||||||
{
|
|
||||||
player.handleAutoShots(Config.ENABLE_AUTO_SHOTS);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,6 +502,12 @@ public abstract class Inventory extends ItemContainer
|
|||||||
update = true;
|
update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Very and apply visual set
|
||||||
|
if (verifyAndApply(player, item, L2ItemInstance::getVisualId))
|
||||||
|
{
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (update)
|
if (update)
|
||||||
{
|
{
|
||||||
player.sendSkillList();
|
player.sendSkillList();
|
||||||
@ -619,6 +627,12 @@ public abstract class Inventory extends ItemContainer
|
|||||||
remove = true;
|
remove = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// verify and remove visual set bonus
|
||||||
|
if (verifyAndRemove(player, item, L2ItemInstance::getVisualId))
|
||||||
|
{
|
||||||
|
remove = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (remove)
|
if (remove)
|
||||||
{
|
{
|
||||||
player.checkItemRestriction();
|
player.checkItemRestriction();
|
||||||
|
@ -460,11 +460,6 @@ public class PcInventory extends Inventory
|
|||||||
actor.sendItemList(false);
|
actor.sendItemList(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isEtcItem() && (item.getItemType() == EtcItemType.SOULSHOT))
|
|
||||||
{
|
|
||||||
actor.handleAutoShots(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Notify to scripts
|
// Notify to scripts
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
||||||
}
|
}
|
||||||
@ -516,11 +511,6 @@ public class PcInventory extends Inventory
|
|||||||
actor.sendItemList(false);
|
actor.sendItemList(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.isEtcItem() && (item.getItemType() == EtcItemType.SOULSHOT))
|
|
||||||
{
|
|
||||||
actor.handleAutoShots(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Notify to scripts
|
// Notify to scripts
|
||||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerItemAdd(actor, item), actor, item.getItem());
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.enums.AttributeType;
|
|||||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||||
import com.l2jmobius.gameserver.enums.ItemLocation;
|
import com.l2jmobius.gameserver.enums.ItemLocation;
|
||||||
import com.l2jmobius.gameserver.enums.ItemSkillType;
|
import com.l2jmobius.gameserver.enums.ItemSkillType;
|
||||||
import com.l2jmobius.gameserver.enums.ShotType;
|
|
||||||
import com.l2jmobius.gameserver.enums.UserInfoType;
|
import com.l2jmobius.gameserver.enums.UserInfoType;
|
||||||
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
import com.l2jmobius.gameserver.geoengine.GeoEngine;
|
||||||
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
import com.l2jmobius.gameserver.idfactory.IdFactory;
|
||||||
@ -176,8 +175,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
|
|
||||||
private final DropProtection _dropProtection = new DropProtection();
|
private final DropProtection _dropProtection = new DropProtection();
|
||||||
|
|
||||||
private int _shotsMask = 0;
|
|
||||||
|
|
||||||
private final List<Options> _enchantOptions = new ArrayList<>();
|
private final List<Options> _enchantOptions = new ArrayList<>();
|
||||||
private final Map<Integer, EnsoulOption> _ensoulOptions = new LinkedHashMap<>(3);
|
private final Map<Integer, EnsoulOption> _ensoulOptions = new LinkedHashMap<>(3);
|
||||||
private final Map<Integer, EnsoulOption> _ensoulSpecialOptions = new LinkedHashMap<>(3);
|
private final Map<Integer, EnsoulOption> _ensoulSpecialOptions = new LinkedHashMap<>(3);
|
||||||
@ -1369,7 +1366,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
final InventoryUpdate iu = new InventoryUpdate();
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
for (L2ItemInstance item : unequiped)
|
for (L2ItemInstance item : unequiped)
|
||||||
{
|
{
|
||||||
item.unChargeAllShots();
|
|
||||||
iu.addModifiedItem(item);
|
iu.addModifiedItem(item);
|
||||||
}
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
@ -1797,7 +1793,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
final InventoryUpdate iu = new InventoryUpdate();
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
for (L2ItemInstance item : unequiped)
|
for (L2ItemInstance item : unequiped)
|
||||||
{
|
{
|
||||||
item.unChargeAllShots();
|
|
||||||
iu.addModifiedItem(item);
|
iu.addModifiedItem(item);
|
||||||
}
|
}
|
||||||
player.sendInventoryUpdate(iu);
|
player.sendInventoryUpdate(iu);
|
||||||
@ -2047,30 +2042,6 @@ public final class L2ItemInstance extends L2Object
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isChargedShot(ShotType type)
|
|
||||||
{
|
|
||||||
return (_shotsMask & type.getMask()) == type.getMask();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setChargedShot(ShotType type, boolean charged)
|
|
||||||
{
|
|
||||||
if (charged)
|
|
||||||
{
|
|
||||||
_shotsMask |= type.getMask();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_shotsMask &= ~type.getMask();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void unChargeAllShots()
|
|
||||||
{
|
|
||||||
_shotsMask = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns enchant effect object for this item
|
* Returns enchant effect object for this item
|
||||||
* @return enchanteffect
|
* @return enchanteffect
|
||||||
|
@ -272,11 +272,7 @@ public abstract class AbstractOlympiadGame
|
|||||||
player.disableAutoShotsAll();
|
player.disableAutoShotsAll();
|
||||||
|
|
||||||
// Discharge any active shots
|
// Discharge any active shots
|
||||||
final L2ItemInstance item = player.getActiveWeaponInstance();
|
player.unchargeAllShots();
|
||||||
if (item != null)
|
|
||||||
{
|
|
||||||
item.unChargeAllShots();
|
|
||||||
}
|
|
||||||
|
|
||||||
// enable skills with cool time <= 15 minutes
|
// enable skills with cool time <= 15 minutes
|
||||||
for (Skill skill : player.getAllSkills())
|
for (Skill skill : player.getAllSkills())
|
||||||
|
@ -1495,11 +1495,11 @@ public final class Skill implements IIdentifiable
|
|||||||
{
|
{
|
||||||
if (useSpiritShot())
|
if (useSpiritShot())
|
||||||
{
|
{
|
||||||
caster.setChargedShot(caster.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS, false);
|
caster.unchargeShot(caster.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS);
|
||||||
}
|
}
|
||||||
else if (useSoulShot())
|
else if (useSoulShot())
|
||||||
{
|
{
|
||||||
caster.setChargedShot(caster.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
|
caster.unchargeShot(caster.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,11 +217,11 @@ public class SkillChannelizer implements Runnable
|
|||||||
// Reduce shots.
|
// Reduce shots.
|
||||||
if (skill.useSpiritShot())
|
if (skill.useSpiritShot())
|
||||||
{
|
{
|
||||||
_channelizer.setChargedShot(_channelizer.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS, false);
|
_channelizer.unchargeShot(_channelizer.isChargedShot(ShotType.BLESSED_SPIRITSHOTS) ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_channelizer.setChargedShot(_channelizer.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS, false);
|
_channelizer.unchargeShot(_channelizer.isChargedShot(ShotType.BLESSED_SOULSHOTS) ? ShotType.BLESSED_SOULSHOTS : ShotType.SOULSHOTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shots are re-charged every cast.
|
// Shots are re-charged every cast.
|
||||||
|
@ -646,17 +646,11 @@ public class EnterWorld implements IClientIncomingPacket
|
|||||||
activeChar.sendPacket(new ExOneDayReceiveRewardList(activeChar));
|
activeChar.sendPacket(new ExOneDayReceiveRewardList(activeChar));
|
||||||
activeChar.sendPacket(ExConnectedTimeAndGettableReward.STATIC_PACKET);
|
activeChar.sendPacket(ExConnectedTimeAndGettableReward.STATIC_PACKET);
|
||||||
|
|
||||||
if (Config.ENABLE_AUTO_SHOTS)
|
// Handle soulshots, disable all on EnterWorld
|
||||||
{
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 0));
|
||||||
activeChar.handleAutoShots(true);
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 1));
|
||||||
}
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 2));
|
||||||
else
|
activeChar.sendPacket(new ExAutoSoulShot(0, true, 3));
|
||||||
{
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 0));
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 1));
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 2));
|
|
||||||
activeChar.sendPacket(new ExAutoSoulShot(0, false, 3));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Config.HARDWARE_INFO_ENABLED)
|
if (Config.HARDWARE_INFO_ENABLED)
|
||||||
{
|
{
|
||||||
|
@ -180,11 +180,7 @@ public final class RequestDropItem implements IClientIncomingPacket
|
|||||||
|
|
||||||
if (item.isEquipped())
|
if (item.isEquipped())
|
||||||
{
|
{
|
||||||
final L2ItemInstance[] unequiped = activeChar.getInventory().unEquipItemInSlotAndRecord(item.getLocationSlot());
|
activeChar.getInventory().unEquipItemInSlot(item.getLocationSlot());
|
||||||
for (L2ItemInstance itm : unequiped)
|
|
||||||
{
|
|
||||||
itm.unChargeAllShots();
|
|
||||||
}
|
|
||||||
activeChar.broadcastUserInfo();
|
activeChar.broadcastUserInfo();
|
||||||
activeChar.sendItemList(true);
|
activeChar.sendItemList(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user