|
@@ -64,7 +64,7 @@ public class Siege implements Siegable
|
|
{
|
|
{
|
|
protected static final Logger _log = Logger.getLogger(Siege.class.getName());
|
|
protected static final Logger _log = Logger.getLogger(Siege.class.getName());
|
|
|
|
|
|
- private static List<SiegeListener> siegeListeners = new FastList<SiegeListener>().shared();
|
|
|
|
|
|
+ private static final List<SiegeListener> siegeListeners = new FastList<SiegeListener>().shared();
|
|
|
|
|
|
// typeId's
|
|
// typeId's
|
|
public static final byte OWNER = -1;
|
|
public static final byte OWNER = -1;
|
|
@@ -188,7 +188,7 @@ public class Siege implements Siegable
|
|
else if ((timeRemaining <= 86400000) && (timeRemaining > 13600000))
|
|
else if ((timeRemaining <= 86400000) && (timeRemaining > 13600000))
|
|
{
|
|
{
|
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.REGISTRATION_TERM_FOR_S1_ENDED);
|
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.REGISTRATION_TERM_FOR_S1_ENDED);
|
|
- sm.addString(getCastle().getName());
|
|
|
|
|
|
+ sm.addCastleId(getCastle().getCastleId());
|
|
Announcements.getInstance().announceToAll(sm);
|
|
Announcements.getInstance().announceToAll(sm);
|
|
_isRegistrationOver = true;
|
|
_isRegistrationOver = true;
|
|
clearSiegeWaitingClan();
|
|
clearSiegeWaitingClan();
|
|
@@ -253,7 +253,7 @@ public class Siege implements Siegable
|
|
if (getIsInProgress())
|
|
if (getIsInProgress())
|
|
{
|
|
{
|
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.SIEGE_OF_S1_HAS_ENDED);
|
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.SIEGE_OF_S1_HAS_ENDED);
|
|
- sm.addString(getCastle().getName());
|
|
|
|
|
|
+ sm.addCastleId(getCastle().getCastleId());
|
|
Announcements.getInstance().announceToAll(sm);
|
|
Announcements.getInstance().announceToAll(sm);
|
|
|
|
|
|
if (getCastle().getOwnerId() > 0)
|
|
if (getCastle().getOwnerId() > 0)
|
|
@@ -261,7 +261,7 @@ public class Siege implements Siegable
|
|
L2Clan clan = ClanTable.getInstance().getClan(getCastle().getOwnerId());
|
|
L2Clan clan = ClanTable.getInstance().getClan(getCastle().getOwnerId());
|
|
sm = SystemMessage.getSystemMessage(SystemMessageId.CLAN_S1_VICTORIOUS_OVER_S2_S_SIEGE);
|
|
sm = SystemMessage.getSystemMessage(SystemMessageId.CLAN_S1_VICTORIOUS_OVER_S2_S_SIEGE);
|
|
sm.addString(clan.getName());
|
|
sm.addString(clan.getName());
|
|
- sm.addString(getCastle().getName());
|
|
|
|
|
|
+ sm.addCastleId(getCastle().getCastleId());
|
|
Announcements.getInstance().announceToAll(sm);
|
|
Announcements.getInstance().announceToAll(sm);
|
|
|
|
|
|
if (clan.getClanId() == _firstOwnerClanId)
|
|
if (clan.getClanId() == _firstOwnerClanId)
|
|
@@ -291,7 +291,7 @@ public class Siege implements Siegable
|
|
else
|
|
else
|
|
{
|
|
{
|
|
sm = SystemMessage.getSystemMessage(SystemMessageId.SIEGE_S1_DRAW);
|
|
sm = SystemMessage.getSystemMessage(SystemMessageId.SIEGE_S1_DRAW);
|
|
- sm.addString(getCastle().getName());
|
|
|
|
|
|
+ sm.addCastleId(getCastle().getCastleId());
|
|
Announcements.getInstance().announceToAll(sm);
|
|
Announcements.getInstance().announceToAll(sm);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -458,7 +458,7 @@ public class Siege implements Siegable
|
|
sm = SystemMessage.getSystemMessage(SystemMessageId.SIEGE_OF_S1_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_INTEREST);
|
|
sm = SystemMessage.getSystemMessage(SystemMessageId.SIEGE_OF_S1_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_INTEREST);
|
|
else
|
|
else
|
|
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_SIEGE_WAS_CANCELED_BECAUSE_NO_CLANS_PARTICIPATED);
|
|
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_SIEGE_WAS_CANCELED_BECAUSE_NO_CLANS_PARTICIPATED);
|
|
- sm.addString(getCastle().getName());
|
|
|
|
|
|
+ sm.addCastleId(getCastle().getCastleId());
|
|
Announcements.getInstance().announceToAll(sm);
|
|
Announcements.getInstance().announceToAll(sm);
|
|
saveCastleSiege();
|
|
saveCastleSiege();
|
|
return;
|
|
return;
|
|
@@ -488,7 +488,7 @@ public class Siege implements Siegable
|
|
ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleEndSiegeTask(getCastle()), 1000); // Prepare auto end task
|
|
ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleEndSiegeTask(getCastle()), 1000); // Prepare auto end task
|
|
|
|
|
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.SIEGE_OF_S1_HAS_STARTED);
|
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.SIEGE_OF_S1_HAS_STARTED);
|
|
- sm.addString(getCastle().getName());
|
|
|
|
|
|
+ sm.addCastleId(getCastle().getCastleId());
|
|
Announcements.getInstance().announceToAll(sm);
|
|
Announcements.getInstance().announceToAll(sm);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1049,7 +1049,7 @@ public class Siege implements Siegable
|
|
if (getIsRegistrationOver())
|
|
if (getIsRegistrationOver())
|
|
{
|
|
{
|
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.DEADLINE_FOR_SIEGE_S1_PASSED);
|
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.DEADLINE_FOR_SIEGE_S1_PASSED);
|
|
- sm.addString(getCastle().getName());
|
|
|
|
|
|
+ sm.addCastleId(getCastle().getCastleId());
|
|
player.sendPacket(sm);
|
|
player.sendPacket(sm);
|
|
}
|
|
}
|
|
else if (getIsInProgress())
|
|
else if (getIsInProgress())
|
|
@@ -1359,7 +1359,7 @@ public class Siege implements Siegable
|
|
getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);
|
|
getCastle().getSiegeDate().add(Calendar.DAY_OF_MONTH, 7);
|
|
|
|
|
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_ANNOUNCED_SIEGE_TIME);
|
|
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_ANNOUNCED_SIEGE_TIME);
|
|
- sm.addString(getCastle().getName());
|
|
|
|
|
|
+ sm.addCastleId(getCastle().getCastleId());
|
|
Announcements.getInstance().announceToAll(sm);
|
|
Announcements.getInstance().announceToAll(sm);
|
|
|
|
|
|
_isRegistrationOver = false; // Allow registration for next siege
|
|
_isRegistrationOver = false; // Allow registration for next siege
|