Jump to content
  • 0

Mirage Skil IL


Question

Posted

hello guys, i need a little help with mirage skill, i see that in stats of the skill in xml file it needs core support, where can i find this core support..?

3 answers to this question

Recommended Posts

  • 0
Posted

core:

Index: /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Skill.java
===================================================================
--- /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Skill.java (revision 95)
+++ /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Skill.java (revision 108)
@@ -24,4 +24,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.model.L2Skill.SkillOpType;

import javolution.text.TextBuilder;
@@ -85,5 +87,5 @@

     public static enum SkillOpType {
-        OP_PASSIVE, OP_ACTIVE, OP_TOGGLE
+        OP_PASSIVE, OP_ACTIVE, OP_TOGGLE, OP_CHANCE
     }

@@ -474,4 +476,12 @@
     protected EffectTemplate[] _effectTemplatesSelf;

+	private int _triggeredId;
+
+	private int _triggeredLevel;
+
+	private boolean _bestow;
+
+	private boolean _bestowed;
+
     protected L2Skill(StatsSet set)
     {
@@ -2182,3 +2192,34 @@
         return "" + _name + "[id=" + _id + ",lvl=" + _level + "]";
     }
+
+    public int getTriggeredId()
+    {
+        return _triggeredId;
+    }
+
+    public int getTriggeredLevel()
+    {
+        return _triggeredLevel;
+    }
+
+    public boolean bestowTriggered()
+    {
+    	 return _bestow;
+    }
+    
+    public boolean bestowed()
+    {
+    	return _bestowed;
+    }
+    
+    public boolean triggerAnotherSkill()
+    {
+    	return _triggeredId > 1;
+    }
+
+    public final boolean isChance()
+    {
+        return _operateType == SkillOpType.OP_CHANCE;
+    }
+
}
Index: /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Character.java
===================================================================
--- /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Character.java (revision 84)
+++ /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Character.java (revision 108)
@@ -29,4 +29,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.model.L2Skill;

import net.sf.l2j.gameserver.model.L2Effect;
@@ -6016,4 +6018,6 @@
	private long _pvpFlagLasts;

+	private Object _chanceSkills;
+
	public void setPvpFlagLasts(long time)
	{
@@ -6252,3 +6256,25 @@
	public void setForceBuff(ForceBuff fb)
	{}
+	
+	public L2Skill removeSkill(int skillId) {
+		// Remove the skill from the L2Character _skills
+		L2Skill oldSkill = _skills.remove(skillId);
+		// Remove all its Func objects from the L2Character calculator set
+		if (oldSkill != null) {
+			// Stop casting if this skill is used right now
+			if (getLastSkillCast() != null && isCastingNow()) {
+				if (oldSkill.getId() == getLastSkillCast().getId())
+					abortCast();
+			}
+
+			if (oldSkill.isChance() && _chanceSkills != null) {
+				removeSkill(oldSkill.getId());
+			}
+			removeStatsOwner(oldSkill);
+		}
+		return oldSkill;
+
+
+	}
+
}
Index: /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/skills/effects/EffectBestowSkill.java
===================================================================
--- /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/skills/effects/EffectBestowSkill.java (revision 108)
+++ /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/skills/effects/EffectBestowSkill.java (revision 108)
@@ -0,0 +1,77 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package net.sf.l2j.gameserver.skills.effects;
+
+import net.sf.l2j.gameserver.datatables.SkillTable;
+import net.sf.l2j.gameserver.model.L2Effect;
+import net.sf.l2j.gameserver.model.L2Skill;
+import net.sf.l2j.gameserver.skills.Env;
+
+/**
+ * @author Equal
+ */
+final class EffectBestowSkill extends L2Effect
+{
+	public EffectBestowSkill(Env env, EffectTemplate template)
+	{
+		super(env, template);
+	}
+	
+	/**
+	 * 
+	 * @see net.sf.l2j.gameserver.model.L2Effect#getEffectType()
+	 */
+	@Override
+	public EffectType getEffectType()
+	{
+		return EffectType.BUFF;
+	}
+	
+	/**
+	 * 
+	 * @see net.sf.l2j.gameserver.model.L2Effect#onStart()
+	 */
+	@Override
+	public void onStart()
+	{
+		L2Skill tempSkill = SkillTable.getInstance().getInfo(getSkill().getTriggeredId(), getSkill().getTriggeredLevel());
+		if (tempSkill != null)
+		{
+			getEffected().addSkill(tempSkill);
+			return;
+		}
+		return;
+	}
+	
+	/**
+	 * 
+	 * @see net.sf.l2j.gameserver.model.L2Effect#onExit()
+	 */
+	@Override
+	public void onExit()
+	{
+		getEffected().removeSkill(getSkill().getTriggeredId());
+	}
+	
+	/**
+	 * 
+	 * @see net.sf.l2j.gameserver.model.L2Effect#onActionTime()
+	 */
+	@Override
+	public boolean onActionTime()
+	{
+		return false;
+	}
+}

  • 0
