Parcourir la source

BETA: Support for effects on start casting.
* Also fixing channeling skills that doesn't channels specific skill ends up finish skill cast 1 second after the start.
* Reported by: Adry_85
* Reviewed by: Nos

Rumen Nikiforov il y a 11 ans
Parent
commit
f8a2769873

+ 88 - 16
L2J_Server_BETA/java/com/l2jserver/gameserver/engines/skills/DocumentSkill.java

@@ -503,6 +503,10 @@ public class DocumentSkill extends DocumentBase
 				{
 					parseTemplate(n, _currentSkill.currentSkills.get(i));
 				}
+				else if ("startEffects".equalsIgnoreCase(n.getNodeName()))
+				{
+					parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+				}
 				else if ("channelingEffects".equalsIgnoreCase(n.getNodeName()))
 				{
 					parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.CHANNELING);
@@ -529,7 +533,7 @@ public class DocumentSkill extends DocumentBase
 		for (int i = lastLvl; i < (lastLvl + enchantLevels1); i++)
 		{
 			_currentSkill.currentLevel = i - lastLvl;
-			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
+			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundStartEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
 			for (n = first; n != null; n = n.getNextSibling())
 			{
 				if ("enchant1cond".equalsIgnoreCase(n.getNodeName()))
@@ -558,6 +562,11 @@ public class DocumentSkill extends DocumentBase
 					foundFor = true;
 					parseTemplate(n, _currentSkill.currentSkills.get(i));
 				}
+				else if ("enchant1startEffects".equalsIgnoreCase(n.getNodeName()))
+				{
+					foundStartEffects = true;
+					parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+				}
 				else if ("enchant1channelingEffects".equalsIgnoreCase(n.getNodeName()))
 				{
 					foundChannelingEffects = true;
@@ -585,7 +594,7 @@ public class DocumentSkill extends DocumentBase
 				}
 			}
 			// If none found, the enchanted skill will take effects from maxLvL of norm skill
-			if (!foundCond || !foundFor || !foundChannelingEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
+			if (!foundCond || !foundFor || !foundChannelingEffects || !foundStartEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
 			{
 				_currentSkill.currentLevel = lastLvl - 1;
 				for (n = first; n != null; n = n.getNextSibling())
@@ -614,6 +623,10 @@ public class DocumentSkill extends DocumentBase
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i));
 					}
+					else if (!foundStartEffects && "startEffects".equalsIgnoreCase(n.getNodeName()))
+					{
+						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+					}
 					else if (!foundChannelingEffects && "channelingEffects".equalsIgnoreCase(n.getNodeName()))
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.CHANNELING);
@@ -639,7 +652,7 @@ public class DocumentSkill extends DocumentBase
 		}
 		for (int i = lastLvl + enchantLevels1; i < (lastLvl + enchantLevels1 + enchantLevels2); i++)
 		{
-			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
+			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundStartEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
 			_currentSkill.currentLevel = i - lastLvl - enchantLevels1;
 			for (n = first; n != null; n = n.getNextSibling())
 			{
@@ -669,6 +682,11 @@ public class DocumentSkill extends DocumentBase
 					foundFor = true;
 					parseTemplate(n, _currentSkill.currentSkills.get(i));
 				}
+				else if ("enchant2startEffects".equalsIgnoreCase(n.getNodeName()))
+				{
+					foundStartEffects = true;
+					parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+				}
 				else if ("enchant2channelingEffects".equalsIgnoreCase(n.getNodeName()))
 				{
 					foundChannelingEffects = true;
@@ -696,7 +714,7 @@ public class DocumentSkill extends DocumentBase
 				}
 			}
 			// If none found, the enchanted skill will take effects from maxLvL of norm skill
-			if (!foundCond || !foundFor || !foundChannelingEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
+			if (!foundCond || !foundFor || !foundChannelingEffects || !foundStartEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
 			{
 				_currentSkill.currentLevel = lastLvl - 1;
 				for (n = first; n != null; n = n.getNextSibling())
@@ -750,7 +768,7 @@ public class DocumentSkill extends DocumentBase
 		}
 		for (int i = lastLvl + enchantLevels1 + enchantLevels2; i < (lastLvl + enchantLevels1 + enchantLevels2 + enchantLevels3); i++)
 		{
-			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
+			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundStartEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
 			_currentSkill.currentLevel = i - lastLvl - enchantLevels1 - enchantLevels2;
 			for (n = first; n != null; n = n.getNextSibling())
 			{
@@ -780,6 +798,11 @@ public class DocumentSkill extends DocumentBase
 					foundFor = true;
 					parseTemplate(n, _currentSkill.currentSkills.get(i));
 				}
+				else if ("enchant3startEffects".equalsIgnoreCase(n.getNodeName()))
+				{
+					foundStartEffects = true;
+					parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+				}
 				else if ("enchant3channelingEffects".equalsIgnoreCase(n.getNodeName()))
 				{
 					foundChannelingEffects = true;
@@ -807,7 +830,7 @@ public class DocumentSkill extends DocumentBase
 				}
 			}
 			// If none found, the enchanted skill will take effects from maxLvL of norm skill
-			if (!foundCond || !foundFor || !foundChannelingEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
+			if (!foundCond || !foundFor || !foundChannelingEffects || !foundStartEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
 			{
 				_currentSkill.currentLevel = lastLvl - 1;
 				for (n = first; n != null; n = n.getNextSibling())
@@ -836,6 +859,10 @@ public class DocumentSkill extends DocumentBase
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i));
 					}
+					else if (!foundStartEffects && "startEffects".equalsIgnoreCase(n.getNodeName()))
+					{
+						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+					}
 					else if (!foundChannelingEffects && "channelingEffects".equalsIgnoreCase(n.getNodeName()))
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.CHANNELING);
@@ -861,7 +888,7 @@ public class DocumentSkill extends DocumentBase
 		}
 		for (int i = lastLvl + enchantLevels1 + enchantLevels2 + enchantLevels3; i < (lastLvl + enchantLevels1 + enchantLevels2 + enchantLevels3 + enchantLevels4); i++)
 		{
-			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
+			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundStartEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
 			_currentSkill.currentLevel = i - lastLvl - enchantLevels1 - enchantLevels2 - enchantLevels3;
 			for (n = first; n != null; n = n.getNextSibling())
 			{
@@ -891,6 +918,11 @@ public class DocumentSkill extends DocumentBase
 					foundFor = true;
 					parseTemplate(n, _currentSkill.currentSkills.get(i));
 				}
+				else if ("enchant4startEffects".equalsIgnoreCase(n.getNodeName()))
+				{
+					foundStartEffects = true;
+					parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+				}
 				else if ("enchant4channelingEffects".equalsIgnoreCase(n.getNodeName()))
 				{
 					foundChannelingEffects = true;
@@ -918,7 +950,7 @@ public class DocumentSkill extends DocumentBase
 				}
 			}
 			// If none found, the enchanted skill will take effects from maxLvL of norm skill
-			if (!foundCond || !foundFor || !foundChannelingEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
+			if (!foundCond || !foundFor || !foundChannelingEffects || !foundStartEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
 			{
 				_currentSkill.currentLevel = lastLvl - 1;
 				for (n = first; n != null; n = n.getNextSibling())
@@ -947,6 +979,10 @@ public class DocumentSkill extends DocumentBase
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i));
 					}
