2
0
Эх сурвалжийг харах

BETA: Removed '''"passive"''' boolean from passive effects (now it will check if skill is passive), thanks '''Zoey76''' & '''Adry_85''' for help.

MELERIX 13 жил өмнө
parent
commit
e6132d7c57

+ 2 - 11
L2J_Server_BETA/java/com/l2jserver/gameserver/engines/DocumentBase.java

@@ -281,13 +281,6 @@ public abstract class DocumentBase
 			}
 		}
 		
-		boolean passiveEffect = false;
-		if (attrs.getNamedItem("passive") != null)
-		{
-			if (Integer.decode(getValue(attrs.getNamedItem("passive").getNodeValue(),template)) == 1)
-				passiveEffect = true;
-		}
-		
 		boolean self = false;
 		if (attrs.getNamedItem("self") != null)
 		{
@@ -354,8 +347,6 @@ public abstract class DocumentBase
 			}
 		}
 		
-		EffectTemplate lt;
-		
 		final boolean isChanceSkillTrigger = name.equals("ChanceSkillTrigger");
 		int trigId = 0;
 		if (attrs.getNamedItem("triggeredId") != null)
@@ -395,7 +386,7 @@ public abstract class DocumentBase
 			throw new NoSuchElementException("Invalid chance condition: " + chanceCond + " "
 					+ activationChance);
 		
-		lt = new EffectTemplate(attachCond, applayCond, name, lambda, count, abnormalTime, abnormalVisualEffect, special, event, abnormalType, abnormalLvl, icon, effectPower, type, trigId, trigLvl, chance, passiveEffect);
+		final EffectTemplate lt = new EffectTemplate(attachCond, applayCond, name, lambda, count, abnormalTime, abnormalVisualEffect, special, event, abnormalType, abnormalLvl, icon, effectPower, type, trigId, trigLvl, chance);
 		parseTemplate(n, lt);
 		if (template instanceof L2Item)
 			((L2Item) template).attach(lt);
@@ -403,7 +394,7 @@ public abstract class DocumentBase
 		{
 			if (self)
 				((L2Skill) template).attachSelf(lt);
-			else if (passiveEffect)
+			else if (((L2Skill) template).isPassive())
 				((L2Skill) template).attachPassive(lt);
 			else
 				((L2Skill) template).attach(lt);

+ 1 - 5
L2J_Server_BETA/java/com/l2jserver/gameserver/model/effects/EffectTemplate.java

@@ -59,12 +59,10 @@ public class EffectTemplate
 	public final int triggeredLevel;
 	public final ChanceCondition chanceCondition;
 	
-	public final boolean passiveEffect;
-	
 	public EffectTemplate(Condition pAttachCond, Condition pApplayCond, String func, Lambda pLambda,
 			int pCounter, int pAbnormalTime, AbnormalEffect pAbnormalEffect, AbnormalEffect[] pSpecialEffect,
 			AbnormalEffect pEventEffect, String pAbnormalType, byte pAbnormalLvl, boolean showicon,
-			double ePower, L2SkillType eType, int trigId, int trigLvl, ChanceCondition chanceCond, boolean passiveEff)
+			double ePower, L2SkillType eType, int trigId, int trigLvl, ChanceCondition chanceCond)
 	{
 		attachCond = pAttachCond;
 		applayCond = pApplayCond;
@@ -85,8 +83,6 @@ public class EffectTemplate
 		triggeredLevel = trigLvl;
 		chanceCondition = chanceCond;
 		
-		passiveEffect = passiveEff;
-		
 		_func = EffectHandler.getInstance().getHandler(func);
 		if(func == null)
 		{