Browse Source

Rename time -> abnormalTime, thanks UnAfraid.

MELERIX 14 years ago
parent
commit
ff280f77b6

+ 20 - 20
L2J_Server/java/com/l2jserver/gameserver/model/L2Effect.java

@@ -85,7 +85,7 @@ public abstract class L2Effect
 	private EffectState _state;
 	private EffectState _state;
 	
 	
 	// period, seconds
 	// period, seconds
-	private final int _period;
+	private final int _abnormalTime;
 	private int _periodStartTicks;
 	private int _periodStartTicks;
 	private int _periodFirstTime;
 	private int _periodFirstTime;
 	
 	
@@ -164,7 +164,7 @@ public abstract class L2Effect
 		_totalCount = _count;
 		_totalCount = _count;
 		
 		
 		// Support for retail herbs duration when _effected has a Summon
 		// Support for retail herbs duration when _effected has a Summon
-		int temp = template.period;
+		int temp = template.abnormalTime;
 		
 		
 		if ((_skill.getId() > 2277 && _skill.getId() < 2286) || (_skill.getId() >= 2512 && _skill.getId() <= 2514))
 		if ((_skill.getId() > 2277 && _skill.getId() < 2286) || (_skill.getId() >= 2512 && _skill.getId() <= 2514))
 		{
 		{
@@ -178,7 +178,7 @@ public abstract class L2Effect
 		if (env.skillMastery)
 		if (env.skillMastery)
 			temp *= 2;
 			temp *= 2;
 		
 		
-		_period = temp;
+		_abnormalTime = temp;
 		_abnormalEffect = template.abnormalEffect;
 		_abnormalEffect = template.abnormalEffect;
 		_specialEffect = template.specialEffect;
 		_specialEffect = template.specialEffect;
 		_eventEffect = template.eventEffect;
 		_eventEffect = template.eventEffect;
@@ -220,7 +220,7 @@ public abstract class L2Effect
 		_funcTemplates = _template.funcTemplates;
 		_funcTemplates = _template.funcTemplates;
 		_count = effect.getCount();
 		_count = effect.getCount();
 		_totalCount = _template.counter;
 		_totalCount = _template.counter;
-		_period = _template.period;
+		_abnormalTime = _template.abnormalTime;
 		_abnormalEffect = _template.abnormalEffect;
 		_abnormalEffect = _template.abnormalEffect;
 		_specialEffect = _template.specialEffect;
 		_specialEffect = _template.specialEffect;
 		_eventEffect = _template.eventEffect;
 		_eventEffect = _template.eventEffect;
@@ -257,7 +257,7 @@ public abstract class L2Effect
 
 
 	public void setFirstTime(int newFirstTime)
 	public void setFirstTime(int newFirstTime)
 	{
 	{
-		_periodFirstTime = Math.min(newFirstTime, _period);
+		_periodFirstTime = Math.min(newFirstTime, _abnormalTime);
 		_periodStartTicks -= _periodFirstTime * GameTimeController.TICKS_PER_SECOND;
 		_periodStartTicks -= _periodFirstTime * GameTimeController.TICKS_PER_SECOND;
 	}
 	}
 
 
@@ -266,9 +266,9 @@ public abstract class L2Effect
 		return _icon;
 		return _icon;
 	}
 	}
 	
 	
-	public int getPeriod()
+	public int getAbnormalTime()
 	{
 	{
-		return _period;
+		return _abnormalTime;
 	}
 	}
 	
 	
 	public int getTime()
 	public int getTime()
@@ -284,7 +284,7 @@ public abstract class L2Effect
 	{
 	{
 		if (_count == _totalCount)
 		if (_count == _totalCount)
 			return 0;
 			return 0;
-		return (Math.abs(_count - _totalCount + 1) * _period) + getTime() + 1;
+		return (Math.abs(_count - _totalCount + 1) * _abnormalTime) + getTime() + 1;
 	}
 	}
 	
 	
 	public boolean getInUse()
 	public boolean getInUse()
