+++ java/com/l2jserver/gameserver/model/actor/tasks/player/RecoverCancelledBuffsTask.java (working copy)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2004-2014 L2J Server
+ *
+ * This file is part of L2J Server.
+ *
+ * L2J Server is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J Server is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.actor.tasks.player;
+
+import java.util.List;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.skills.BuffInfo;
+import com.l2jserver.gameserver.model.skills.EffectScope;
+import com.l2jserver.gameserver.model.stats.Env;
+import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
+
+/**
+ * @author nuLL
+ */
+public class RecoverCancelledBuffsTask implements Runnable
+{
+ private final List<BuffInfo> _buffs;
+ private final L2PcInstance _player;
+
+ public RecoverCancelledBuffsTask(List<BuffInfo> buffs, L2PcInstance player)
+ {
+ _player = player;
+ _buffs = buffs;
+ }
+
+ @Override
+ public void run()
+ {
+ for (BuffInfo buff : _buffs)
+ {
+ final Env env = new Env();
+ env.setCharacter(_player);
+ env.setTarget(_player);
+ env.setSkill(buff.getSkill());
+ final BuffInfo stolenOrCanceled = new BuffInfo(env);
+ 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));
+ }
+}
why the "Env.java" file no longer exists in the project
hello everyone !
I need help with a l2script Rev H5-Salvation/Classic build. I compiled the project, installed everything but I can't log in to the server, it won't log me in. I tried a thousand ways without good results. I leave you the error when logging in either with the H5-Salvation Client.
ERROR ---> WARN: IPBANMANAGER ---> IP !!!!
I'm waiting for help! Thank you!
Hello !
I have a problem when connecting to the pack with the Salvation client, it blocks my IP, I see that the account is created in the database but it remains logged in.
Any idea what it could be? ALso with H5 CLient !
Thank you !
Question
HARDECORE
Can anyone help me by adapting this mod to l2jserver?
https://gist.github.com/rodrigonull/5d4b2862c56e39f3faa6
This is the only part with error.
why the "Env.java" file no longer exists in the project
Edited by HARDECORE1 answer to this question
Recommended Posts