L2JMobius

Free Users => Bug Reports => Topic started by: Strelook66 on November 30, 2020, 11:43:35 PM

Title: Skill cancellation
Post by: Strelook66 on November 30, 2020, 11:43:35 PM
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 (https://streamable.com/d9m5nq)

Title: Re: Skill cancellation
Post by: Mobius on December 01, 2020, 12:31:31 AM
Start from RequestTargetCanceld.
player.abortCast(true);
Title: Re: Skill cancellation
Post by: Strelook66 on December 01, 2020, 12:56:10 AM
Tried it, same result. Will keep searching. As far as i've seen, all skill types, even the SoE has the same effect.
Title: Re: Skill cancellation
Post by: Mobius on December 01, 2020, 12:57:50 AM
Tryed to remove queued skills from player?
Title: Re: Skill cancellation
Post by: G-hamsteR on December 01, 2020, 08:41:47 AM
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
Title: Re: Skill cancellation
Post by: Strelook66 on December 01, 2020, 10:06:52 AM
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.
Title: Re: Skill cancellation
Post by: Mobius on December 01, 2020, 09:16:24 PM
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.