Added missing final modifiers.

This commit is contained in:
MobiusDev
2015-12-26 12:03:36 +00:00
parent cc92e5d062
commit e0d681a17e
974 changed files with 5919 additions and 5917 deletions

View File

@@ -106,7 +106,7 @@ public final class CharacterBirthday extends Quest
if (!Util.checkIfInRange(10, npc, player, true))
{
L2Npc spawned = addSpawn(32600, player.getX() + 10, player.getY() + 10, player.getZ() + 10, 0, false, 0, true);
final L2Npc spawned = addSpawn(32600, player.getX() + 10, player.getY() + 10, player.getZ() + 10, 0, false, 0, true);
startQuestTimer("despawn_npc", 180000, spawned, player);
SPAWNS++;
}

View File

@@ -81,9 +81,9 @@ public final class FreyaCelebration extends LongTimeEvent
{
if (getQuestItemsCount(player, Inventory.ADENA_ID) > 1)
{
long _curr_time = System.currentTimeMillis();
String value = loadGlobalQuestVar(player.getAccountName());
long _reuse_time = value == "" ? 0 : Long.parseLong(value);
final long _curr_time = System.currentTimeMillis();
final String value = loadGlobalQuestVar(player.getAccountName());
final long _reuse_time = value == "" ? 0 : Long.parseLong(value);
if (_curr_time > _reuse_time)
{
@@ -93,10 +93,10 @@ public final class FreyaCelebration extends LongTimeEvent
}
else
{
long remainingTime = (_reuse_time - System.currentTimeMillis()) / 1000;
int hours = (int) (remainingTime / 3600);
int minutes = (int) ((remainingTime % 3600) / 60);
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_WILL_BE_AVAILABLE_FOR_RE_USE_AFTER_S2_HOUR_S_S3_MINUTE_S);
final long remainingTime = (_reuse_time - System.currentTimeMillis()) / 1000;
final int hours = (int) (remainingTime / 3600);
final int minutes = (int) ((remainingTime % 3600) / 60);
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_WILL_BE_AVAILABLE_FOR_RE_USE_AFTER_S2_HOUR_S_S3_MINUTE_S);
sm.addItemName(FREYA_POTION);
sm.addInt(hours);
sm.addInt(minutes);
@@ -105,7 +105,7 @@ public final class FreyaCelebration extends LongTimeEvent
}
else
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_NEED_S2_S1_S);
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_NEED_S2_S1_S);
sm.addItemName(Inventory.ADENA_ID);
sm.addInt(1);
player.sendPacket(sm);
@@ -126,7 +126,7 @@ public final class FreyaCelebration extends LongTimeEvent
{
if (getRandom(100) < 5)
{
CreatureSay cs = new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), NpcStringId.DEAR_S1_THINK_OF_THIS_AS_MY_APPRECIATION_FOR_THE_GIFT_TAKE_THIS_WITH_YOU_THERE_S_NOTHING_STRANGE_ABOUT_IT_IT_S_JUST_A_BIT_OF_MY_CAPRICIOUSNESS);
final CreatureSay cs = new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), NpcStringId.DEAR_S1_THINK_OF_THIS_AS_MY_APPRECIATION_FOR_THE_GIFT_TAKE_THIS_WITH_YOU_THERE_S_NOTHING_STRANGE_ABOUT_IT_IT_S_JUST_A_BIT_OF_MY_CAPRICIOUSNESS);
cs.addStringParameter(caster.getName());
npc.broadcastPacket(cs);

View File

@@ -98,10 +98,10 @@ public final class GiftOfVitality extends LongTimeEvent
final long reuse = player.getVariables().getLong(REUSE, 0);
if (reuse > System.currentTimeMillis())
{
long remainingTime = (reuse - System.currentTimeMillis()) / 1000;
int hours = (int) (remainingTime / 3600);
int minutes = (int) ((remainingTime % 3600) / 60);
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_WILL_BE_AVAILABLE_FOR_RE_USE_AFTER_S2_HOUR_S_S3_MINUTE_S);
final long remainingTime = (reuse - System.currentTimeMillis()) / 1000;
final int hours = (int) (remainingTime / 3600);
final int minutes = (int) ((remainingTime % 3600) / 60);
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_WILL_BE_AVAILABLE_FOR_RE_USE_AFTER_S2_HOUR_S_S3_MINUTE_S);
sm.addSkillName(23179);
sm.addInt(hours);
sm.addInt(minutes);

View File

@@ -94,9 +94,9 @@ public final class MasterOfEnchanting extends LongTimeEvent
}
else if (event.equalsIgnoreCase("buy_scroll_24"))
{
long curTime = System.currentTimeMillis();
String value = loadGlobalQuestVar(player.getAccountName());
long reuse = value == "" ? 0 : Long.parseLong(value);
final long curTime = System.currentTimeMillis();
final String value = loadGlobalQuestVar(player.getAccountName());
final long reuse = value == "" ? 0 : Long.parseLong(value);
if (player.getCreateDate().after(EVENT_START))
{
return "32599-bidth.htm";
@@ -118,12 +118,12 @@ public final class MasterOfEnchanting extends LongTimeEvent
}
else
{
long remainingTime = (reuse - curTime) / 1000;
int hours = (int) remainingTime / 3600;
int minutes = ((int) remainingTime % 3600) / 60;
final long remainingTime = (reuse - curTime) / 1000;
final int hours = (int) remainingTime / 3600;
final int minutes = ((int) remainingTime % 3600) / 60;
if (hours > 0)
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_S1_HOUR_S_AND_S2_MINUTE_S_REMAINING_UNTIL_THE_ITEM_CAN_BE_PURCHASED_AGAIN);
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_S1_HOUR_S_AND_S2_MINUTE_S_REMAINING_UNTIL_THE_ITEM_CAN_BE_PURCHASED_AGAIN);
sm.addInt(hours);
sm.addInt(minutes);
player.sendPacket(sm);
@@ -131,7 +131,7 @@ public final class MasterOfEnchanting extends LongTimeEvent
}
else if (minutes > 0)
{
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_S1_MINUTE_S_REMAINING_UNTIL_THE_ITEM_CAN_BE_PURCHASED_AGAIN);
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_S1_MINUTE_S_REMAINING_UNTIL_THE_ITEM_CAN_BE_PURCHASED_AGAIN);
sm.addInt(minutes);
player.sendPacket(sm);
htmltext = "32599-scroll24.htm";