瀏覽代碼

Rename stackType -> abnormalType & stackOrder -> abnormalLvl, thanks UnAfraid.

MELERIX 14 年之前
父節點
當前提交
8b657b7afd

+ 16 - 16
L2J_Server/java/com/l2jserver/gameserver/model/CharEffectList.java

@@ -317,17 +317,17 @@ public class CharEffectList
 		if ( (_buffs == null || _buffs.isEmpty()) ||
 		if ( (_buffs == null || _buffs.isEmpty()) ||
 				checkSkill._effectTemplates == null ||
 				checkSkill._effectTemplates == null ||
 				checkSkill._effectTemplates.length < 1 ||
 				checkSkill._effectTemplates.length < 1 ||
-				checkSkill._effectTemplates[0].stackType == null ||
-				"none".equals(checkSkill._effectTemplates[0].stackType))
+				checkSkill._effectTemplates[0].abnormalType == null ||
+				"none".equals(checkSkill._effectTemplates[0].abnormalType))
 		{
 		{
 			return false;
 			return false;
 		}
 		}
 		
 		
-		String stackType = checkSkill._effectTemplates[0].stackType;
+		String stackType = checkSkill._effectTemplates[0].abnormalType;
 		
 		
 		for (L2Effect e : _buffs)
 		for (L2Effect e : _buffs)
 		{
 		{
-			if (e.getStackType() != null && e.getStackType().equals(stackType))
+			if (e.getAbnormalType() != null && e.getAbnormalType().equals(stackType))
 			{
 			{
 				return true;
 				return true;
 			}
 			}
@@ -721,7 +721,7 @@ public class CharEffectList
 			effectList = _buffs;
 			effectList = _buffs;
 		}
 		}
 		
 		
-		if ("none".equals(effect.getStackType()))
+		if ("none".equals(effect.getAbnormalType()))
 		{
 		{
 			// Remove Func added by this effect from the L2Character Calculator
 			// Remove Func added by this effect from the L2Character Calculator
 			_owner.removeStatsOwner(effect);
 			_owner.removeStatsOwner(effect);
@@ -731,7 +731,7 @@ public class CharEffectList
 			if(_stackedEffects == null) return;
 			if(_stackedEffects == null) return;
 			
 			
 			// Get the list of all stacked effects corresponding to the stack type of the L2Effect to add
 			// Get the list of all stacked effects corresponding to the stack type of the L2Effect to add
-			List<L2Effect> stackQueue = _stackedEffects.get(effect.getStackType());
+			List<L2Effect> stackQueue = _stackedEffects.get(effect.getAbnormalType());
 			
 			
 			if (stackQueue == null || stackQueue.isEmpty()) return;
 			if (stackQueue == null || stackQueue.isEmpty()) return;
 			
 			
@@ -761,10 +761,10 @@ public class CharEffectList
 					}
 					}
 				}
 				}
 				if (stackQueue.isEmpty())
 				if (stackQueue.isEmpty())
-					_stackedEffects.remove(effect.getStackType());
+					_stackedEffects.remove(effect.getAbnormalType());
 				else
 				else
 					// Update the Stack Group table _stackedEffects of the L2Character
 					// Update the Stack Group table _stackedEffects of the L2Character
-					_stackedEffects.put(effect.getStackType(), stackQueue);
+					_stackedEffects.put(effect.getAbnormalType(), stackQueue);
 			}
 			}
 		}
 		}
 		
 		
@@ -799,8 +799,8 @@ public class CharEffectList
 				if (e != null
 				if (e != null
 						&& e.getSkill().getId() == newEffect.getSkill().getId()
 						&& e.getSkill().getId() == newEffect.getSkill().getId()
 						&& e.getEffectType() == newEffect.getEffectType()
 						&& e.getEffectType() == newEffect.getEffectType()
-						&& e.getStackOrder() == newEffect.getStackOrder()
-						&& e.getStackType().equals(newEffect.getStackType()))
+						&& e.getAbnormalLvl() == newEffect.getAbnormalLvl()
+						&& e.getAbnormalType().equals(newEffect.getAbnormalType()))
 				{
 				{
 					// Started scheduled timer needs to be canceled.
 					// Started scheduled timer needs to be canceled.
 					newEffect.stopEffectTask();
 					newEffect.stopEffectTask();
@@ -818,8 +818,8 @@ public class CharEffectList
 				if (e != null
 				if (e != null
 						&& e.getSkill().getId() == newEffect.getSkill().getId()
 						&& e.getSkill().getId() == newEffect.getSkill().getId()
 						&& e.getEffectType() == newEffect.getEffectType()
 						&& e.getEffectType() == newEffect.getEffectType()
-						&& e.getStackOrder() == newEffect.getStackOrder()
-						&& e.getStackType().equals(newEffect.getStackType()))
+						&& e.getAbnormalLvl() == newEffect.getAbnormalLvl()
+						&& e.getAbnormalType().equals(newEffect.getAbnormalType()))
 				{
 				{
 					e.exit(); // exit this
 					e.exit(); // exit this
 				}
 				}
@@ -924,7 +924,7 @@ public class CharEffectList
 		}
 		}
 		
 		
 		// Check if a stack group is defined for this effect
 		// Check if a stack group is defined for this effect