+					else if (!foundStartEffects && "startEffects".equalsIgnoreCase(n.getNodeName()))
+					{
+						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+					}
 					else if (!foundChannelingEffects && "channelingEffects".equalsIgnoreCase(n.getNodeName()))
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.CHANNELING);
@@ -972,7 +1008,7 @@ public class DocumentSkill extends DocumentBase
 		}
 		for (int i = lastLvl + enchantLevels1 + enchantLevels2 + enchantLevels3 + enchantLevels4; i < (lastLvl + enchantLevels1 + enchantLevels2 + enchantLevels3 + enchantLevels4 + enchantLevels5); i++)
 		{
-			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
+			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundStartEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
 			_currentSkill.currentLevel = i - lastLvl - enchantLevels1 - enchantLevels2 - enchantLevels3 - enchantLevels4;
 			for (n = first; n != null; n = n.getNextSibling())
 			{
@@ -1002,6 +1038,11 @@ public class DocumentSkill extends DocumentBase
 					foundFor = true;
 					parseTemplate(n, _currentSkill.currentSkills.get(i));
 				}
+				else if ("enchant5startEffects".equalsIgnoreCase(n.getNodeName()))
+				{
+					foundStartEffects = true;
+					parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+				}
 				else if ("enchant5channelingEffects".equalsIgnoreCase(n.getNodeName()))
 				{
 					foundChannelingEffects = true;
@@ -1029,7 +1070,7 @@ public class DocumentSkill extends DocumentBase
 				}
 			}
 			// If none found, the enchanted skill will take effects from maxLvL of norm skill
-			if (!foundCond || !foundFor || !foundChannelingEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
+			if (!foundCond || !foundFor || !foundChannelingEffects || !foundStartEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
 			{
 				_currentSkill.currentLevel = lastLvl - 1;
 				for (n = first; n != null; n = n.getNextSibling())
@@ -1058,6 +1099,10 @@ public class DocumentSkill extends DocumentBase
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i));
 					}
+					else if (!foundStartEffects && "startEffects".equalsIgnoreCase(n.getNodeName()))
+					{
+						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+					}
 					else if (!foundChannelingEffects && "channelingEffects".equalsIgnoreCase(n.getNodeName()))
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.CHANNELING);
@@ -1083,7 +1128,7 @@ public class DocumentSkill extends DocumentBase
 		}
 		for (int i = lastLvl + enchantLevels1 + enchantLevels2 + enchantLevels3 + enchantLevels4 + enchantLevels5; i < (lastLvl + enchantLevels1 + enchantLevels2 + enchantLevels3 + enchantLevels4 + enchantLevels5 + enchantLevels6); i++)
 		{
-			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
+			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundStartEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
 			_currentSkill.currentLevel = i - lastLvl - enchantLevels1 - enchantLevels2 - enchantLevels3 - enchantLevels4 - enchantLevels5;
 			for (n = first; n != null; n = n.getNextSibling())
 			{
@@ -1113,6 +1158,11 @@ public class DocumentSkill extends DocumentBase
 					foundFor = true;
 					parseTemplate(n, _currentSkill.currentSkills.get(i));
 				}
+				else if ("enchant6startEffects".equalsIgnoreCase(n.getNodeName()))
+				{
+					foundStartEffects = true;
+					parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+				}
 				else if ("enchant6channelingEffects".equalsIgnoreCase(n.getNodeName()))
 				{
 					foundChannelingEffects = true;
@@ -1140,7 +1190,7 @@ public class DocumentSkill extends DocumentBase
 				}
 			}
 			// If none found, the enchanted skill will take effects from maxLvL of norm skill
-			if (!foundCond || !foundFor || !foundChannelingEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
+			if (!foundCond || !foundFor || !foundChannelingEffects || !foundStartEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
 			{
 				_currentSkill.currentLevel = lastLvl - 1;
 				for (n = first; n != null; n = n.getNextSibling())
@@ -1169,6 +1219,10 @@ public class DocumentSkill extends DocumentBase
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i));
 					}
