|
@@ -135,16 +135,10 @@ public class EffectTemplate
|
|
*/
|
|
*/
|
|
public L2Effect getStolenEffect(Env env, L2Effect stolen)
|
|
public L2Effect getStolenEffect(Env env, L2Effect stolen)
|
|
{
|
|
{
|
|
- Class<?> func = EffectHandler.getInstance().getHandler(_name);
|
|
|
|
- if (func == null)
|
|
|
|
- {
|
|
|
|
- throw new RuntimeException();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
Constructor<?> stolenCons;
|
|
Constructor<?> stolenCons;
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- stolenCons = func.getConstructor(Env.class, L2Effect.class);
|
|
|
|
|
|
+ stolenCons = _handler.getConstructor(Env.class, L2Effect.class);
|
|
}
|
|
}
|
|
catch (NoSuchMethodException e)
|
|
catch (NoSuchMethodException e)
|
|
{
|
|
{
|
|
@@ -167,7 +161,7 @@ public class EffectTemplate
|
|
}
|
|
}
|
|
catch (InvocationTargetException e)
|
|
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;
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -258,4 +252,10 @@ public class EffectTemplate
|
|
{
|
|
{
|
|
return _parameters != null;
|
|
return _parameters != null;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public String toString()
|
|
|
|
+ {
|
|
|
|
+ return "Effect template[" + _handler + "]";
|
|
|
|
+ }
|
|
}
|
|
}
|