L2JMobius

Free Users => Bug Reports => Topic started by: Badwatermagic on April 27, 2021, 10:55:21 PM

Title: Bypassing Spell Conditions
Post by: Badwatermagic on April 27, 2021, 10:55:21 PM
Players can bypass skill/spell conditions like recharges condition to not be able to cast on other rechargers. To do this a player simply has to start running, start cast on a player and then immediately target themselves and it will cast on them even though the condition is there, therefore bypassing it.

Recharge ID: 1013
Title: Re: Bypassing Spell Conditions
Post by: Mobius on April 27, 2021, 11:19:55 PM
Try this.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/skills/Skill.java
===================================================================
--- java/org/l2jmobius/gameserver/model/skills/Skill.java (revision 8479)
+++ java/org/l2jmobius/gameserver/model/skills/Skill.java (working copy)
@@ -1214,7 +1214,7 @@
  {
  if (effect.isInstant())
  {
- if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this))
+ if (applyInstantEffects && effect.calcSuccess(info.getEffector(), info.getEffected(), this) && checkCondition(info.getEffector(), info.getEffected()))
  {
  effect.instant(info.getEffector(), info.getEffected(), this, info.getItem());
  }
Title: Re: Bypassing Spell Conditions
Post by: Badwatermagic on May 02, 2021, 03:18:11 AM
This bugged out all skills/spells. No abilities were working. I could cast the skills but no damage, heals, mp regain or anything was working.
Title: Re: Bypassing Spell Conditions
Post by: Badwatermagic on May 02, 2021, 03:27:14 AM
https://drive.google.com/file/d/1UNXuWBhWxqcUVOryIiHtuUGjT11AgoBK/view?usp=sharing (https://drive.google.com/file/d/1UNXuWBhWxqcUVOryIiHtuUGjT11AgoBK/view?usp=sharing)

This is an example of a bypass. I shouldn't be able to cast recharge on myself as a healer with recharge. But I can by first clicking on someone else, running, and then clicking on myself.
Title: Re: Bypassing Spell Conditions
Post by: Mobius on May 02, 2021, 08:58:49 PM
What is the retail behavior for this?
How does it prevent this from happening?

Strangely I try this on subcriber Homunculus version and it does not happen.