Prohibit casting of spells while disabled.

This commit is contained in:
MobiusDev 2018-04-10 19:20:52 +00:00
parent e26f4f39eb
commit 4ac95b0be1
6 changed files with 36 additions and 0 deletions

View File

@ -526,6 +526,12 @@ public class SkillCaster implements Runnable
// Launch the magic skill in order to calculate its effects // Launch the magic skill in order to calculate its effects
try try
{ {
// Mobius: Disabled characters should not be able to finish bad skills.
if (caster.isAttackingDisabled() && skill.isBad())
{
return;
}
// Check if the toggle skill effects are already in progress on the L2Character // Check if the toggle skill effects are already in progress on the L2Character
if (skill.isToggle() && caster.isAffectedBySkill(skill.getId())) if (skill.isToggle() && caster.isAffectedBySkill(skill.getId()))
{ {

View File

@ -526,6 +526,12 @@ public class SkillCaster implements Runnable
// Launch the magic skill in order to calculate its effects // Launch the magic skill in order to calculate its effects
try try
{ {
// Mobius: Disabled characters should not be able to finish bad skills.
if (caster.isAttackingDisabled() && skill.isBad())
{
return;
}
// Check if the toggle skill effects are already in progress on the L2Character // Check if the toggle skill effects are already in progress on the L2Character
if (skill.isToggle() && caster.isAffectedBySkill(skill.getId())) if (skill.isToggle() && caster.isAffectedBySkill(skill.getId()))
{ {

View File

@ -526,6 +526,12 @@ public class SkillCaster implements Runnable
// Launch the magic skill in order to calculate its effects // Launch the magic skill in order to calculate its effects
try try
{ {
// Mobius: Disabled characters should not be able to finish bad skills.
if (caster.isAttackingDisabled() && skill.isBad())
{
return;
}
// Check if the toggle skill effects are already in progress on the L2Character // Check if the toggle skill effects are already in progress on the L2Character
if (skill.isToggle() && caster.isAffectedBySkill(skill.getId())) if (skill.isToggle() && caster.isAffectedBySkill(skill.getId()))
{ {

View File

@ -526,6 +526,12 @@ public class SkillCaster implements Runnable
// Launch the magic skill in order to calculate its effects // Launch the magic skill in order to calculate its effects
try try
{ {
// Mobius: Disabled characters should not be able to finish bad skills.
if (caster.isAttackingDisabled() && skill.isBad())
{
return;
}
// Check if the toggle skill effects are already in progress on the L2Character // Check if the toggle skill effects are already in progress on the L2Character
if (skill.isToggle() && caster.isAffectedBySkill(skill.getId())) if (skill.isToggle() && caster.isAffectedBySkill(skill.getId()))
{ {

View File

@ -526,6 +526,12 @@ public class SkillCaster implements Runnable
// Launch the magic skill in order to calculate its effects // Launch the magic skill in order to calculate its effects
try try
{ {
// Mobius: Disabled characters should not be able to finish bad skills.
if (caster.isAttackingDisabled() && skill.isBad())
{
return;
}
// Check if the toggle skill effects are already in progress on the L2Character // Check if the toggle skill effects are already in progress on the L2Character
if (skill.isToggle() && caster.isAffectedBySkill(skill.getId())) if (skill.isToggle() && caster.isAffectedBySkill(skill.getId()))
{ {

View File

@ -526,6 +526,12 @@ public class SkillCaster implements Runnable
// Launch the magic skill in order to calculate its effects // Launch the magic skill in order to calculate its effects
try try
{ {
// Mobius: Disabled characters should not be able to finish bad skills.
if (caster.isAttackingDisabled() && skill.isBad())
{
return;
}
// Check if the toggle skill effects are already in progress on the L2Character // Check if the toggle skill effects are already in progress on the L2Character
if (skill.isToggle() && caster.isAffectedBySkill(skill.getId())) if (skill.isToggle() && caster.isAffectedBySkill(skill.getId()))
{ {