Replaced assignments with compound operators.
This commit is contained in:
@@ -181,7 +181,7 @@ public final class DenOfEvil extends AbstractNpcAI
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
for (int i = SKILL_ID; i <= (SKILL_ID + 4); i = i + 2)
|
||||
for (int i = SKILL_ID; i <= (SKILL_ID + 4); i += 2)
|
||||
{
|
||||
// test 3 skills if some is lvl 4
|
||||
if (_zone.getSkillLevel(i) > 3)
|
||||
@@ -221,7 +221,7 @@ public final class DenOfEvil extends AbstractNpcAI
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = SKILL_ID; i <= (SKILL_ID + 4); i = i + 2)
|
||||
for (int i = SKILL_ID; i <= (SKILL_ID + 4); i += 2)
|
||||
{
|
||||
_zone.removeSkill(i);
|
||||
}
|
||||
|
@@ -88,7 +88,7 @@ public final class Anais extends AbstractNpcAI
|
||||
final L2Object target = npc.getTarget();
|
||||
_nextTarget = (target != null) && target.isPlayer() ? (L2PcInstance) target : null;
|
||||
final L2Npc b = _divineBurners.get(_pot);
|
||||
_pot = _pot + 1;
|
||||
_pot += 1;
|
||||
b.setDisplayEffect(1);
|
||||
b.setWalking();
|
||||
final L2Npc ward = addSpawn(GRAIL_WARD, new Location(b.getX(), b.getY(), b.getZ()), true, 0);
|
||||
|
@@ -1164,7 +1164,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
name = player.getName();
|
||||
if (name.toLowerCase().contains(CharacterToFind.toLowerCase()))
|
||||
{
|
||||
CharactersFound = CharactersFound + 1;
|
||||
CharactersFound += 1;
|
||||
replyMSG.append("<tr><td width=80><a action=\"bypass -h admin_character_info ");
|
||||
replyMSG.append(name);
|
||||
replyMSG.append("\">");
|
||||
@@ -1267,7 +1267,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
}
|
||||
|
||||
name = player.getName();
|
||||
CharactersFound = CharactersFound + 1;
|
||||
CharactersFound += 1;
|
||||
replyMSG.append("<tr><td width=80><a action=\"bypass -h admin_character_info ");
|
||||
replyMSG.append(name);
|
||||
replyMSG.append("\">");
|
||||
|
@@ -102,7 +102,7 @@ public final class Pumping extends AbstractEffect
|
||||
{
|
||||
player.sendPacket(SystemMessageId.DUE_TO_YOUR_REELING_AND_OR_PUMPING_SKILL_BEING_THREE_OR_MORE_LEVELS_HIGHER_THAN_YOUR_FISHING_SKILL_A_50_DAMAGE_PENALTY_WILL_BE_APPLIED);
|
||||
pen = (int) (dmg * 0.05);
|
||||
dmg = dmg - pen;
|
||||
dmg -= pen;
|
||||
}
|
||||
if (SS > 1)
|
||||
{
|
||||
|
@@ -102,7 +102,7 @@ public final class Reeling extends AbstractEffect
|
||||
{
|
||||
player.sendPacket(SystemMessageId.DUE_TO_YOUR_REELING_AND_OR_PUMPING_SKILL_BEING_THREE_OR_MORE_LEVELS_HIGHER_THAN_YOUR_FISHING_SKILL_A_50_DAMAGE_PENALTY_WILL_BE_APPLIED);
|
||||
pen = (int) (dmg * 0.05);
|
||||
dmg = dmg - pen;
|
||||
dmg -= pen;
|
||||
}
|
||||
if (SS > 1)
|
||||
{
|
||||
|
@@ -781,11 +781,11 @@ public class Q00335_TheSongOfTheHunter extends Quest
|
||||
}
|
||||
}
|
||||
|
||||
i0 = 33520 + i0;
|
||||
i1 = 33520 + i1;
|
||||
i2 = 33520 + i2;
|
||||
i3 = 33520 + i3;
|
||||
i4 = 33520 + i4;
|
||||
i0 += 33520;
|
||||
i1 += 33520;
|
||||
i2 += 33520;
|
||||
i3 += 33520;
|
||||
i4 += 33520;
|
||||
|
||||
htmltext = getHtml(player, "30745-16.html", i0, i1, i2, i3, i4);
|
||||
}
|
||||
@@ -793,20 +793,20 @@ public class Q00335_TheSongOfTheHunter extends Quest
|
||||
{
|
||||
i5 = qs.getMemoState();
|
||||
i0 = i5 % 32;
|
||||
i5 = i5 / 32;
|
||||
i5 /= 32;
|
||||
i1 = i5 % 32;
|
||||
i5 = i5 / 32;
|
||||
i5 /= 32;
|
||||
i2 = i5 % 32;
|
||||
i5 = i5 / 32;
|
||||
i5 /= 32;
|
||||
i3 = i5 % 32;
|
||||
i5 = i5 / 32;
|
||||
i5 /= 32;
|
||||
i4 = i5 % 32;
|
||||
i5 = i5 / 32;
|
||||
i0 = 33520 + i0;
|
||||
i1 = 33520 + i1;
|
||||
i2 = 33520 + i2;
|
||||
i3 = 33520 + i3;
|
||||
i4 = 33520 + i4;
|
||||
i5 /= 32;
|
||||
i0 += 33520;
|
||||
i1 += 33520;
|
||||
i2 += 33520;
|
||||
i3 += 33520;
|
||||
i4 += 33520;
|
||||
|
||||
htmltext = getHtml(player, "30745-16.html", i4, i3, i2, i1, i0);
|
||||
}
|
||||
@@ -901,15 +901,15 @@ public class Q00335_TheSongOfTheHunter extends Quest
|
||||
{
|
||||
i5 = qs.getMemoState();
|
||||
i0 = i5 % 32;
|
||||
i5 = i5 / 32;
|
||||
i5 /= 32;
|
||||
i1 = i5 % 32;
|
||||
i5 = i5 / 32;
|
||||
i5 /= 32;
|
||||
i2 = i5 % 32;
|
||||
i5 = i5 / 32;
|
||||
i5 /= 32;
|
||||
i3 = i5 % 32;
|
||||
i5 = i5 / 32;
|
||||
i5 /= 32;
|
||||
i4 = i5 % 32;
|
||||
i5 = i5 / 32;
|
||||
i5 /= 32;
|
||||
i0 = 33520 + (i0 + 20);
|
||||
i1 = 33520 + (i1 + 20);
|
||||
i2 = 33520 + (i2 + 20);
|
||||
|
@@ -985,23 +985,23 @@ public class Q00348_AnArrogantSearch extends Quest
|
||||
int i0 = memoStateEx % 10;
|
||||
if (i0 >= 4)
|
||||
{
|
||||
i1 = i1 + 6;
|
||||
i0 = i0 - 4;
|
||||
i2 = i2 + 1;
|
||||
i1 += 6;
|
||||
i0 -= 4;
|
||||
i2 += 1;
|
||||
}
|
||||
|
||||
if (i0 >= 2)
|
||||
{
|
||||
i0 = i0 - 2;
|
||||
i1 = i1 + 1;
|
||||
i2 = i2 + 1;
|
||||
i0 -= 2;
|
||||
i1 += 1;
|
||||
i2 += 1;
|
||||
}
|
||||
|
||||
if (i0 >= 1)
|
||||
{
|
||||
i1 = i1 + 3;
|
||||
i2 = i2 + 1;
|
||||
i0 = i0 - 1;
|
||||
i1 += 3;
|
||||
i2 += 1;
|
||||
i0 -= 1;
|
||||
}
|
||||
|
||||
if (i0 == 0)
|
||||
|
@@ -357,7 +357,7 @@ public final class Q00384_WarehouseKeepersPastime extends Quest
|
||||
|
||||
private String fillBoard(L2PcInstance player, QuestState qs, String html)
|
||||
{
|
||||
for (int i0 = 0; i0 < 9; i0 = i0 + 1)
|
||||
for (int i0 = 0; i0 < 9; i0 += 1)
|
||||
{
|
||||
int i1 = getNumberFromBingoBoard(qs, i0);
|
||||
if (isSelectedBingoNumber(qs, i1))
|
||||
@@ -374,7 +374,7 @@ public final class Q00384_WarehouseKeepersPastime extends Quest
|
||||
|
||||
private String colorBoard(L2PcInstance player, QuestState qs, String html)
|
||||
{
|
||||
for (int i0 = 0; i0 < 9; i0 = i0 + 1)
|
||||
for (int i0 = 0; i0 < 9; i0 += 1)
|
||||
{
|
||||
int i1 = getNumberFromBingoBoard(qs, i0);
|
||||
html = html.replace("<?FontColor" + (i0 + 1) + "?>", (isSelectedBingoNumber(qs, i1)) ? "ff0000" : "ffffff");
|
||||
|
@@ -320,7 +320,7 @@ public final class Q00386_StolenDignity extends Quest
|
||||
|
||||
private String fillBoard(L2PcInstance player, QuestState qs, String html)
|
||||
{
|
||||
for (int i0 = 0; i0 < 9; i0 = i0 + 1)
|
||||
for (int i0 = 0; i0 < 9; i0 += 1)
|
||||
{
|
||||
final int i1 = getNumberFromBingoBoard(qs, i0);
|
||||
if (isSelectedBingoNumber(qs, i1))
|
||||
@@ -337,7 +337,7 @@ public final class Q00386_StolenDignity extends Quest
|
||||
|
||||
private String colorBoard(L2PcInstance player, QuestState qs, String html)
|
||||
{
|
||||
for (int i0 = 0; i0 < 9; i0 = i0 + 1)
|
||||
for (int i0 = 0; i0 < 9; i0 += 1)
|
||||
{
|
||||
final int i1 = getNumberFromBingoBoard(qs, i0);
|
||||
html = html.replace("<?FontColor" + (i0 + 1) + "?>", isSelectedBingoNumber(qs, i1) ? "ff0000" : "ffffff");
|
||||
|
@@ -297,7 +297,7 @@ public final class Q00419_GetAPet extends Quest
|
||||
int i7 = 1;
|
||||
for (int i = 1; i <= randomLinkOffset; i++)
|
||||
{
|
||||
i7 = i7 * 2;
|
||||
i7 *= 2;
|
||||
}
|
||||
|
||||
if (((i7 & qs.getMemoState()) == 0) && (randomLinkOffset < 18))
|
||||
@@ -321,7 +321,7 @@ public final class Q00419_GetAPet extends Quest
|
||||
int i7 = 1;
|
||||
for (int i = 1; i <= randomReplyOffset; i++)
|
||||
{
|
||||
i7 = i7 * 2;
|
||||
i7 *= 2;
|
||||
}
|
||||
|
||||
if (((i7 & i8) == 0) && (randomReplyOffset < 5))
|
||||
|
@@ -159,83 +159,83 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
}
|
||||
if (i1 >= 57)
|
||||
{
|
||||
i1 = i1 - 56;
|
||||
i1 -= 56;
|
||||
}
|
||||
else if (i1 >= 43)
|
||||
{
|
||||
i1 = i1 - 42;
|
||||
i1 -= 42;
|
||||
}
|
||||
else if (i1 >= 29)
|
||||
{
|
||||
i1 = i1 - 28;
|
||||
i1 -= 28;
|
||||
}
|
||||
else if (i1 >= 15)
|
||||
{
|
||||
i1 = i1 - 14;
|
||||
i1 -= 14;
|
||||
}
|
||||
if (i2 >= 57)
|
||||
{
|
||||
i2 = i2 - 56;
|
||||
i2 -= 56;
|
||||
}
|
||||
else if (i2 >= 43)
|
||||
{
|
||||
i2 = i2 - 42;
|
||||
i2 -= 42;
|
||||
}
|
||||
else if (i2 >= 29)
|
||||
{
|
||||
i2 = i2 - 28;
|
||||
i2 -= 28;
|
||||
}
|
||||
else if (i2 >= 15)
|
||||
{
|
||||
i2 = i2 - 14;
|
||||
i2 -= 14;
|
||||
}
|
||||
if (i3 >= 57)
|
||||
{
|
||||
i3 = i3 - 56;
|
||||
i3 -= 56;
|
||||
}
|
||||
else if (i3 >= 43)
|
||||
{
|
||||
i3 = i3 - 42;
|
||||
i3 -= 42;
|
||||
}
|
||||
else if (i3 >= 29)
|
||||
{
|
||||
i3 = i3 - 28;
|
||||
i3 -= 28;
|
||||
}
|
||||
else if (i3 >= 15)
|
||||
{
|
||||
i3 = i3 - 14;
|
||||
i3 -= 14;
|
||||
}
|
||||
if (i4 >= 57)
|
||||
{
|
||||
i4 = i4 - 56;
|
||||
i4 -= 56;
|
||||
}
|
||||
else if (i4 >= 43)
|
||||
{
|
||||
i4 = i4 - 42;
|
||||
i4 -= 42;
|
||||
}
|
||||
else if (i4 >= 29)
|
||||
{
|
||||
i4 = i4 - 28;
|
||||
i4 -= 28;
|
||||
}
|
||||
else if (i4 >= 15)
|
||||
{
|
||||
i4 = i4 - 14;
|
||||
i4 -= 14;
|
||||
}
|
||||
if (i5 >= 57)
|
||||
{
|
||||
i5 = i5 - 56;
|
||||
i5 -= 56;
|
||||
}
|
||||
else if (i5 >= 43)
|
||||
{
|
||||
i5 = i5 - 42;
|
||||
i5 -= 42;
|
||||
}
|
||||
else if (i5 >= 29)
|
||||
{
|
||||
i5 = i5 - 28;
|
||||
i5 -= 28;
|
||||
}
|
||||
else if (i5 >= 15)
|
||||
{
|
||||
i5 = i5 - 14;
|
||||
i5 -= 14;
|
||||
}
|
||||
qs.set("v1", (i4 * 1000000) + (i3 * 10000) + (i2 * 100) + i1);
|
||||
qs.set("ExMemoState", i5);
|
||||
@@ -264,7 +264,7 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
{
|
||||
if ((i9 % 2) < 1)
|
||||
{
|
||||
i9 = i9 + 1;
|
||||
i9 += 1;
|
||||
}
|
||||
if ((i9 % 32) < 31)
|
||||
{
|
||||
@@ -276,7 +276,7 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
{
|
||||
if ((i9 % 4) < 2)
|
||||
{
|
||||
i9 = i9 + 2;
|
||||
i9 += 2;
|
||||
}
|
||||
if ((i9 % 32) < 31)
|
||||
{
|
||||
@@ -288,7 +288,7 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
{
|
||||
if ((i9 % 8) < 4)
|
||||
{
|
||||
i9 = i9 + 4;
|
||||
i9 += 4;
|
||||
}
|
||||
if ((i9 % 32) < 31)
|
||||
{
|
||||
@@ -300,7 +300,7 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
{
|
||||
if ((i9 % 16) < 8)
|
||||
{
|
||||
i9 = i9 + 8;
|
||||
i9 += 8;
|
||||
}
|
||||
if ((i9 % 32) < 31)
|
||||
{
|
||||
@@ -312,7 +312,7 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
{
|
||||
if ((i9 % 32) < 16)
|
||||
{
|
||||
i9 = i9 + 16;
|
||||
i9 += 16;
|
||||
}
|
||||
if ((i9 % 32) < 31)
|
||||
{
|
||||
@@ -334,23 +334,23 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
{
|
||||
if (i1 == i2)
|
||||
{
|
||||
i6 = i6 + 10;
|
||||
i8 = i8 + 8;
|
||||
i6 += 10;
|
||||
i8 += 8;
|
||||
}
|
||||
if (i1 == i3)
|
||||
{
|
||||
i6 = i6 + 10;
|
||||
i8 = i8 + 4;
|
||||
i6 += 10;
|
||||
i8 += 4;
|
||||
}
|
||||
if (i1 == i4)
|
||||
{
|
||||
i6 = i6 + 10;
|
||||
i8 = i8 + 2;
|
||||
i6 += 10;
|
||||
i8 += 2;
|
||||
}
|
||||
if (i1 == i5)
|
||||
{
|
||||
i6 = i6 + 10;
|
||||
i8 = i8 + 1;
|
||||
i6 += 10;
|
||||
i8 += 1;
|
||||
}
|
||||
if ((i6 % 100) < 10)
|
||||
{
|
||||
@@ -358,18 +358,18 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
{
|
||||
if (((i8 % 8) < 4) && (i2 == i3))
|
||||
{
|
||||
i6 = i6 + 10;
|
||||
i8 = i8 + 4;
|
||||
i6 += 10;
|
||||
i8 += 4;
|
||||
}
|
||||
if (((i8 % 4) < 2) && (i2 == i4))
|
||||
{
|
||||
i6 = i6 + 10;
|
||||
i8 = i8 + 2;
|
||||
i6 += 10;
|
||||
i8 += 2;
|
||||
}
|
||||
if (((i8 % 2) < 1) && (i2 == i5))
|
||||
{
|
||||
i6 = i6 + 10;
|
||||
i8 = i8 + 1;
|
||||
i6 += 10;
|
||||
i8 += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -377,18 +377,18 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
{
|
||||
if (((i8 % 8) < 4) && (i2 == i3))
|
||||
{
|
||||
i6 = i6 + 1;
|
||||
i8 = i8 + 4;
|
||||
i6 += 1;
|
||||
i8 += 4;
|
||||
}
|
||||
if (((i8 % 4) < 2) && (i2 == i4))
|
||||
{
|
||||
i6 = i6 + 1;
|
||||
i8 = i8 + 2;
|
||||
i6 += 1;
|
||||
i8 += 2;
|
||||
}
|
||||
if (((i8 % 2) < 1) && (i2 == i5))
|
||||
{
|
||||
i6 = i6 + 1;
|
||||
i8 = i8 + 1;
|
||||
i6 += 1;
|
||||
i8 += 1;
|
||||
}
|
||||
}
|
||||
if ((i6 % 100) < 10)
|
||||
@@ -397,13 +397,13 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
{
|
||||
if (((i8 % 4) < 2) && (i3 == i4))
|
||||
{
|
||||
i6 = i6 + 10;
|
||||
i8 = i8 + 2;
|
||||
i6 += 10;
|
||||
i8 += 2;
|
||||
}
|
||||
if (((i8 % 2) < 1) && (i3 == i5))
|
||||
{
|
||||
i6 = i6 + 10;
|
||||
i8 = i8 + 1;
|
||||
i6 += 10;
|
||||
i8 += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -411,27 +411,27 @@ public final class Q00662_AGameOfCards extends Quest
|
||||
{
|
||||
if (((i8 % 4) < 2) && (i3 == i4))
|
||||
{
|
||||
i6 = i6 + 1;
|
||||
i8 = i8 + 2;
|
||||
i6 += 1;
|
||||
i8 += 2;
|
||||
}
|
||||
if (((i8 % 2) < 1) && (i3 == i5))
|
||||
{
|
||||
i6 = i6 + 1;
|
||||
i8 = i8 + 1;
|
||||
i6 += 1;
|
||||
i8 += 1;
|
||||
}
|
||||
}
|
||||
if ((i6 % 100) < 10)
|
||||
{
|
||||
if (((i8 % 4) < 2) && ((i8 % 2) < 1) && (i4 == i5))
|
||||
{
|
||||
i6 = i6 + 10;
|
||||
i8 = i8 + 1;
|
||||
i6 += 10;
|
||||
i8 += 1;
|
||||
}
|
||||
}
|
||||
else if (((i6 % 10) == 0) && ((i8 % 4) < 2) && ((i8 % 2) < 1) && (i4 == i5))
|
||||
{
|
||||
i6 = i6 + 1;
|
||||
i8 = i8 + 1;
|
||||
i6 += 1;
|
||||
i8 += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -252,7 +252,7 @@ public final class Q00692_HowtoOpposeEvil extends Quest
|
||||
return false;
|
||||
}
|
||||
|
||||
count = count / minCount;
|
||||
count /= minCount;
|
||||
takeItems(player, itemId, count * minCount);
|
||||
rewardItems(player, rewardItemId, rewardCount * count);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user