And where to put it because i am new and i don't know how to put it so please can someone help me and adapt?
-import java.util.Vector;
+import javolution.util.FastMap;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.ThreadPoolManager;
@@ -52,7 +52,7 @@
// Get skill power (which is used as baseRate).
final double skillPower = skill.getPower();
- Vector<L2Skill> cancelledBuffs = new Vector<>();
+ FastMap<L2Skill, int[]> cancelledBuffs = new FastMap<>();
for (L2Object obj : targets)
{
@@ -108,9 +108,9 @@
// Stores the last canceled skill for further use.
lastCanceledSkillId = effect.getSkill().getId();
- if (!cancelledBuffs.contains(effect.getSkill()))
+ if (!cancelledBuffs.containsKey(effect.getSkill()))
{
- cancelledBuffs.add(effect.getSkill());
+ cancelledBuffs.put(effect.getSkill(), new int[] { effect.getCount(), effect.getTime() });
}
// Exit the effect.
and
package net.sf.l2j.gameserver.model.entity.custom;
-import java.util.Vector;
+import javolution.util.FastMap;
+import net.sf.l2j.gameserver.model.L2Effect;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.skills.Env;
+import net.sf.l2j.gameserver.skills.effects.EffectTemplate;
/**
* @author Anarchy
@@ -26,9 +29,9 @@
public class CustomCancelTask implements Runnable
{
private L2PcInstance _player = null;
- private Vector<L2Skill> _buffs = null;
+ private FastMap<L2Skill, int[]> _buffs = null;
- public CustomCancelTask(L2PcInstance _player, Vector<L2Skill> _buffs)
+ public CustomCancelTask(L2PcInstance _player, FastMap<L2Skill, int[]> _buffs)
{
this._player = _player;
this._buffs = _buffs;
@@ -42,7 +45,7 @@
return;
}
- for (L2Skill s : _buffs)
+ for (L2Skill s : _buffs.keySet())
{
if (s == null)
{
@@ -49,7 +52,21 @@
continue;
}
- s.getEffects(_player, _player);
+ Env env = new Env();
+ env.player = _player;
+ env.target = _player;
+ env.skill = s;
+ L2Effect ef;
+ for (EffectTemplate et : s.getEffectTemplates())
+ {
+ ef = et.getEffect(env);
+ if (ef != null)
+ {
+ ef.setCount(_buffs.get(s)[0]);
+ ef.setFirstTime(_buffs.get(s)[1]);
+ ef.scheduleEffect();
+ }
+ }
}
}
}
\ No newline at end of file
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
so i bought this crap of the server few years back and i just found it laying around on my pc and i thought i should share it, if i remember correctly this crap has a lot of bugs that people abuse 🙂
https://drive.google.com/file/d/13QWg8pi4BPbGbTmlygZ078LjL6Fb0J2a/view?usp=sharing source
https://drive.google.com/file/d/13QWg8pi4BPbGbTmlygZ078LjL6Fb0J2a/view?usp=sharing system
Since last massive leak as explained as 07/09 (notably all development branches), I don't accept anymore financial newcomers that easily. People will have to contribute 100 cookies worth of contributions (bug reports/fixes) as a first step to be accepted as Donator. Free user can join after sharing over 200 cookies out of contributions, compared to 100 cookies before.
You can say thanks to RusAcis, and notably his worthless leader, UnleashedForce.
The size of users will continue to shrink if more leaks occur, until true helpers only will be left.
New prices are as following :
Joining price: 200€ + 100 cookies, or 200 cookies
This fee has to be paid if you are joining aCis project. Next month, and all other months, you will have to donate only basic monthly donation.
Monthly price: 10€ / 10 cookies
This fee has to be paid every month.
I won't accept any new join fee before the 100 cookies contribution. Your money will be instantly sent back.
Also, in the same shape of idea, actual supporters/donators have to be active to stay in sources. It doesn't have to be a particular amount, you just have to share from time to time *anything*. I don't accept anymore silent ppl. Only useful people will be kept.
Question
`Sapphire
Can someone adapt this code for l2reunion?
And where to put it because i am new and i don't know how to put it so please can someone help me and adapt?
and
or check the topic
here the link
http://www.maxcheate...r-cancellation/
and i am sorry for my bad english
and i can't speak english im using google translate
please help
thanks.
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.