浏览代码

Effects update for Steal Divinity, thanks Gnacik

_DS_ 15 年之前
父节点
当前提交
5bf27b7f9f

+ 2 - 2
L2_GameServer/java/com/l2jserver/gameserver/datatables/GMSkillTable.java

@@ -23,8 +23,8 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  */
 public class GMSkillTable
 {
-	private static final L2Skill[] _gmSkills = new L2Skill[33];
-	private static final int[] _gmSkillsId = { 7041, 7042, 7043, 7044, 7045, 7046, 7047, 7048, 7049, 7050, 7051, 7052, 7053, 7054, 7055, 7056, 7057, 7058, 7059, 7060, 7061, 7062, 7063, 7064, 7088, 7089, 7090, 7091, 7092, 7093, 7094 ,7095, 7096 };
+	private static final L2Skill[] _gmSkills = new L2Skill[34];
+	private static final int[] _gmSkillsId = { 7029, 7041, 7042, 7043, 7044, 7045, 7046, 7047, 7048, 7049, 7050, 7051, 7052, 7053, 7054, 7055, 7056, 7057, 7058, 7059, 7060, 7061, 7062, 7063, 7064, 7088, 7089, 7090, 7091, 7092, 7093, 7094 ,7095, 7096 };
 	
 	private GMSkillTable()
 	{

+ 10 - 2
L2_GameServer/java/com/l2jserver/gameserver/model/L2Skill.java

@@ -21,6 +21,7 @@ import java.util.logging.Logger;
 
 import com.l2jserver.Config;
 import com.l2jserver.gameserver.GeoData;
+import com.l2jserver.gameserver.datatables.GMSkillTable;
 import com.l2jserver.gameserver.datatables.HeroSkillTable;
 import com.l2jserver.gameserver.datatables.SkillTable;
 import com.l2jserver.gameserver.datatables.SkillTreeTable;
@@ -241,7 +242,8 @@ public abstract class L2Skill implements IChanceSkillTrigger
     private final int _afterEffectId;
     private final int _afterEffectLvl;
     private final boolean _isHeroSkill; // If true the skill is a Hero Skill
-
+    private final boolean _isGMSkill;	// True if skill is GM skill
+    
     private final int _baseCritRate;  // percent of success for skill critical hit (especially for PDAM & BLOW - they're not affected by rCrit values or buffs). Default loads -1 for all other skills but 0 to PDAM & BLOW
     private final int _lethalEffect1;     // percent of success for lethal 1st effect (hit cp to 1 or if mob hp to 50%) (only for PDAM skills)
     private final int _lethalEffect2;     // percent of success for lethal 2nd effect (hit cp,hp to 1 or if mob hp to 1) (only for PDAM skills)
@@ -436,7 +438,8 @@ public abstract class L2Skill implements IChanceSkillTrigger
         _transformDuration = set.getInteger("transformDuration", 0);
 
         _isHeroSkill = HeroSkillTable.isHeroSkill(_id);
-
+        _isGMSkill = GMSkillTable.isGMSkill(_id);
+        
         _baseCritRate = set.getInteger("baseCritRate", (_skillType == L2SkillType.PDAM  || _skillType == L2SkillType.BLOW) ? 0 : -1);
         _lethalEffect1 = set.getInteger("lethal1",0);
         _lethalEffect2 = set.getInteger("lethal2",0);
@@ -978,6 +981,11 @@ public abstract class L2Skill implements IChanceSkillTrigger
         return _isHeroSkill;
     }
 
+    public final boolean isGMSkill()
+    {
+        return _isGMSkill;
+    }
+
     public final int getNumCharges()
     {
         return _numCharges;

+ 10 - 0
L2_GameServer/java/com/l2jserver/gameserver/skills/effects/EffectChanceSkillTrigger.java

@@ -36,6 +36,16 @@ public class EffectChanceSkillTrigger extends L2Effect implements IChanceSkillTr
 	    _chanceCondition = template.chanceCondition;
     }
 
+	// Special constructor to steal this effect
+	public EffectChanceSkillTrigger(Env env, L2Effect effect)
+	{
+		super(env, effect);
+		
+		_triggeredId = effect.getEffectTemplate().triggeredId;
+		_triggeredLevel = effect.getEffectTemplate().triggeredLevel;
+		_chanceCondition = effect.getEffectTemplate().chanceCondition;
+	}
+
 	@Override
     public L2EffectType getEffectType()
     {

+ 5 - 0
L2_GameServer/java/com/l2jserver/gameserver/skills/effects/EffectHealOverTime.java

@@ -29,6 +29,11 @@ public class EffectHealOverTime extends L2Effect
 		super(env, template);
 	}
 	
+	// Special constructor to steal this effect
+	public EffectHealOverTime(Env env, L2Effect effect)
+	{
+		super(env, effect);
+	}
 	/**
 	 * 
 	 * @see com.l2jserver.gameserver.model.L2Effect#getEffectType()

+ 6 - 0
L2_GameServer/java/com/l2jserver/gameserver/skills/effects/EffectNoblesseBless.java

@@ -31,6 +31,12 @@ public class EffectNoblesseBless extends L2Effect
 		super(env, template);
 	}
 	
+	// Special constructor to steal this effect
+	public EffectNoblesseBless(Env env, L2Effect effect)
+	{
+		super(env, effect);
+	}
+	
 	/**
 	 * 
 	 * @see com.l2jserver.gameserver.model.L2Effect#getEffectType()

+ 6 - 0
L2_GameServer/java/com/l2jserver/gameserver/skills/effects/EffectSilentMove.java

@@ -31,6 +31,12 @@ public class EffectSilentMove extends L2Effect
 		super(env, template);
 	}
 	
+	// Special constructor to steal this effect
+	public EffectSilentMove(Env env, L2Effect effect)
+	{
+		super(env, effect);
+	}
+	
 	/**
 	 * 
 	 * @see com.l2jserver.gameserver.model.L2Effect#onStart()