diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/WorldObject.java index 52e1bd792d..d0d5446395 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -846,12 +846,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /** diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/WorldObject.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/WorldObject.java index 8c880e69ae..d86548cb13 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/WorldObject.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/WorldObject.java @@ -813,12 +813,7 @@ public abstract class WorldObject extends ListenersContainer implements IIdentif */ public double calculateDirectionTo(ILocational target) { - int heading = Util.calculateHeadingFrom(this, target) - _heading; - if (heading < 0) - { - heading += 65535; - } - return Util.convertHeadingToDegree(heading); + return Util.calculateAngleFrom(this, target); } /**