Browse Source

BETA: Fixing instant self-effects not being applied to the caster.
* Fixes Blink skill not working.
* Reported by: thorl2
* Minor cleanup in some effects.
* Implemented to missing skills Anesthesia (5085) and Deadly Poison (5086).
* Requested by: St3eT
* Reviewed by: Adry_85
* Implemented skill Test - Blink (7078).

Zoey76 11 years ago
parent
commit
1f4136ce21

+ 9 - 13
L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/Blink.java

@@ -34,16 +34,16 @@ import com.l2jserver.gameserver.util.Util;
 
 /**
  * Blink effect implementation.<br>
- * This class handles warp effects, disappear and quickly turn up in a near location. If geodata enabled and an object is between initial and final point, flight is stopped just before colliding with object. Flight course and radius are set as skill properties (flyCourse and flyRadius):
+ * This class handles warp effects, disappear and quickly turn up in a near location.<br>
+ * If geodata enabled and an object is between initial and final point, flight is stopped just before colliding with object.<br>
+ * Flight course and radius are set as skill properties (flyCourse and flyRadius):
  * <ul>
  * <li>Fly Radius means the distance between starting point and final point, it must be an integer.</li>
  * <li>Fly Course means the movement direction: imagine a compass above player's head, making north player's heading. So if fly course is 180, player will go backwards (good for blink, e.g.).</li>
  * </ul>
  * By the way, if flyCourse = 360 or 0, player will be moved in in front of him. <br>
- * <br>
- * If target is effector, put in XML self = "1". This will make _actor = getEffector(). This, combined with target type, allows more complex actions like flying target's backwards or player's backwards.<br>
- * <br>
- * @author House
+ * If target is effector, put in XML self="1", this will make _actor = getEffector(). This, combined with target type, allows more complex actions like flying target's backwards or player's backwards.
+ * @author DrHouse
  */
 public final class Blink extends AbstractEffect
 {
@@ -72,21 +72,17 @@ public final class Blink extends AbstractEffect
 		int x = effected.getX() + x1;
 		int y = effected.getY() + y1;
 		int z = effected.getZ();
-		
+		Location loc = new Location(x, y, z);
 		if (Config.GEODATA > 0)
 		{
-			final Location destiny = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceId());
-			x = destiny.getX();
-			y = destiny.getY();
-			z = destiny.getZ();
+			loc = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceId());
 		}
 		
-		// TODO: check if this AI intention is retail-like. This stops player's previous movement
 		effected.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
-		effected.broadcastPacket(new FlyToLocation(effected, x, y, z, FlyType.DUMMY));
+		effected.broadcastPacket(new FlyToLocation(effected, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
 		effected.abortAttack();
 		effected.abortCast();
-		effected.setXYZ(x, y, z);
+		effected.setXYZ(loc);
 		effected.broadcastPacket(new ValidateLocation(effected));
 	}
 }

+ 3 - 5
L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/EnemyCharge.java

@@ -65,10 +65,8 @@ public final class EnemyCharge extends AbstractEffect
 			_log.info("EffectEnemyCharge was going to use invalid coordinates for characters, getEffector: " + curX + "," + curY + " and getEffected: " + info.getEffected().getX() + "," + info.getEffected().getY());
 			return;
 		}
-		int offset = Math.max((int) distance - info.getSkill().getFlyRadius(), 30);
 		
-		double cos;
-		double sin;
+		int offset = Math.max((int) distance - info.getSkill().getFlyRadius(), 30);
 		
 		// approximation for moving closer when z coordinates are different
 		// TODO: handle Z axis movement better
@@ -85,8 +83,8 @@ public final class EnemyCharge extends AbstractEffect
 		}
 		
 		// Calculate movement angles needed
-		sin = dy / distance;
-		cos = dx / distance;
+		double sin = dy / distance;
+		double cos = dx / distance;
 		
 		// Calculate the new destination with offset included
 		int x = curX + (int) ((distance - offset) * cos);

+ 4 - 6
L2J_DataPack_BETA/dist/game/data/scripts/handlers/effecthandlers/TeleportToTarget.java

@@ -66,7 +66,6 @@ public final class TeleportToTarget extends AbstractEffect
 			return;
 		}
 		
-		int x = 0, y = 0, z = 0;
 		int px = target.getX();
 		int py = target.getY();
 		double ph = Util.convertHeadingToDegree(target.getHeading());
@@ -78,11 +77,10 @@ public final class TeleportToTarget extends AbstractEffect
 		}
 		
 		ph = (Math.PI * ph) / 180;
-		x = (int) (px + (25 * Math.cos(ph)));
-		y = (int) (py + (25 * Math.sin(ph)));
-		z = target.getZ();
+		int x = (int) (px + (25 * Math.cos(ph)));
+		int y = (int) (py + (25 * Math.sin(ph)));
+		int z = target.getZ();
 		Location loc = new Location(x, y, z);
-		
 		if (Config.GEODATA > 0)
 		{
 			loc = GeoData.getInstance().moveCheck(activeChar.getX(), activeChar.getY(), activeChar.getZ(), x, y, z, activeChar.getInstanceId());
@@ -92,7 +90,7 @@ public final class TeleportToTarget extends AbstractEffect
 		activeChar.broadcastPacket(new FlyToLocation(activeChar, loc.getX(), loc.getY(), loc.getZ(), FlyType.DUMMY));
 		activeChar.abortAttack();
 		activeChar.abortCast();
-		activeChar.setXYZ(loc.getX(), loc.getY(), loc.getZ());
+		activeChar.setXYZ(loc);
 		activeChar.broadcastPacket(new ValidateLocation(activeChar));
 	}
 }

