Autor Tema: [IMP] Cancel Return Buff  (Leído 2255 veces)

Desconectado Jerry

  • Vips
  • Usuario
  • *
  • Mensajes: 125
  • Karma: 0
  • Sexo: Masculino
[IMP] Cancel Return Buff
« en: Febrero 20, 2018, 07:44:43 pm »
Código: [Seleccionar]
### Eclipse Workspace Patch 1.0
#P L2J_DataPack_BETA
Index: dist/game/data/scripts/handlers/effecthandlers/DispelBySlot.java
===================================================================
--- dist/game/data/scripts/handlers/effecthandlers/DispelBySlot.java (revision 10078)
+++ dist/game/data/scripts/handlers/effecthandlers/DispelBySlot.java (working copy)
@@ -18,11 +18,14 @@
  */
 package handlers.effecthandlers;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.EnumMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import com.l2jserver.gameserver.ThreadPoolManager;
 import com.l2jserver.gameserver.model.CharEffectList;
 import com.l2jserver.gameserver.model.StatsSet;
 import com.l2jserver.gameserver.model.actor.L2Character;
@@ -32,6 +35,8 @@
 import com.l2jserver.gameserver.model.skills.AbnormalType;
 import com.l2jserver.gameserver.model.skills.BuffInfo;
 
+import custom.CancelReturn.CancelReturn;
+
 /**
  * Dispel By Slot effect implementation.
  * @author Gnacik, Zoey76, Adry_85
@@ -82,6 +87,7 @@
 
  final L2Character effected = info.getEffected();
  final CharEffectList effectList = effected.getEffectList();
+ final List<BuffInfo> buffList = new ArrayList<>();
  // There is no need to iterate over all buffs,
  // Just iterate once over all slots to dispel and get the buff with that abnormal if exists,
  // Operation of O(n) for the amount of slots to dispel (which is usually small) and O(1) to get the buff.
@@ -102,11 +108,18 @@
  {
  continue;
  }
-
- if ((entry.getKey() == toDispel.getSkill().getAbnormalType()) && (entry.getValue() >= toDispel.getSkill().getAbnormalLvl()))
+ if (effected.isPlayer() && !effected.getActingPlayer().isInOlympiadMode())
  {
+ buffList.add(toDispel);
+ }
+ else if ((entry.getKey() == toDispel.getSkill().getAbnormalType()) && (entry.getValue() >= toDispel.getSkill().getAbnormalLvl()))
+ {
  effectList.stopSkillEffects(true, entry.getKey());
  }
  }
+ if (!buffList.isEmpty())
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new CancelReturn(effected, buffList), 15 * 1000);
+ }
  }
 }
Index: dist/game/data/scripts/custom/CancelReturn/CancelReturn.java
===================================================================
--- dist/game/data/scripts/custom/CancelReturn/CancelReturn.java (revision 0)
+++ dist/game/data/scripts/custom/CancelReturn/CancelReturn.java (working copy)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack 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 DataPack 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 custom.CancelReturn;
+
+import java.util.List;
+
+import com.l2jserver.gameserver.model.CharEffectList;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.skills.BuffInfo;
+
+/**
+ * Cancel Return.<br>
+ * It will return dispelled effects back to it's owner.
+ * @author xban1x
+ */
+public final class CancelReturn implements Runnable
+{
+ private final L2Character _character;
+ private final List<BuffInfo> _buffList;
+
+ public CancelReturn(L2Character character, List<BuffInfo> buffList)
+ {
+ _character = character;
+ _buffList = buffList;
+ }
+
+ @Override
+ public void run()
+ {
+ if ((_character != null) && (_buffList != null))
+ {
+ final CharEffectList cel = _character.getEffectList();
+ for (BuffInfo bi : _buffList)
+ {
+ cel.add(bi);
+ }
+ }
+ }
+
+}
Index: dist/game/data/scripts/custom/CancelReturn/CancelReturn.java
===================================================================
--- dist/game/data/scripts/custom/CancelReturn/CancelReturn.java (revision 0)
+++ dist/game/data/scripts/custom/CancelReturn/CancelReturn.java (working copy)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack 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 DataPack 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 custom.CancelReturn;
+
+import java.util.List;
+
+import com.l2jserver.gameserver.model.CharEffectList;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.skills.BuffInfo;
+
+/**
+ * Cancel Return.<br>
+ * It will return dispelled effects back to it's owner.
+ * @author xban1x
+ */
+public final class CancelReturn implements Runnable
+{
+ private final L2Character _character;
+ private final List<BuffInfo> _buffList;
+
+ public CancelReturn(L2Character character, List<BuffInfo> buffList)
+ {
+ _character = character;
+ _buffList = buffList;
+ }
+
+ @Override
+ public void run()
+ {
+ if ((_character != null) && (_buffList != null))
+ {
+ final CharEffectList cel = _character.getEffectList();
+ for (BuffInfo bi : _buffList)
+ {
+ cel.add(bi);
+ }
+ }
+ }
+
+}
Index: dist/game/data/scripts/handlers/effecthandlers/DispelBySlotProbability.java
===================================================================
--- dist/game/data/scripts/handlers/effecthandlers/DispelBySlotProbability.java (revision 10078)
+++ dist/game/data/scripts/handlers/effecthandlers/DispelBySlotProbability.java (working copy)
@@ -18,11 +18,14 @@
  */
 package handlers.effecthandlers;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.EnumMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import com.l2jserver.gameserver.ThreadPoolManager;
 import com.l2jserver.gameserver.model.CharEffectList;
 import com.l2jserver.gameserver.model.StatsSet;
 import com.l2jserver.gameserver.model.actor.L2Character;
