ambush
Page 1 of 1
ambush
comme certain l'on vu ambush de l'assassin bug un peu voici un patch que j'ai fait qui regle ce probleme.
copier dans fichier text puis renomer en .patch
### Eclipse Workspace Patch 1.0
#P AE-go_GameServer
Index: src/com/aionemu/gameserver/skillengine/effect/Effects.java
===================================================================
--- src/com/aionemu/gameserver/skillengine/effect/Effects.java
+++ src/com/aionemu/gameserver/skillengine/effect/Effects.java
@@ -115,7 +115,8 @@
@XmlElement(name = "boostheal", type = BoostHealEffect.class),
@XmlElement(name = "dispelbuff", type = DispelBuffEffect.class),
@XmlElement(name = "skilllauncher", type = SkillLauncherEffect.class),
- @XmlElement(name = "forcedmove", type = ForcedMoveEffect.class)
+ @XmlElement(name = "forcedmove", type = ForcedMoveEffect.class),
+ @XmlElement(name = "movebehind", type = MoveBehindEffect.class)
})
protected List<EffectTemplate> effects;
Index: src/com/aionemu/gameserver/world/World.java
===================================================================
--- src/com/aionemu/gameserver/world/World.java
+++ src/com/aionemu/gameserver/world/World.java
@@ -346,4 +346,18 @@
object.clearKnownlist();
}
+
+ /**
+ * @param x
+ * @param y
+ * @param z
+ * @param heading
+ * @return
+ */
+ public WorldPosition setNewPosition(float x, float y, float z, byte heading)
+ {
+ WorldPosition position = new WorldPosition();
+ position.setXYZH(x, y, z, heading);
+ return position;
+ }
}
Index: data/static_data/skills/skills.xsd
===================================================================
--- data/static_data/skills/skills.xsd
+++ data/static_data/skills/skills.xsd
@@ -208,7 +208,9 @@
<xs:element name="skilllauncher" type="SkillLauncherEffect"
minOccurs="0" maxOccurs="1" />
<xs:element name="forcedmove" type="ForcedMoveEffect"
- minOccurs="0" maxOccurs="1" />
+ minOccurs="0" maxOccurs="1" />
+ <xs:element name="movebehind" type="MoveBehindEffect"
+ minOccurs="0" maxOccurs="1" />
</xs:sequence>
<xs:attribute name="food" type="xs:boolean"/>
</xs:complexType>
@@ -1055,6 +1057,13 @@
</xs:complexContent>
</xs:complexType>
+ <xs:complexType name="MoveBehindEffect">
+ <xs:complexContent>
+ <xs:extension base="DamageEffect">
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
<!-- CONDITIONS -->
<xs:complexType name="MpCondition">
Index: src/com/aionemu/gameserver/utils/PositionUtil.java
===================================================================
--- src/com/aionemu/gameserver/utils/PositionUtil.java
+++ src/com/aionemu/gameserver/utils/PositionUtil.java
@@ -17,6 +17,7 @@
package com.aionemu.gameserver.utils;
import com.aionemu.gameserver.model.gameobjects.VisibleObject;
+import com.aionemu.gameserver.world.WorldPosition;
/**
* @author ATracer
@@ -59,4 +60,26 @@
if (angleDiff >= 360 - MAX_ANGLE_DIFF) angleDiff -= 360;
return Math.abs(angleDiff) <= MAX_ANGLE_DIFF;
}
+
+ /**
+ * @param object
+ * @param distance
+ * @return
+ */
+ public static WorldPosition getBackDistanceCoordinate(VisibleObject object, float distance)
+ {
+ float x = object.getX();
+ float y = object.getY();
+ float degree = MathUtil.convertHeadingToDegree(object.getHeading());
+
+ double radian = degree * (Math.PI / 180);
+ double xPos = distance * Math.cos(radian);
+ double yPos = distance * Math.sin(radian);
+
+ float newX = (float) (x - xPos);
+ float newY = (float) (y - yPos);
+
+ return object.getActiveRegion().getWorld().setNewPosition(newX, newY, object.getZ() + 0.05f,
+ object.getHeading());
+ }
}
Index: src/com/aionemu/gameserver/network/aion/serverpackets/SM_PLAYER_MOVE.java
===================================================================
--- src/com/aionemu/gameserver/network/aion/serverpackets/SM_PLAYER_MOVE.java
+++ src/com/aionemu/gameserver/network/aion/serverpackets/SM_PLAYER_MOVE.java
@@ -0,0 +1,60 @@
+/*
+ * This file is part by leolegolas.
+ *
+ * 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 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.network.aion.serverpackets;
+
+import java.nio.ByteBuffer;
+
+import com.aionemu.gameserver.network.aion.AionConnection;
+import com.aionemu.gameserver.network.aion.AionServerPacket;
+
+/**
+ * @author cura
+ */
+public class SM_PLAYER_MOVE extends AionServerPacket
+{
+ private final float x;
+ private final float y;
+ private final float z;
+ private final byte heading;
+
+ /**
+ * @param x
+ * @param y
+ * @param z
+ * @param heading
+ */
+ public SM_PLAYER_MOVE(float x, float y, float z, byte heading)
+ {
+ super();
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.heading = heading;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void writeImpl(AionConnection con, ByteBuffer buf)
+ {
+ writeF(buf, x); // x
+ writeF(buf, y); // y
+ writeF(buf, z); // z
+ writeC(buf, heading); // heading
+ }
+}
Index: data/static_data/skills/skill_templates.xml
===================================================================
--- data/static_data/skills/skill_templates.xml
+++ data/static_data/skills/skill_templates.xml
@@ -11702,7 +11702,8 @@
<targetrelation value="ENEMY"/>
</setproperties>
<effects>
- <stun duration="3000" effectid="20000" e="2"/>
+ <movebehind value="78" e="1" hoptype="DAMAGE"/>
+ <stun duration="3000" effectid="20000" e="2" element="FIRE" hoptype="SKILLLV" hopb="2131"/>
</effects>
<actions>
<mpuse value="65" delta="0"/>
@@ -11719,7 +11720,8 @@
<targetrelation value="ENEMY"/>
</setproperties>
<effects>
- <stun duration="3000" effectid="20000" e="2"/>
+ <movebehind value="88" e="1" hoptype="DAMAGE"/>
+ <stun duration="3000" effectid="20000" e="2" element="FIRE" hoptype="SKILLLV" hopb="2561"/>
</effects>
<actions>
<mpuse value="73" delta="0"/>
@@ -13001,7 +13003,8 @@
<targetrelation value="ENEMY"/>
</setproperties>
<effects>
- <stun duration="3000" effectid="20000" e="2"/>
+ <movebehind value="109" e="1" hoptype="DAMAGE"/>
+ <stun duration="3000" effectid="20000" e="2" element="FIRE" hoptype="SKILLLV" hopb="2934"/>
</effects>
<actions>
<mpuse value="79" delta="0"/>
@@ -13999,7 +14002,8 @@
<targetrelation value="ENEMY"/>
</setproperties>
<effects>
- <stun duration="3000" effectid="20000" e="2"/>
+ <movebehind value="126" e="1" hoptype="DAMAGE"/>
+ <stun duration="3000" effectid="20000" e="2" element="FIRE" hoptype="SKILLLV" hopb="3360"/>
</effects>
<actions>
<mpuse value="82" delta="0"/>
@@ -14167,7 +14171,8 @@
<targetrelation value="ENEMY"/>
</setproperties>
<effects>
- <stun duration="3000" effectid="20000" e="2"/>
+ <movebehind value="152" e="1" hoptype="DAMAGE"/>
+ <stun duration="3000" effectid="20000" e="2" element="FIRE" hoptype="SKILLLV" hopb="3712"/>
</effects>
<actions>
<mpuse value="82" delta="0"/>
Index: src/com/aionemu/gameserver/skillengine/effect/MoveBehindEffect.java
===================================================================
--- src/com/aionemu/gameserver/skillengine/effect/MoveBehindEffect.java
+++ src/com/aionemu/gameserver/skillengine/effect/MoveBehindEffect.java
@@ -0,0 +1,59 @@
+/*
+ * This file is part by leolegolas
+ *
+ * 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 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.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.PacketSendUtility;
+import com.aionemu.gameserver.utils.PositionUtil;
+import com.aionemu.gameserver.world.WorldPosition;
+
+/**
+ * @author cura
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "MoveBehindEffect")
+public class MoveBehindEffect extends DamageEffect
+{
+ @Override
+ public void applyEffect(Effect effect)
+ {
+ super.applyEffect(effect);
+
+ Creature effector = effect.getEffector();
+ Creature effected = effect.getEffected();
+
+ WorldPosition position = PositionUtil.getBackDistanceCoordinate(effected, 1.5f);
+
+ PacketSendUtility.sendPacket((Player) effector, new SM_PLAYER_MOVE(position.getX(), position.getY(), position
+ .getZ(), position.getHeading()));
+ }
+
+ @Override
+ public void calculate(Effect effect)
+ {
+ if(effect.getEffected().isSpawned())
+ super.calculate(effect, DamageType.PHYSICAL);
+ }
+}
Index: src/com/aionemu/gameserver/network/aion/ServerPacketsOpcodes.java
===================================================================
--- src/com/aionemu/gameserver/network/aion/ServerPacketsOpcodes.java
+++ src/com/aionemu/gameserver/network/aion/ServerPacketsOpcodes.java
@@ -75,6 +75,7 @@
addPacketOpcode(SM_STATUPDATE_EXP.class, 0x28, idSet);
addPacketOpcode(SM_DP_INFO.class, 0x29, idSet);
addPacketOpcode(SM_TELEPORT_LOC.class, 0x2C, idSet);
+ addPacketOpcode(SM_PLAYER_MOVE.class, 0x2D, idSet);
addPacketOpcode(SM_NPC_INFO.class, 0x2E, idSet);
addPacketOpcode(SM_PLAYER_SPAWN.class, 0x2F, idSet);
addPacketOpcode(SM_GATHERABLE_INFO.class, 0x31, idSet);
copier dans fichier text puis renomer en .patch
### Eclipse Workspace Patch 1.0
#P AE-go_GameServer
Index: src/com/aionemu/gameserver/skillengine/effect/Effects.java
===================================================================
--- src/com/aionemu/gameserver/skillengine/effect/Effects.java
+++ src/com/aionemu/gameserver/skillengine/effect/Effects.java
@@ -115,7 +115,8 @@
@XmlElement(name = "boostheal", type = BoostHealEffect.class),
@XmlElement(name = "dispelbuff", type = DispelBuffEffect.class),
@XmlElement(name = "skilllauncher", type = SkillLauncherEffect.class),
- @XmlElement(name = "forcedmove", type = ForcedMoveEffect.class)
+ @XmlElement(name = "forcedmove", type = ForcedMoveEffect.class),
+ @XmlElement(name = "movebehind", type = MoveBehindEffect.class)
})
protected List<EffectTemplate> effects;
Index: src/com/aionemu/gameserver/world/World.java
===================================================================
--- src/com/aionemu/gameserver/world/World.java
+++ src/com/aionemu/gameserver/world/World.java
@@ -346,4 +346,18 @@
object.clearKnownlist();
}
+
+ /**
+ * @param x
+ * @param y
+ * @param z
+ * @param heading
+ * @return
+ */
+ public WorldPosition setNewPosition(float x, float y, float z, byte heading)
+ {
+ WorldPosition position = new WorldPosition();
+ position.setXYZH(x, y, z, heading);
+ return position;
+ }
}
Index: data/static_data/skills/skills.xsd
===================================================================
--- data/static_data/skills/skills.xsd
+++ data/static_data/skills/skills.xsd
@@ -208,7 +208,9 @@
<xs:element name="skilllauncher" type="SkillLauncherEffect"
minOccurs="0" maxOccurs="1" />
<xs:element name="forcedmove" type="ForcedMoveEffect"
- minOccurs="0" maxOccurs="1" />
+ minOccurs="0" maxOccurs="1" />
+ <xs:element name="movebehind" type="MoveBehindEffect"
+ minOccurs="0" maxOccurs="1" />
</xs:sequence>
<xs:attribute name="food" type="xs:boolean"/>
</xs:complexType>
@@ -1055,6 +1057,13 @@
</xs:complexContent>
</xs:complexType>
+ <xs:complexType name="MoveBehindEffect">
+ <xs:complexContent>
+ <xs:extension base="DamageEffect">
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
<!-- CONDITIONS -->
<xs:complexType name="MpCondition">
Index: src/com/aionemu/gameserver/utils/PositionUtil.java
===================================================================
--- src/com/aionemu/gameserver/utils/PositionUtil.java
+++ src/com/aionemu/gameserver/utils/PositionUtil.java
@@ -17,6 +17,7 @@
package com.aionemu.gameserver.utils;
import com.aionemu.gameserver.model.gameobjects.VisibleObject;
+import com.aionemu.gameserver.world.WorldPosition;
/**
* @author ATracer
@@ -59,4 +60,26 @@
if (angleDiff >= 360 - MAX_ANGLE_DIFF) angleDiff -= 360;
return Math.abs(angleDiff) <= MAX_ANGLE_DIFF;
}
+
+ /**
+ * @param object
+ * @param distance
+ * @return
+ */
+ public static WorldPosition getBackDistanceCoordinate(VisibleObject object, float distance)
+ {
+ float x = object.getX();
+ float y = object.getY();
+ float degree = MathUtil.convertHeadingToDegree(object.getHeading());
+
+ double radian = degree * (Math.PI / 180);
+ double xPos = distance * Math.cos(radian);
+ double yPos = distance * Math.sin(radian);
+
+ float newX = (float) (x - xPos);
+ float newY = (float) (y - yPos);
+
+ return object.getActiveRegion().getWorld().setNewPosition(newX, newY, object.getZ() + 0.05f,
+ object.getHeading());
+ }
}
Index: src/com/aionemu/gameserver/network/aion/serverpackets/SM_PLAYER_MOVE.java
===================================================================
--- src/com/aionemu/gameserver/network/aion/serverpackets/SM_PLAYER_MOVE.java
+++ src/com/aionemu/gameserver/network/aion/serverpackets/SM_PLAYER_MOVE.java
@@ -0,0 +1,60 @@
+/*
+ * This file is part by leolegolas.
+ *
+ * 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 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.network.aion.serverpackets;
+
+import java.nio.ByteBuffer;
+
+import com.aionemu.gameserver.network.aion.AionConnection;
+import com.aionemu.gameserver.network.aion.AionServerPacket;
+
+/**
+ * @author cura
+ */
+public class SM_PLAYER_MOVE extends AionServerPacket
+{
+ private final float x;
+ private final float y;
+ private final float z;
+ private final byte heading;
+
+ /**
+ * @param x
+ * @param y
+ * @param z
+ * @param heading
+ */
+ public SM_PLAYER_MOVE(float x, float y, float z, byte heading)
+ {
+ super();
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.heading = heading;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void writeImpl(AionConnection con, ByteBuffer buf)
+ {
+ writeF(buf, x); // x
+ writeF(buf, y); // y
+ writeF(buf, z); // z
+ writeC(buf, heading); // heading
+ }
+}
Index: data/static_data/skills/skill_templates.xml
===================================================================
--- data/static_data/skills/skill_templates.xml
+++ data/static_data/skills/skill_templates.xml
@@ -11702,7 +11702,8 @@
<targetrelation value="ENEMY"/>
</setproperties>
<effects>
- <stun duration="3000" effectid="20000" e="2"/>
+ <movebehind value="78" e="1" hoptype="DAMAGE"/>
+ <stun duration="3000" effectid="20000" e="2" element="FIRE" hoptype="SKILLLV" hopb="2131"/>
</effects>
<actions>
<mpuse value="65" delta="0"/>
@@ -11719,7 +11720,8 @@
<targetrelation value="ENEMY"/>
</setproperties>
<effects>
- <stun duration="3000" effectid="20000" e="2"/>
+ <movebehind value="88" e="1" hoptype="DAMAGE"/>
+ <stun duration="3000" effectid="20000" e="2" element="FIRE" hoptype="SKILLLV" hopb="2561"/>
</effects>
<actions>
<mpuse value="73" delta="0"/>
@@ -13001,7 +13003,8 @@
<targetrelation value="ENEMY"/>
</setproperties>
<effects>
- <stun duration="3000" effectid="20000" e="2"/>
+ <movebehind value="109" e="1" hoptype="DAMAGE"/>
+ <stun duration="3000" effectid="20000" e="2" element="FIRE" hoptype="SKILLLV" hopb="2934"/>
</effects>
<actions>
<mpuse value="79" delta="0"/>
@@ -13999,7 +14002,8 @@
<targetrelation value="ENEMY"/>
</setproperties>
<effects>
- <stun duration="3000" effectid="20000" e="2"/>
+ <movebehind value="126" e="1" hoptype="DAMAGE"/>
+ <stun duration="3000" effectid="20000" e="2" element="FIRE" hoptype="SKILLLV" hopb="3360"/>
</effects>
<actions>
<mpuse value="82" delta="0"/>
@@ -14167,7 +14171,8 @@
<targetrelation value="ENEMY"/>
</setproperties>
<effects>
- <stun duration="3000" effectid="20000" e="2"/>
+ <movebehind value="152" e="1" hoptype="DAMAGE"/>
+ <stun duration="3000" effectid="20000" e="2" element="FIRE" hoptype="SKILLLV" hopb="3712"/>
</effects>
<actions>
<mpuse value="82" delta="0"/>
Index: src/com/aionemu/gameserver/skillengine/effect/MoveBehindEffect.java
===================================================================
--- src/com/aionemu/gameserver/skillengine/effect/MoveBehindEffect.java
+++ src/com/aionemu/gameserver/skillengine/effect/MoveBehindEffect.java
@@ -0,0 +1,59 @@
+/*
+ * This file is part by leolegolas
+ *
+ * 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 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.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.PacketSendUtility;
+import com.aionemu.gameserver.utils.PositionUtil;
+import com.aionemu.gameserver.world.WorldPosition;
+
+/**
+ * @author cura
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "MoveBehindEffect")
+public class MoveBehindEffect extends DamageEffect
+{
+ @Override
+ public void applyEffect(Effect effect)
+ {
+ super.applyEffect(effect);
+
+ Creature effector = effect.getEffector();
+ Creature effected = effect.getEffected();
+
+ WorldPosition position = PositionUtil.getBackDistanceCoordinate(effected, 1.5f);
+
+ PacketSendUtility.sendPacket((Player) effector, new SM_PLAYER_MOVE(position.getX(), position.getY(), position
+ .getZ(), position.getHeading()));
+ }
+
+ @Override
+ public void calculate(Effect effect)
+ {
+ if(effect.getEffected().isSpawned())
+ super.calculate(effect, DamageType.PHYSICAL);
+ }
+}
Index: src/com/aionemu/gameserver/network/aion/ServerPacketsOpcodes.java
===================================================================
--- src/com/aionemu/gameserver/network/aion/ServerPacketsOpcodes.java
+++ src/com/aionemu/gameserver/network/aion/ServerPacketsOpcodes.java
@@ -75,6 +75,7 @@
addPacketOpcode(SM_STATUPDATE_EXP.class, 0x28, idSet);
addPacketOpcode(SM_DP_INFO.class, 0x29, idSet);
addPacketOpcode(SM_TELEPORT_LOC.class, 0x2C, idSet);
+ addPacketOpcode(SM_PLAYER_MOVE.class, 0x2D, idSet);
addPacketOpcode(SM_NPC_INFO.class, 0x2E, idSet);
addPacketOpcode(SM_PLAYER_SPAWN.class, 0x2F, idSet);
addPacketOpcode(SM_GATHERABLE_INFO.class, 0x31, idSet);
leolegolas- Core dev
- Messages : 8
Date d'inscription : 2010-08-13
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum