Removed pointless EffectTickTask tick count variable.

This commit is contained in:
MobiusDevelopment
2020-01-28 15:26:44 +00:00
parent fe05c1cddc
commit 393e53514c
51 changed files with 51 additions and 572 deletions

View File

@ -16,8 +16,6 @@
*/
package org.l2jmobius.gameserver.model.effects;
import java.util.concurrent.atomic.AtomicInteger;
import org.l2jmobius.gameserver.model.skills.BuffInfo;
/**
@ -28,7 +26,6 @@ public class EffectTickTask implements Runnable
{
private final BuffInfo _info;
private final AbstractEffect _effect;
private final AtomicInteger _tickCount = new AtomicInteger();
/**
* EffectTickTask constructor.
@ -59,18 +56,9 @@ public class EffectTickTask implements Runnable
return _effect;
}
/**
* Gets the current tick count.
* @return the tick count
*/
public int getTickCount()
{
return _tickCount.get();
}
@Override
public void run()
{
_info.onTick(_effect, _tickCount.incrementAndGet());
_info.onTick(_effect);
}
}

View File

@ -346,9 +346,8 @@ public class BuffInfo
* Called on each tick.<br>
* Verify if the effect should end and the effect task should be cancelled.
* @param effect the effect that is ticking
* @param tickCount the tick count
*/
public void onTick(AbstractEffect effect, int tickCount)
public void onTick(AbstractEffect effect)
{
boolean continueForever = false;
// If the effect is in use, allow it to affect the effected.
@ -424,24 +423,6 @@ public class BuffInfo
}
}
/**
* Gets the effect tick count.
* @param effect the effect
* @return the current tick count
*/
public int getTickCount(AbstractEffect effect)
{
if (_tasks != null)
{
final EffectTaskInfo effectTaskInfo = _tasks.get(effect);
if (effectTaskInfo != null)
{
return effectTaskInfo.getEffectTask().getTickCount();
}
}
return 0;
}
public void resetAbnormalTime(int abnormalTime)
{
if (_abnormalTime > 0)