@@ -33,6 +36,8 @@
 import com.l2jserver.gameserver.model.skills.BuffInfo;
 import com.l2jserver.util.Rnd;
 
+import custom.CancelReturn.CancelReturn;
+
 /**
  * Dispel By Slot Probability effect implementation.
  * @author Adry_85, Zoey76
@@ -85,6 +90,7 @@
 
  final L2Character effected = info.getEffected();
  final CharEffectList effectList = effected.getEffectList();
+ final List<BuffInfo> buffList = new ArrayList<>();
  // There is no need to iterate over all buffs,
  // Just iterate once over all slots to dispel and get the buff with that abnormal if exists,
  // Operation of O(n) for the amount of slots to dispel (which is usually small) and O(1) to get the buff.
@@ -106,12 +112,19 @@
  {
  continue;
  }
-
- if ((toDispel.getSkill().getAbnormalType() == entry.getKey()) && (entry.getValue() >= toDispel.getSkill().getAbnormalLvl()))
+ if (effected.isPlayer() && !effected.getActingPlayer().isInOlympiadMode())
  {
+ buffList.add(toDispel);
+ }
+ else if ((toDispel.getSkill().getAbnormalType() == entry.getKey()) && (entry.getValue() >= toDispel.getSkill().getAbnormalLvl()))
+ {
  effectList.stopSkillEffects(true, entry.getKey());
  }
  }
  }
+ if (!buffList.isEmpty())
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new CancelReturn(effected, buffList), 15 * 1000);
+ }
  }
 }
Index: dist/game/data/scripts/handlers/effecthandlers/DispelByCategory.java
===================================================================
--- dist/game/data/scripts/handlers/effecthandlers/DispelByCategory.java (revision 10078)
+++ dist/game/data/scripts/handlers/effecthandlers/DispelByCategory.java (working copy)
@@ -20,6 +20,7 @@
 
 import java.util.List;
 
+import com.l2jserver.gameserver.ThreadPoolManager;
 import com.l2jserver.gameserver.model.StatsSet;
 import com.l2jserver.gameserver.model.conditions.Condition;
 import com.l2jserver.gameserver.model.effects.AbstractEffect;
@@ -27,6 +28,8 @@
 import com.l2jserver.gameserver.model.skills.BuffInfo;
 import com.l2jserver.gameserver.model.stats.Formulas;
 
+import custom.CancelReturn.CancelReturn;
+
 /**
  * Dispel By Category effect implementation.
  * @author DS, Adry_85
@@ -66,6 +69,13 @@
  }
 
  final List<BuffInfo> canceled = Formulas.calcCancelStealEffects(info.getEffector(), info.getEffected(), info.getSkill(), _slot, _rate, _max);
+ if (info.getEffected().isPlayer() && !info.getEffected().getActingPlayer().isInOlympiadMode())
+ {
+ if (!canceled.isEmpty())
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new CancelReturn(info.getEffected(), canceled), 15 * 1000);
+ }
+ }
  for (BuffInfo can : canceled)
  {
  info.getEffected().getEffectList().stopSkillEffects(true, can.getSkill());

Desconectado 3gato

  • Usuario
  • *
  • Mensajes: 23
  • Karma: 0
  • Sexo: Masculino
  • Learn and share my knowledge!
Re:[IMP] Cancel Return Buff
« Respuesta #1 en: Febrero 22, 2018, 07:04:30 am »
Usted repitió eso dos veces.

[spoiler]Index: dist/game/data/scripts/custom/CancelReturn/CancelReturn.java
===================================================================
--- dist/game/data/scripts/custom/CancelReturn/CancelReturn.java   (revision 0)
+++ dist/game/data/scripts/custom/CancelReturn/CancelReturn.java   (working copy)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack 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 DataPack 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 custom.CancelReturn;
+
+import java.util.List;
+
+import com.l2jserver.gameserver.model.CharEffectList;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.skills.BuffInfo;
+
+/**
+ * Cancel Return.<br>
+ * It will return dispelled effects back to it's owner.
+ * @author xban1x
+ */
+public final class CancelReturn implements Runnable
+{
+   private final L2Character _character;
+   private final List<BuffInfo> _buffList;
+   
+   public CancelReturn(L2Character character, List<BuffInfo> buffList)
+   {
+      _character = character;
+      _buffList = buffList;
+   }
+   
+   @Override
+   public void run()
+   {
+      if ((_character != null) && (_buffList != null))
+      {
+         final CharEffectList cel = _character.getEffectList();
+         for (BuffInfo bi : _buffList)
+         {
+            cel.add(bi);
+         }
+      }
+   }
+   
+}[/spoiler]


