Show castle icon on chat.

This commit is contained in:
MobiusDevelopment 2020-01-02 00:37:44 +00:00
parent e85db6c835
commit 2afcbf6bd6
2 changed files with 22 additions and 4 deletions

View File

@ -198,9 +198,9 @@ public class CreatureSay implements IClientOutgoingPacket
final PlayerInstance player = World.getInstance().getPlayer(_objectId); final PlayerInstance player = World.getInstance().getPlayer(_objectId);
if (player != null) if (player != null)
{ {
if (((_chatType == ChatType.CLAN) || (_chatType == ChatType.ALLIANCE)) && (player.getClan() != null)) if ((player.getClan() != null) && ((_chatType == ChatType.CLAN) || (_chatType == ChatType.ALLIANCE)))
{ {
packet.writeC(player.getClan().getCastleId()); packet.writeC(0); // unknown clan byte
} }
final int rank = RankManager.getInstance().getPlayerGlobalRank(player); final int rank = RankManager.getInstance().getPlayerGlobalRank(player);
@ -220,6 +220,15 @@ public class CreatureSay implements IClientOutgoingPacket
{ {
packet.writeC(3); packet.writeC(3);
} }
if (player.getClan() != null)
{
packet.writeC(player.getClan().getCastleId());
}
else
{
packet.writeC(0);
}
} }
else else
{ {

View File

@ -198,9 +198,9 @@ public class CreatureSay implements IClientOutgoingPacket
final PlayerInstance player = World.getInstance().getPlayer(_objectId); final PlayerInstance player = World.getInstance().getPlayer(_objectId);
if (player != null) if (player != null)
{ {
if (((_chatType == ChatType.CLAN) || (_chatType == ChatType.ALLIANCE)) && (player.getClan() != null)) if ((player.getClan() != null) && ((_chatType == ChatType.CLAN) || (_chatType == ChatType.ALLIANCE)))
{ {
packet.writeC(player.getClan().getCastleId()); packet.writeC(0); // unknown clan byte
} }
final int rank = RankManager.getInstance().getPlayerGlobalRank(player); final int rank = RankManager.getInstance().getPlayerGlobalRank(player);
@ -220,6 +220,15 @@ public class CreatureSay implements IClientOutgoingPacket
{ {
packet.writeC(3); packet.writeC(3);
} }
if (player.getClan() != null)
{
packet.writeC(player.getClan().getCastleId());
}
else
{
packet.writeC(0);
}
} }
else else
{ {