Code style changes.

This commit is contained in:
MobiusDev
2016-04-26 19:21:19 +00:00
parent 6a13705766
commit fc070c9238
768 changed files with 3338 additions and 4252 deletions

View File

@@ -31,7 +31,7 @@ final class CharacterBirthday extends Quest
private static final int ALEGRIA = 32600;
private static int SPAWNS = 0;
private final static int[] GK =
private static final int[] GK =
{
30006,
30059,

View File

@@ -131,12 +131,9 @@ final class FreyaCelebration extends LongTimeEvent
caster.addItem("FreyaCelebration", FREYA_GIFT, 1, npc, true);
}
else
else if (getRandom(10) < 2)
{
if (getRandom(10) < 2)
{
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), FREYA_TEXT[getRandom(FREYA_TEXT.length - 1)]));
}
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getName(), FREYA_TEXT[getRandom(FREYA_TEXT.length - 1)]));
}
}
return super.onSkillSee(npc, caster, skill, targets, isSummon);

View File

@@ -123,7 +123,7 @@ final class GiftOfVitality extends LongTimeEvent
}
else
{
final SkillHolder[] skills = (player.isMageClass()) ? MAGE_SKILLS : FIGHTER_SKILLS;
final SkillHolder[] skills = player.isMageClass() ? MAGE_SKILLS : FIGHTER_SKILLS;
npc.setTarget(player);
for (SkillHolder sk : skills)
{

View File

@@ -27,20 +27,20 @@ import com.l2jmobius.gameserver.model.event.LongTimeEvent;
*/
final class HeavyMedal extends LongTimeEvent
{
private final static int CAT_ROY = 31228;
private final static int CAT_WINNIE = 31229;
private final static int GLITTERING_MEDAL = 6393;
private static final int CAT_ROY = 31228;
private static final int CAT_WINNIE = 31229;
private static final int GLITTERING_MEDAL = 6393;
private final static int WIN_CHANCE = 50;
private static final int WIN_CHANCE = 50;
private final static int[] MEDALS =
private static final int[] MEDALS =
{
5,
10,
20,
40
};
private final static int[] BADGES =
private static final int[] BADGES =
{
6399,
6400,

View File

@@ -134,21 +134,18 @@ final class MasterOfEnchanting extends LongTimeEvent
player.sendPacket(sm);
htmltext = "32599-scroll24.htm";
}
// Little glitch. There is no SystemMessage with seconds only.
// If time is less than 1 minute player can buy scrolls
else if (getQuestItemsCount(player, Inventory.ADENA_ID) > SCROLL_24_PRICE)
{
takeItems(player, Inventory.ADENA_ID, SCROLL_24_PRICE);
giveItems(player, MASTER_YOGI_SCROLL, 24);
saveGlobalQuestVar(player.getAccountName(), Long.toString(System.currentTimeMillis() + (SCROLL_24_TIME * 3600000)));
htmltext = "32599-scroll24.htm";
}
else
{
// Little glitch. There is no SystemMessage with seconds only.
// If time is less than 1 minute player can buy scrolls
if (getQuestItemsCount(player, Inventory.ADENA_ID) > SCROLL_24_PRICE)
{
takeItems(player, Inventory.ADENA_ID, SCROLL_24_PRICE);
giveItems(player, MASTER_YOGI_SCROLL, 24);
saveGlobalQuestVar(player.getAccountName(), Long.toString(System.currentTimeMillis() + (SCROLL_24_TIME * 3600000)));
htmltext = "32599-scroll24.htm";
}
else
{
htmltext = "32599-s24-no.htm";
}
htmltext = "32599-s24-no.htm";
}
}
}

View File

@@ -73,7 +73,7 @@ final class ThePowerOfLove extends LongTimeEvent
}
case "ct":
{
if (!hasQuestItems(player, CT) && (!hasQuestItems(player, CH) && (!hasQuestItems(player, CC))))
if (!hasQuestItems(player, CT) && !hasQuestItems(player, CH) && !hasQuestItems(player, CC))
{
giveItems(player, CT, 1);
giveItems(player, CT_TRANSORM, 1);
@@ -88,7 +88,7 @@ final class ThePowerOfLove extends LongTimeEvent
}
case "ch":
{
if (!hasQuestItems(player, CT) && (!hasQuestItems(player, CH) && (!hasQuestItems(player, CC))))
if (!hasQuestItems(player, CT) && !hasQuestItems(player, CH) && !hasQuestItems(player, CC))
{
giveItems(player, CH, 1);
giveItems(player, CH_TRANSORM, 1);
@@ -103,7 +103,7 @@ final class ThePowerOfLove extends LongTimeEvent
}
case "cc":
{
if (!hasQuestItems(player, CT) && (!hasQuestItems(player, CH) && (!hasQuestItems(player, CC))))
if (!hasQuestItems(player, CT) && !hasQuestItems(player, CH) && !hasQuestItems(player, CC))
{
giveItems(player, CC, 1);
giveItems(player, CC_TRANSORM, 1);