-		if ("none".equals(newEffect.getStackType()))
+		if ("none".equals(newEffect.getAbnormalType()))
 		{
 		{
 			// Set this L2Effect to In Use
 			// Set this L2Effect to In Use
 			if (newEffect.setInUse(true))
 			if (newEffect.setInUse(true))
@@ -940,7 +940,7 @@ public class CharEffectList
 		if (_stackedEffects == null) _stackedEffects = new FastMap<String, List<L2Effect>>();
 		if (_stackedEffects == null) _stackedEffects = new FastMap<String, List<L2Effect>>();
 		
 		
 		// Get the list of all stacked effects corresponding to the stack type of the L2Effect to add
 		// Get the list of all stacked effects corresponding to the stack type of the L2Effect to add
-		stackQueue = _stackedEffects.get(newEffect.getStackType());
+		stackQueue = _stackedEffects.get(newEffect.getAbnormalType());
 		
 		
 		if (stackQueue != null)
 		if (stackQueue != null)
 		{
 		{
@@ -955,7 +955,7 @@ public class CharEffectList
 				
 				
 				while (queueIterator.hasNext())
 				while (queueIterator.hasNext())
 				{
 				{
-					if (newEffect.getStackOrder() < queueIterator.next().getStackOrder())
+					if (newEffect.getAbnormalLvl() < queueIterator.next().getAbnormalLvl())
 						pos++;
 						pos++;
 					else break;
 					else break;
 				}
 				}
@@ -987,7 +987,7 @@ public class CharEffectList
 		}
 		}
 		
 		
 		// Update the Stack Group table _stackedEffects of the L2Character
 		// Update the Stack Group table _stackedEffects of the L2Character
-		_stackedEffects.put(newEffect.getStackType(), stackQueue);
+		_stackedEffects.put(newEffect.getAbnormalType(), stackQueue);
 		
 		
 		// Get the first stacked effect of the Stack group selected
 		// Get the first stacked effect of the Stack group selected
 		if (!stackQueue.isEmpty())
 		if (!stackQueue.isEmpty())

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

@@ -132,10 +132,10 @@ public abstract class L2Effect
 	private ScheduledFuture<?> _currentFuture;
 	private ScheduledFuture<?> _currentFuture;
 	
 	
 	/** The Identifier of the stack group */
 	/** The Identifier of the stack group */
-	private final String _stackType;
+	private final String _abnormalType;
 	
 	
 	/** The position of the effect in the stack group */
 	/** The position of the effect in the stack group */
-	private final float _stackOrder;
+	private final float _abnormalLvl;
 	
 	
 	private boolean _inUse = false;
 	private boolean _inUse = false;
 	private boolean _startConditionsCorrect = true;
 	private boolean _startConditionsCorrect = true;
@@ -182,8 +182,8 @@ public abstract class L2Effect
 		_abnormalEffect = template.abnormalEffect;
 		_abnormalEffect = template.abnormalEffect;
 		_specialEffect = template.specialEffect;
 		_specialEffect = template.specialEffect;
 		_eventEffect = template.eventEffect;
 		_eventEffect = template.eventEffect;
-		_stackType = template.stackType;
-		_stackOrder = template.stackOrder;
+		_abnormalType = template.abnormalType;
+		_abnormalLvl = template.abnormalLvl;
 		_periodStartTicks = GameTimeController.getGameTicks();
 		_periodStartTicks = GameTimeController.getGameTicks();
 		_periodFirstTime = 0;
 		_periodFirstTime = 0;
 		_icon = template.icon;
 		_icon = template.icon;
@@ -224,8 +224,8 @@ public abstract class L2Effect
 		_abnormalEffect = _template.abnormalEffect;
 		_abnormalEffect = _template.abnormalEffect;
 		_specialEffect = _template.specialEffect;
 		_specialEffect = _template.specialEffect;
 		_eventEffect = _template.eventEffect;
 		_eventEffect = _template.eventEffect;
-		_stackType = _template.stackType;
-		_stackOrder = _template.stackOrder;
+		_abnormalType = _template.abnormalType;
+		_abnormalLvl = _template.abnormalLvl;
 		_periodStartTicks = effect.getPeriodStartTicks();
 		_periodStartTicks = effect.getPeriodStartTicks();
 		_periodFirstTime = effect.getTime();
 		_periodFirstTime = effect.getTime();
 		_icon = _template.icon;
 		_icon = _template.icon;
@@ -303,14 +303,14 @@ public abstract class L2Effect
 		return _startConditionsCorrect;
 		return _startConditionsCorrect;
 	}
 	}
 	
 	