+					else if (!foundChannelingEffects && "startEffects".equalsIgnoreCase(n.getNodeName()))
+					{
+						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+					}
 					else if (!foundChannelingEffects && "channelingEffects".equalsIgnoreCase(n.getNodeName()))
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.CHANNELING);
@@ -1194,7 +1248,7 @@ public class DocumentSkill extends DocumentBase
 		}
 		for (int i = lastLvl + enchantLevels1 + enchantLevels2 + enchantLevels3 + enchantLevels4 + enchantLevels5 + enchantLevels6; i < (lastLvl + enchantLevels1 + enchantLevels2 + enchantLevels3 + enchantLevels4 + enchantLevels5 + enchantLevels6 + enchantLevels7); i++)
 		{
-			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
+			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundStartEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
 			_currentSkill.currentLevel = i - lastLvl - enchantLevels1 - enchantLevels2 - enchantLevels3 - enchantLevels4 - enchantLevels5 - enchantLevels6;
 			for (n = first; n != null; n = n.getNextSibling())
 			{
@@ -1224,6 +1278,11 @@ public class DocumentSkill extends DocumentBase
 					foundFor = true;
 					parseTemplate(n, _currentSkill.currentSkills.get(i));
 				}
+				else if ("enchant7startEffects".equalsIgnoreCase(n.getNodeName()))
+				{
+					foundStartEffects = true;
+					parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+				}
 				else if ("enchant7channelingEffects".equalsIgnoreCase(n.getNodeName()))
 				{
 					foundChannelingEffects = true;
@@ -1251,7 +1310,7 @@ public class DocumentSkill extends DocumentBase
 				}
 			}
 			// If none found, the enchanted skill will take effects from maxLvL of norm skill
-			if (!foundCond || !foundFor || !foundChannelingEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
+			if (!foundCond || !foundFor || !foundChannelingEffects || !foundStartEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
 			{
 				_currentSkill.currentLevel = lastLvl - 1;
 				for (n = first; n != null; n = n.getNextSibling())
@@ -1280,6 +1339,10 @@ public class DocumentSkill extends DocumentBase
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i));
 					}
+					else if (!foundChannelingEffects && "startEffects".equalsIgnoreCase(n.getNodeName()))
+					{
+						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+					}
 					else if (!foundChannelingEffects && "channelingEffects".equalsIgnoreCase(n.getNodeName()))
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.CHANNELING);
@@ -1305,7 +1368,7 @@ public class DocumentSkill extends DocumentBase
 		}
 		for (int i = lastLvl + enchantLevels1 + enchantLevels2 + enchantLevels3 + enchantLevels4 + enchantLevels5 + enchantLevels6 + enchantLevels7; i < (lastLvl + enchantLevels1 + enchantLevels2 + enchantLevels3 + enchantLevels4 + enchantLevels5 + enchantLevels6 + enchantLevels7 + enchantLevels8); i++)
 		{
-			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
+			boolean foundCond = false, foundFor = false, foundChannelingEffects = false, foundStartEffects = false, foundPveEffects = false, foundPvpEffects = false, foundEndEffects = false, foundSelfEffects = false;
 			_currentSkill.currentLevel = i - lastLvl - enchantLevels1 - enchantLevels2 - enchantLevels3 - enchantLevels4 - enchantLevels5 - enchantLevels6 - enchantLevels7;
 			for (n = first; n != null; n = n.getNextSibling())
 			{
@@ -1335,6 +1398,11 @@ public class DocumentSkill extends DocumentBase
 					foundFor = true;
 					parseTemplate(n, _currentSkill.currentSkills.get(i));
 				}
+				else if ("enchant8startEffects".equalsIgnoreCase(n.getNodeName()))
+				{
+					foundStartEffects = true;
+					parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+				}
 				else if ("enchant8channelingEffects".equalsIgnoreCase(n.getNodeName()))
 				{
 					foundChannelingEffects = true;
@@ -1362,7 +1430,7 @@ public class DocumentSkill extends DocumentBase
 				}
 			}
 			// If none found, the enchanted skill will take effects from maxLvL of norm skill
-			if (!foundCond || !foundFor || !foundChannelingEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
+			if (!foundCond || !foundFor || !foundChannelingEffects || !foundStartEffects || !foundPveEffects || !foundPvpEffects || !foundEndEffects || !foundSelfEffects)
 			{
 				_currentSkill.currentLevel = lastLvl - 1;
 				for (n = first; n != null; n = n.getNextSibling())
@@ -1391,6 +1459,10 @@ public class DocumentSkill extends DocumentBase
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i));
 					}