@@ -354,12 +354,12 @@ public abstract class L2Effect
 	
 	
 	private final synchronized void startEffectTask()
 	private final synchronized void startEffectTask()
 	{
 	{
-		if (_period > 0)
+		if (_abnormalTime > 0)
 		{
 		{
 			stopEffectTask();
 			stopEffectTask();
-			final int initialDelay = Math.max((_period - _periodFirstTime) * 1000, 5);
+			final int initialDelay = Math.max((_abnormalTime - _periodFirstTime) * 1000, 5);
 			if (_count > 1)
 			if (_count > 1)
-				_currentFuture = ThreadPoolManager.getInstance().scheduleEffectAtFixedRate(new EffectTask(), initialDelay, _period * 1000);
+				_currentFuture = ThreadPoolManager.getInstance().scheduleEffectAtFixedRate(new EffectTask(), initialDelay, _abnormalTime * 1000);
 			else
 			else
 				_currentFuture = ThreadPoolManager.getInstance().scheduleEffect(new EffectTask(), initialDelay);
 				_currentFuture = ThreadPoolManager.getInstance().scheduleEffect(new EffectTask(), initialDelay);
 		}
 		}
@@ -463,7 +463,7 @@ public abstract class L2Effect
 					getEffected().sendPacket(smsg);
 					getEffected().sendPacket(smsg);
 				}
 				}
 
 
-				if (_period != 0)
+				if (_abnormalTime != 0)
 				{
 				{
 					startEffectTask();
 					startEffectTask();
 					return;
 					return;
@@ -506,7 +506,7 @@ public abstract class L2Effect
 				stopEffectTask();
 				stopEffectTask();
 				
 				
 				// Cancel the effect in the the abnormal effect map of the L2Character
 				// Cancel the effect in the the abnormal effect map of the L2Character
-				if (getInUse() || !(_count > 1 || _period > 0))
+				if (getInUse() || !(_count > 1 || _abnormalTime > 0))
 					if (_startConditionsCorrect)
 					if (_startConditionsCorrect)
 						onExit();
 						onExit();
 				
 				
@@ -564,8 +564,8 @@ public abstract class L2Effect
 		}
 		}
 		else if (future != null)
 		else if (future != null)
 			mi.addEffect(sk.getId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
 			mi.addEffect(sk.getId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
-		else if (_period == -1)
-			mi.addEffect(sk.getId(), getLevel(), _period);
+		else if (_abnormalTime == -1)
+			mi.addEffect(sk.getId(), getLevel(), _abnormalTime);
 	}
 	}
 	
 	
 	public final void addPartySpelledIcon(PartySpelled ps)
 	public final void addPartySpelledIcon(PartySpelled ps)
@@ -577,8 +577,8 @@ public abstract class L2Effect
 		final L2Skill sk = getSkill();
 		final L2Skill sk = getSkill();
 		if (future != null)
 		if (future != null)
 			ps.addPartySpelledEffect(sk.getId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
 			ps.addPartySpelledEffect(sk.getId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
-		else if (_period == -1)
-			ps.addPartySpelledEffect(sk.getId(), getLevel(), _period);
+		else if (_abnormalTime == -1)
+			ps.addPartySpelledEffect(sk.getId(), getLevel(), _abnormalTime);
 	}
 	}
 	
 	
 	public final void addOlympiadSpelledIcon(ExOlympiadSpelledInfo os)
 	public final void addOlympiadSpelledIcon(ExOlympiadSpelledInfo os)
@@ -590,8 +590,8 @@ public abstract class L2Effect
 		final L2Skill sk = getSkill();
 		final L2Skill sk = getSkill();
 		if (future != null)
 		if (future != null)
 			os.addEffect(sk.getId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
 			os.addEffect(sk.getId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
-		else if (_period == -1)
-			os.addEffect(sk.getId(), getLevel(), _period);
+		else if (_abnormalTime == -1)
+			os.addEffect(sk.getId(), getLevel(), _abnormalTime);
 	}
 	}
 	
 	
 	public int getLevel()
 	public int getLevel()
@@ -656,7 +656,7 @@ public abstract class L2Effect
 	@Override
 	@Override
 	public String toString()
 	public String toString()
 	{
 	{
-		return "L2Effect [_skill=" + _skill + ", _state=" + _state + ", _period=" + _period + "]";
+		return "L2Effect [_skill=" + _skill + ", _state=" + _state + ", _period=" + _abnormalTime + "]";
 	}
 	}
 	
 	
 	public boolean isSeflEffectType()
 	public boolean isSeflEffectType()

+ 9 - 9
L2J_Server/java/com/l2jserver/gameserver/skills/DocumentBase.java

@@ -244,33 +244,33 @@ abstract class DocumentBase
 		/**
 		/**
 		 * Keep this values as default ones, DP needs it
 		 * Keep this values as default ones, DP needs it
 		 */
 		 */
