Este parche devuelve los buffs que han sido cancelados anteriormente.
Los minutos de regreso se cambian aqui:
private int minutes = 2;
Index: dist/game/data/scripts/handlers/skillhandlers/Disablers.java
================================================== =================
--- dist/game/data/scripts/handlers/skillhandlers/Disablers.java (revision 176)
+++ dist/game/data/scripts/handlers/skillhandlers/Disablers.java (working copy)
@@ -15,11 +15,13 @@
package handlers.skillhandlers;
import java.util.logging.Logger;
+import javolution.util.FastList;
+import com.l2jhidden.game.ThreadPoolManager;
import com.l2jserver.gameserver.ai.CtrlEvent;
import com.l2jserver.gameserver.ai.CtrlIntention;
import com.l2jserver.gameserver.ai.L2AttackableAI;
import com.l2jserver.gameserver.datatables.ExperienceTabl e;
+import com.l2jserver.gameserver.datatables.SkillTable;
import com.l2jserver.gameserver.handler.ISkillHandler;
import com.l2jserver.gameserver.handler.SkillHandler;
import com.l2jserver.gameserver.model.L2Effect;
@@ -70,7 +72,49 @@
protected static final Logger _log = Logger.getLogger(L2Skill.class.getName());
+ private int minutes = 2;
+ class ReturnEffects implements Runnable//wyatt
+ {
+ private int _time;
+ FastList _list;
+ L2Character _player;
+
+ public ReturnEffects (int time, L2Character player, FastListlist)
+ {
+ _time = time;
+ _list = list;
+ _player = player;
+ }
+
+ @Override
+ public void run()
+ {
+ if (_time > 0)
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(th is, 1000);
+ _time-=1000;
+ }
+
+ if (_time==0)
+ {
+ ((L2PcInstance)_player).stopAllEffectsExceptThoseT hatLastThroughDeath();
+
+ for (L2Effect e : _list)
+ {
+ L2Skill skill = SkillTable.getInstance().getInfo(e.getSkill().getI d(), e.getLevel());
+
+ if(skill != null)
+ {
+ skill.getEffects(_player, _player);
+ }
+ }
+ ((L2PcInstance)_player).clearcancelbuffs();
+ }
+ }
+ }
+
+
* @see com.l2jserver.gameserver.handler.ISkillHandler#use Skill(com.l2jserver.gameserver.model.actor.L2Chara cter, com.l2jserver.gameserver.model.L2Skill, com.l2jserver.gameserver.model.L2Object[])
@@ -566,7 +610,17 @@
landrate = (int) activeChar.calcStat(Stats.CANCEL_VULN, landrate, target, null);
if (Rnd.get(100) < landrate)
+ {
removedBuffs += negateEffect(target, L2SkillType.BUFF, -1, skill.getMaxNegatedEffects());
+ if (target instanceof L2PcInstance)
+ {
+ for (L2Effect effect : target.getAllEffects())
+ {
+ ((L2PcInstance)target).addcancelbuffs(effect);}
+ ThreadPoolManager.getInstance().executeTask(new ReturnEffects(minutes * 60000, target, ((L2PcInstance)target).getcancelbuffs()));
+
+ }
+ }
break;
case HEAL:
ISkillHandler Healhandler = SkillHandler.getInstance().getHandler(L2SkillType. HEAL);
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java
================================================== =================
--- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 167)
+++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -372,7 +372,24 @@
private static final String RESTORE_TP_BOOKMARK = "SELECT Id,x,y,z,icon,tag,name FROM character_tpbookmark WHERE charId=?";
private static final String DELETE_TP_BOOKMARK = "DELETE FROM character_tpbookmark WHERE charId=? AND Id=?";
+ //Cancel return back buffs
+ private FastList cancelbuffs = new FastList();
+ public FastList getcancelbuffs()
+ {
+ return cancelbuffs;
+ }
+
+ public void addcancelbuffs(L2Effect effect)
+ {
+ cancelbuffs.add(effect);
+ }
+
+ public void clearcancelbuffs()
+ {
+ cancelbuffs.clear();
+ }
+
// Character Subclass SQL String Definitions:
private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE charId=? ORDER BY class_index ASC";
private static final String ADD_CHAR_SUBCLASS = "INSERT INTO character_subclasses (charId,class_id,exp,sp,level,class_index) VALUES (?,?,?,?,?,?)";
Credits: No tienes permiso para ver los enlaces. Para poder verlos
Registrate o
Conectate.