y cuando agrego, tengo estos errores:

[spoiler][/spoiler]

Conectado swarlog

  • Desarrollador
  • Usuario
  • *
  • Mensajes: 1.633
  • Karma: 5
  • Sexo: Masculino
    • U3Games
Re:[IMP] Cancel Return Buff
« Respuesta #2 en: Febrero 22, 2018, 08:25:36 pm »

y cuando agrego, tengo estos errores:

[spoiler][/spoiler]

Revisa lo que modificaste, veo que eliminaste la línea:

Código: [Seleccionar]
final List<BuffInfo> canceled = Formulas.calcCancelStealEffects(info.getEffector(), info.getEffected(), info.getSkill(), _slot, _rate, _max);

Desconectado Kryspo

  • Usuario
  • *
  • Mensajes: 150
  • Karma: 0
  • Sexo: Masculino
  • Desarrollador Java de L2jChile
Re:[IMP] Cancel Return Buff
« Respuesta #3 en: Marzo 25, 2018, 08:09:32 pm »
Cada cuanto regresan los buff ??

Desconectado 3gato

  • Usuario
  • *
  • Mensajes: 23
  • Karma: 0
  • Sexo: Masculino
  • Learn and share my knowledge!
Re:[IMP] Cancel Return Buff
« Respuesta #4 en: Junio 08, 2018, 09:12:19 am »
Código: [Seleccionar]
### Eclipse Workspace Patch 1.0
#P L2J_DataPack_BETA
Index: dist/game/data/scripts/handlers/effecthandlers/DispelBySlot.java
===================================================================
--- dist/game/data/scripts/handlers/effecthandlers/DispelBySlot.java (revision 10078)
+++ dist/game/data/scripts/handlers/effecthandlers/DispelBySlot.java (working copy)
@@ -18,11 +18,14 @@
  */
 package handlers.effecthandlers;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.EnumMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import com.l2jserver.gameserver.ThreadPoolManager;
 import com.l2jserver.gameserver.model.CharEffectList;
 import com.l2jserver.gameserver.model.StatsSet;
 import com.l2jserver.gameserver.model.actor.L2Character;