+					else if (!foundStartEffects && "startEffects".equalsIgnoreCase(n.getNodeName()))
+					{
+						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.START);
+					}
 					else if (!foundChannelingEffects && "channelingEffects".equalsIgnoreCase(n.getNodeName()))
 					{
 						parseTemplate(n, _currentSkill.currentSkills.get(i), EffectScope.CHANNELING);

+ 17 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/L2Character.java

@@ -108,6 +108,7 @@ import com.l2jserver.gameserver.model.quest.Quest;
 import com.l2jserver.gameserver.model.skills.AbnormalType;
 import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
 import com.l2jserver.gameserver.model.skills.BuffInfo;
+import com.l2jserver.gameserver.model.skills.EffectScope;
 import com.l2jserver.gameserver.model.skills.L2Skill;
 import com.l2jserver.gameserver.model.skills.L2SkillType;
 import com.l2jserver.gameserver.model.skills.SkillChannelized;
@@ -116,6 +117,7 @@ import com.l2jserver.gameserver.model.skills.funcs.Func;
 import com.l2jserver.gameserver.model.skills.targets.L2TargetType;
 import com.l2jserver.gameserver.model.stats.BaseStats;
 import com.l2jserver.gameserver.model.stats.Calculator;
+import com.l2jserver.gameserver.model.stats.Env;
 import com.l2jserver.gameserver.model.stats.Formulas;
 import com.l2jserver.gameserver.model.stats.Stats;
 import com.l2jserver.gameserver.model.zone.ZoneId;
@@ -1763,7 +1765,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
 		// Get the Base Casting Time of the Skills.
 		int skillTime = (skill.getHitTime() + skill.getCoolTime());
 		
-		if (!skill.isChanneling())
+		if (!skill.isChanneling() || (skill.getChannelingSkillId() == 0))
 		{
 			// Calculate the Casting Time of the "Non-Static" Skills (with caster PAtk/MAtkSpd).
 			if (!skill.isStatic())
@@ -1928,6 +1930,17 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
 			sendPacket(sm);
 		}
 		
+		if (skill.hasEffects(EffectScope.START))
+		{
+			final Env env = new Env();
+			env.setSkillMastery(Formulas.calcSkillMastery(this, skill));
+			env.setCharacter(this);
+			env.setTarget(target);
+			env.setSkill(skill);
+			final BuffInfo info = new BuffInfo(env);
+			skill.applyEffectScope(EffectScope.START, info, true, false);
+		}
+		
 		// Before start AI Cast Broadcast Fly Effect is Need
 		if (skill.getFlyType() != null)
 		{
@@ -1945,7 +1958,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
 				sendPacket(new SetupGauge(SetupGauge.BLUE, skillTime));
 			}
 			
-			if (skill.isChanneling())
+			if (skill.isChanneling() && (skill.getChannelingSkillId() > 0))
 			{
 				getSkillChannelizer().startChanneling(skill);
 			}
@@ -2046,7 +2059,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
 		}
 		
 		// prevent casting signets to peace zone
-		if (skill.isChanneling())
+		if (skill.isChanneling() && (skill.getChannelingSkillId() > 0))
 		{
 			L2WorldRegion region = getWorldRegion();
 			if (region == null)
@@ -5791,7 +5804,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
 			return;
 		}
 		
-		if (!skill.isChanneling() && !skill.isToggle())
+		if (!skill.isToggle())
 		{
 			broadcastPacket(new MagicSkillLaunched(this, skill.getDisplayId(), skill.getDisplayLevel(), targets));
 		}

+ 1 - 0
L2J_Server_BETA/java/com/l2jserver/gameserver/model/skills/EffectScope.java

@@ -24,6 +24,7 @@ package com.l2jserver.gameserver.model.skills;
 public enum EffectScope
 {
 	GENERAL,
+	START,
 	SELF,
 	PASSIVE,
 	CHANNELING,