From 35ff9997066e0922d8ef9bff50cbc9ede37598db Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 13 Dec 2021 22:28:29 +0000 Subject: [PATCH] Proper ids for ExSetCompassZoneCode. Thanks to aviengier. --- .../gameserver/model/actor/Player.java | 8 ++++---- .../serverpackets/ExSetCompassZoneCode.java | 17 +++++++---------- .../gameserver/model/actor/Player.java | 8 ++++---- .../serverpackets/ExSetCompassZoneCode.java | 17 +++++++---------- 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/actor/Player.java index ae9fde22f8..b073a8f824 100644 --- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -1860,12 +1860,12 @@ public class Player extends Playable } else if (isInsideZone(ZoneId.SIEGE)) { - if (_lastCompassZone == ExSetCompassZoneCode.SIEGEWARZONE2) + if (_lastCompassZone == ExSetCompassZoneCode.SIEGEWARZONE) { return; } - _lastCompassZone = ExSetCompassZoneCode.SIEGEWARZONE2; - sendPacket(new ExSetCompassZoneCode(ExSetCompassZoneCode.SIEGEWARZONE2)); + _lastCompassZone = ExSetCompassZoneCode.SIEGEWARZONE; + sendPacket(new ExSetCompassZoneCode(ExSetCompassZoneCode.SIEGEWARZONE)); } else if (isInsideZone(ZoneId.PVP)) { @@ -1900,7 +1900,7 @@ public class Player extends Playable { return; } - if (_lastCompassZone == ExSetCompassZoneCode.SIEGEWARZONE2) + if (_lastCompassZone == ExSetCompassZoneCode.SIEGEWARZONE) { updatePvPStatus(); } diff --git a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExSetCompassZoneCode.java b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExSetCompassZoneCode.java index fb32e199b2..5187833002 100644 --- a/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExSetCompassZoneCode.java +++ b/L2J_Mobius_10.0_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/ExSetCompassZoneCode.java @@ -24,16 +24,13 @@ import org.l2jmobius.gameserver.network.OutgoingPackets; */ public class ExSetCompassZoneCode implements IClientOutgoingPacket { - // TODO: Enum - public static final int ALTEREDZONE = 0x08; - public static final int SIEGEWARZONE1 = 0x0A; - public static final int SIEGEWARZONE2 = 0x0B; - public static final int PEACEZONE = 0x0C; - public static final int SEVENSIGNSZONE = 0x0D; - public static final int PVPZONE = 0x0E; - public static final int GENERALZONE = 0x0F; - // TODO: need to find the desired value - public static final int NOPVPZONE = 0x0C; + public static final int ALTEREDZONE = 7; + public static final int SIEGEWARZONE = 10; + public static final int PEACEZONE = 11; + public static final int SEVENSIGNSZONE = 12; + public static final int NOPVPZONE = 13; + public static final int PVPZONE = 14; + public static final int GENERALZONE = 15; private final int _zoneType; diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Player.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Player.java index 55d7b17fd6..e993f9443d 100644 --- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Player.java +++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/Player.java @@ -1898,12 +1898,12 @@ public class Player extends Playable } else if (isInsideZone(ZoneId.SIEGE)) { - if (_lastCompassZone == ExSetCompassZoneCode.SIEGEWARZONE2) + if (_lastCompassZone == ExSetCompassZoneCode.SIEGEWARZONE) { return; } - _lastCompassZone = ExSetCompassZoneCode.SIEGEWARZONE2; - sendPacket(new ExSetCompassZoneCode(ExSetCompassZoneCode.SIEGEWARZONE2)); + _lastCompassZone = ExSetCompassZoneCode.SIEGEWARZONE; + sendPacket(new ExSetCompassZoneCode(ExSetCompassZoneCode.SIEGEWARZONE)); } else if (isInsideZone(ZoneId.PVP)) { @@ -1938,7 +1938,7 @@ public class Player extends Playable { return; } - if (_lastCompassZone == ExSetCompassZoneCode.SIEGEWARZONE2) + if (_lastCompassZone == ExSetCompassZoneCode.SIEGEWARZONE) { updatePvPStatus(); } diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/ExSetCompassZoneCode.java b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/ExSetCompassZoneCode.java index fb32e199b2..5187833002 100644 --- a/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/ExSetCompassZoneCode.java +++ b/L2J_Mobius_Essence_6.0_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/ExSetCompassZoneCode.java @@ -24,16 +24,13 @@ import org.l2jmobius.gameserver.network.OutgoingPackets; */ public class ExSetCompassZoneCode implements IClientOutgoingPacket { - // TODO: Enum - public static final int ALTEREDZONE = 0x08; - public static final int SIEGEWARZONE1 = 0x0A; - public static final int SIEGEWARZONE2 = 0x0B; - public static final int PEACEZONE = 0x0C; - public static final int SEVENSIGNSZONE = 0x0D; - public static final int PVPZONE = 0x0E; - public static final int GENERALZONE = 0x0F; - // TODO: need to find the desired value - public static final int NOPVPZONE = 0x0C; + public static final int ALTEREDZONE = 7; + public static final int SIEGEWARZONE = 10; + public static final int PEACEZONE = 11; + public static final int SEVENSIGNSZONE = 12; + public static final int NOPVPZONE = 13; + public static final int PVPZONE = 14; + public static final int GENERALZONE = 15; private final int _zoneType;