@@ -32,6 +35,8 @@
 import com.l2jserver.gameserver.model.skills.AbnormalType;
 import com.l2jserver.gameserver.model.skills.BuffInfo;
 
+import custom.CancelReturn.CancelReturn;
+
 /**
  * Dispel By Slot effect implementation.
  * @author Gnacik, Zoey76, Adry_85
@@ -82,6 +87,7 @@
 
  final L2Character effected = info.getEffected();
  final CharEffectList effectList = effected.getEffectList();
+ final List<BuffInfo> buffList = new ArrayList<>();
  // There is no need to iterate over all buffs,
  // Just iterate once over all slots to dispel and get the buff with that abnormal if exists,
  // Operation of O(n) for the amount of slots to dispel (which is usually small) and O(1) to get the buff.
@@ -102,11 +108,18 @@
  {
  continue;
  }
-
- if ((entry.getKey() == toDispel.getSkill().getAbnormalType()) && (entry.getValue() >= toDispel.getSkill().getAbnormalLvl()))
+ if (effected.isPlayer() && !effected.getActingPlayer().isInOlympiadMode())
  {
+ buffList.add(toDispel);
+ }
+ else if ((entry.getKey() == toDispel.getSkill().getAbnormalType()) && (entry.getValue() >= toDispel.getSkill().getAbnormalLvl()))
+ {
  effectList.stopSkillEffects(true, entry.getKey());
  }
  }
+ if (!buffList.isEmpty())
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new CancelReturn(effected, buffList), 15 * 1000);
+ }
  }
 }
Index: dist/game/data/scripts/custom/CancelReturn/CancelReturn.java
===================================================================
--- dist/game/data/scripts/custom/CancelReturn/CancelReturn.java (revision 0)
+++ dist/game/data/scripts/custom/CancelReturn/CancelReturn.java (working copy)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack 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 DataPack 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 custom.CancelReturn;
+
+import java.util.List;
+
+import com.l2jserver.gameserver.model.CharEffectList;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.skills.BuffInfo;
+
+/**
+ * Cancel Return.<br>
+ * It will return dispelled effects back to it's owner.
+ * @author xban1x
+ */
+public final class CancelReturn implements Runnable
+{
+ private final L2Character _character;
+ private final List<BuffInfo> _buffList;
+
+ public CancelReturn(L2Character character, List<BuffInfo> buffList)
+ {
+ _character = character;
+ _buffList = buffList;
+ }
+
+ @Override
+ public void run()
+ {
+ if ((_character != null) && (_buffList != null))
+ {
+ final CharEffectList cel = _character.getEffectList();
+ for (BuffInfo bi : _buffList)
+ {
+ cel.add(bi);
+ }
+ }
+ }
+
+}
Index: dist/game/data/scripts/custom/CancelReturn/CancelReturn.java
===================================================================
--- dist/game/data/scripts/custom/CancelReturn/CancelReturn.java (revision 0)
+++ dist/game/data/scripts/custom/CancelReturn/CancelReturn.java (working copy)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack 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 DataPack 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 custom.CancelReturn;
+
+import java.util.List;
+
+import com.l2jserver.gameserver.model.CharEffectList;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.skills.BuffInfo;
+
+/**
+ * Cancel Return.<br>
+ * It will return dispelled effects back to it's owner.
+ * @author xban1x
+ */
+public final class CancelReturn implements Runnable
+{
+ private final L2Character _character;
+ private final List<BuffInfo> _buffList;
+
+ public CancelReturn(L2Character character, List<BuffInfo> buffList)
+ {
+ _character = character;
+ _buffList = buffList;
+ }
+
+ @Override
+ public void run()
+ {
+ if ((_character != null) && (_buffList != null))
+ {
+ final CharEffectList cel = _character.getEffectList();
+ for (BuffInfo bi : _buffList)
+ {
+ cel.add(bi);
+ }
+ }
+ }
+
+}
Index: dist/game/data/scripts/handlers/effecthandlers/DispelBySlotProbability.java
===================================================================
--- dist/game/data/scripts/handlers/effecthandlers/DispelBySlotProbability.java (revision 10078)
+++ dist/game/data/scripts/handlers/effecthandlers/DispelBySlotProbability.java (working copy)
@@ -18,11 +18,14 @@
  */
 package handlers.effecthandlers;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.EnumMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import com.l2jserver.gameserver.ThreadPoolManager;
 import com.l2jserver.gameserver.model.CharEffectList;
 import com.l2jserver.gameserver.model.StatsSet;
 import com.l2jserver.gameserver.model.actor.L2Character;
