Prechádzať zdrojové kódy

BETA: Core-part for ​​[DP9697].

Adry_85 12 rokov pred
rodič
commit
d8ac1c5fbb

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

@@ -135,16 +135,10 @@ public class EffectTemplate
 	 */
 	public L2Effect getStolenEffect(Env env, L2Effect stolen)
 	{
-		Class<?> func = EffectHandler.getInstance().getHandler(_name);
-		if (func == null)
-		{
-			throw new RuntimeException();
-		}
-		
 		Constructor<?> stolenCons;
 		try
 		{
-			stolenCons = func.getConstructor(Env.class, L2Effect.class);
+			stolenCons = _handler.getConstructor(Env.class, L2Effect.class);
 		}
 		catch (NoSuchMethodException e)
 		{
@@ -167,7 +161,7 @@ public class EffectTemplate
 		}
 		catch (InvocationTargetException e)
 		{
-			_log.log(Level.WARNING, "Error creating new instance of Class " + func + " Exception was: " + e.getTargetException().getMessage(), e.getTargetException());
+			_log.log(Level.WARNING, "Error creating new instance of Class " + _handler + " Exception was: " + e.getTargetException().getMessage(), e.getTargetException());
 			return null;
 		}
 	}
@@ -258,4 +252,10 @@ public class EffectTemplate
 	{
 		return _parameters != null;
 	}
+	
+	@Override
+	public String toString()
+	{
+		return "Effect template[" + _handler + "]";
+	}
 }

+ 0 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/model/skills/L2SkillType.java

@@ -108,8 +108,6 @@ public enum L2SkillType
 	REMOVE_TRAP,
 	SHIFT_TARGET,
 	
-	STEAL_BUFF,
-	
 	// Skill is done within the core.
 	COREDONE,
 	// Refuel airship