L2JMobius

C6 Skill cancellation

Strelook66 · 7 · 5641

Online Strelook66

  • Knight
  • ***
    • Posts: 82
Hi, I noticed that while casting a skill, the player can click to move away, animation disappears, but the skill is still cast.

See video:

https://streamable.com/d9m5nq



Online Mobius

  • Distinguished King
  • *****
    • Posts: 16050
Start from RequestTargetCanceld.
player.abortCast(true);


Online Strelook66

  • Knight
  • ***
    • Posts: 82
Tried it, same result. Will keep searching. As far as i've seen, all skill types, even the SoE has the same effect.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16050

Online G-hamsteR

  • Viscount
  • *****
    • Posts: 333
I don't have the same problem, but you could edit gameserver/network/clientpackets/MoveBackwardToLocation.java

Add a check:

Code: [Select]
if(player.isCasting()) {
player.sendPacket(ActionFailed.STATIC_PACKET);
return;
}

I'm using the private version and it's working fine. This change isn't there, but I think it's a quick fix. I haven't tested it though


Online Strelook66

  • Knight
  • ***
    • Posts: 82
I don't have the same problem, but you could edit gameserver/network/clientpackets/MoveBackwardToLocation.java

Add a check:

Code: [Select]
if(player.isCasting()) {
player.sendPacket(ActionFailed.STATIC_PACKET);
return;
}

I'm using the private version and it's working fine. This change isn't there, but I think it's a quick fix. I haven't tested it though



This works. Its a temporary quick fix. Now i am 100% i did a bad import. Will check to see when I'll have time. Thank you.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16050
I was thinking something like this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/actor/Creature.java
===================================================================
--- java/org/l2jmobius/gameserver/model/actor/Creature.java (revision 7754)
+++ java/org/l2jmobius/gameserver/model/actor/Creature.java (working copy)
@@ -5063,8 +5063,10 @@
 
  // cancels the skill hit scheduled task
  enableAllSkills(); // re-enables the skills
- if (this instanceof PlayerInstance)
+ if (isPlayer())
  {
+ getActingPlayer().setCurrentSkill(null, false, false);
+ getActingPlayer().setQueuedSkill(null, false, false);
  getAI().notifyEvent(CtrlEvent.EVT_FINISH_CASTING); // setting back previous intention
  }
 

On the private version moving is not possible while casting.
So someone must verify this on free.