Can someone please help me adapt this mod to the last l2jserver?
the code was made to l2jserver, I tried to add it and it was okay until I got to RecoverCancelledBuffsTask.java because the Env.java file no longer exists in the l2jserver project. I could not adapt it. Can someone please help?
https://gist.github.com/rodrigonull/5d4b2862c56e39f3faa6
You need to adapt the code to your emulator.
(https://i.imgur.com/DBaXLko.png)
@Override
public void run()
{
for (BuffInfo buff : _buffs)
{
final BuffInfo stolenOrCanceled = new BuffInfo(_player, _player, buff.getSkill());
stolenOrCanceled.setAbnormalTime(buff.getTime());
buff.getSkill().applyEffectScope(EffectScope.GENERAL, stolenOrCanceled, true, true);
if (stolenOrCanceled.getAbnormalTime() > 0)
{
_player.getEffectList().add(stolenOrCanceled);
}
}
_player.sendPacket(new ExShowScreenMessage("Your cancelled buffs has been given back.", 2000));
}
Codes change list: https://www.united-extreme.com/u3games/foro/index.php?topic=737.0
Example:
before: List<BLABLABLA> example = new FastList<>();
after: List<BLABLABLA> example = new ArrayList<>();
use "ArrayList"