diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/siege/Siege.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/siege/Siege.java index 3dfb03a9df..5896b62ef3 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/siege/Siege.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/siege/Siege.java @@ -502,6 +502,7 @@ public class Siege implements Siegable _isInProgress = true; // Flag so that same siege instance cannot be started again loadSiegeClan(); // Load siege clan from db updatePlayerSiegeStateFlags(false); + updatePlayerSiegeStateFlags(false); // This fixes icons between allies because it first shows as an enemy for unknown reasons teleportPlayer(SiegeTeleportWhoType.NotOwner, TeleportWhereType.TOWN); // Teleport to the closest town _controlTowerCount = 0; spawnControlTower(); // Spawn control tower diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java index 393947e0bd..cfcc530b59 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java @@ -28,28 +28,27 @@ import org.l2jmobius.gameserver.network.OutgoingPackets; */ public class RelationChanged implements IClientOutgoingPacket { - // TODO: Enum - public static final int RELATION_PARTY1 = 0x1; // party member - public static final int RELATION_PARTY2 = 0x2; // party member - public static final int RELATION_PARTY3 = 0x4; // party member - public static final int RELATION_PARTY4 = 0x8; // party member (for information, see Player.getRelation()) - public static final int RELATION_PARTYLEADER = 0x10; // true if is party leader - public static final int RELATION_HAS_PARTY = 0x20; // true if is in party - public static final int RELATION_CLAN_MEMBER = 0x40; // true if is in clan - public static final int RELATION_LEADER = 0x100; // true if is clan leader - public static final int RELATION_CLAN_MATE = 0x200; // true if is in same clan - public static final int RELATION_INSIEGE = 0x400; // true if in siege - public static final int RELATION_ATTACKER = 0x800; // true when attacker - public static final int RELATION_DECLARED_WAR = 0x3000; // single sword - public static final int RELATION_ALLY = 0x4000; // blue siege icon, cannot have if red - public static final int RELATION_MUTUAL_WAR = 0x6000; // double swords - public static final int RELATION_ENEMY = 0x8000; // true when red icon, doesn't matter with blue - public static final int RELATION_ALLY_MEMBER = 0x10000; // clan is in alliance - public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon + public static final int RELATION_PARTY1 = 1; // party member + public static final int RELATION_PARTY2 = 2; // party member + public static final int RELATION_PARTY3 = 4; // party member + public static final int RELATION_PARTY4 = 8; // party member (for information, see Player.getRelation()) + public static final int RELATION_PARTYLEADER = 16; // true if is party leader + public static final int RELATION_HAS_PARTY = 32; // true if is in party + public static final int RELATION_CLAN_MEMBER = 64; // true if is in clan + public static final int RELATION_LEADER = 128; // true if is clan leader + public static final int RELATION_CLAN_MATE = 256; // true if is in same clan + public static final int RELATION_INSIEGE = 512; // true if in siege + public static final int RELATION_ATTACKER = 1024; // true when attacker + public static final int RELATION_ALLY = 2048; // blue siege icon, cannot have if red + public static final int RELATION_ENEMY = 4096; // true when red icon, doesn't matter with blue + public static final int RELATION_DECLARED_WAR = 8192; // single sword + public static final int RELATION_MUTUAL_WAR = 24576; // double swords + public static final int RELATION_ALLY_MEMBER = 65536; // clan is in alliance + public static final int RELATION_TERRITORY_WAR = 524288; // show Territory War icon // Masks - public static final byte SEND_DEFAULT = 0x01; - public static final byte SEND_ONE = 0x02; - public static final byte SEND_MULTI = 0x04; + public static final byte SEND_DEFAULT = 1; + public static final byte SEND_ONE = 2; + public static final byte SEND_MULTI = 4; protected static class Relation { @@ -62,7 +61,7 @@ public class RelationChanged implements IClientOutgoingPacket private Relation _singled; private final List _multi; - private byte _mask = 0x00; + private byte _mask = 0; public RelationChanged(Playable activeChar, long relation, boolean autoattackable) { diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java index 7d19fd9246..d05abc4477 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java @@ -436,23 +436,31 @@ public class UserInfo extends AbstractMaskPacket final Clan clan = player.getClan(); if (party != null) { - relation |= 0x08; // Party member + relation |= 8; // Party member if (party.getLeader() == _player) { - relation |= 0x10; // Party leader + relation |= 16; // Party leader } } if (clan != null) { - relation |= 0x20; // Clan member + + if (player.getSiegeState() == 1) + { + relation |= 256; // Clan member + } + else if (player.getSiegeState() == 2) + { + relation |= 32; // Clan member + } if (clan.getLeaderId() == player.getObjectId()) { - relation |= 0x40; // Clan leader + relation |= 64; // Clan leader } } - if (player.isInSiege()) + if (player.getSiegeState() != 0) { - relation |= 0x80; // In siege + relation |= 128; // In siege } return relation; } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/siege/Siege.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/siege/Siege.java index 3dfb03a9df..5896b62ef3 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/siege/Siege.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/siege/Siege.java @@ -502,6 +502,7 @@ public class Siege implements Siegable _isInProgress = true; // Flag so that same siege instance cannot be started again loadSiegeClan(); // Load siege clan from db updatePlayerSiegeStateFlags(false); + updatePlayerSiegeStateFlags(false); // This fixes icons between allies because it first shows as an enemy for unknown reasons teleportPlayer(SiegeTeleportWhoType.NotOwner, TeleportWhereType.TOWN); // Teleport to the closest town _controlTowerCount = 0; spawnControlTower(); // Spawn control tower diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java index 393947e0bd..cfcc530b59 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java @@ -28,28 +28,27 @@ import org.l2jmobius.gameserver.network.OutgoingPackets; */ public class RelationChanged implements IClientOutgoingPacket { - // TODO: Enum - public static final int RELATION_PARTY1 = 0x1; // party member - public static final int RELATION_PARTY2 = 0x2; // party member - public static final int RELATION_PARTY3 = 0x4; // party member - public static final int RELATION_PARTY4 = 0x8; // party member (for information, see Player.getRelation()) - public static final int RELATION_PARTYLEADER = 0x10; // true if is party leader - public static final int RELATION_HAS_PARTY = 0x20; // true if is in party - public static final int RELATION_CLAN_MEMBER = 0x40; // true if is in clan - public static final int RELATION_LEADER = 0x100; // true if is clan leader - public static final int RELATION_CLAN_MATE = 0x200; // true if is in same clan - public static final int RELATION_INSIEGE = 0x400; // true if in siege - public static final int RELATION_ATTACKER = 0x800; // true when attacker - public static final int RELATION_DECLARED_WAR = 0x3000; // single sword - public static final int RELATION_ALLY = 0x4000; // blue siege icon, cannot have if red - public static final int RELATION_MUTUAL_WAR = 0x6000; // double swords - public static final int RELATION_ENEMY = 0x8000; // true when red icon, doesn't matter with blue - public static final int RELATION_ALLY_MEMBER = 0x10000; // clan is in alliance - public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon + public static final int RELATION_PARTY1 = 1; // party member + public static final int RELATION_PARTY2 = 2; // party member + public static final int RELATION_PARTY3 = 4; // party member + public static final int RELATION_PARTY4 = 8; // party member (for information, see Player.getRelation()) + public static final int RELATION_PARTYLEADER = 16; // true if is party leader + public static final int RELATION_HAS_PARTY = 32; // true if is in party + public static final int RELATION_CLAN_MEMBER = 64; // true if is in clan + public static final int RELATION_LEADER = 128; // true if is clan leader + public static final int RELATION_CLAN_MATE = 256; // true if is in same clan + public static final int RELATION_INSIEGE = 512; // true if in siege + public static final int RELATION_ATTACKER = 1024; // true when attacker + public static final int RELATION_ALLY = 2048; // blue siege icon, cannot have if red + public static final int RELATION_ENEMY = 4096; // true when red icon, doesn't matter with blue + public static final int RELATION_DECLARED_WAR = 8192; // single sword + public static final int RELATION_MUTUAL_WAR = 24576; // double swords + public static final int RELATION_ALLY_MEMBER = 65536; // clan is in alliance + public static final int RELATION_TERRITORY_WAR = 524288; // show Territory War icon // Masks - public static final byte SEND_DEFAULT = 0x01; - public static final byte SEND_ONE = 0x02; - public static final byte SEND_MULTI = 0x04; + public static final byte SEND_DEFAULT = 1; + public static final byte SEND_ONE = 2; + public static final byte SEND_MULTI = 4; protected static class Relation { @@ -62,7 +61,7 @@ public class RelationChanged implements IClientOutgoingPacket private Relation _singled; private final List _multi; - private byte _mask = 0x00; + private byte _mask = 0; public RelationChanged(Playable activeChar, long relation, boolean autoattackable) { diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java index 7d19fd9246..d05abc4477 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java @@ -436,23 +436,31 @@ public class UserInfo extends AbstractMaskPacket final Clan clan = player.getClan(); if (party != null) { - relation |= 0x08; // Party member + relation |= 8; // Party member if (party.getLeader() == _player) { - relation |= 0x10; // Party leader + relation |= 16; // Party leader } } if (clan != null) { - relation |= 0x20; // Clan member + + if (player.getSiegeState() == 1) + { + relation |= 256; // Clan member + } + else if (player.getSiegeState() == 2) + { + relation |= 32; // Clan member + } if (clan.getLeaderId() == player.getObjectId()) { - relation |= 0x40; // Clan leader + relation |= 64; // Clan leader } } - if (player.isInSiege()) + if (player.getSiegeState() != 0) { - relation |= 0x80; // In siege + relation |= 128; // In siege } return relation; } diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/siege/Siege.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/siege/Siege.java index 4747943f87..1d6235e4e8 100644 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/siege/Siege.java +++ b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/siege/Siege.java @@ -502,6 +502,7 @@ public class Siege implements Siegable _isInProgress = true; // Flag so that same siege instance cannot be started again loadSiegeClan(); // Load siege clan from db updatePlayerSiegeStateFlags(false); + updatePlayerSiegeStateFlags(false); // This fixes icons between allies because it first shows as an enemy for unknown reasons teleportPlayer(SiegeTeleportWhoType.NotOwner, TeleportWhereType.TOWN); // Teleport to the closest town _controlTowerCount = 0; spawnControlTower(); // Spawn control tower diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java index 393947e0bd..cfcc530b59 100644 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java +++ b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java @@ -28,28 +28,27 @@ import org.l2jmobius.gameserver.network.OutgoingPackets; */ public class RelationChanged implements IClientOutgoingPacket { - // TODO: Enum - public static final int RELATION_PARTY1 = 0x1; // party member - public static final int RELATION_PARTY2 = 0x2; // party member - public static final int RELATION_PARTY3 = 0x4; // party member - public static final int RELATION_PARTY4 = 0x8; // party member (for information, see Player.getRelation()) - public static final int RELATION_PARTYLEADER = 0x10; // true if is party leader - public static final int RELATION_HAS_PARTY = 0x20; // true if is in party - public static final int RELATION_CLAN_MEMBER = 0x40; // true if is in clan - public static final int RELATION_LEADER = 0x100; // true if is clan leader - public static final int RELATION_CLAN_MATE = 0x200; // true if is in same clan - public static final int RELATION_INSIEGE = 0x400; // true if in siege - public static final int RELATION_ATTACKER = 0x800; // true when attacker - public static final int RELATION_DECLARED_WAR = 0x3000; // single sword - public static final int RELATION_ALLY = 0x4000; // blue siege icon, cannot have if red - public static final int RELATION_MUTUAL_WAR = 0x6000; // double swords - public static final int RELATION_ENEMY = 0x8000; // true when red icon, doesn't matter with blue - public static final int RELATION_ALLY_MEMBER = 0x10000; // clan is in alliance - public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon + public static final int RELATION_PARTY1 = 1; // party member + public static final int RELATION_PARTY2 = 2; // party member + public static final int RELATION_PARTY3 = 4; // party member + public static final int RELATION_PARTY4 = 8; // party member (for information, see Player.getRelation()) + public static final int RELATION_PARTYLEADER = 16; // true if is party leader + public static final int RELATION_HAS_PARTY = 32; // true if is in party + public static final int RELATION_CLAN_MEMBER = 64; // true if is in clan + public static final int RELATION_LEADER = 128; // true if is clan leader + public static final int RELATION_CLAN_MATE = 256; // true if is in same clan + public static final int RELATION_INSIEGE = 512; // true if in siege + public static final int RELATION_ATTACKER = 1024; // true when attacker + public static final int RELATION_ALLY = 2048; // blue siege icon, cannot have if red + public static final int RELATION_ENEMY = 4096; // true when red icon, doesn't matter with blue + public static final int RELATION_DECLARED_WAR = 8192; // single sword + public static final int RELATION_MUTUAL_WAR = 24576; // double swords + public static final int RELATION_ALLY_MEMBER = 65536; // clan is in alliance + public static final int RELATION_TERRITORY_WAR = 524288; // show Territory War icon // Masks - public static final byte SEND_DEFAULT = 0x01; - public static final byte SEND_ONE = 0x02; - public static final byte SEND_MULTI = 0x04; + public static final byte SEND_DEFAULT = 1; + public static final byte SEND_ONE = 2; + public static final byte SEND_MULTI = 4; protected static class Relation { @@ -62,7 +61,7 @@ public class RelationChanged implements IClientOutgoingPacket private Relation _singled; private final List _multi; - private byte _mask = 0x00; + private byte _mask = 0; public RelationChanged(Playable activeChar, long relation, boolean autoattackable) { diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java index fcd79453ca..29afb3c74f 100644 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java +++ b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java @@ -438,23 +438,31 @@ public class UserInfo extends AbstractMaskPacket final Clan clan = player.getClan(); if (party != null) { - relation |= 0x08; // Party member + relation |= 8; // Party member if (party.getLeader() == _player) { - relation |= 0x10; // Party leader + relation |= 16; // Party leader } } if (clan != null) { - relation |= 0x20; // Clan member + + if (player.getSiegeState() == 1) + { + relation |= 256; // Clan member + } + else if (player.getSiegeState() == 2) + { + relation |= 32; // Clan member + } if (clan.getLeaderId() == player.getObjectId()) { - relation |= 0x40; // Clan leader + relation |= 64; // Clan leader } } - if (player.isInSiege()) + if (player.getSiegeState() != 0) { - relation |= 0x80; // In siege + relation |= 128; // In siege } return relation; } diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/siege/Siege.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/siege/Siege.java index 4747943f87..1d6235e4e8 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/siege/Siege.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/siege/Siege.java @@ -502,6 +502,7 @@ public class Siege implements Siegable _isInProgress = true; // Flag so that same siege instance cannot be started again loadSiegeClan(); // Load siege clan from db updatePlayerSiegeStateFlags(false); + updatePlayerSiegeStateFlags(false); // This fixes icons between allies because it first shows as an enemy for unknown reasons teleportPlayer(SiegeTeleportWhoType.NotOwner, TeleportWhereType.TOWN); // Teleport to the closest town _controlTowerCount = 0; spawnControlTower(); // Spawn control tower diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java index 393947e0bd..cfcc530b59 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java @@ -28,28 +28,27 @@ import org.l2jmobius.gameserver.network.OutgoingPackets; */ public class RelationChanged implements IClientOutgoingPacket { - // TODO: Enum - public static final int RELATION_PARTY1 = 0x1; // party member - public static final int RELATION_PARTY2 = 0x2; // party member - public static final int RELATION_PARTY3 = 0x4; // party member - public static final int RELATION_PARTY4 = 0x8; // party member (for information, see Player.getRelation()) - public static final int RELATION_PARTYLEADER = 0x10; // true if is party leader - public static final int RELATION_HAS_PARTY = 0x20; // true if is in party - public static final int RELATION_CLAN_MEMBER = 0x40; // true if is in clan - public static final int RELATION_LEADER = 0x100; // true if is clan leader - public static final int RELATION_CLAN_MATE = 0x200; // true if is in same clan - public static final int RELATION_INSIEGE = 0x400; // true if in siege - public static final int RELATION_ATTACKER = 0x800; // true when attacker - public static final int RELATION_DECLARED_WAR = 0x3000; // single sword - public static final int RELATION_ALLY = 0x4000; // blue siege icon, cannot have if red - public static final int RELATION_MUTUAL_WAR = 0x6000; // double swords - public static final int RELATION_ENEMY = 0x8000; // true when red icon, doesn't matter with blue - public static final int RELATION_ALLY_MEMBER = 0x10000; // clan is in alliance - public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon + public static final int RELATION_PARTY1 = 1; // party member + public static final int RELATION_PARTY2 = 2; // party member + public static final int RELATION_PARTY3 = 4; // party member + public static final int RELATION_PARTY4 = 8; // party member (for information, see Player.getRelation()) + public static final int RELATION_PARTYLEADER = 16; // true if is party leader + public static final int RELATION_HAS_PARTY = 32; // true if is in party + public static final int RELATION_CLAN_MEMBER = 64; // true if is in clan + public static final int RELATION_LEADER = 128; // true if is clan leader + public static final int RELATION_CLAN_MATE = 256; // true if is in same clan + public static final int RELATION_INSIEGE = 512; // true if in siege + public static final int RELATION_ATTACKER = 1024; // true when attacker + public static final int RELATION_ALLY = 2048; // blue siege icon, cannot have if red + public static final int RELATION_ENEMY = 4096; // true when red icon, doesn't matter with blue + public static final int RELATION_DECLARED_WAR = 8192; // single sword + public static final int RELATION_MUTUAL_WAR = 24576; // double swords + public static final int RELATION_ALLY_MEMBER = 65536; // clan is in alliance + public static final int RELATION_TERRITORY_WAR = 524288; // show Territory War icon // Masks - public static final byte SEND_DEFAULT = 0x01; - public static final byte SEND_ONE = 0x02; - public static final byte SEND_MULTI = 0x04; + public static final byte SEND_DEFAULT = 1; + public static final byte SEND_ONE = 2; + public static final byte SEND_MULTI = 4; protected static class Relation { @@ -62,7 +61,7 @@ public class RelationChanged implements IClientOutgoingPacket private Relation _singled; private final List _multi; - private byte _mask = 0x00; + private byte _mask = 0; public RelationChanged(Playable activeChar, long relation, boolean autoattackable) { diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java index a9d396a29a..bd8231a9e0 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java @@ -445,23 +445,31 @@ public class UserInfo extends AbstractMaskPacket final Clan clan = player.getClan(); if (party != null) { - relation |= 0x08; // Party member + relation |= 8; // Party member if (party.getLeader() == _player) { - relation |= 0x10; // Party leader + relation |= 16; // Party leader } } if (clan != null) { - relation |= 0x20; // Clan member + + if (player.getSiegeState() == 1) + { + relation |= 256; // Clan member + } + else if (player.getSiegeState() == 2) + { + relation |= 32; // Clan member + } if (clan.getLeaderId() == player.getObjectId()) { - relation |= 0x40; // Clan leader + relation |= 64; // Clan leader } } - if (player.isInSiege()) + if (player.getSiegeState() != 0) { - relation |= 0x80; // In siege + relation |= 128; // In siege } return relation; } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/siege/Siege.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/siege/Siege.java index c53db37e26..feca8398c4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/siege/Siege.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/siege/Siege.java @@ -502,6 +502,7 @@ public class Siege implements Siegable _isInProgress = true; // Flag so that same siege instance cannot be started again loadSiegeClan(); // Load siege clan from db updatePlayerSiegeStateFlags(false); + updatePlayerSiegeStateFlags(false); // This fixes icons between allies because it first shows as an enemy for unknown reasons teleportPlayer(SiegeTeleportWhoType.NotOwner, TeleportWhereType.TOWN); // Teleport to the closest town _controlTowerCount = 0; spawnControlTower(); // Spawn control tower diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java index 393947e0bd..cfcc530b59 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java @@ -28,28 +28,27 @@ import org.l2jmobius.gameserver.network.OutgoingPackets; */ public class RelationChanged implements IClientOutgoingPacket { - // TODO: Enum - public static final int RELATION_PARTY1 = 0x1; // party member - public static final int RELATION_PARTY2 = 0x2; // party member - public static final int RELATION_PARTY3 = 0x4; // party member - public static final int RELATION_PARTY4 = 0x8; // party member (for information, see Player.getRelation()) - public static final int RELATION_PARTYLEADER = 0x10; // true if is party leader - public static final int RELATION_HAS_PARTY = 0x20; // true if is in party - public static final int RELATION_CLAN_MEMBER = 0x40; // true if is in clan - public static final int RELATION_LEADER = 0x100; // true if is clan leader - public static final int RELATION_CLAN_MATE = 0x200; // true if is in same clan - public static final int RELATION_INSIEGE = 0x400; // true if in siege - public static final int RELATION_ATTACKER = 0x800; // true when attacker - public static final int RELATION_DECLARED_WAR = 0x3000; // single sword - public static final int RELATION_ALLY = 0x4000; // blue siege icon, cannot have if red - public static final int RELATION_MUTUAL_WAR = 0x6000; // double swords - public static final int RELATION_ENEMY = 0x8000; // true when red icon, doesn't matter with blue - public static final int RELATION_ALLY_MEMBER = 0x10000; // clan is in alliance - public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon + public static final int RELATION_PARTY1 = 1; // party member + public static final int RELATION_PARTY2 = 2; // party member + public static final int RELATION_PARTY3 = 4; // party member + public static final int RELATION_PARTY4 = 8; // party member (for information, see Player.getRelation()) + public static final int RELATION_PARTYLEADER = 16; // true if is party leader + public static final int RELATION_HAS_PARTY = 32; // true if is in party + public static final int RELATION_CLAN_MEMBER = 64; // true if is in clan + public static final int RELATION_LEADER = 128; // true if is clan leader + public static final int RELATION_CLAN_MATE = 256; // true if is in same clan + public static final int RELATION_INSIEGE = 512; // true if in siege + public static final int RELATION_ATTACKER = 1024; // true when attacker + public static final int RELATION_ALLY = 2048; // blue siege icon, cannot have if red + public static final int RELATION_ENEMY = 4096; // true when red icon, doesn't matter with blue + public static final int RELATION_DECLARED_WAR = 8192; // single sword + public static final int RELATION_MUTUAL_WAR = 24576; // double swords + public static final int RELATION_ALLY_MEMBER = 65536; // clan is in alliance + public static final int RELATION_TERRITORY_WAR = 524288; // show Territory War icon // Masks - public static final byte SEND_DEFAULT = 0x01; - public static final byte SEND_ONE = 0x02; - public static final byte SEND_MULTI = 0x04; + public static final byte SEND_DEFAULT = 1; + public static final byte SEND_ONE = 2; + public static final byte SEND_MULTI = 4; protected static class Relation { @@ -62,7 +61,7 @@ public class RelationChanged implements IClientOutgoingPacket private Relation _singled; private final List _multi; - private byte _mask = 0x00; + private byte _mask = 0; public RelationChanged(Playable activeChar, long relation, boolean autoattackable) { diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java index d89d0e6085..0f8618bb04 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java @@ -440,23 +440,31 @@ public class UserInfo extends AbstractMaskPacket final Clan clan = player.getClan(); if (party != null) { - relation |= 0x08; // Party member + relation |= 8; // Party member if (party.getLeader() == _player) { - relation |= 0x10; // Party leader + relation |= 16; // Party leader } } if (clan != null) { - relation |= 0x20; // Clan member + + if (player.getSiegeState() == 1) + { + relation |= 256; // Clan member + } + else if (player.getSiegeState() == 2) + { + relation |= 32; // Clan member + } if (clan.getLeaderId() == player.getObjectId()) { - relation |= 0x40; // Clan leader + relation |= 64; // Clan leader } } - if (player.isInSiege()) + if (player.getSiegeState() != 0) { - relation |= 0x80; // In siege + relation |= 128; // In siege } return relation; } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/siege/Siege.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/siege/Siege.java index c53db37e26..feca8398c4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/siege/Siege.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/siege/Siege.java @@ -502,6 +502,7 @@ public class Siege implements Siegable _isInProgress = true; // Flag so that same siege instance cannot be started again loadSiegeClan(); // Load siege clan from db updatePlayerSiegeStateFlags(false); + updatePlayerSiegeStateFlags(false); // This fixes icons between allies because it first shows as an enemy for unknown reasons teleportPlayer(SiegeTeleportWhoType.NotOwner, TeleportWhereType.TOWN); // Teleport to the closest town _controlTowerCount = 0; spawnControlTower(); // Spawn control tower diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java index 393947e0bd..cfcc530b59 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java @@ -28,28 +28,27 @@ import org.l2jmobius.gameserver.network.OutgoingPackets; */ public class RelationChanged implements IClientOutgoingPacket { - // TODO: Enum - public static final int RELATION_PARTY1 = 0x1; // party member - public static final int RELATION_PARTY2 = 0x2; // party member - public static final int RELATION_PARTY3 = 0x4; // party member - public static final int RELATION_PARTY4 = 0x8; // party member (for information, see Player.getRelation()) - public static final int RELATION_PARTYLEADER = 0x10; // true if is party leader - public static final int RELATION_HAS_PARTY = 0x20; // true if is in party - public static final int RELATION_CLAN_MEMBER = 0x40; // true if is in clan - public static final int RELATION_LEADER = 0x100; // true if is clan leader - public static final int RELATION_CLAN_MATE = 0x200; // true if is in same clan - public static final int RELATION_INSIEGE = 0x400; // true if in siege - public static final int RELATION_ATTACKER = 0x800; // true when attacker - public static final int RELATION_DECLARED_WAR = 0x3000; // single sword - public static final int RELATION_ALLY = 0x4000; // blue siege icon, cannot have if red - public static final int RELATION_MUTUAL_WAR = 0x6000; // double swords - public static final int RELATION_ENEMY = 0x8000; // true when red icon, doesn't matter with blue - public static final int RELATION_ALLY_MEMBER = 0x10000; // clan is in alliance - public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon + public static final int RELATION_PARTY1 = 1; // party member + public static final int RELATION_PARTY2 = 2; // party member + public static final int RELATION_PARTY3 = 4; // party member + public static final int RELATION_PARTY4 = 8; // party member (for information, see Player.getRelation()) + public static final int RELATION_PARTYLEADER = 16; // true if is party leader + public static final int RELATION_HAS_PARTY = 32; // true if is in party + public static final int RELATION_CLAN_MEMBER = 64; // true if is in clan + public static final int RELATION_LEADER = 128; // true if is clan leader + public static final int RELATION_CLAN_MATE = 256; // true if is in same clan + public static final int RELATION_INSIEGE = 512; // true if in siege + public static final int RELATION_ATTACKER = 1024; // true when attacker + public static final int RELATION_ALLY = 2048; // blue siege icon, cannot have if red + public static final int RELATION_ENEMY = 4096; // true when red icon, doesn't matter with blue + public static final int RELATION_DECLARED_WAR = 8192; // single sword + public static final int RELATION_MUTUAL_WAR = 24576; // double swords + public static final int RELATION_ALLY_MEMBER = 65536; // clan is in alliance + public static final int RELATION_TERRITORY_WAR = 524288; // show Territory War icon // Masks - public static final byte SEND_DEFAULT = 0x01; - public static final byte SEND_ONE = 0x02; - public static final byte SEND_MULTI = 0x04; + public static final byte SEND_DEFAULT = 1; + public static final byte SEND_ONE = 2; + public static final byte SEND_MULTI = 4; protected static class Relation { @@ -62,7 +61,7 @@ public class RelationChanged implements IClientOutgoingPacket private Relation _singled; private final List _multi; - private byte _mask = 0x00; + private byte _mask = 0; public RelationChanged(Playable activeChar, long relation, boolean autoattackable) { diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java index d89d0e6085..0f8618bb04 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java @@ -440,23 +440,31 @@ public class UserInfo extends AbstractMaskPacket final Clan clan = player.getClan(); if (party != null) { - relation |= 0x08; // Party member + relation |= 8; // Party member if (party.getLeader() == _player) { - relation |= 0x10; // Party leader + relation |= 16; // Party leader } } if (clan != null) { - relation |= 0x20; // Clan member + + if (player.getSiegeState() == 1) + { + relation |= 256; // Clan member + } + else if (player.getSiegeState() == 2) + { + relation |= 32; // Clan member + } if (clan.getLeaderId() == player.getObjectId()) { - relation |= 0x40; // Clan leader + relation |= 64; // Clan leader } } - if (player.isInSiege()) + if (player.getSiegeState() != 0) { - relation |= 0x80; // In siege + relation |= 128; // In siege } return relation; } diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/siege/Siege.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/siege/Siege.java index c53db37e26..feca8398c4 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/siege/Siege.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/siege/Siege.java @@ -502,6 +502,7 @@ public class Siege implements Siegable _isInProgress = true; // Flag so that same siege instance cannot be started again loadSiegeClan(); // Load siege clan from db updatePlayerSiegeStateFlags(false); + updatePlayerSiegeStateFlags(false); // This fixes icons between allies because it first shows as an enemy for unknown reasons teleportPlayer(SiegeTeleportWhoType.NotOwner, TeleportWhereType.TOWN); // Teleport to the closest town _controlTowerCount = 0; spawnControlTower(); // Spawn control tower diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java index 393947e0bd..cfcc530b59 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java @@ -28,28 +28,27 @@ import org.l2jmobius.gameserver.network.OutgoingPackets; */ public class RelationChanged implements IClientOutgoingPacket { - // TODO: Enum - public static final int RELATION_PARTY1 = 0x1; // party member - public static final int RELATION_PARTY2 = 0x2; // party member - public static final int RELATION_PARTY3 = 0x4; // party member - public static final int RELATION_PARTY4 = 0x8; // party member (for information, see Player.getRelation()) - public static final int RELATION_PARTYLEADER = 0x10; // true if is party leader - public static final int RELATION_HAS_PARTY = 0x20; // true if is in party - public static final int RELATION_CLAN_MEMBER = 0x40; // true if is in clan - public static final int RELATION_LEADER = 0x100; // true if is clan leader - public static final int RELATION_CLAN_MATE = 0x200; // true if is in same clan - public static final int RELATION_INSIEGE = 0x400; // true if in siege - public static final int RELATION_ATTACKER = 0x800; // true when attacker - public static final int RELATION_DECLARED_WAR = 0x3000; // single sword - public static final int RELATION_ALLY = 0x4000; // blue siege icon, cannot have if red - public static final int RELATION_MUTUAL_WAR = 0x6000; // double swords - public static final int RELATION_ENEMY = 0x8000; // true when red icon, doesn't matter with blue - public static final int RELATION_ALLY_MEMBER = 0x10000; // clan is in alliance - public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon + public static final int RELATION_PARTY1 = 1; // party member + public static final int RELATION_PARTY2 = 2; // party member + public static final int RELATION_PARTY3 = 4; // party member + public static final int RELATION_PARTY4 = 8; // party member (for information, see Player.getRelation()) + public static final int RELATION_PARTYLEADER = 16; // true if is party leader + public static final int RELATION_HAS_PARTY = 32; // true if is in party + public static final int RELATION_CLAN_MEMBER = 64; // true if is in clan + public static final int RELATION_LEADER = 128; // true if is clan leader + public static final int RELATION_CLAN_MATE = 256; // true if is in same clan + public static final int RELATION_INSIEGE = 512; // true if in siege + public static final int RELATION_ATTACKER = 1024; // true when attacker + public static final int RELATION_ALLY = 2048; // blue siege icon, cannot have if red + public static final int RELATION_ENEMY = 4096; // true when red icon, doesn't matter with blue + public static final int RELATION_DECLARED_WAR = 8192; // single sword + public static final int RELATION_MUTUAL_WAR = 24576; // double swords + public static final int RELATION_ALLY_MEMBER = 65536; // clan is in alliance + public static final int RELATION_TERRITORY_WAR = 524288; // show Territory War icon // Masks - public static final byte SEND_DEFAULT = 0x01; - public static final byte SEND_ONE = 0x02; - public static final byte SEND_MULTI = 0x04; + public static final byte SEND_DEFAULT = 1; + public static final byte SEND_ONE = 2; + public static final byte SEND_MULTI = 4; protected static class Relation { @@ -62,7 +61,7 @@ public class RelationChanged implements IClientOutgoingPacket private Relation _singled; private final List _multi; - private byte _mask = 0x00; + private byte _mask = 0; public RelationChanged(Playable activeChar, long relation, boolean autoattackable) { diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java index 001ef54552..911642acb3 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java @@ -442,23 +442,31 @@ public class UserInfo extends AbstractMaskPacket final Clan clan = player.getClan(); if (party != null) { - relation |= 0x08; // Party member + relation |= 8; // Party member if (party.getLeader() == _player) { - relation |= 0x10; // Party leader + relation |= 16; // Party leader } } if (clan != null) { - relation |= 0x20; // Clan member + + if (player.getSiegeState() == 1) + { + relation |= 256; // Clan member + } + else if (player.getSiegeState() == 2) + { + relation |= 32; // Clan member + } if (clan.getLeaderId() == player.getObjectId()) { - relation |= 0x40; // Clan leader + relation |= 64; // Clan leader } } - if (player.isInSiege()) + if (player.getSiegeState() != 0) { - relation |= 0x80; // In siege + relation |= 128; // In siege } return relation; } diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/siege/Siege.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/siege/Siege.java index c53db37e26..feca8398c4 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/siege/Siege.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/siege/Siege.java @@ -502,6 +502,7 @@ public class Siege implements Siegable _isInProgress = true; // Flag so that same siege instance cannot be started again loadSiegeClan(); // Load siege clan from db updatePlayerSiegeStateFlags(false); + updatePlayerSiegeStateFlags(false); // This fixes icons between allies because it first shows as an enemy for unknown reasons teleportPlayer(SiegeTeleportWhoType.NotOwner, TeleportWhereType.TOWN); // Teleport to the closest town _controlTowerCount = 0; spawnControlTower(); // Spawn control tower diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java index 393947e0bd..cfcc530b59 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/RelationChanged.java @@ -28,28 +28,27 @@ import org.l2jmobius.gameserver.network.OutgoingPackets; */ public class RelationChanged implements IClientOutgoingPacket { - // TODO: Enum - public static final int RELATION_PARTY1 = 0x1; // party member - public static final int RELATION_PARTY2 = 0x2; // party member - public static final int RELATION_PARTY3 = 0x4; // party member - public static final int RELATION_PARTY4 = 0x8; // party member (for information, see Player.getRelation()) - public static final int RELATION_PARTYLEADER = 0x10; // true if is party leader - public static final int RELATION_HAS_PARTY = 0x20; // true if is in party - public static final int RELATION_CLAN_MEMBER = 0x40; // true if is in clan - public static final int RELATION_LEADER = 0x100; // true if is clan leader - public static final int RELATION_CLAN_MATE = 0x200; // true if is in same clan - public static final int RELATION_INSIEGE = 0x400; // true if in siege - public static final int RELATION_ATTACKER = 0x800; // true when attacker - public static final int RELATION_DECLARED_WAR = 0x3000; // single sword - public static final int RELATION_ALLY = 0x4000; // blue siege icon, cannot have if red - public static final int RELATION_MUTUAL_WAR = 0x6000; // double swords - public static final int RELATION_ENEMY = 0x8000; // true when red icon, doesn't matter with blue - public static final int RELATION_ALLY_MEMBER = 0x10000; // clan is in alliance - public static final int RELATION_TERRITORY_WAR = 0x80000; // show Territory War icon + public static final int RELATION_PARTY1 = 1; // party member + public static final int RELATION_PARTY2 = 2; // party member + public static final int RELATION_PARTY3 = 4; // party member + public static final int RELATION_PARTY4 = 8; // party member (for information, see Player.getRelation()) + public static final int RELATION_PARTYLEADER = 16; // true if is party leader + public static final int RELATION_HAS_PARTY = 32; // true if is in party + public static final int RELATION_CLAN_MEMBER = 64; // true if is in clan + public static final int RELATION_LEADER = 128; // true if is clan leader + public static final int RELATION_CLAN_MATE = 256; // true if is in same clan + public static final int RELATION_INSIEGE = 512; // true if in siege + public static final int RELATION_ATTACKER = 1024; // true when attacker + public static final int RELATION_ALLY = 2048; // blue siege icon, cannot have if red + public static final int RELATION_ENEMY = 4096; // true when red icon, doesn't matter with blue + public static final int RELATION_DECLARED_WAR = 8192; // single sword + public static final int RELATION_MUTUAL_WAR = 24576; // double swords + public static final int RELATION_ALLY_MEMBER = 65536; // clan is in alliance + public static final int RELATION_TERRITORY_WAR = 524288; // show Territory War icon // Masks - public static final byte SEND_DEFAULT = 0x01; - public static final byte SEND_ONE = 0x02; - public static final byte SEND_MULTI = 0x04; + public static final byte SEND_DEFAULT = 1; + public static final byte SEND_ONE = 2; + public static final byte SEND_MULTI = 4; protected static class Relation { @@ -62,7 +61,7 @@ public class RelationChanged implements IClientOutgoingPacket private Relation _singled; private final List _multi; - private byte _mask = 0x00; + private byte _mask = 0; public RelationChanged(Playable activeChar, long relation, boolean autoattackable) { diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java index 293feb64f1..f791f99f2a 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java @@ -447,23 +447,31 @@ public class UserInfo extends AbstractMaskPacket final Clan clan = player.getClan(); if (party != null) { - relation |= 0x08; // Party member + relation |= 8; // Party member if (party.getLeader() == _player) { - relation |= 0x10; // Party leader + relation |= 16; // Party leader } } if (clan != null) { - relation |= 0x20; // Clan member + + if (player.getSiegeState() == 1) + { + relation |= 256; // Clan member + } + else if (player.getSiegeState() == 2) + { + relation |= 32; // Clan member + } if (clan.getLeaderId() == player.getObjectId()) { - relation |= 0x40; // Clan leader + relation |= 64; // Clan leader } } - if (player.isInSiege()) + if (player.getSiegeState() != 0) { - relation |= 0x80; // In siege + relation |= 128; // In siege } return relation; }