@@ -33,6 +36,8 @@
 import com.l2jserver.gameserver.model.skills.BuffInfo;
 import com.l2jserver.util.Rnd;
 
+import custom.CancelReturn.CancelReturn;
+
 /**
  * Dispel By Slot Probability effect implementation.
  * @author Adry_85, Zoey76
@@ -85,6 +90,7 @@
 
  final L2Character effected = info.getEffected();
  final CharEffectList effectList = effected.getEffectList();
+ final List<BuffInfo> buffList = new ArrayList<>();
  // There is no need to iterate over all buffs,
  // Just iterate once over all slots to dispel and get the buff with that abnormal if exists,
  // Operation of O(n) for the amount of slots to dispel (which is usually small) and O(1) to get the buff.
@@ -106,12 +112,19 @@
  {
  continue;
  }
-
- if ((toDispel.getSkill().getAbnormalType() == entry.getKey()) && (entry.getValue() >= toDispel.getSkill().getAbnormalLvl()))
+ if (effected.isPlayer() && !effected.getActingPlayer().isInOlympiadMode())
  {
+ buffList.add(toDispel);
+ }
+ else if ((toDispel.getSkill().getAbnormalType() == entry.getKey()) && (entry.getValue() >= toDispel.getSkill().getAbnormalLvl()))
+ {
  effectList.stopSkillEffects(true, entry.getKey());
  }
  }
  }
+ if (!buffList.isEmpty())
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new CancelReturn(effected, buffList), 15 * 1000);
+ }
  }
 }
Index: dist/game/data/scripts/handlers/effecthandlers/DispelByCategory.java
===================================================================
--- dist/game/data/scripts/handlers/effecthandlers/DispelByCategory.java (revision 10078)
+++ dist/game/data/scripts/handlers/effecthandlers/DispelByCategory.java (working copy)
@@ -20,6 +20,7 @@
 
 import java.util.List;
 
+import com.l2jserver.gameserver.ThreadPoolManager;
 import com.l2jserver.gameserver.model.StatsSet;
 import com.l2jserver.gameserver.model.conditions.Condition;
 import com.l2jserver.gameserver.model.effects.AbstractEffect;
@@ -27,6 +28,8 @@
 import com.l2jserver.gameserver.model.skills.BuffInfo;
 import com.l2jserver.gameserver.model.stats.Formulas;
 
+import custom.CancelReturn.CancelReturn;
+
 /**
  * Dispel By Category effect implementation.
  * @author DS, Adry_85
@@ -66,6 +69,13 @@
  }
 
  final List<BuffInfo> canceled = Formulas.calcCancelStealEffects(info.getEffector(), info.getEffected(), info.getSkill(), _slot, _rate, _max);
+ if (info.getEffected().isPlayer() && !info.getEffected().getActingPlayer().isInOlympiadMode())
+ {
+ if (!canceled.isEmpty())
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new CancelReturn(info.getEffected(), canceled), 15 * 1000);
+ }
+ }
  for (BuffInfo can : canceled)
  {
  info.getEffected().getEffectList().stopSkillEffects(true, can.getSkill());

Su mod está faltando la parte del Steal Divinity. que utiliza el type: StealAbnormal
usted puede ponerlo a disposición por favor?



y tiene un error en el código.
En realidad no es un error, porque el código funciona 100% como debería.
el único problema es que algunos cancelan utiliza el type: DispelByCategory
y la habilidad que tira debuff "Cleanse (Cardinal), Soul Cleanse (SoulHound)"
usa el mismo Type:


Skill de la clase Cardinal:

   <skill id="1409" levels="1" name="Cleanse">
      <set name="castRange" val="600" />
      <set name="effectPoint" val="1" />
      <set name="effectRange" val="1100" />
      <set name="hitTime" val="4000" />
      <set name="icon" val="icon.skill1409" />
      <set name="isMagic" val="1" /> <!-- Magic Skill -->
      <set name="itemConsumeCount" val="1" />
      <set name="itemConsumeId" val="8874" /> <!-- Einhasad's Holy Water -->
      <set name="magicLvl" val="78" />
      <set name="mpConsume" val="46" />
      <set name="mpInitialConsume" val="12" />
      <set name="operateType" val="A1" />
      <set name="reuseDelay" val="8000" />
      <set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
      <set name="targetType" val="ONE" />
      <for>
         <effect name="DispelByCategory">
            <param slot="debuff" rate="100" max="10" />
         </effect>
      </for>
   </skill>


Skill de la clase Soul Hound:

   <skill id="1510" levels="1" name="Soul Cleanse">
      <!-- Confirmed CT2.5 -->
      <set name="castRange" val="600" />
      <set name="effectPoint" val="611" />
      <set name="effectRange" val="1100" />
      <set name="hitTime" val="2000" />
      <set name="icon" val="icon.skill1510" />
      <set name="isMagic" val="1" /> <!-- Magic Skill -->
      <set name="magicLvl" val="66" />
      <set name="mpConsume" val="25" />
      <set name="mpInitialConsume" val="7" />
      <set name="operateType" val="A1" />
      <set name="reuseDelay" val="15000" />
      <set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
      <set name="targetType" val="ONE" />
      <cond msgId="113" addName="1">
         <target race="KAMAEL" />
      </cond>
      <for>
         <effect name="DispelByCategory">
            <param slot="debuff" rate="100" max="3" />
         </effect>
      </for>
   </skill>


cuando el jugador usa la skill cleanse para sacar los debufs, los debufs vuelven después de 15 segundos.
Usted o alguien tiene una posible corrección para eso?

Desconectado 3gato

  • Usuario
  • *
  • Mensajes: 23
  • Karma: 0
  • Sexo: Masculino
  • Learn and share my knowledge!
Re:[IMP] Cancel Return Buff
« Respuesta #5 en: Junio 08, 2018, 09:13:10 am »

y cuando agrego, tengo estos errores:

[spoiler][/spoiler]

Revisa lo que modificaste, veo que eliminaste la línea:

Código: [Seleccionar]
final List<BuffInfo> canceled = Formulas.calcCancelStealEffects(info.getEffector(), info.getEffected(), info.getSkill(), _slot, _rate, _max);

Gracias !

Desconectado PiexPient

  • Usuario
  • *
  • Mensajes: 1
  • Karma: 0
  • Sexo: Masculino
Re: [IMP] Cancel Return Buff
« Respuesta #6 en: Julio 21, 2021, 03:08:17 pm »
<a href=https://clomidset.com/>where to buy clomid in uk</a>