Posted

core:

Index: /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Skill.java
===================================================================
--- /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Skill.java (revision 95)
+++ /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Skill.java (revision 108)
@@ -24,4 +24,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.model.L2Skill.SkillOpType;

import javolution.text.TextBuilder;
@@ -85,5 +87,5 @@

     public static enum SkillOpType {
-        OP_PASSIVE, OP_ACTIVE, OP_TOGGLE
+        OP_PASSIVE, OP_ACTIVE, OP_TOGGLE, OP_CHANCE
     }

@@ -474,4 +476,12 @@
     protected EffectTemplate[] _effectTemplatesSelf;

+	private int _triggeredId;
+
+	private int _triggeredLevel;
+
+	private boolean _bestow;
+
+	private boolean _bestowed;
+
     protected L2Skill(StatsSet set)
     {
@@ -2182,3 +2192,34 @@
         return "" + _name + "[id=" + _id + ",lvl=" + _level + "]";
     }
+
+    public int getTriggeredId()
+    {
+        return _triggeredId;
+    }
+
+    public int getTriggeredLevel()
+    {
+        return _triggeredLevel;
+    }
+
+    public boolean bestowTriggered()
+    {
+    	 return _bestow;
+    }
+    
+    public boolean bestowed()
+    {
+    	return _bestowed;
+    }
+    
+    public boolean triggerAnotherSkill()
+    {
+    	return _triggeredId > 1;
+    }
+
+    public final boolean isChance()
+    {
+        return _operateType == SkillOpType.OP_CHANCE;
+    }
+
}
Index: /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Character.java
===================================================================
--- /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Character.java (revision 84)
+++ /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/model/L2Character.java (revision 108)
@@ -29,4 +29,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.model.L2Skill;

import net.sf.l2j.gameserver.model.L2Effect;
@@ -6016,4 +6018,6 @@
	private long _pvpFlagLasts;

+	private Object _chanceSkills;
+
	public void setPvpFlagLasts(long time)
	{
@@ -6252,3 +6256,25 @@
	public void setForceBuff(ForceBuff fb)
	{}
+	
+	public L2Skill removeSkill(int skillId) {
+		// Remove the skill from the L2Character _skills
+		L2Skill oldSkill = _skills.remove(skillId);
+		// Remove all its Func objects from the L2Character calculator set
+		if (oldSkill != null) {
+			// Stop casting if this skill is used right now
+			if (getLastSkillCast() != null && isCastingNow()) {
+				if (oldSkill.getId() == getLastSkillCast().getId())
+					abortCast();
+			}
+
+			if (oldSkill.isChance() && _chanceSkills != null) {
+				removeSkill(oldSkill.getId());
+			}
+			removeStatsOwner(oldSkill);
+		}
+		return oldSkill;
+
+
+	}
+
}
Index: /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/skills/effects/EffectBestowSkill.java
===================================================================
--- /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/skills/effects/EffectBestowSkill.java (revision 108)
+++ /trunk/L2JHardCode_GameServer/java/net/sf/l2j/gameserver/skills/effects/EffectBestowSkill.java (revision 108)
@@ -0,0 +1,77 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package net.sf.l2j.gameserver.skills.effects;
+
+import net.sf.l2j.gameserver.datatables.SkillTable;
+import net.sf.l2j.gameserver.model.L2Effect;
+import net.sf.l2j.gameserver.model.L2Skill;
+import net.sf.l2j.gameserver.skills.Env;
+
+/**
+ * @author Equal
+ */
+final class EffectBestowSkill extends L2Effect
+{
+	public EffectBestowSkill(Env env, EffectTemplate template)
+	{
+		super(env, template);
+	}
+	
+	/**
+	 * 
+	 * @see net.sf.l2j.gameserver.model.L2Effect#getEffectType()
+	 */
+	@Override
+	public EffectType getEffectType()
+	{
+		return EffectType.BUFF;
+	}
+	
+	/**
+	 * 
+	 * @see net.sf.l2j.gameserver.model.L2Effect#onStart()
+	 */
+	@Override
+	public void onStart()
+	{
+		L2Skill tempSkill = SkillTable.getInstance().getInfo(getSkill().getTriggeredId(), getSkill().getTriggeredLevel());
+		if (tempSkill != null)
+		{
+			getEffected().addSkill(tempSkill);
+			return;
+		}
+		return;
+	}
+	
+	/**
+	 * 
+	 * @see net.sf.l2j.gameserver.model.L2Effect#onExit()
+	 */
+	@Override
+	public void onExit()
+	{
+		getEffected().removeSkill(getSkill().getTriggeredId());
+	}
+	
+	/**
+	 * 
+	 * @see net.sf.l2j.gameserver.model.L2Effect#onActionTime()
+	 */
+	@Override
+	public boolean onActionTime()
+	{
+		return false;
+	}
+}

 

if you dont know how to add it search a guide

Guest
This topic is now closed to further replies.


×
×
  • Create New...