Removed pointless EffectTickTask tick count variable.
This commit is contained in:
		| @@ -320,7 +320,7 @@ public class AdminBuffs implements IAdminCommandHandler | ||||
| 				sb.append(")"); | ||||
| 				sb.append(!info.isInUse() ? FONT_RED2 : ""); | ||||
| 				sb.append("</td><td>"); | ||||
| 				sb.append(info.getSkill().isToggle() ? "T (" + info.getTickCount(effect) + ")" : info.getSkill().isPassive() ? "P" : info.getTime() + "s"); | ||||
| 				sb.append(info.getSkill().isToggle() ? "T" : info.getSkill().isPassive() ? "P" : info.getTime() + "s"); | ||||
| 				sb.append("</td><td><button value=\"X\" action=\"bypass -h admin_stopbuff "); | ||||
| 				sb.append(target.getObjectId()); | ||||
| 				sb.append(" "); | ||||
|   | ||||
| @@ -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); | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment