Fixed player join clan with penalty from clan entry application.
Contributed by Enryu.
This commit is contained in:
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_WILL_BE_ABLE_TO_JOIN_YOUR_CLAN_IN_24_H_AFTER_LEAVING_THE_PREVIOUS_ONE);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_WILL_BE_ABLE_TO_JOIN_YOUR_CLAN_IN_24_H_AFTER_LEAVING_THE_PREVIOUS_ONE);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_CANNOT_JOIN_THE_CLAN_BECAUSE_ONE_DAY_HAS_NOT_YET_PASSED_SINCE_THEY_LEFT_ANOTHER_CLAN);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -106,12 +114,19 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_WILL_BE_ABLE_TO_JOIN_YOUR_CLAN_IN_24_H_AFTER_LEAVING_THE_PREVIOUS_ONE);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -104,15 +112,22 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
// This activates the clan tab on the new member.
|
// This activates the clan tab on the new member.
|
||||||
PledgeShowMemberListAll.sendAllTo(target);
|
PledgeShowMemberListAll.sendAllTo(target);
|
||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
player.setClanJoinTime(System.currentTimeMillis());
|
player.setClanJoinTime(currentTime);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_WILL_BE_ABLE_TO_JOIN_YOUR_CLAN_IN_24_H_AFTER_LEAVING_THE_PREVIOUS_ONE);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -104,15 +112,22 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
// This activates the clan tab on the new member.
|
// This activates the clan tab on the new member.
|
||||||
PledgeShowMemberListAll.sendAllTo(target);
|
PledgeShowMemberListAll.sendAllTo(target);
|
||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
player.setClanJoinTime(System.currentTimeMillis());
|
player.setClanJoinTime(currentTime);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_WILL_BE_ABLE_TO_JOIN_YOUR_CLAN_IN_24_H_AFTER_LEAVING_THE_PREVIOUS_ONE);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -41,14 +41,13 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
private boolean _acceptRequest;
|
private boolean _acceptRequest;
|
||||||
private int _playerId;
|
private int _playerId;
|
||||||
private int _clanId;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean read(GameClient client, PacketReader packet)
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
{
|
{
|
||||||
_acceptRequest = packet.readD() == 1;
|
_acceptRequest = packet.readD() == 1;
|
||||||
_playerId = packet.readD();
|
_playerId = packet.readD();
|
||||||
_clanId = packet.readD();
|
packet.readD(); // Clan Id.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,16 +55,25 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
public void run(GameClient client)
|
public void run(GameClient client)
|
||||||
{
|
{
|
||||||
final Player player = client.getPlayer();
|
final Player player = client.getPlayer();
|
||||||
if ((player == null) || (player.getClan() == null))
|
if (player == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final Clan clan = player.getClan();
|
||||||
|
if (clan == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int clanId = clan.getId();
|
||||||
if (_acceptRequest)
|
if (_acceptRequest)
|
||||||
{
|
{
|
||||||
final Player target = World.getInstance().getPlayer(_playerId);
|
final Player target = World.getInstance().getPlayer(_playerId);
|
||||||
final Clan clan = player.getClan();
|
if (target != null)
|
||||||
if ((target != null) && (target.getClan() == null) && (clan != null))
|
{
|
||||||
|
final long currentTime = System.currentTimeMillis();
|
||||||
|
if ((target.getClan() == null) && (target.getClanJoinExpiryTime() < currentTime))
|
||||||
{
|
{
|
||||||
target.sendPacket(new JoinPledge(clan.getId()));
|
target.sendPacket(new JoinPledge(clan.getId()));
|
||||||
|
|
||||||
@@ -104,15 +112,22 @@ public class RequestPledgeWaitingUserAccept implements IClientIncomingPacket
|
|||||||
// This activates the clan tab on the new member.
|
// This activates the clan tab on the new member.
|
||||||
PledgeShowMemberListAll.sendAllTo(target);
|
PledgeShowMemberListAll.sendAllTo(target);
|
||||||
target.setClanJoinExpiryTime(0);
|
target.setClanJoinExpiryTime(0);
|
||||||
player.setClanJoinTime(System.currentTimeMillis());
|
player.setClanJoinTime(currentTime);
|
||||||
target.broadcastUserInfo();
|
target.broadcastUserInfo();
|
||||||
|
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
|
}
|
||||||
|
else if (target.getClanJoinExpiryTime() > currentTime)
|
||||||
|
{
|
||||||
|
final SystemMessage sm = new SystemMessage(SystemMessageId.C1_WILL_BE_ABLE_TO_JOIN_YOUR_CLAN_IN_24_H_AFTER_LEAVING_THE_PREVIOUS_ONE);
|
||||||
|
sm.addString(target.getName());
|
||||||
|
player.sendPacket(sm);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ClanEntryManager.getInstance().removePlayerApplication(_clanId, _playerId);
|
ClanEntryManager.getInstance().removePlayerApplication(clanId, _playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user