+ 1 - 4
L2J_DataPack_BETA/dist/game/data/scripts/handlers/skillhandlers/Dummy.java

@@ -30,9 +30,6 @@ import com.l2jserver.gameserver.model.skills.L2Skill;
 import com.l2jserver.gameserver.model.skills.L2SkillType;
 import com.l2jserver.gameserver.model.stats.Formulas;
 
-/**
- * @version $Revision: 1.1.2.5.2.4 $ $Date: 2005/04/03 15:55:03 $
- */
 public class Dummy implements ISkillHandler
 {
 	private static final L2SkillType[] SKILL_IDS =
@@ -82,7 +79,7 @@ public class Dummy implements ISkillHandler
 			{
 				activeChar.stopSkillEffects(true, skill.getId());
 			}
-			skill.applyEffects(activeChar, null, activeChar, true, false, false, 0);
+			skill.applyEffects(activeChar, null, activeChar, true, false, true, 0);
 		}
 		
 		if (skill.useSpiritShot())

+ 16 - 6
L2J_DataPack_BETA/dist/game/data/stats/skills/05000-05099.xml

@@ -1318,40 +1318,50 @@
 		</for>
 	</skill>
 	<skill id="5085" levels="1" name="Anesthesia">
-		<!-- Temporarily stunned and Immobilized. -->
+		<!-- Confirmed CT2.5 -->
 		<set name="abnormalLvl" val="1" />
 		<set name="abnormalTime" val="30" />
 		<set name="abnormalType" val="ANESTHESIA" />
 		<set name="abnormalVisualEffect" val="PARALYZE" />
 		<set name="activateRate" val="20" />
+		<set name="affectRange" val="200" />
 		<set name="basicProperty" val="MEN" />
 		<set name="effectPoint" val="-100" />
 		<set name="hitTime" val="3300" />
 		<set name="icon" val="icon.skill5085" />
+		<set name="isDebuff" val="true" />
 		<set name="isMagic" val="1" /> <!-- Magic Skill -->
 		<set name="magicLvl" val="85" />
+		<set name="mpConsume" val="23" />
 		<set name="operateType" val="A2" />
-		<set name="skillType" val="NOTDONE" />
-		<set name="targetType" val="NONE" />
+		<set name="targetType" val="AURA" />
+		<for>
+			<effect name="Stun" />
+		</for>
 	</skill>
 	<skill id="5086" levels="1" name="Deadly Poison">
-		<!-- Infected with poison and gradually losing HP. If HP falls to 0, death will ensue. -->
+		<!-- Confirmed CT2.5 -->
 		<set name="abnormalLvl" val="2" />
 		<set name="abnormalTime" val="60" />
 		<set name="abnormalType" val="CRITICAL_POISON" />
 		<set name="abnormalVisualEffect" val="DOT_POISON" />
 		<set name="activateRate" val="50" />
+		<set name="affectRange" val="200" />
 		<set name="basicProperty" val="CON" />
 		<set name="effectPoint" val="-100" />
 		<set name="hitTime" val="3300" />
 		<set name="icon" val="icon.skill5086" />
+		<set name="isDebuff" val="true" />
 		<set name="isMagic" val="1" /> <!-- Magic Skill -->
 		<set name="lvlBonusRate" val="1" />
 		<set name="magicLvl" val="-1" />
+		<set name="mpConsume" val="23" />
 		<set name="operateType" val="A2" />
-		<set name="skillType" val="NOTDONE" />
-		<set name="targetType" val="NONE" />
+		<set name="targetType" val="AURA" />
 		<set name="trait" val="POISON" />
+		<effect name="DamOverTime" ticks="5" val="12">
+			<param canKill="true" />
+		</effect>
 	</skill>
 	<skill id="5087" levels="2" name="Berserk">
 		<!-- Confirmed CT2.5 -->

+ 11 - 2
L2J_DataPack_BETA/dist/game/data/stats/skills/07000-07099.xml

@@ -1129,23 +1129,32 @@
 		<set name="trait" val="SHOCK" />
 	</skill>
 	<skill id="7078" levels="1" name="Test - Blink">
+		<!-- Confirmed CT2.5 -->
 		<set name="abnormalLvl" val="1" />
 		<set name="abnormalTime" val="2" />
 		<set name="abnormalType" val="STUN" />
 		<set name="abnormalVisualEffect" val="STUN" />
 		<set name="activateRate" val="80" />
 		<set name="affectLimit" val="5-12" />
+		<set name="affectRange" val="200" />
 		<set name="basicProperty" val="CON" />
 		<set name="coolTime" val="200" />
+		<set name="flyCourse" val="0" /> <!-- Teleport to Back -->
+		<set name="flyRadius" val="400" />
 		<set name="hitTime" val="300" />
 		<set name="isMagic" val="1" /> <!-- Magic Skill -->
 		<set name="lvlBonusRate" val="1" />
 		<set name="magicLvl" val="75" />
+		<set name="mpConsume" val="50" />
+		<set name="mpInitialConsume" val="50" />
 		<set name="operateType" val="A2" />
 		<set name="reuseDelay" val="5000" />
-		<set name="skillType" val="NOTDONE" />
-		<set name="targetType" val="NONE" />
+		<set name="targetType" val="AURA" />
 		<set name="trait" val="SHOCK" />
+		<for>
+			<effect self="1" name="Blink" />
+			<effect name="Stun" />
+		</for>
 	</skill>
 	<skill id="7079" levels="1" name="Test - Party Damage Absorb">
 		<set name="abnormalLvl" val="1" />