Fixed toggle reset.

This commit is contained in:
MobiusDev
2016-04-28 20:37:35 +00:00
parent 7af31aa563
commit 0709c3baa4
2 changed files with 9 additions and 15 deletions

View File

@@ -8678,6 +8678,14 @@ public final class L2PcInstance extends L2Playable
return false; return false;
} }
// Check if the skill type is toggle.
if (skill.isToggle() && isAffectedBySkill(skill.getId()))
{
stopSkillEffects(true, skill.getId());
sendPacket(ActionFailed.STATIC_PACKET);
return false;
}
// ************************************* Check Casting in Progress ******************************************* // ************************************* Check Casting in Progress *******************************************
// If a skill is currently being used, queue this one if this is not the same // If a skill is currently being used, queue this one if this is not the same
@@ -8696,6 +8704,7 @@ public final class L2PcInstance extends L2Playable
sendPacket(ActionFailed.STATIC_PACKET); sendPacket(ActionFailed.STATIC_PACKET);
return false; return false;
} }
setIsCastingNow(true); setIsCastingNow(true);
// Create a new SkillDat object and set the player _currentSkill // Create a new SkillDat object and set the player _currentSkill
// This is used mainly to save & queue the button presses, since L2Character has // This is used mainly to save & queue the button presses, since L2Character has
@@ -8781,14 +8790,6 @@ public final class L2PcInstance extends L2Playable
return false; return false;
} }
// Check if the skill type is toggle.
if (skill.isToggle() && isAffectedBySkill(skill.getId()))
{
stopSkillEffects(true, skill.getId());
sendPacket(ActionFailed.STATIC_PACKET);
return false;
}
// Check if the player uses "Fake Death" skill // Check if the player uses "Fake Death" skill
// Note: do not check this before TOGGLE reset // Note: do not check this before TOGGLE reset
if (isFakeDeath()) if (isFakeDeath())

View File

@@ -60,13 +60,6 @@ public final class RequestMagicSkillUse extends L2GameClientPacket
return; return;
} }
if (activeChar.isFakeDeath())
{
activeChar.sendPacket(SystemMessageId.YOU_CANNOT_MOVE_WHILE_SITTING);
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
return;
}
// Get the level of the used skill // Get the level of the used skill
Skill skill = activeChar.getKnownSkill(_magicId); Skill skill = activeChar.getKnownSkill(_magicId);
if (skill == null) if (skill == null)