-	public String getStackType()
+	public String getAbnormalType()
 	{
 	{
-		return _stackType;
+		return _abnormalType;
 	}
 	}
 	
 	
-	public float getStackOrder()
+	public float getAbnormalLvl()
 	{
 	{
-		return _stackOrder;
+		return _abnormalLvl;
 	}
 	}
 	
 	
 	public final L2Skill getSkill()
 	public final L2Skill getSkill()

+ 3 - 3
L2J_Server/java/com/l2jserver/gameserver/model/actor/instance/L2BabyPetInstance.java

@@ -313,9 +313,9 @@ public final class L2BabyPetInstance extends L2PetInstance
 								{
 								{
 									// effect with same stacktype and greater or equal stackorder
 									// effect with same stacktype and greater or equal stackorder
 									if (skill.hasEffects()
 									if (skill.hasEffects()
-											&& !"none".equals(skill.getEffectTemplates()[0].stackType)
-											&& e.getStackType().equals(skill.getEffectTemplates()[0].stackType)
-											&& e.getStackOrder() >= skill.getEffectTemplates()[0].stackOrder)
+											&& !"none".equals(skill.getEffectTemplates()[0].abnormalType)
+											&& e.getAbnormalType().equals(skill.getEffectTemplates()[0].abnormalType)
+											&& e.getAbnormalLvl() >= skill.getEffectTemplates()[0].abnormalLvl)
 									{
 									{
 										iter.remove();
 										iter.remove();
 									}
 									}

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

@@ -304,15 +304,15 @@ abstract class DocumentBase
 			String spc = attrs.getNamedItem("event").getNodeValue();
 			String spc = attrs.getNamedItem("event").getNodeValue();
 			event = AbnormalEffect.getByName(spc);
 			event = AbnormalEffect.getByName(spc);
 		}
 		}
-		float stackOrder = 0;
-		String stackType = "none";
-		if (attrs.getNamedItem("stackType") != null)
+		float abnormalLvl = 0;
+		String abnormalType = "none";
+		if (attrs.getNamedItem("abnormalType") != null)
 		{
 		{
-			stackType = attrs.getNamedItem("stackType").getNodeValue();
+			abnormalType = attrs.getNamedItem("abnormalType").getNodeValue();
 		}
 		}
-		if (attrs.getNamedItem("stackOrder") != null)
+		if (attrs.getNamedItem("abnormalLvl") != null)
 		{
 		{
-			stackOrder = Float.parseFloat(getValue(attrs.getNamedItem("stackOrder").getNodeValue(), template));
+			abnormalLvl = Float.parseFloat(getValue(attrs.getNamedItem("abnormalLvl").getNodeValue(), template));
 		}
 		}
 		
 		
 		double effectPower = -1;
 		double effectPower = -1;
@@ -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, stackType, stackOrder, icon, effectPower, type, trigId, trigLvl, chance);
+		lt = new EffectTemplate(attachCond, applayCond, name, lambda, count, time, 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);

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

@@ -49,8 +49,8 @@ public class EffectTemplate
 	public final AbnormalEffect specialEffect;
 	public final AbnormalEffect specialEffect;
 	public final AbnormalEffect eventEffect;
 	public final AbnormalEffect eventEffect;
 	public FuncTemplate[] funcTemplates;
 	public FuncTemplate[] funcTemplates;
-	public final String stackType;
-	public final float stackOrder;
+	public final String abnormalType;
+	public final float abnormalLvl;
 	public final boolean icon;
 	public final boolean icon;
 	public final String funcName;
 	public final String funcName;
 	public final double effectPower; // to thandle chance
 	public final double effectPower; // to thandle chance
@@ -62,7 +62,7 @@ public class EffectTemplate
 	
 	
 	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 pPeriod, AbnormalEffect pAbnormalEffect, AbnormalEffect pSpecialEffect,
-			AbnormalEffect pEventEffect, String pStackType, float pStackOrder, boolean showicon,
+			AbnormalEffect pEventEffect, String pAbnormalType, float pAbnormalLvl, boolean showicon,
 			double ePower, L2SkillType eType, int trigId, int trigLvl, ChanceCondition chanceCond)
 			double ePower, L2SkillType eType, int trigId, int trigLvl, ChanceCondition chanceCond)
 	{
 	{
 		attachCond = pAttachCond;
 		attachCond = pAttachCond;
@@ -73,8 +73,8 @@ public class EffectTemplate
 		abnormalEffect = pAbnormalEffect;
 		abnormalEffect = pAbnormalEffect;
 		specialEffect = pSpecialEffect;
 		specialEffect = pSpecialEffect;
 		eventEffect = pEventEffect;
 		eventEffect = pEventEffect;
-		stackType = pStackType;
-		stackOrder = pStackOrder;
+		abnormalType = pAbnormalType;
+		abnormalLvl = pAbnormalLvl;
 		icon = showicon;
 		icon = showicon;
 		funcName = func;
 		funcName = func;
 		effectPower = ePower;
 		effectPower = ePower;