L2JMobius

High Five Buff exploit

Affer · 6 · 10105

Offline Affer

  • Vassal
  • *
    • Posts: 8
Hello,

A player found an interesting exploit and was kind enough to report it to me.

Setup:
  • l2jmobius free version
  • High Five Chronicle

Problem:
  • Possible to get multiple times the same buff

How to:
  • Get Empower Buff
  • Pick up Herb of Mystic -> Buff disapear
  • Get Empower Buff -> Buff appears twice
  • Pick up Herb of Mystic again -> One Empower diseapears
  • Get Empower Buff -> Buff appears three times
  • Repeat

I checked with the GM tool, the 3 instances of the buff are active.

It works for herbs that have the same "features" as the buff.


Offline Affer

  • Vassal
  • *
    • Posts: 8
I believe it's related to this post : https://l2jmobius.org/forum/index.php?topic=5127.0

Is is something that is fixed in the private version ?


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16011
Try this.
This is actually made for the private version, no idea if it fits the free one.
Code: [Select]
Index: java/org/l2jmobius/gameserver/model/EffectList.java
===================================================================
--- java/org/l2jmobius/gameserver/model/EffectList.java (revision 7463)
+++ java/org/l2jmobius/gameserver/model/EffectList.java (working copy)
@@ -604,8 +604,7 @@
  {
  _hiddenBuffs.decrementAndGet();
  }
- // Removes the buff from the stack.
- else
+ else // Removes the buff from the stack.
  {
  _stackedEffects.remove(info.getSkill().getAbnormalType());
  }
@@ -1426,8 +1425,7 @@
  {
  stopSkillEffects(false, skill);
  }
- // Verify stacked skills.
- else
+ else // Verify stacked skills.
  {
  synchronized (this)
  {
@@ -1437,34 +1435,25 @@
  // Skills are only replaced if the incoming buff has greater or equal abnormal level.
  if ((stackedInfo != null) && (skill.getAbnormalLvl() >= stackedInfo.getSkill().getAbnormalLvl()))
  {
+ stopSkillEffects(false, skill.getAbnormalType());
+
  // If it is an herb, set as not in use the lesser buff.
  // Effect will be present in the effect list.
  // Effects stats are removed and onActionTime() is not called.
  // But finish task continues to run, and ticks as well.
- if (skill.isAbnormalInstant())
+ if (stackedInfo.getSkill().isAbnormalInstant())
  {
- if (stackedInfo.getSkill().isAbnormalInstant())
- {
- stopSkillEffects(false, skill.getAbnormalType());
- stackedInfo = _stackedEffects.get(skill.getAbnormalType());
- }
-
- if (stackedInfo != null)
- {
- stackedInfo.setInUse(false);
- // Remove stats
- stackedInfo.removeStats();
- _hiddenBuffs.incrementAndGet();
- }
+ stackedInfo = _stackedEffects.get(skill.getAbnormalType());
  }
- // Remove buff that will stack with the abnormal type.
- else
+
+ if (stackedInfo != null)
  {
- stopSkillEffects(false, skill.getAbnormalType());
+ stackedInfo.setInUse(false);
+ stackedInfo.removeStats();
+ _hiddenBuffs.incrementAndGet();
  }
  }
- // If the new buff is a lesser buff, then don't add it.
- else
+ else // If the new buff is a lesser buff, then don't add it.
  {
  return;
  }


Offline Affer

  • Vassal
  • *
    • Posts: 8
Hello Mobius, thanks a lot!

I will give it a try and will let you know !


Offline Affer

  • Vassal
  • *
    • Posts: 8
Hello Mobius; I tried it and it works just fine; impossible to exploit this anymore.

Thanks a lot for your quick support and your awesome work !