-		int time = 1;
+		int abnormalTime = 1;
 		int count = 1;
 		int count = 1;
 		
 		
 		if (attrs.getNamedItem("count") != null)
 		if (attrs.getNamedItem("count") != null)
 		{
 		{
 			count = Integer.decode(getValue(attrs.getNamedItem("count").getNodeValue(), template));
 			count = Integer.decode(getValue(attrs.getNamedItem("count").getNodeValue(), template));
 		}
 		}
-		if (attrs.getNamedItem("time") != null)
+		if (attrs.getNamedItem("abnormalTime") != null)
 		{
 		{
-			time = Integer.decode(getValue(attrs.getNamedItem("time").getNodeValue(),template));
+			abnormalTime = Integer.decode(getValue(attrs.getNamedItem("abnormalTime").getNodeValue(),template));
 			if (Config.ENABLE_MODIFY_SKILL_DURATION)
 			if (Config.ENABLE_MODIFY_SKILL_DURATION)
 			{
 			{
 				if (Config.SKILL_DURATION_LIST.containsKey(((L2Skill) template).getId()))
 				if (Config.SKILL_DURATION_LIST.containsKey(((L2Skill) template).getId()))
 				{
 				{
 					if (((L2Skill) template).getLevel() < 100)
 					if (((L2Skill) template).getLevel() < 100)
-						time = Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
+						abnormalTime = Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
 					else if ((((L2Skill) template).getLevel() >= 100) && (((L2Skill) template).getLevel() < 140))
 					else if ((((L2Skill) template).getLevel() >= 100) && (((L2Skill) template).getLevel() < 140))
-						time += Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
+						abnormalTime += Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
 					else if (((L2Skill) template).getLevel() > 140)
 					else if (((L2Skill) template).getLevel() > 140)
-						time = Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
+						abnormalTime = Config.SKILL_DURATION_LIST.get(((L2Skill) template).getId());
 					if (Config.DEBUG)
 					if (Config.DEBUG)
-						_log.info("*** Skill " + ((L2Skill) template).getName() + " (" + ((L2Skill) template).getLevel() + ") changed duration to " + time + " seconds.");
+						_log.info("*** Skill " + ((L2Skill) template).getName() + " (" + ((L2Skill) template).getLevel() + ") changed duration to " + abnormalTime + " seconds.");
 				}
 				}
 			}
 			}
 		}
 		}
 		else if (((L2Skill) template).getBuffDuration() > 0)
 		else if (((L2Skill) template).getBuffDuration() > 0)
-			time = ((L2Skill) template).getBuffDuration() / 1000 / count;
+			abnormalTime = ((L2Skill) template).getBuffDuration() / 1000 / count;
 		
 		
 		boolean self = false;
 		boolean self = false;
 		if (attrs.getNamedItem("self") != null)
 		if (attrs.getNamedItem("self") != null)
@@ -372,7 +372,7 @@ abstract class DocumentBase
 			throw new NoSuchElementException("Invalid chance condition: " + chanceCond + " "
 			throw new NoSuchElementException("Invalid chance condition: " + chanceCond + " "
 					+ activationChance);
 					+ activationChance);
 		
 		
-		lt = new EffectTemplate(attachCond, applayCond, name, lambda, count, time, abnormal, special, event, abnormalType, abnormalLvl, icon, effectPower, type, trigId, trigLvl, chance);
+		lt = new EffectTemplate(attachCond, applayCond, name, lambda, count, abnormalTime, abnormal, special, event, abnormalType, abnormalLvl, icon, effectPower, type, trigId, trigLvl, chance);
 		parseTemplate(n, lt);
 		parseTemplate(n, lt);
 		if (template instanceof L2Item)
 		if (template instanceof L2Item)
 			((L2Item) template).attach(lt);
 			((L2Item) template).attach(lt);

+ 1 - 1
L2J_Server/java/com/l2jserver/gameserver/skills/effects/EffectCancel.java

