MaxHp and MaxMp effect heals with a task.
This commit is contained in:
parent
8b313ed415
commit
c3d11803a9
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -39,7 +40,11 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
@Override
|
@Override
|
||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal && !effected.isHpBlocked())
|
if (_heal)
|
||||||
|
{
|
||||||
|
if (!effected.isHpBlocked())
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
@ -54,6 +59,8 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -40,20 +41,23 @@ public class MaxMp extends AbstractStatEffect
|
|||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal)
|
if (_heal)
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
case DIFF: // DIFF
|
case DIFF:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PER: // PER
|
case PER:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -39,7 +40,11 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
@Override
|
@Override
|
||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal && !effected.isHpBlocked())
|
if (_heal)
|
||||||
|
{
|
||||||
|
if (!effected.isHpBlocked())
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
@ -54,6 +59,8 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -40,20 +41,23 @@ public class MaxMp extends AbstractStatEffect
|
|||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal)
|
if (_heal)
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
case DIFF: // DIFF
|
case DIFF:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PER: // PER
|
case PER:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -39,7 +40,11 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
@Override
|
@Override
|
||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal && !effected.isHpBlocked())
|
if (_heal)
|
||||||
|
{
|
||||||
|
if (!effected.isHpBlocked())
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
@ -54,6 +59,8 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -40,20 +41,23 @@ public class MaxMp extends AbstractStatEffect
|
|||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal)
|
if (_heal)
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
case DIFF: // DIFF
|
case DIFF:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PER: // PER
|
case PER:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -39,7 +40,11 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
@Override
|
@Override
|
||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal && !effected.isHpBlocked())
|
if (_heal)
|
||||||
|
{
|
||||||
|
if (!effected.isHpBlocked())
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
@ -54,6 +59,8 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -40,20 +41,23 @@ public class MaxMp extends AbstractStatEffect
|
|||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal)
|
if (_heal)
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
case DIFF: // DIFF
|
case DIFF:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PER: // PER
|
case PER:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -39,7 +40,11 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
@Override
|
@Override
|
||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal && !effected.isHpBlocked())
|
if (_heal)
|
||||||
|
{
|
||||||
|
if (!effected.isHpBlocked())
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
@ -54,6 +59,8 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -40,20 +41,23 @@ public class MaxMp extends AbstractStatEffect
|
|||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal)
|
if (_heal)
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
case DIFF: // DIFF
|
case DIFF:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PER: // PER
|
case PER:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -39,7 +40,11 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
@Override
|
@Override
|
||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal && !effected.isHpBlocked())
|
if (_heal)
|
||||||
|
{
|
||||||
|
if (!effected.isHpBlocked())
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
@ -54,6 +59,8 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -40,20 +41,23 @@ public class MaxMp extends AbstractStatEffect
|
|||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal)
|
if (_heal)
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
case DIFF: // DIFF
|
case DIFF:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PER: // PER
|
case PER:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -39,7 +40,11 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
@Override
|
@Override
|
||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal && !effected.isHpBlocked())
|
if (_heal)
|
||||||
|
{
|
||||||
|
if (!effected.isHpBlocked())
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
@ -54,6 +59,8 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -40,20 +41,23 @@ public class MaxMp extends AbstractStatEffect
|
|||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal)
|
if (_heal)
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
case DIFF: // DIFF
|
case DIFF:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PER: // PER
|
case PER:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -39,7 +40,11 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
@Override
|
@Override
|
||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal && !effected.isHpBlocked())
|
if (_heal)
|
||||||
|
{
|
||||||
|
if (!effected.isHpBlocked())
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
@ -54,6 +59,8 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -40,20 +41,23 @@ public class MaxMp extends AbstractStatEffect
|
|||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal)
|
if (_heal)
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
case DIFF: // DIFF
|
case DIFF:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PER: // PER
|
case PER:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -39,7 +40,11 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
@Override
|
@Override
|
||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal && !effected.isHpBlocked())
|
if (_heal)
|
||||||
|
{
|
||||||
|
if (!effected.isHpBlocked())
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
@ -54,6 +59,8 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -40,20 +41,23 @@ public class MaxMp extends AbstractStatEffect
|
|||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal)
|
if (_heal)
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
case DIFF: // DIFF
|
case DIFF:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PER: // PER
|
case PER:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -39,7 +40,11 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
@Override
|
@Override
|
||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal && !effected.isHpBlocked())
|
if (_heal)
|
||||||
|
{
|
||||||
|
if (!effected.isHpBlocked())
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
@ -54,6 +59,8 @@ public class MaxHp extends AbstractStatEffect
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package handlers.effecthandlers;
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import com.l2jmobius.commons.concurrent.ThreadPool;
|
||||||
import com.l2jmobius.gameserver.model.StatsSet;
|
import com.l2jmobius.gameserver.model.StatsSet;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
@ -40,20 +41,23 @@ public class MaxMp extends AbstractStatEffect
|
|||||||
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
public void continuousInstant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
|
||||||
{
|
{
|
||||||
if (_heal)
|
if (_heal)
|
||||||
|
{
|
||||||
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
switch (_mode)
|
switch (_mode)
|
||||||
{
|
{
|
||||||
case DIFF: // DIFF
|
case DIFF:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
effected.setCurrentMp(effected.getCurrentMp() + _amount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PER: // PER
|
case PER:
|
||||||
{
|
{
|
||||||
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
effected.setCurrentMp(effected.getCurrentMp() + (effected.getMaxMp() * (_amount / 100)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user