Only FAN_PB AffectScope skills should enable ground type skill.
This commit is contained in:
parent
90a51d6371
commit
5fc90cf6ef
@ -278,6 +278,7 @@ import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
|||||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
@ -8707,16 +8708,19 @@ public class Player extends Playable
|
|||||||
final Location worldPosition = _currentSkillWorldPosition;
|
final Location worldPosition = _currentSkillWorldPosition;
|
||||||
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
if (getCurrentMp() >= usedSkill.getMpConsume())
|
||||||
{
|
{
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
@ -66,6 +66,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
|
|||||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
@ -350,14 +351,14 @@ public class SkillCaster implements Runnable
|
|||||||
if (!_skill.isNotBroadcastable())
|
if (!_skill.isNotBroadcastable())
|
||||||
{
|
{
|
||||||
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
||||||
if ((_skill.getTargetType() == TargetType.GROUND) && caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && (_skill.getAffectScope() == AffectScope.FAN_PB))
|
||||||
{
|
{
|
||||||
final Player player = caster.getActingPlayer();
|
final Player player = caster.getActingPlayer();
|
||||||
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
||||||
if (worldPosition != null)
|
if (worldPosition != null)
|
||||||
{
|
{
|
||||||
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
||||||
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getId(), location)), 100);
|
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getDisplayId(), location)), 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,7 +588,7 @@ public class SkillCaster implements Runnable
|
|||||||
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
||||||
|
|
||||||
// Reset current skill world position.
|
// Reset current skill world position.
|
||||||
if (caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && ((_skill.getAffectScope() == AffectScope.FAN_PB) || (_skill.getAffectScope() == AffectScope.FAN)))
|
||||||
{
|
{
|
||||||
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
||||||
}
|
}
|
||||||
|
@ -278,6 +278,7 @@ import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
|||||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
@ -8766,16 +8767,19 @@ public class Player extends Playable
|
|||||||
final Location worldPosition = _currentSkillWorldPosition;
|
final Location worldPosition = _currentSkillWorldPosition;
|
||||||
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
if (getCurrentMp() >= usedSkill.getMpConsume())
|
||||||
{
|
{
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
@ -66,6 +66,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
|
|||||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
@ -350,14 +351,14 @@ public class SkillCaster implements Runnable
|
|||||||
if (!_skill.isNotBroadcastable())
|
if (!_skill.isNotBroadcastable())
|
||||||
{
|
{
|
||||||
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
||||||
if ((_skill.getTargetType() == TargetType.GROUND) && caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && (_skill.getAffectScope() == AffectScope.FAN_PB))
|
||||||
{
|
{
|
||||||
final Player player = caster.getActingPlayer();
|
final Player player = caster.getActingPlayer();
|
||||||
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
||||||
if (worldPosition != null)
|
if (worldPosition != null)
|
||||||
{
|
{
|
||||||
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
||||||
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getId(), location)), 100);
|
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getDisplayId(), location)), 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,7 +588,7 @@ public class SkillCaster implements Runnable
|
|||||||
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
||||||
|
|
||||||
// Reset current skill world position.
|
// Reset current skill world position.
|
||||||
if (caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && ((_skill.getAffectScope() == AffectScope.FAN_PB) || (_skill.getAffectScope() == AffectScope.FAN)))
|
||||||
{
|
{
|
||||||
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
||||||
}
|
}
|
||||||
|
@ -282,6 +282,7 @@ import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
|||||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
@ -8801,16 +8802,19 @@ public class Player extends Playable
|
|||||||
final Location worldPosition = _currentSkillWorldPosition;
|
final Location worldPosition = _currentSkillWorldPosition;
|
||||||
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
if (getCurrentMp() >= usedSkill.getMpConsume())
|
||||||
{
|
{
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
@ -66,6 +66,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
|
|||||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
@ -350,14 +351,14 @@ public class SkillCaster implements Runnable
|
|||||||
if (!_skill.isNotBroadcastable())
|
if (!_skill.isNotBroadcastable())
|
||||||
{
|
{
|
||||||
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
||||||
if ((_skill.getTargetType() == TargetType.GROUND) && caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && (_skill.getAffectScope() == AffectScope.FAN_PB))
|
||||||
{
|
{
|
||||||
final Player player = caster.getActingPlayer();
|
final Player player = caster.getActingPlayer();
|
||||||
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
||||||
if (worldPosition != null)
|
if (worldPosition != null)
|
||||||
{
|
{
|
||||||
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
||||||
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getId(), location)), 100);
|
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getDisplayId(), location)), 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,7 +588,7 @@ public class SkillCaster implements Runnable
|
|||||||
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
||||||
|
|
||||||
// Reset current skill world position.
|
// Reset current skill world position.
|
||||||
if (caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && ((_skill.getAffectScope() == AffectScope.FAN_PB) || (_skill.getAffectScope() == AffectScope.FAN)))
|
||||||
{
|
{
|
||||||
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
||||||
}
|
}
|
||||||
|
@ -287,6 +287,7 @@ import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
|||||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
@ -8658,16 +8659,19 @@ public class Player extends Playable
|
|||||||
final Location worldPosition = _currentSkillWorldPosition;
|
final Location worldPosition = _currentSkillWorldPosition;
|
||||||
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
if (getCurrentMp() >= usedSkill.getMpConsume())
|
||||||
{
|
{
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
|
|||||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
@ -346,14 +347,14 @@ public class SkillCaster implements Runnable
|
|||||||
if (!_skill.isNotBroadcastable())
|
if (!_skill.isNotBroadcastable())
|
||||||
{
|
{
|
||||||
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
||||||
if ((_skill.getTargetType() == TargetType.GROUND) && caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && (_skill.getAffectScope() == AffectScope.FAN_PB))
|
||||||
{
|
{
|
||||||
final Player player = caster.getActingPlayer();
|
final Player player = caster.getActingPlayer();
|
||||||
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
||||||
if (worldPosition != null)
|
if (worldPosition != null)
|
||||||
{
|
{
|
||||||
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
||||||
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getId(), location)), 100);
|
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getDisplayId(), location)), 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,7 +588,7 @@ public class SkillCaster implements Runnable
|
|||||||
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
||||||
|
|
||||||
// Reset current skill world position.
|
// Reset current skill world position.
|
||||||
if (caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && ((_skill.getAffectScope() == AffectScope.FAN_PB) || (_skill.getAffectScope() == AffectScope.FAN)))
|
||||||
{
|
{
|
||||||
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
||||||
}
|
}
|
||||||
|
@ -293,6 +293,7 @@ import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
|||||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
@ -8903,16 +8904,19 @@ public class Player extends Playable
|
|||||||
final Location worldPosition = _currentSkillWorldPosition;
|
final Location worldPosition = _currentSkillWorldPosition;
|
||||||
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
if (getCurrentMp() >= usedSkill.getMpConsume())
|
||||||
{
|
{
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
|
|||||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
@ -346,14 +347,14 @@ public class SkillCaster implements Runnable
|
|||||||
if (!_skill.isNotBroadcastable())
|
if (!_skill.isNotBroadcastable())
|
||||||
{
|
{
|
||||||
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
||||||
if ((_skill.getTargetType() == TargetType.GROUND) && caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && (_skill.getAffectScope() == AffectScope.FAN_PB))
|
||||||
{
|
{
|
||||||
final Player player = caster.getActingPlayer();
|
final Player player = caster.getActingPlayer();
|
||||||
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
||||||
if (worldPosition != null)
|
if (worldPosition != null)
|
||||||
{
|
{
|
||||||
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
||||||
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getId(), location)), 100);
|
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getDisplayId(), location)), 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,7 +588,7 @@ public class SkillCaster implements Runnable
|
|||||||
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
||||||
|
|
||||||
// Reset current skill world position.
|
// Reset current skill world position.
|
||||||
if (caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && ((_skill.getAffectScope() == AffectScope.FAN_PB) || (_skill.getAffectScope() == AffectScope.FAN)))
|
||||||
{
|
{
|
||||||
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
||||||
}
|
}
|
||||||
|
@ -293,6 +293,7 @@ import org.l2jmobius.gameserver.model.skill.CommonSkill;
|
|||||||
import org.l2jmobius.gameserver.model.skill.Skill;
|
import org.l2jmobius.gameserver.model.skill.Skill;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
import org.l2jmobius.gameserver.model.skill.SkillCaster;
|
||||||
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
import org.l2jmobius.gameserver.model.skill.SkillCastingType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
import org.l2jmobius.gameserver.model.stats.BaseStat;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
@ -8903,16 +8904,19 @@ public class Player extends Playable
|
|||||||
final Location worldPosition = _currentSkillWorldPosition;
|
final Location worldPosition = _currentSkillWorldPosition;
|
||||||
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
if ((usedSkill.getTargetType() == TargetType.GROUND) && (worldPosition == null))
|
||||||
{
|
{
|
||||||
if (getCurrentMp() >= usedSkill.getMpConsume())
|
if (usedSkill.getAffectScope() == AffectScope.FAN_PB)
|
||||||
{
|
{
|
||||||
if (usedSkill.checkCondition(this, target, true))
|
if (getCurrentMp() >= usedSkill.getMpConsume())
|
||||||
{
|
{
|
||||||
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
if (usedSkill.checkCondition(this, target, true))
|
||||||
|
{
|
||||||
|
sendPacket(new MagicSkillUse(this, this, usedSkill.getDisplayId(), usedSkill.getDisplayLevel(), 0, 0, usedSkill.getReuseDelayGroup(), -1, SkillCastingType.NORMAL, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sendPacket(SystemMessageId.NOT_ENOUGH_MP);
|
|
||||||
}
|
}
|
||||||
sendPacket(ActionFailed.STATIC_PACKET);
|
sendPacket(ActionFailed.STATIC_PACKET);
|
||||||
return false;
|
return false;
|
||||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item;
|
|||||||
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
import org.l2jmobius.gameserver.model.item.type.ActionType;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
import org.l2jmobius.gameserver.model.options.OptionSkillHolder;
|
||||||
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
import org.l2jmobius.gameserver.model.options.OptionSkillType;
|
||||||
|
import org.l2jmobius.gameserver.model.skill.targets.AffectScope;
|
||||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
@ -346,14 +347,14 @@ public class SkillCaster implements Runnable
|
|||||||
if (!_skill.isNotBroadcastable())
|
if (!_skill.isNotBroadcastable())
|
||||||
{
|
{
|
||||||
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
caster.broadcastPacket(new MagicSkillUse(caster, target, _skill.getDisplayId(), _skill.getDisplayLevel(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
|
||||||
if ((_skill.getTargetType() == TargetType.GROUND) && caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && (_skill.getAffectScope() == AffectScope.FAN_PB))
|
||||||
{
|
{
|
||||||
final Player player = caster.getActingPlayer();
|
final Player player = caster.getActingPlayer();
|
||||||
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
final Location worldPosition = player.getCurrentSkillWorldPosition();
|
||||||
if (worldPosition != null)
|
if (worldPosition != null)
|
||||||
{
|
{
|
||||||
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
final Location location = new Location(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ(), worldPosition.getHeading());
|
||||||
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getId(), location)), 100);
|
ThreadPool.schedule(() -> player.broadcastPacket(new ExMagicSkillUseGround(player.getObjectId(), _skill.getDisplayId(), location)), 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,7 +588,7 @@ public class SkillCaster implements Runnable
|
|||||||
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
caster.rechargeShots(_skill.useSoulShot(), _skill.useSpiritShot(), false);
|
||||||
|
|
||||||
// Reset current skill world position.
|
// Reset current skill world position.
|
||||||
if (caster.isPlayer())
|
if (caster.isPlayer() && (_skill.getTargetType() == TargetType.GROUND) && ((_skill.getAffectScope() == AffectScope.FAN_PB) || (_skill.getAffectScope() == AffectScope.FAN)))
|
||||||
{
|
{
|
||||||
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
caster.getActingPlayer().setCurrentSkillWorldPosition(null);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user