@@ -188,7 +188,7 @@ public class EffectCancel extends L2Effect
 	private static boolean calcCancelSuccess(L2Effect effect, int cancelLvl, int baseRate)
 	private static boolean calcCancelSuccess(L2Effect effect, int cancelLvl, int baseRate)
 	{
 	{
 		int rate = 2 * (cancelLvl - effect.getSkill().getMagicLevel());
 		int rate = 2 * (cancelLvl - effect.getSkill().getMagicLevel());
-		rate += effect.getPeriod()/120;
+		rate += effect.getAbnormalTime()/120;
 		rate += baseRate;
 		rate += baseRate;
 		
 		
 		if (rate < 25)
 		if (rate < 25)

+ 1 - 1
L2J_Server/java/com/l2jserver/gameserver/skills/effects/EffectCancelDebuff.java

@@ -147,7 +147,7 @@ public class EffectCancelDebuff extends L2Effect
     private static boolean calcCancelSuccess(L2Effect effect, int cancelLvl, int baseRate)
     private static boolean calcCancelSuccess(L2Effect effect, int cancelLvl, int baseRate)
     {
     {
         int rate = 2 * (cancelLvl - effect.getSkill().getMagicLevel());
         int rate = 2 * (cancelLvl - effect.getSkill().getMagicLevel());
-        rate += (effect.getPeriod() - effect.getTime()) / 1200;
+        rate += (effect.getAbnormalTime() - effect.getTime()) / 1200;
         rate += baseRate;
         rate += baseRate;
        
        
         if (rate < 25)
         if (rate < 25)

+ 1 - 1
L2J_Server/java/com/l2jserver/gameserver/skills/effects/EffectHealOverTime.java

@@ -62,7 +62,7 @@ public class EffectHealOverTime extends L2Effect
 	@Override
 	@Override
 	public boolean onStart()
 	public boolean onStart()
 	{
 	{
-		getEffected().sendPacket(new ExRegMax(calc(), getTotalCount() * getPeriod(), getPeriod()));
+		getEffected().sendPacket(new ExRegMax(calc(), getTotalCount() * getAbnormalTime(), getAbnormalTime()));
 		return true;
 		return true;
 	}
 	}
 	
 	

+ 1 - 1
L2J_Server/java/com/l2jserver/gameserver/skills/effects/EffectMpConsumePerLevel.java

@@ -50,7 +50,7 @@ public class EffectMpConsumePerLevel extends L2Effect
 		
 		
 		double base = calc();
 		double base = calc();
 		double consume = (getEffected().getLevel() - 1) / 7.5 * base
 		double consume = (getEffected().getLevel() - 1) / 7.5 * base
-		* getPeriod();
+		* getAbnormalTime();
 		
 		
 		if (consume > getEffected().getCurrentMp())
 		if (consume > getEffected().getCurrentMp())
 		{
 		{

+ 3 - 3
L2J_Server/java/com/l2jserver/gameserver/templates/effects/EffectTemplate.java

@@ -44,7 +44,7 @@ public class EffectTemplate
 	public final Condition applayCond;
 	public final Condition applayCond;
 	public final Lambda lambda;
 	public final Lambda lambda;
 	public final int counter;
 	public final int counter;
-	public final int period; // in seconds
+	public final int abnormalTime; // in seconds
 	public final AbnormalEffect abnormalEffect;
 	public final AbnormalEffect abnormalEffect;
 	public final AbnormalEffect specialEffect;
 	public final AbnormalEffect specialEffect;
 	public final AbnormalEffect eventEffect;
 	public final AbnormalEffect eventEffect;
@@ -61,7 +61,7 @@ public class EffectTemplate
 	public final ChanceCondition chanceCondition;
 	public final ChanceCondition chanceCondition;
 	
 	
 	public EffectTemplate(Condition pAttachCond, Condition pApplayCond, String func, Lambda pLambda,
 	public EffectTemplate(Condition pAttachCond, Condition pApplayCond, String func, Lambda pLambda,
-			int pCounter, int pPeriod, AbnormalEffect pAbnormalEffect, AbnormalEffect pSpecialEffect,
+			int pCounter, int pAbnormalTime, AbnormalEffect pAbnormalEffect, AbnormalEffect pSpecialEffect,
 			AbnormalEffect pEventEffect, String pAbnormalType, byte pAbnormalLvl, boolean showicon,
 			AbnormalEffect pEventEffect, String pAbnormalType, byte pAbnormalLvl, boolean showicon,
 			double ePower, L2SkillType eType, int trigId, int trigLvl, ChanceCondition chanceCond)
 			double ePower, L2SkillType eType, int trigId, int trigLvl, ChanceCondition chanceCond)
 	{
 	{
@@ -69,7 +69,7 @@ public class EffectTemplate
 		applayCond = pApplayCond;
 		applayCond = pApplayCond;
 		lambda = pLambda;
 		lambda = pLambda;
 		counter = pCounter;
 		counter = pCounter;
-		period = pPeriod;
+		abnormalTime = pAbnormalTime;
 		abnormalEffect = pAbnormalEffect;
 		abnormalEffect = pAbnormalEffect;
 		specialEffect = pSpecialEffect;
 		specialEffect = pSpecialEffect;
 		eventEffect = pEventEffect;
 		eventEffect = pEventEffect;