Aion Gates
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[SKILLS] Blind Leap & Time and Space Jump 100%[CLOSED]

Go down

[SKILLS] Blind Leap & Time and Space Jump 100%[CLOSED] Empty [SKILLS] Blind Leap & Time and Space Jump 100%[CLOSED]

Post  M@xx Mon 23 Aug - 9:31

Skill_templates.xml:
CHANGE 1424 and 1463 effects

Code:
<skill_template skill_id="1424" name="STR_SKILL_WI_DiemsionJump_G1" nameId="590347" stack="SKILL_WI_DIEMSIONJUMP" lvl="1" skilltype="MAGICAL" skillsubtype="NONE" tslot="NONE" activation="ACTIVE" cooldown="600" duration="0" cancel_rate="20">
        <startconditions>
            <mp value="100" delta="0"/>
        </startconditions>
        <setproperties>
            <firsttarget value="ME"/>
            <firsttargetrange value="1"/>
            <targetrange value="ONLYONE"/>
            <targetrelation value="FRIEND"/>
        </setproperties>
        <effects>
            <dispel dispeltype="EFFECTID" e="1">
                <effectids>119682</effectids>
            </dispel>
            <leap distance="30.0" direction="0" up="6.0" e="2"/>
        </effects>
        <actions>
            <mpuse value="100" delta="0"/>
        </actions>
    </skill_template>

    <skill_template skill_id="1463" name="STR_SKILL_WI_DimensionDoor_G1" nameId="565015" stack="SKILL_WI_DIMENSIONDOOR" lvl="1" skilltype="MAGICAL" skillsubtype="NONE" tslot="NONE" activation="ACTIVE" cooldown="300" duration="0" cancel_rate="30">
        <setproperties>
            <firsttarget value="ME"/>
            <firsttargetrange value="1"/>
            <targetrange value="ONLYONE"/>
            <targetrelation value="FRIEND"/>
        </setproperties>
        <effects>
            <dispel dispeltype="EFFECTTYPE" e="1">
                <effectids>1</effectids>
                <effectids>9</effectids>
                <effectids>20003</effectids>
                <effectids>112251</effectids><!--Shockgames-->
                <effectids>1185012</effectids>
                <effectids>20007</effectids>
            </dispel>
            <leap distance="20.0" direction="1.0" up="4.5" e="2"/>
        </effects>
    </skill_template>


patch
Code:
Index: data/static_data/skills/skills.xsd
===================================================================
--- data/static_data/skills/skills.xsd    (revision 178)
+++ data/static_data/skills/skills.xsd    (working copy)
@@ -218,6 +218,8 @@
                minOccurs="0" maxOccurs="1" />
            <xs:element name="changemp" type="ChangeMpConsumptionEffect"
                minOccurs="0" maxOccurs="1" />
+            <xs:element name="leap" type="LeapEffect"
+                minOccurs="0" maxOccurs="1" />
        </xs:sequence>
        <xs:attribute name="food" type="xs:boolean"/>
    </xs:complexType>
@@ -1357,7 +1359,16 @@
            <xs:enumeration value="ME" />
            <xs:enumeration value="OPPONENT" />
        </xs:restriction>
+       
    </xs:simpleType>
-   
+    <xs:complexType name="LeapEffect">
+        <xs:complexContent>
+            <xs:extension base="Effect">
+                <xs:attribute name="distance" type="xs:float" />
+                <xs:attribute name="direction" type="xs:float" />
+                <xs:attribute name="up" type="xs:float" />
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
 </xs:schema>
 
Index: src/main/java/com/aionemu/gameserver/skillengine/effect/Effects.java
===================================================================
--- src/main/java/com/aionemu/gameserver/skillengine/effect/Effects.java    (revision 176)
+++ src/main/java/com/aionemu/gameserver/skillengine/effect/Effects.java    (working copy)
@@ -119,7 +119,8 @@
        @XmlElement(name = "fear", type = FearEffect.class),
        @XmlElement(name = "movebehind", type = MoveBehindEffect.class),
        @XmlElement(name = "rebirth", type = RebirthEffect.class),
-        @XmlElement(name = "changemp", type = ChangeMpConsumptionEffect.class)
+        @XmlElement(name = "changemp", type = ChangeMpConsumptionEffect.class),
+        @XmlElement(name = "leap", type = LeapEffect.class)
    })
    protected List<EffectTemplate> effects;
   
Index: src/main/java/com/aionemu/gameserver/skillengine/effect/LeapEffect.java
===================================================================
--- src/main/java/com/aionemu/gameserver/skillengine/effect/LeapEffect.java    (revision 0)
+++ src/main/java/com/aionemu/gameserver/skillengine/effect/LeapEffect.java    (revision 0)
@@ -0,0 +1,80 @@
+/*
+ * This file is part of aion-unique <aion-unique.org>.
+ *
+ *  aion-unique 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.
+ *
+ *  aion-unique 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 aion-unique.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.aionemu.gameserver.skillengine.effect;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+import com.aionemu.gameserver.model.gameobjects.Creature;
+import com.aionemu.gameserver.model.gameobjects.player.Player;
+import com.aionemu.gameserver.network.aion.serverpackets.SM_PLAYER_MOVE;
+import com.aionemu.gameserver.skillengine.action.DamageType;
+import com.aionemu.gameserver.skillengine.model.Effect;
+import com.aionemu.gameserver.utils.MathUtil;
+import com.aionemu.gameserver.utils.PacketSendUtility;
+import com.aionemu.gameserver.world.World;
+
+/**
+ * @author Bio
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "LeapEffect")
+public class LeapEffect extends EffectTemplate
+{
+    @XmlAttribute(name = "distance")
+    private float distance;
+    @XmlAttribute(name = "direction")
+    private float direction;
+    @XmlAttribute(name = "up")
+    private float up;
+
+   
+    @Override
+    public void applyEffect(Effect effect)
+    {
+        final Player effector = (Player)effect.getEffector();
+       
+        // Move Effector backwards direction=1 or frontwards direction=0
+        double radian = Math.toRadians(MathUtil.convertHeadingToDegree(effector.getHeading()));
+        float x1 = (float)(Math.cos(Math.PI * direction + radian) * distance);
+        float y1 = (float)(Math.sin(Math.PI * direction + radian) * distance);
+        World.getInstance().updatePosition(
+            effector,
+            effector.getX() + x1,
+            effector.getY() + y1,
+            effector.getZ() + up,
+            effector.getHeading());
+       
+        PacketSendUtility.sendPacket(effector,
+            new SM_PLAYER_MOVE(
+                effector.getX(),
+                effector.getY(),
+                effector.getZ(),
+                effector.getHeading()
+            )
+        );
+    }
+   
+    @Override
+    public void calculate(Effect effect)
+    {
+        effect.addSucessEffect(this);
+    }
+}
\ No newline at end of file
M@xx
M@xx
Core dev
Core dev

Messages : 83
Date d'inscription : 2010-07-30

https://aiongates.forums-actifs.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum