diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java index 30cb438627..2622ef96bb 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java @@ -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) @@ -218,7 +218,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); } diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Anais/Anais.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Anais/Anais.java index 974b9f0054..299ecaca30 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Anais/Anais.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/ai/bosses/Anais/Anais.java @@ -90,7 +90,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); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index 247c38d5f8..6019435834 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -1246,7 +1246,7 @@ public class AdminEditChar implements IAdminCommandHandler name = player.getName(); if (name.toLowerCase().contains(CharacterToFind.toLowerCase())) { - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); @@ -1346,7 +1346,7 @@ public class AdminEditChar implements IAdminCommandHandler } name = player.getName(); - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java index d77a3087c2..fbed4c2028 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java @@ -311,7 +311,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)) @@ -328,7 +328,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("", isSelectedBingoNumber(qs, i1) ? "ff0000" : "ffffff"); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java index e01b71b21d..4bfe51f045 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java @@ -150,83 +150,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; } st.setCond((i4 * 1000000) + (i3 * 10000) + (i2 * 100) + i1); @@ -256,7 +256,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 2) < 1) { - i9 = i9 + 1; + i9 += 1; } if ((i9 % 32) < 31) { @@ -268,7 +268,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 4) < 2) { - i9 = i9 + 2; + i9 += 2; } if ((i9 % 32) < 31) { @@ -280,7 +280,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 8) < 4) { - i9 = i9 + 4; + i9 += 4; } if ((i9 % 32) < 31) { @@ -292,7 +292,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 16) < 8) { - i9 = i9 + 8; + i9 += 8; } if ((i9 % 32) < 31) { @@ -304,7 +304,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 32) < 16) { - i9 = i9 + 16; + i9 += 16; } if ((i9 % 32) < 31) { @@ -326,23 +326,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) { @@ -352,24 +352,24 @@ public final class Q00662_AGameOfCards extends Quest { if (i2 == i3) { - i6 = i6 + 10; - i8 = i8 + 4; + i6 += 10; + i8 += 4; } } if ((i8 % 4) < 2) { if (i2 == i4) { - i6 = i6 + 10; - i8 = i8 + 2; + i6 += 10; + i8 += 2; } } if ((i8 % 2) < 1) { if (i2 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -382,24 +382,24 @@ public final class Q00662_AGameOfCards extends Quest { if (i2 == i3) { - i6 = i6 + 1; - i8 = i8 + 4; + i6 += 1; + i8 += 4; } } if ((i8 % 4) < 2) { if (i2 == i4) { - i6 = i6 + 1; - i8 = i8 + 2; + i6 += 1; + i8 += 2; } } if ((i8 % 2) < 1) { if (i2 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } @@ -412,16 +412,16 @@ public final class Q00662_AGameOfCards extends Quest { if (i3 == i4) { - i6 = i6 + 10; - i8 = i8 + 2; + i6 += 10; + i8 += 2; } } if ((i8 % 2) < 1) { if (i3 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -434,16 +434,16 @@ public final class Q00662_AGameOfCards extends Quest { if (i3 == i4) { - i6 = i6 + 1; - i8 = i8 + 2; + i6 += 1; + i8 += 2; } } if ((i8 % 2) < 1) { if (i3 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } @@ -456,8 +456,8 @@ public final class Q00662_AGameOfCards extends Quest { if (i4 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -470,8 +470,8 @@ public final class Q00662_AGameOfCards extends Quest { if (i4 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/LoginServerThread.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/LoginServerThread.java index 22b6b4cf67..a724ee1f15 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/LoginServerThread.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/LoginServerThread.java @@ -185,7 +185,7 @@ public class LoginServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = in.read(incoming, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java index ace84cc7f1..873ee3d3df 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java @@ -125,7 +125,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = originalAttackTarget.getX() + newX; + newX += originalAttackTarget.getX(); } else { @@ -134,7 +134,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = originalAttackTarget.getY() + newY; + newY += originalAttackTarget.getY(); } else { @@ -167,20 +167,20 @@ public class FriendlyNpcAI extends L2AttackableAI if (originalAttackTarget.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (originalAttackTarget.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) @@ -197,10 +197,10 @@ public class FriendlyNpcAI extends L2AttackableAI int range = npc.getPhysicalAttackRange() + combinedCollision; if (originalAttackTarget.isMoving()) { - range = range + 50; + range += 50; if (npc.isMoving()) { - range = range + 50; + range += 50; } } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 47532438f4..a4ef4266dd 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -757,7 +757,7 @@ public class L2AttackableAI extends L2CharacterAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = target.getX() + newX; + newX += target.getX(); } else { @@ -766,7 +766,7 @@ public class L2AttackableAI extends L2CharacterAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = target.getY() + newY; + newY += target.getY(); } else { @@ -799,20 +799,20 @@ public class L2AttackableAI extends L2CharacterAI if (target.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (target.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java index 21ed01119d..9d5fd311e8 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java @@ -132,7 +132,7 @@ public class StackIDFactory extends IdFactory else { id = _curOID; - _curOID = _curOID + 1; + _curOID += 1; } return id; } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/L2Object.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/L2Object.java index 7818e92ace..9b4b881ff9 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/L2Object.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/L2Object.java @@ -813,7 +813,7 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab int heading = Util.calculateHeadingFrom(this, target) - _heading; if (heading < 0) { - heading = 65535 + heading; + heading += 65535; } return Util.convertHeadingToDegree(heading); } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java index 806873802e..ce409e1e8a 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java @@ -102,7 +102,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance public void onReceiveFood() { // Eating food extends the duration by 20secs, to a max of 20minutes - _remainingTime = _remainingTime + DURATION_INCREASE_INTERVAL; + _remainingTime += DURATION_INCREASE_INTERVAL; if (_remainingTime > MAX_DURATION) { _remainingTime = MAX_DURATION; diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/entity/Hero.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/entity/Hero.java index 27be59aa41..b0f807cb38 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/entity/Hero.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/entity/Hero.java @@ -199,7 +199,7 @@ public class Hero private String calcFightTime(long FightTime) { final String format = String.format("%%0%dd", 2); - FightTime = FightTime / 1000; + FightTime /= 1000; final String seconds = String.format(format, FightTime % 60); final String minutes = String.format(format, (FightTime % 3600) / 60); return minutes + ":" + seconds; diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 886fb55c00..42ba71bbda 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -256,7 +256,7 @@ public final class Formulas // Autoattack critical depends on level difference at high levels as well. if ((activeChar.getLevel() >= 78) || (target.getLevel() >= 78)) { - rate = rate + (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); + rate += (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); } // Autoattack critical rate is limited between 3%-97%. diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index 0982f340af..617c98de98 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -112,13 +112,13 @@ public class ZoneCuboid extends L2ZoneForm final int _y2 = _r.y + _r.height; // x1->x2 - for (int x = _x1; x < _x2; x = x + STEP) + for (int x = _x1; x < _x2; x += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, x, _y1, z); dropDebugItem(Inventory.ADENA_ID, 1, x, _y2, z); } // y1->y2 - for (int y = _y1; y < _y2; y = y + STEP) + for (int y = _y1; y < _y2; y += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, _x1, y, z); dropDebugItem(Inventory.ADENA_ID, 1, _x2, y, z); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/Util.java index bba56f5466..cd566e6d3f 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/util/Util.java @@ -87,7 +87,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return angleTarget; } @@ -127,7 +127,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } @@ -137,7 +137,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(dy, dx)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/loginserver/GameServerThread.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/loginserver/GameServerThread.java index 7d9ec1824b..dcac78d9ca 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/loginserver/GameServerThread.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/loginserver/GameServerThread.java @@ -104,7 +104,7 @@ public class GameServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = _in.read(data, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java index 30cb438627..2622ef96bb 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java @@ -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) @@ -218,7 +218,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); } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Anais/Anais.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Anais/Anais.java index 974b9f0054..299ecaca30 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Anais/Anais.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/ai/bosses/Anais/Anais.java @@ -90,7 +90,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); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index a18269181c..3af6c45a6e 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -1266,7 +1266,7 @@ public class AdminEditChar implements IAdminCommandHandler name = player.getName(); if (name.toLowerCase().contains(CharacterToFind.toLowerCase())) { - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); @@ -1366,7 +1366,7 @@ public class AdminEditChar implements IAdminCommandHandler } name = player.getName(); - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java index d77a3087c2..fbed4c2028 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java @@ -311,7 +311,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)) @@ -328,7 +328,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("", isSelectedBingoNumber(qs, i1) ? "ff0000" : "ffffff"); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java index e01b71b21d..4bfe51f045 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java @@ -150,83 +150,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; } st.setCond((i4 * 1000000) + (i3 * 10000) + (i2 * 100) + i1); @@ -256,7 +256,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 2) < 1) { - i9 = i9 + 1; + i9 += 1; } if ((i9 % 32) < 31) { @@ -268,7 +268,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 4) < 2) { - i9 = i9 + 2; + i9 += 2; } if ((i9 % 32) < 31) { @@ -280,7 +280,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 8) < 4) { - i9 = i9 + 4; + i9 += 4; } if ((i9 % 32) < 31) { @@ -292,7 +292,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 16) < 8) { - i9 = i9 + 8; + i9 += 8; } if ((i9 % 32) < 31) { @@ -304,7 +304,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 32) < 16) { - i9 = i9 + 16; + i9 += 16; } if ((i9 % 32) < 31) { @@ -326,23 +326,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) { @@ -352,24 +352,24 @@ public final class Q00662_AGameOfCards extends Quest { if (i2 == i3) { - i6 = i6 + 10; - i8 = i8 + 4; + i6 += 10; + i8 += 4; } } if ((i8 % 4) < 2) { if (i2 == i4) { - i6 = i6 + 10; - i8 = i8 + 2; + i6 += 10; + i8 += 2; } } if ((i8 % 2) < 1) { if (i2 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -382,24 +382,24 @@ public final class Q00662_AGameOfCards extends Quest { if (i2 == i3) { - i6 = i6 + 1; - i8 = i8 + 4; + i6 += 1; + i8 += 4; } } if ((i8 % 4) < 2) { if (i2 == i4) { - i6 = i6 + 1; - i8 = i8 + 2; + i6 += 1; + i8 += 2; } } if ((i8 % 2) < 1) { if (i2 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } @@ -412,16 +412,16 @@ public final class Q00662_AGameOfCards extends Quest { if (i3 == i4) { - i6 = i6 + 10; - i8 = i8 + 2; + i6 += 10; + i8 += 2; } } if ((i8 % 2) < 1) { if (i3 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -434,16 +434,16 @@ public final class Q00662_AGameOfCards extends Quest { if (i3 == i4) { - i6 = i6 + 1; - i8 = i8 + 2; + i6 += 1; + i8 += 2; } } if ((i8 % 2) < 1) { if (i3 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } @@ -456,8 +456,8 @@ public final class Q00662_AGameOfCards extends Quest { if (i4 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -470,8 +470,8 @@ public final class Q00662_AGameOfCards extends Quest { if (i4 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/LoginServerThread.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/LoginServerThread.java index 22b6b4cf67..a724ee1f15 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/LoginServerThread.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/LoginServerThread.java @@ -185,7 +185,7 @@ public class LoginServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = in.read(incoming, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java index ace84cc7f1..873ee3d3df 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java @@ -125,7 +125,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = originalAttackTarget.getX() + newX; + newX += originalAttackTarget.getX(); } else { @@ -134,7 +134,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = originalAttackTarget.getY() + newY; + newY += originalAttackTarget.getY(); } else { @@ -167,20 +167,20 @@ public class FriendlyNpcAI extends L2AttackableAI if (originalAttackTarget.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (originalAttackTarget.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) @@ -197,10 +197,10 @@ public class FriendlyNpcAI extends L2AttackableAI int range = npc.getPhysicalAttackRange() + combinedCollision; if (originalAttackTarget.isMoving()) { - range = range + 50; + range += 50; if (npc.isMoving()) { - range = range + 50; + range += 50; } } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 9b49df1495..4b37212d3a 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -757,7 +757,7 @@ public class L2AttackableAI extends L2CharacterAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = target.getX() + newX; + newX += target.getX(); } else { @@ -766,7 +766,7 @@ public class L2AttackableAI extends L2CharacterAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = target.getY() + newY; + newY += target.getY(); } else { @@ -799,20 +799,20 @@ public class L2AttackableAI extends L2CharacterAI if (target.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (target.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java index 21ed01119d..9d5fd311e8 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java @@ -132,7 +132,7 @@ public class StackIDFactory extends IdFactory else { id = _curOID; - _curOID = _curOID + 1; + _curOID += 1; } return id; } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/L2Object.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/L2Object.java index 7818e92ace..9b4b881ff9 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/L2Object.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/L2Object.java @@ -813,7 +813,7 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab int heading = Util.calculateHeadingFrom(this, target) - _heading; if (heading < 0) { - heading = 65535 + heading; + heading += 65535; } return Util.convertHeadingToDegree(heading); } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java index 806873802e..ce409e1e8a 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java @@ -102,7 +102,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance public void onReceiveFood() { // Eating food extends the duration by 20secs, to a max of 20minutes - _remainingTime = _remainingTime + DURATION_INCREASE_INTERVAL; + _remainingTime += DURATION_INCREASE_INTERVAL; if (_remainingTime > MAX_DURATION) { _remainingTime = MAX_DURATION; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/entity/Hero.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/entity/Hero.java index 27be59aa41..b0f807cb38 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/entity/Hero.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/entity/Hero.java @@ -199,7 +199,7 @@ public class Hero private String calcFightTime(long FightTime) { final String format = String.format("%%0%dd", 2); - FightTime = FightTime / 1000; + FightTime /= 1000; final String seconds = String.format(format, FightTime % 60); final String minutes = String.format(format, (FightTime % 3600) / 60); return minutes + ":" + seconds; diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 886fb55c00..42ba71bbda 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -256,7 +256,7 @@ public final class Formulas // Autoattack critical depends on level difference at high levels as well. if ((activeChar.getLevel() >= 78) || (target.getLevel() >= 78)) { - rate = rate + (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); + rate += (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); } // Autoattack critical rate is limited between 3%-97%. diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index 0982f340af..617c98de98 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -112,13 +112,13 @@ public class ZoneCuboid extends L2ZoneForm final int _y2 = _r.y + _r.height; // x1->x2 - for (int x = _x1; x < _x2; x = x + STEP) + for (int x = _x1; x < _x2; x += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, x, _y1, z); dropDebugItem(Inventory.ADENA_ID, 1, x, _y2, z); } // y1->y2 - for (int y = _y1; y < _y2; y = y + STEP) + for (int y = _y1; y < _y2; y += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, _x1, y, z); dropDebugItem(Inventory.ADENA_ID, 1, _x2, y, z); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/Util.java index bba56f5466..cd566e6d3f 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/util/Util.java @@ -87,7 +87,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return angleTarget; } @@ -127,7 +127,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } @@ -137,7 +137,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(dy, dx)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/loginserver/GameServerThread.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/loginserver/GameServerThread.java index 7d9ec1824b..dcac78d9ca 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/loginserver/GameServerThread.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/loginserver/GameServerThread.java @@ -104,7 +104,7 @@ public class GameServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = _in.read(data, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java index 30cb438627..2622ef96bb 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java @@ -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) @@ -218,7 +218,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); } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Anais/Anais.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Anais/Anais.java index 974b9f0054..299ecaca30 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Anais/Anais.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/ai/bosses/Anais/Anais.java @@ -90,7 +90,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); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index a18269181c..3af6c45a6e 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -1266,7 +1266,7 @@ public class AdminEditChar implements IAdminCommandHandler name = player.getName(); if (name.toLowerCase().contains(CharacterToFind.toLowerCase())) { - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); @@ -1366,7 +1366,7 @@ public class AdminEditChar implements IAdminCommandHandler } name = player.getName(); - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java index 5653976766..1d4b8b0b07 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java @@ -311,7 +311,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)) @@ -328,7 +328,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("", isSelectedBingoNumber(qs, i1) ? "ff0000" : "ffffff"); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java index e01b71b21d..4bfe51f045 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java @@ -150,83 +150,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; } st.setCond((i4 * 1000000) + (i3 * 10000) + (i2 * 100) + i1); @@ -256,7 +256,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 2) < 1) { - i9 = i9 + 1; + i9 += 1; } if ((i9 % 32) < 31) { @@ -268,7 +268,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 4) < 2) { - i9 = i9 + 2; + i9 += 2; } if ((i9 % 32) < 31) { @@ -280,7 +280,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 8) < 4) { - i9 = i9 + 4; + i9 += 4; } if ((i9 % 32) < 31) { @@ -292,7 +292,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 16) < 8) { - i9 = i9 + 8; + i9 += 8; } if ((i9 % 32) < 31) { @@ -304,7 +304,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 32) < 16) { - i9 = i9 + 16; + i9 += 16; } if ((i9 % 32) < 31) { @@ -326,23 +326,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) { @@ -352,24 +352,24 @@ public final class Q00662_AGameOfCards extends Quest { if (i2 == i3) { - i6 = i6 + 10; - i8 = i8 + 4; + i6 += 10; + i8 += 4; } } if ((i8 % 4) < 2) { if (i2 == i4) { - i6 = i6 + 10; - i8 = i8 + 2; + i6 += 10; + i8 += 2; } } if ((i8 % 2) < 1) { if (i2 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -382,24 +382,24 @@ public final class Q00662_AGameOfCards extends Quest { if (i2 == i3) { - i6 = i6 + 1; - i8 = i8 + 4; + i6 += 1; + i8 += 4; } } if ((i8 % 4) < 2) { if (i2 == i4) { - i6 = i6 + 1; - i8 = i8 + 2; + i6 += 1; + i8 += 2; } } if ((i8 % 2) < 1) { if (i2 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } @@ -412,16 +412,16 @@ public final class Q00662_AGameOfCards extends Quest { if (i3 == i4) { - i6 = i6 + 10; - i8 = i8 + 2; + i6 += 10; + i8 += 2; } } if ((i8 % 2) < 1) { if (i3 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -434,16 +434,16 @@ public final class Q00662_AGameOfCards extends Quest { if (i3 == i4) { - i6 = i6 + 1; - i8 = i8 + 2; + i6 += 1; + i8 += 2; } } if ((i8 % 2) < 1) { if (i3 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } @@ -456,8 +456,8 @@ public final class Q00662_AGameOfCards extends Quest { if (i4 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -470,8 +470,8 @@ public final class Q00662_AGameOfCards extends Quest { if (i4 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/LoginServerThread.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/LoginServerThread.java index ba22e9ae11..dc4b70f0be 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/LoginServerThread.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/LoginServerThread.java @@ -187,7 +187,7 @@ public class LoginServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = in.read(incoming, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java index ace84cc7f1..873ee3d3df 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java @@ -125,7 +125,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = originalAttackTarget.getX() + newX; + newX += originalAttackTarget.getX(); } else { @@ -134,7 +134,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = originalAttackTarget.getY() + newY; + newY += originalAttackTarget.getY(); } else { @@ -167,20 +167,20 @@ public class FriendlyNpcAI extends L2AttackableAI if (originalAttackTarget.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (originalAttackTarget.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) @@ -197,10 +197,10 @@ public class FriendlyNpcAI extends L2AttackableAI int range = npc.getPhysicalAttackRange() + combinedCollision; if (originalAttackTarget.isMoving()) { - range = range + 50; + range += 50; if (npc.isMoving()) { - range = range + 50; + range += 50; } } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 9b49df1495..4b37212d3a 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -757,7 +757,7 @@ public class L2AttackableAI extends L2CharacterAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = target.getX() + newX; + newX += target.getX(); } else { @@ -766,7 +766,7 @@ public class L2AttackableAI extends L2CharacterAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = target.getY() + newY; + newY += target.getY(); } else { @@ -799,20 +799,20 @@ public class L2AttackableAI extends L2CharacterAI if (target.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (target.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java index 21ed01119d..9d5fd311e8 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java @@ -132,7 +132,7 @@ public class StackIDFactory extends IdFactory else { id = _curOID; - _curOID = _curOID + 1; + _curOID += 1; } return id; } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/L2Object.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/L2Object.java index 7818e92ace..9b4b881ff9 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/L2Object.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/L2Object.java @@ -813,7 +813,7 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab int heading = Util.calculateHeadingFrom(this, target) - _heading; if (heading < 0) { - heading = 65535 + heading; + heading += 65535; } return Util.convertHeadingToDegree(heading); } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java index 806873802e..ce409e1e8a 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java @@ -102,7 +102,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance public void onReceiveFood() { // Eating food extends the duration by 20secs, to a max of 20minutes - _remainingTime = _remainingTime + DURATION_INCREASE_INTERVAL; + _remainingTime += DURATION_INCREASE_INTERVAL; if (_remainingTime > MAX_DURATION) { _remainingTime = MAX_DURATION; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/entity/Hero.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/entity/Hero.java index 27be59aa41..b0f807cb38 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/entity/Hero.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/entity/Hero.java @@ -199,7 +199,7 @@ public class Hero private String calcFightTime(long FightTime) { final String format = String.format("%%0%dd", 2); - FightTime = FightTime / 1000; + FightTime /= 1000; final String seconds = String.format(format, FightTime % 60); final String minutes = String.format(format, (FightTime % 3600) / 60); return minutes + ":" + seconds; diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 886fb55c00..42ba71bbda 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -256,7 +256,7 @@ public final class Formulas // Autoattack critical depends on level difference at high levels as well. if ((activeChar.getLevel() >= 78) || (target.getLevel() >= 78)) { - rate = rate + (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); + rate += (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); } // Autoattack critical rate is limited between 3%-97%. diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index 0982f340af..617c98de98 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -112,13 +112,13 @@ public class ZoneCuboid extends L2ZoneForm final int _y2 = _r.y + _r.height; // x1->x2 - for (int x = _x1; x < _x2; x = x + STEP) + for (int x = _x1; x < _x2; x += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, x, _y1, z); dropDebugItem(Inventory.ADENA_ID, 1, x, _y2, z); } // y1->y2 - for (int y = _y1; y < _y2; y = y + STEP) + for (int y = _y1; y < _y2; y += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, _x1, y, z); dropDebugItem(Inventory.ADENA_ID, 1, _x2, y, z); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/Util.java index bba56f5466..cd566e6d3f 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/util/Util.java @@ -87,7 +87,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return angleTarget; } @@ -127,7 +127,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } @@ -137,7 +137,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(dy, dx)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/loginserver/GameServerThread.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/loginserver/GameServerThread.java index 7d9ec1824b..dcac78d9ca 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/loginserver/GameServerThread.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/loginserver/GameServerThread.java @@ -104,7 +104,7 @@ public class GameServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = _in.read(data, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java index 30cb438627..2622ef96bb 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/areas/DenOfDevil/DenOfEvil.java @@ -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) @@ -218,7 +218,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); } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Anais/Anais.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Anais/Anais.java index 974b9f0054..299ecaca30 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Anais/Anais.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/ai/bosses/Anais/Anais.java @@ -90,7 +90,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); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index a18269181c..3af6c45a6e 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -1266,7 +1266,7 @@ public class AdminEditChar implements IAdminCommandHandler name = player.getName(); if (name.toLowerCase().contains(CharacterToFind.toLowerCase())) { - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); @@ -1366,7 +1366,7 @@ public class AdminEditChar implements IAdminCommandHandler } name = player.getName(); - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java index 5653976766..1d4b8b0b07 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java @@ -311,7 +311,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)) @@ -328,7 +328,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("", isSelectedBingoNumber(qs, i1) ? "ff0000" : "ffffff"); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java index e01b71b21d..4bfe51f045 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java @@ -150,83 +150,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; } st.setCond((i4 * 1000000) + (i3 * 10000) + (i2 * 100) + i1); @@ -256,7 +256,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 2) < 1) { - i9 = i9 + 1; + i9 += 1; } if ((i9 % 32) < 31) { @@ -268,7 +268,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 4) < 2) { - i9 = i9 + 2; + i9 += 2; } if ((i9 % 32) < 31) { @@ -280,7 +280,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 8) < 4) { - i9 = i9 + 4; + i9 += 4; } if ((i9 % 32) < 31) { @@ -292,7 +292,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 16) < 8) { - i9 = i9 + 8; + i9 += 8; } if ((i9 % 32) < 31) { @@ -304,7 +304,7 @@ public final class Q00662_AGameOfCards extends Quest { if ((i9 % 32) < 16) { - i9 = i9 + 16; + i9 += 16; } if ((i9 % 32) < 31) { @@ -326,23 +326,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) { @@ -352,24 +352,24 @@ public final class Q00662_AGameOfCards extends Quest { if (i2 == i3) { - i6 = i6 + 10; - i8 = i8 + 4; + i6 += 10; + i8 += 4; } } if ((i8 % 4) < 2) { if (i2 == i4) { - i6 = i6 + 10; - i8 = i8 + 2; + i6 += 10; + i8 += 2; } } if ((i8 % 2) < 1) { if (i2 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -382,24 +382,24 @@ public final class Q00662_AGameOfCards extends Quest { if (i2 == i3) { - i6 = i6 + 1; - i8 = i8 + 4; + i6 += 1; + i8 += 4; } } if ((i8 % 4) < 2) { if (i2 == i4) { - i6 = i6 + 1; - i8 = i8 + 2; + i6 += 1; + i8 += 2; } } if ((i8 % 2) < 1) { if (i2 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } @@ -412,16 +412,16 @@ public final class Q00662_AGameOfCards extends Quest { if (i3 == i4) { - i6 = i6 + 10; - i8 = i8 + 2; + i6 += 10; + i8 += 2; } } if ((i8 % 2) < 1) { if (i3 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -434,16 +434,16 @@ public final class Q00662_AGameOfCards extends Quest { if (i3 == i4) { - i6 = i6 + 1; - i8 = i8 + 2; + i6 += 1; + i8 += 2; } } if ((i8 % 2) < 1) { if (i3 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } @@ -456,8 +456,8 @@ public final class Q00662_AGameOfCards extends Quest { if (i4 == i5) { - i6 = i6 + 10; - i8 = i8 + 1; + i6 += 10; + i8 += 1; } } } @@ -470,8 +470,8 @@ public final class Q00662_AGameOfCards extends Quest { if (i4 == i5) { - i6 = i6 + 1; - i8 = i8 + 1; + i6 += 1; + i8 += 1; } } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/LoginServerThread.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/LoginServerThread.java index ba22e9ae11..dc4b70f0be 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/LoginServerThread.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/LoginServerThread.java @@ -187,7 +187,7 @@ public class LoginServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = in.read(incoming, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java index ace84cc7f1..873ee3d3df 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java @@ -125,7 +125,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = originalAttackTarget.getX() + newX; + newX += originalAttackTarget.getX(); } else { @@ -134,7 +134,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = originalAttackTarget.getY() + newY; + newY += originalAttackTarget.getY(); } else { @@ -167,20 +167,20 @@ public class FriendlyNpcAI extends L2AttackableAI if (originalAttackTarget.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (originalAttackTarget.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) @@ -197,10 +197,10 @@ public class FriendlyNpcAI extends L2AttackableAI int range = npc.getPhysicalAttackRange() + combinedCollision; if (originalAttackTarget.isMoving()) { - range = range + 50; + range += 50; if (npc.isMoving()) { - range = range + 50; + range += 50; } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 9b49df1495..4b37212d3a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -757,7 +757,7 @@ public class L2AttackableAI extends L2CharacterAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = target.getX() + newX; + newX += target.getX(); } else { @@ -766,7 +766,7 @@ public class L2AttackableAI extends L2CharacterAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = target.getY() + newY; + newY += target.getY(); } else { @@ -799,20 +799,20 @@ public class L2AttackableAI extends L2CharacterAI if (target.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (target.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java index 21ed01119d..9d5fd311e8 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java @@ -132,7 +132,7 @@ public class StackIDFactory extends IdFactory else { id = _curOID; - _curOID = _curOID + 1; + _curOID += 1; } return id; } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/L2Object.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/L2Object.java index 7818e92ace..9b4b881ff9 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/L2Object.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/L2Object.java @@ -813,7 +813,7 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab int heading = Util.calculateHeadingFrom(this, target) - _heading; if (heading < 0) { - heading = 65535 + heading; + heading += 65535; } return Util.convertHeadingToDegree(heading); } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java index 806873802e..ce409e1e8a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java @@ -102,7 +102,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance public void onReceiveFood() { // Eating food extends the duration by 20secs, to a max of 20minutes - _remainingTime = _remainingTime + DURATION_INCREASE_INTERVAL; + _remainingTime += DURATION_INCREASE_INTERVAL; if (_remainingTime > MAX_DURATION) { _remainingTime = MAX_DURATION; diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/entity/Hero.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/entity/Hero.java index 27be59aa41..b0f807cb38 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/entity/Hero.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/entity/Hero.java @@ -199,7 +199,7 @@ public class Hero private String calcFightTime(long FightTime) { final String format = String.format("%%0%dd", 2); - FightTime = FightTime / 1000; + FightTime /= 1000; final String seconds = String.format(format, FightTime % 60); final String minutes = String.format(format, (FightTime % 3600) / 60); return minutes + ":" + seconds; diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 683fca2df5..8e6230698d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -256,7 +256,7 @@ public final class Formulas // Autoattack critical depends on level difference at high levels as well. if ((activeChar.getLevel() >= 78) || (target.getLevel() >= 78)) { - rate = rate + (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); + rate += (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); } // Autoattack critical rate is limited between 3%-97%. diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index 0982f340af..617c98de98 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -112,13 +112,13 @@ public class ZoneCuboid extends L2ZoneForm final int _y2 = _r.y + _r.height; // x1->x2 - for (int x = _x1; x < _x2; x = x + STEP) + for (int x = _x1; x < _x2; x += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, x, _y1, z); dropDebugItem(Inventory.ADENA_ID, 1, x, _y2, z); } // y1->y2 - for (int y = _y1; y < _y2; y = y + STEP) + for (int y = _y1; y < _y2; y += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, _x1, y, z); dropDebugItem(Inventory.ADENA_ID, 1, _x2, y, z); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/Util.java index bba56f5466..cd566e6d3f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/util/Util.java @@ -87,7 +87,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return angleTarget; } @@ -127,7 +127,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } @@ -137,7 +137,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(dy, dx)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/loginserver/GameServerThread.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/loginserver/GameServerThread.java index 7d9ec1824b..dcac78d9ca 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/loginserver/GameServerThread.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/loginserver/GameServerThread.java @@ -104,7 +104,7 @@ public class GameServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = _in.read(data, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java index 2376abad11..329b0827f8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java @@ -136,7 +136,7 @@ public class StackIDFactory extends IdFactory else { id = _curOID; - _curOID = _curOID + 1; + _curOID += 1; } return id; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java index 05a0064ce2..17fabe9098 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java @@ -117,7 +117,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance public void onReceiveFood() { // Eating food extends the duration by 20secs, to a max of 20minutes - _remainingTime = _remainingTime + DURATION_INCREASE_INTERVAL; + _remainingTime += DURATION_INCREASE_INTERVAL; if (_remainingTime > MAX_DURATION) { _remainingTime = MAX_DURATION; diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/DenOfEvil/DenOfEvil.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/DenOfEvil/DenOfEvil.java index 54192ccb95..43abb5e0e3 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/DenOfEvil/DenOfEvil.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/DenOfEvil/DenOfEvil.java @@ -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); } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/bosses/Anais/Anais.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/bosses/Anais/Anais.java index bfc6a13544..d2e9118527 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/bosses/Anais/Anais.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/bosses/Anais/Anais.java @@ -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); diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index 223972b861..49d0ae214b 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -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(""); @@ -1267,7 +1267,7 @@ public class AdminEditChar implements IAdminCommandHandler } name = player.getName(); - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Pumping.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Pumping.java index b40e1b8850..a74a695940 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Pumping.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Pumping.java @@ -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) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Reeling.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Reeling.java index 21c74944f8..35bf55d118 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Reeling.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Reeling.java @@ -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) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00335_TheSongOfTheHunter/Q00335_TheSongOfTheHunter.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00335_TheSongOfTheHunter/Q00335_TheSongOfTheHunter.java index 673813eb9d..384b6fcd0e 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00335_TheSongOfTheHunter/Q00335_TheSongOfTheHunter.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00335_TheSongOfTheHunter/Q00335_TheSongOfTheHunter.java @@ -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); diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00348_AnArrogantSearch/Q00348_AnArrogantSearch.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00348_AnArrogantSearch/Q00348_AnArrogantSearch.java index c5dbaaf6d7..1c853803d3 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00348_AnArrogantSearch/Q00348_AnArrogantSearch.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00348_AnArrogantSearch/Q00348_AnArrogantSearch.java @@ -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) diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00384_WarehouseKeepersPastime/Q00384_WarehouseKeepersPastime.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00384_WarehouseKeepersPastime/Q00384_WarehouseKeepersPastime.java index 9e8050917c..3fc4596533 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00384_WarehouseKeepersPastime/Q00384_WarehouseKeepersPastime.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00384_WarehouseKeepersPastime/Q00384_WarehouseKeepersPastime.java @@ -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("", (isSelectedBingoNumber(qs, i1)) ? "ff0000" : "ffffff"); diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java index 2905c06a31..c7e58230e9 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00386_StolenDignity/Q00386_StolenDignity.java @@ -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("", isSelectedBingoNumber(qs, i1) ? "ff0000" : "ffffff"); diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00419_GetAPet/Q00419_GetAPet.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00419_GetAPet/Q00419_GetAPet.java index 4853e8dccb..d76d01db34 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00419_GetAPet/Q00419_GetAPet.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00419_GetAPet/Q00419_GetAPet.java @@ -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)) diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java index f3f58fe418..1874baff79 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00662_AGameOfCards/Q00662_AGameOfCards.java @@ -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; } } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00692_HowtoOpposeEvil/Q00692_HowtoOpposeEvil.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00692_HowtoOpposeEvil/Q00692_HowtoOpposeEvil.java index d9130208f3..922d937961 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00692_HowtoOpposeEvil/Q00692_HowtoOpposeEvil.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/quests/Q00692_HowtoOpposeEvil/Q00692_HowtoOpposeEvil.java @@ -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; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/LoginServerThread.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/LoginServerThread.java index db8d804af6..1163b6ae48 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/LoginServerThread.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/LoginServerThread.java @@ -185,7 +185,7 @@ public class LoginServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = in.read(incoming, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 8f6f251c7a..8ffbcbbc6f 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -924,20 +924,20 @@ public class L2AttackableAI extends L2CharacterAI if (originalAttackTarget.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (originalAttackTarget.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceId())) @@ -1213,10 +1213,10 @@ public class L2AttackableAI extends L2CharacterAI int range = npc.getPhysicalAttackRange() + combinedCollision; if (mostHate.isMoving()) { - range = range + 50; + range += 50; if (npc.isMoving()) { - range = range + 50; + range += 50; } } @@ -1304,7 +1304,7 @@ public class L2AttackableAI extends L2CharacterAI final double srange = sk.getCastRange() + caster.getTemplate().getCollisionRadius(); if (attackTarget.isMoving()) { - dist2 = dist2 - 30; + dist2 -= 30; } if (sk.isContinuous()) @@ -1901,7 +1901,7 @@ public class L2AttackableAI extends L2CharacterAI range = sk.getCastRange() + actor.getTemplate().getCollisionRadius() + obj.getTemplate().getCollisionRadius(); if (obj.isMoving()) { - dist2 = dist2 - 70; + dist2 -= 70; } } catch (NullPointerException e) @@ -1930,7 +1930,7 @@ public class L2AttackableAI extends L2CharacterAI range = sk.getCastRange() + actor.getTemplate().getCollisionRadius() + obj.getTemplate().getCollisionRadius(); if (obj.isMoving()) { - dist2 = dist2 - 70; + dist2 -= 70; } } catch (NullPointerException e) @@ -1969,7 +1969,7 @@ public class L2AttackableAI extends L2CharacterAI range = sk.getCastRange() + actor.getTemplate().getCollisionRadius() + targets.getTemplate().getCollisionRadius(); if (targets.isMoving()) { - dist2 = dist2 - 70; + dist2 -= 70; } } catch (NullPointerException e) @@ -2002,7 +2002,7 @@ public class L2AttackableAI extends L2CharacterAI range = sk.getCastRange() + actor.getTemplate().getCollisionRadius() + obj.getTemplate().getCollisionRadius(); if (obj.isMoving()) { - dist2 = dist2 - 70; + dist2 -= 70; } } catch (NullPointerException e) @@ -2118,7 +2118,7 @@ public class L2AttackableAI extends L2CharacterAI range = actor.getPhysicalAttackRange() + actor.getTemplate().getCollisionRadius() + obj.getTemplate().getCollisionRadius(); if (obj.isMoving()) { - dist2 = dist2 - 70; + dist2 -= 70; } } catch (NullPointerException e) diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java index 9114767cd8..c5f1bf339c 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java @@ -132,7 +132,7 @@ public class StackIDFactory extends IdFactory else { id = _curOID; - _curOID = _curOID + 1; + _curOID += 1; } return id; } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/HandysBlockCheckerManager.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/HandysBlockCheckerManager.java index c08b612387..76e0e2cae3 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/HandysBlockCheckerManager.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/HandysBlockCheckerManager.java @@ -14,95 +14,370 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package ai.areas.Gracia.AI.NPC.GeneralDilios; +package com.l2jmobius.gameserver.instancemanager; import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import com.l2jmobius.gameserver.enums.ChatType; -import com.l2jmobius.gameserver.model.L2Spawn; -import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.Config; +import com.l2jmobius.commons.concurrent.ThreadPool; +import com.l2jmobius.gameserver.enums.Team; +import com.l2jmobius.gameserver.instancemanager.tasks.PenaltyRemoveTask; +import com.l2jmobius.gameserver.model.ArenaParticipantsHolder; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -import com.l2jmobius.gameserver.network.NpcStringId; -import com.l2jmobius.gameserver.network.serverpackets.NpcSay; - -import ai.AbstractNpcAI; +import com.l2jmobius.gameserver.model.itemcontainer.PcInventory; +import com.l2jmobius.gameserver.model.olympiad.OlympiadManager; +import com.l2jmobius.gameserver.model.zone.ZoneId; +import com.l2jmobius.gameserver.network.SystemMessageId; +import com.l2jmobius.gameserver.network.serverpackets.ExCubeGameAddPlayer; +import com.l2jmobius.gameserver.network.serverpackets.ExCubeGameChangeTeam; +import com.l2jmobius.gameserver.network.serverpackets.ExCubeGameRemovePlayer; +import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; /** - * Dilios AI - * @author JIV, Sephiroth, Apocalipce + * This class manage the player add/remove, team change and event arena status,
+ * as the clearance of the participants list or liberate the arena. + * @author BiggBoss */ -public final class GeneralDilios extends AbstractNpcAI +public final class HandysBlockCheckerManager { - private static final int GENERAL_ID = 32549; - private static final int GUARD_ID = 32619; + // All the participants and their team classified by arena + private static final ArenaParticipantsHolder[] _arenaPlayers = new ArenaParticipantsHolder[4]; - private L2Npc _general = null; - private final Set _guards = Collections.newSetFromMap(new ConcurrentHashMap<>()); + // Arena votes to start the game + private static final Map _arenaVotes = new HashMap<>(); - private static final NpcStringId[] DILIOS_TEXT = + // Arena Status, True = is being used, otherwise, False + private static final Map _arenaStatus = new HashMap<>(); + + // Registration request penalty (10 seconds) + protected static Set _registrationPenalty = Collections.synchronizedSet(new HashSet<>()); + + /** + * Return the number of event-start votes for the specified arena id + * @param arenaId + * @return int (number of votes) + */ + public synchronized int getArenaVotes(int arenaId) { - NpcStringId.MESSENGER_INFORM_THE_PATRONS_OF_THE_KEUCEREUS_ALLIANCE_BASE_WE_RE_GATHERING_BRAVE_ADVENTURERS_TO_ATTACK_TIAT_S_MOUNTED_TROOP_THAT_S_ROOTED_IN_THE_SEED_OF_DESTRUCTION, - // NpcStringId.MESSENGER_INFORM_THE_PATRONS_OF_THE_KEUCEREUS_ALLIANCE_BASE_THE_SEED_OF_DESTRUCTION_IS_CURRENTLY_SECURED_UNDER_THE_FLAG_OF_THE_KEUCEREUS_ALLIANCE, - // NpcStringId.MESSENGER_INFORM_THE_PATRONS_OF_THE_KEUCEREUS_ALLIANCE_BASE_TIATS_MOUNTED_TROOP_IS_CURRENTLY_TRYING_TO_RETAKE_SEED_OF_DESTRUCTION_COMMIT_ALL_THE_AVAILABLE_REINFORCEMENTS_INTO_SEED_OF_DESTRUCTION, - NpcStringId.MESSENGER_INFORM_THE_BROTHERS_IN_KUCEREUS_CLAN_OUTPOST_BRAVE_ADVENTURERS_WHO_HAVE_CHALLENGED_THE_SEED_OF_INFINITY_ARE_CURRENTLY_INFILTRATING_THE_HALL_OF_EROSION_THROUGH_THE_DEFENSIVELY_WEAK_HALL_OF_SUFFERING, - // NpcStringId.MESSENGER_INFORM_THE_BROTHERS_IN_KUCEREUS_CLAN_OUTPOST_SWEEPING_THE_SEED_OF_INFINITY_IS_CURRENTLY_COMPLETE_TO_THE_HEART_OF_THE_SEED_EKIMUS_IS_BEING_DIRECTLY_ATTACKED_AND_THE_UNDEAD_REMAINING_IN_THE_HALL_OF_SUFFERING_ARE_BEING_ERADICATED, - NpcStringId.MESSENGER_INFORM_THE_PATRONS_OF_THE_KEUCEREUS_ALLIANCE_BASE_THE_SEED_OF_INFINITY_IS_CURRENTLY_SECURED_UNDER_THE_FLAG_OF_THE_KEUCEREUS_ALLIANCE - // NpcStringId.MESSENGER_INFORM_THE_PATRONS_OF_THE_KEUCEREUS_ALLIANCE_BASE_THE_RESURRECTED_UNDEAD_IN_THE_SEED_OF_INFINITY_ARE_POURING_INTO_THE_HALL_OF_SUFFERING_AND_THE_HALL_OF_EROSION - // NpcStringId.MESSENGER_INFORM_THE_BROTHERS_IN_KUCEREUS_CLAN_OUTPOST_EKIMUS_IS_ABOUT_TO_BE_REVIVED_BY_THE_RESURRECTED_UNDEAD_IN_SEED_OF_INFINITY_SEND_ALL_REINFORCEMENTS_TO_THE_HEART_AND_THE_HALL_OF_SUFFERING - }; - - public GeneralDilios() - { - addSpawnId(GENERAL_ID, GUARD_ID); + return _arenaVotes.get(arenaId); } - @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + /** + * Add a new vote to start the event for the specified arena id + * @param arena + */ + public synchronized void increaseArenaVotes(int arena) { - if (event.startsWith("command_")) + final int newVotes = _arenaVotes.get(arena) + 1; + final ArenaParticipantsHolder holder = _arenaPlayers[arena]; + + if ((newVotes > (holder.getAllPlayers().size() / 2)) && !holder.getEvent().isStarted()) { - int value = Integer.parseInt(event.substring(8)); - if (value < 6) + clearArenaVotes(arena); + if ((holder.getBlueTeamSize() == 0) || (holder.getRedTeamSize() == 0)) { - _general.broadcastPacket(new NpcSay(_general.getObjectId(), ChatType.NPC_GENERAL, GENERAL_ID, NpcStringId.STABBING_THREE_TIMES)); - startQuestTimer("guard_animation_0", 3400, null, null); + return; + } + if (Config.HBCE_FAIR_PLAY) + { + holder.checkAndShuffle(); + } + ThreadPool.execute(holder.getEvent().new StartEvent()); + } + else + { + _arenaVotes.put(arena, newVotes); + } + } + + /** + * Will clear the votes queue (of event start) for the specified arena id + * @param arena + */ + public synchronized void clearArenaVotes(int arena) + { + _arenaVotes.put(arena, 0); + } + + protected HandysBlockCheckerManager() + { + // Initialize arena status + _arenaStatus.put(0, false); + _arenaStatus.put(1, false); + _arenaStatus.put(2, false); + _arenaStatus.put(3, false); + + // Initialize arena votes + _arenaVotes.put(0, 0); + _arenaVotes.put(1, 0); + _arenaVotes.put(2, 0); + _arenaVotes.put(3, 0); + } + + /** + * Returns the players holder + * @param arena + * @return ArenaParticipantsHolder + */ + public ArenaParticipantsHolder getHolder(int arena) + { + return _arenaPlayers[arena]; + } + + /** + * Initializes the participants holder + */ + public void startUpParticipantsQueue() + { + for (int i = 0; i < 4; ++i) + { + _arenaPlayers[i] = new ArenaParticipantsHolder(i); + } + } + + /** + * Add the player to the specified arena (through the specified arena manager) and send the needed server -> client packets + * @param player + * @param arenaId + * @return + */ + public boolean addPlayerToArena(L2PcInstance player, int arenaId) + { + final ArenaParticipantsHolder holder = _arenaPlayers[arenaId]; + + synchronized (holder) + { + boolean isRed; + + for (int i = 0; i < 4; i++) + { + if (_arenaPlayers[i].getAllPlayers().contains(player)) + { + final SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_ALREADY_REGISTERED_ON_THE_MATCH_WAITING_LIST); + msg.addString(player.getName()); + player.sendPacket(msg); + return false; + } + } + + if (player.isCursedWeaponEquipped()) + { + player.sendPacket(SystemMessageId.YOU_CANNOT_REGISTER_WHILE_IN_POSSESSION_OF_A_CURSED_WEAPON); + return false; + } + + if (player.isOnEvent() || player.isInOlympiadMode()) + { + player.sendMessage("Couldnt register you due other event participation"); + return false; + } + + if (OlympiadManager.getInstance().isRegistered(player)) + { + OlympiadManager.getInstance().unRegisterNoble(player); + player.sendPacket(SystemMessageId.APPLICANTS_FOR_THE_OLYMPIAD_UNDERGROUND_COLISEUM_OR_KRATEI_S_CUBE_MATCHES_CANNOT_REGISTER); + } + + // if(UnderGroundColiseum.getInstance().isRegisteredPlayer(player)) + // { + // UngerGroundColiseum.getInstance().removeParticipant(player); + // player.sendPacket(SystemMessageId.COLISEUM_OLYMPIAD_KRATEIS_APPLICANTS_CANNOT_PARTICIPATE)); + // } + // if(KrateiCubeManager.getInstance().isRegisteredPlayer(player)) + // { + // KrateiCubeManager.getInstance().removeParticipant(player); + // player.sendPacket(SystemMessageId.COLISEUM_OLYMPIAD_KRATEIS_APPLICANTS_CANNOT_PARTICIPATE)); + // } + + if (_registrationPenalty.contains(player.getObjectId())) + { + player.sendPacket(SystemMessageId.YOU_MUST_WAIT_10_SECONDS_BEFORE_ATTEMPTING_TO_REGISTER_AGAIN); + return false; + } + + if (holder.getBlueTeamSize() < holder.getRedTeamSize()) + { + holder.addPlayer(player, 1); + isRed = false; } else { - value = -1; - _general.broadcastPacket(new NpcSay(_general.getObjectId(), ChatType.NPC_SHOUT, GENERAL_ID, DILIOS_TEXT[getRandom(DILIOS_TEXT.length)])); + holder.addPlayer(player, 0); + isRed = true; } - startQuestTimer("command_" + (value + 1), 60000, null, null); + holder.broadCastPacketToTeam(new ExCubeGameAddPlayer(player, isRed)); + return true; } - else if (event.startsWith("guard_animation_")) - { - final int value = Integer.parseInt(event.substring(16)); - for (L2Spawn guard : _guards) - { - guard.getLastSpawn().broadcastSocialAction(4); - } - if (value < 2) - { - startQuestTimer("guard_animation_" + (value + 1), 1500, null, null); - } - } - return super.onAdvEvent(event, npc, player); } - @Override - public String onSpawn(L2Npc npc) + /** + * Will remove the specified player from the specified team and arena and will send the needed packet to all his team mates / enemy team mates + * @param player + * @param arenaId + * @param team + */ + public void removePlayer(L2PcInstance player, int arenaId, int team) { - if (npc.getId() == GENERAL_ID) + final ArenaParticipantsHolder holder = _arenaPlayers[arenaId]; + synchronized (holder) { - startQuestTimer("command_0", 60000, null, null); - _general = npc; + final boolean isRed = team == 0; + + holder.removePlayer(player, team); + holder.broadCastPacketToTeam(new ExCubeGameRemovePlayer(player, isRed)); + + // End event if theres an empty team + final int teamSize = isRed ? holder.getRedTeamSize() : holder.getBlueTeamSize(); + if (teamSize == 0) + { + holder.getEvent().endEventAbnormally(); + } + + _registrationPenalty.add(player.getObjectId()); + schedulePenaltyRemoval(player.getObjectId()); } - else if (npc.getId() == GUARD_ID) - { - _guards.add(npc.getSpawn()); - } - return super.onSpawn(npc); } -} + + /** + * Will change the player from one team to other (if possible) and will send the needed packets + * @param player + * @param arena + * @param team + */ + public void changePlayerToTeam(L2PcInstance player, int arena, int team) + { + final ArenaParticipantsHolder holder = _arenaPlayers[arena]; + + synchronized (holder) + { + final boolean isFromRed = holder.getRedPlayers().contains(player); + + if (isFromRed && (holder.getBlueTeamSize() == 6)) + { + player.sendMessage("The team is full"); + return; + } + else if (!isFromRed && (holder.getRedTeamSize() == 6)) + { + player.sendMessage("The team is full"); + return; + } + + final int futureTeam = isFromRed ? 1 : 0; + holder.addPlayer(player, futureTeam); + + if (isFromRed) + { + holder.removePlayer(player, 0); + } + else + { + holder.removePlayer(player, 1); + } + holder.broadCastPacketToTeam(new ExCubeGameChangeTeam(player, isFromRed)); + } + } + + /** + * Will erase all participants from the specified holder + * @param arenaId + */ + public synchronized void clearPaticipantQueueByArenaId(int arenaId) + { + _arenaPlayers[arenaId].clearPlayers(); + } + + /** + * Returns true if arena is holding an event at this momment + * @param arenaId + * @return boolean + */ + public boolean arenaIsBeingUsed(int arenaId) + { + if ((arenaId < 0) || (arenaId > 3)) + { + return false; + } + return _arenaStatus.get(arenaId); + } + + /** + * Set the specified arena as being used + * @param arenaId + */ + public void setArenaBeingUsed(int arenaId) + { + _arenaStatus.put(arenaId, true); + } + + /** + * Set as free the specified arena for future events + * @param arenaId + */ + public void setArenaFree(int arenaId) + { + _arenaStatus.put(arenaId, false); + } + + /** + * Called when played logs out while participating in Block Checker Event + * @param player + */ + public void onDisconnect(L2PcInstance player) + { + final int arena = player.getBlockCheckerArena(); + final int team = getHolder(arena).getPlayerTeam(player); + getInstance().removePlayer(player, arena, team); + if (player.getTeam() != Team.NONE) + { + player.stopAllEffects(); + // Remove team aura + player.setTeam(Team.NONE); + + // Remove the event items + final PcInventory inv = player.getInventory(); + + if (inv.getItemByItemId(13787) != null) + { + final long count = inv.getInventoryItemCount(13787, 0); + inv.destroyItemByItemId("Handys Block Checker", 13787, count, player, player); + } + if (inv.getItemByItemId(13788) != null) + { + final long count = inv.getInventoryItemCount(13788, 0); + inv.destroyItemByItemId("Handys Block Checker", 13788, count, player, player); + } + player.setInsideZone(ZoneId.PVP, false); + // Teleport Back + player.teleToLocation(-57478, -60367, -2370); + } + } + + public void removePenalty(int objectId) + { + _registrationPenalty.remove(objectId); + } + + private void schedulePenaltyRemoval(int objId) + { + ThreadPool.schedule(new PenaltyRemoveTask(objId), 10000); + } + + /** + * Gets the single instance of {@code HandysBlockCheckerManager}. + * @return single instance of {@code HandysBlockCheckerManager} + */ + public static HandysBlockCheckerManager getInstance() + { + return SingletonHolder._instance; + } + + private static class SingletonHolder + { + protected static final HandysBlockCheckerManager _instance = new HandysBlockCheckerManager(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/L2Object.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/L2Object.java index e952cfad5f..2c8d99795c 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/L2Object.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/L2Object.java @@ -846,7 +846,7 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab int heading = Util.calculateHeadingFrom(this, target) - _heading; if (heading < 0) { - heading = 65535 + heading; + heading += 65535; } return Util.convertHeadingToDegree(heading); } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java index bd8f19ae77..8c2e1143ca 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java @@ -101,7 +101,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance public void onReceiveFood() { // Eating food extends the duration by 20secs, to a max of 20minutes - _remainingTime = _remainingTime + DURATION_INCREASE_INTERVAL; + _remainingTime += DURATION_INCREASE_INTERVAL; if (_remainingTime > MAX_DURATION) { _remainingTime = MAX_DURATION; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/entity/Hero.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/entity/Hero.java index 0e0cf613e1..6698cd23a0 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/entity/Hero.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/entity/Hero.java @@ -193,7 +193,7 @@ public class Hero private String calcFightTime(long FightTime) { final String format = String.format("%%0%dd", 2); - FightTime = FightTime / 1000; + FightTime /= 1000; return String.format(format, (FightTime % 3600) / 60) + ":" + String.format(format, FightTime % 60); } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/instancezone/Instance.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/instancezone/Instance.java index 8e5df0ab43..4def82d945 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/instancezone/Instance.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/instancezone/Instance.java @@ -780,22 +780,22 @@ public final class Instance else if ((remaining > 300000) && (emptyTimeLeft > 300000)) { interval = 300000; - remaining = remaining - 300000; + remaining -= 300000; } else if ((remaining > 60000) && (emptyTimeLeft > 60000)) { interval = 60000; - remaining = remaining - 60000; + remaining -= 60000; } else if ((remaining > 30000) && (emptyTimeLeft > 30000)) { interval = 30000; - remaining = remaining - 30000; + remaining -= 30000; } else { interval = 10000; - remaining = remaining - 10000; + remaining -= 10000; } } else if (remaining > 300000) @@ -805,7 +805,7 @@ public final class Instance final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTE_S_YOU_WILL_BE_FORCED_OUT_OF_THE_DUNGEON_WHEN_THE_TIME_EXPIRES); sm.addString(Integer.toString(timeLeft)); Broadcast.toPlayersInInstance(sm, _id); - remaining = remaining - 300000; + remaining -= 300000; } else if (remaining > 60000) { @@ -814,21 +814,21 @@ public final class Instance final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTE_S_YOU_WILL_BE_FORCED_OUT_OF_THE_DUNGEON_WHEN_THE_TIME_EXPIRES); sm.addString(Integer.toString(timeLeft)); Broadcast.toPlayersInInstance(sm, _id); - remaining = remaining - 60000; + remaining -= 60000; } else if (remaining > 30000) { timeLeft = remaining / 1000; interval = 30000; cs = new CreatureSay(0, ChatType.ALLIANCE, "Notice", timeLeft + " seconds left."); - remaining = remaining - 30000; + remaining -= 30000; } else { timeLeft = remaining / 1000; interval = 10000; cs = new CreatureSay(0, ChatType.ALLIANCE, "Notice", timeLeft + " seconds left."); - remaining = remaining - 10000; + remaining -= 10000; } if (cs != null) { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 0516abc9cf..e3adb82b21 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -1782,12 +1782,12 @@ public final class Formulas attack_attribute += 100; attack_attribute *= attack_attribute; - attack_attribute_mod = (attack_attribute / 144.0) * attack_attribute_mod; + attack_attribute_mod *= (attack_attribute / 144.0); defence_attribute += 100; defence_attribute *= defence_attribute; - defence_attribute_mod = (defence_attribute / 169.0) * defence_attribute_mod; + defence_attribute_mod *= (defence_attribute / 169.0); double attribute_mod_diff = attack_attribute_mod - defence_attribute_mod; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index ada6177a88..1c61d25fa7 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -112,13 +112,13 @@ public class ZoneCuboid extends L2ZoneForm final int _y2 = _r.y + _r.height; // x1->x2 - for (int x = _x1; x < _x2; x = x + STEP) + for (int x = _x1; x < _x2; x += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, x, _y1, z); dropDebugItem(Inventory.ADENA_ID, 1, x, _y2, z); } // y1->y2 - for (int y = _y1; y < _y2; y = y + STEP) + for (int y = _y1; y < _y2; y += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, _x1, y, z); dropDebugItem(Inventory.ADENA_ID, 1, _x2, y, z); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ExUISetting.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ExUISetting.java index 3d4b978fae..6d3dd6563b 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ExUISetting.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ExUISetting.java @@ -49,21 +49,21 @@ public class ExUISetting implements IClientOutgoingPacket if (_uiSettings.getCategories().containsKey(category)) { final List catElList1 = _uiSettings.getCategories().get(category); - size = size + catElList1.size(); + size += catElList1.size(); } category++; size++; if (_uiSettings.getCategories().containsKey(category)) { final List catElList2 = _uiSettings.getCategories().get(category); - size = size + catElList2.size(); + size += catElList2.size(); } category++; - size = size + 4; + size += 4; if (_uiSettings.getKeys().containsKey(i)) { final List keyElList = _uiSettings.getKeys().get(i); - size = size + (keyElList.size() * 20); + size += (keyElList.size() * 20); } } buffsize = size; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/Util.java index 9249d78477..884c1d9557 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/Util.java @@ -83,7 +83,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return angleTarget; } @@ -97,7 +97,7 @@ public final class Util { if (degree < 0) { - degree = 360 + degree; + degree += 360; } return (int) (degree * 182.044444444); } @@ -112,7 +112,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } @@ -122,7 +122,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(dy, dx)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/loginserver/GameServerThread.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/loginserver/GameServerThread.java index 7ad31f7916..dbae7995e2 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/loginserver/GameServerThread.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/loginserver/GameServerThread.java @@ -104,7 +104,7 @@ public class GameServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = _in.read(data, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index 0a4737ae90..b42c605108 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -1242,7 +1242,7 @@ public class AdminEditChar implements IAdminCommandHandler name = player.getName(); if (name.toLowerCase().contains(CharacterToFind.toLowerCase())) { - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append("
"); @@ -1342,7 +1342,7 @@ public class AdminEditChar implements IAdminCommandHandler } name = player.getName(); - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/LoginServerThread.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/LoginServerThread.java index ba22e9ae11..dc4b70f0be 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/LoginServerThread.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/LoginServerThread.java @@ -187,7 +187,7 @@ public class LoginServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = in.read(incoming, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java index ace84cc7f1..873ee3d3df 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java @@ -125,7 +125,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = originalAttackTarget.getX() + newX; + newX += originalAttackTarget.getX(); } else { @@ -134,7 +134,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = originalAttackTarget.getY() + newY; + newY += originalAttackTarget.getY(); } else { @@ -167,20 +167,20 @@ public class FriendlyNpcAI extends L2AttackableAI if (originalAttackTarget.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (originalAttackTarget.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) @@ -197,10 +197,10 @@ public class FriendlyNpcAI extends L2AttackableAI int range = npc.getPhysicalAttackRange() + combinedCollision; if (originalAttackTarget.isMoving()) { - range = range + 50; + range += 50; if (npc.isMoving()) { - range = range + 50; + range += 50; } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 9b49df1495..4b37212d3a 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -757,7 +757,7 @@ public class L2AttackableAI extends L2CharacterAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = target.getX() + newX; + newX += target.getX(); } else { @@ -766,7 +766,7 @@ public class L2AttackableAI extends L2CharacterAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = target.getY() + newY; + newY += target.getY(); } else { @@ -799,20 +799,20 @@ public class L2AttackableAI extends L2CharacterAI if (target.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (target.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java index 21ed01119d..9d5fd311e8 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java @@ -132,7 +132,7 @@ public class StackIDFactory extends IdFactory else { id = _curOID; - _curOID = _curOID + 1; + _curOID += 1; } return id; } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/L2Object.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/L2Object.java index 7818e92ace..9b4b881ff9 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/L2Object.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/L2Object.java @@ -813,7 +813,7 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab int heading = Util.calculateHeadingFrom(this, target) - _heading; if (heading < 0) { - heading = 65535 + heading; + heading += 65535; } return Util.convertHeadingToDegree(heading); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java index 806873802e..ce409e1e8a 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java @@ -102,7 +102,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance public void onReceiveFood() { // Eating food extends the duration by 20secs, to a max of 20minutes - _remainingTime = _remainingTime + DURATION_INCREASE_INTERVAL; + _remainingTime += DURATION_INCREASE_INTERVAL; if (_remainingTime > MAX_DURATION) { _remainingTime = MAX_DURATION; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/entity/Hero.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/entity/Hero.java index 27be59aa41..b0f807cb38 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/entity/Hero.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/entity/Hero.java @@ -199,7 +199,7 @@ public class Hero private String calcFightTime(long FightTime) { final String format = String.format("%%0%dd", 2); - FightTime = FightTime / 1000; + FightTime /= 1000; final String seconds = String.format(format, FightTime % 60); final String minutes = String.format(format, (FightTime % 3600) / 60); return minutes + ":" + seconds; diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 07abdb1173..d727fe57a0 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -256,7 +256,7 @@ public final class Formulas // Autoattack critical depends on level difference at high levels as well. if ((activeChar.getLevel() >= 78) || (target.getLevel() >= 78)) { - rate = rate + (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); + rate += (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); } // Autoattack critical rate is limited between 3%-97%. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index 0982f340af..617c98de98 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -112,13 +112,13 @@ public class ZoneCuboid extends L2ZoneForm final int _y2 = _r.y + _r.height; // x1->x2 - for (int x = _x1; x < _x2; x = x + STEP) + for (int x = _x1; x < _x2; x += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, x, _y1, z); dropDebugItem(Inventory.ADENA_ID, 1, x, _y2, z); } // y1->y2 - for (int y = _y1; y < _y2; y = y + STEP) + for (int y = _y1; y < _y2; y += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, _x1, y, z); dropDebugItem(Inventory.ADENA_ID, 1, _x2, y, z); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/Util.java index bba56f5466..cd566e6d3f 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/util/Util.java @@ -87,7 +87,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return angleTarget; } @@ -127,7 +127,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } @@ -137,7 +137,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(dy, dx)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/loginserver/GameServerThread.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/loginserver/GameServerThread.java index 7d9ec1824b..dcac78d9ca 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/loginserver/GameServerThread.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/loginserver/GameServerThread.java @@ -104,7 +104,7 @@ public class GameServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = _in.read(data, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index 0a4737ae90..b42c605108 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -1242,7 +1242,7 @@ public class AdminEditChar implements IAdminCommandHandler name = player.getName(); if (name.toLowerCase().contains(CharacterToFind.toLowerCase())) { - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); @@ -1342,7 +1342,7 @@ public class AdminEditChar implements IAdminCommandHandler } name = player.getName(); - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/LoginServerThread.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/LoginServerThread.java index ba22e9ae11..dc4b70f0be 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/LoginServerThread.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/LoginServerThread.java @@ -187,7 +187,7 @@ public class LoginServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = in.read(incoming, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java index ace84cc7f1..873ee3d3df 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java @@ -125,7 +125,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = originalAttackTarget.getX() + newX; + newX += originalAttackTarget.getX(); } else { @@ -134,7 +134,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = originalAttackTarget.getY() + newY; + newY += originalAttackTarget.getY(); } else { @@ -167,20 +167,20 @@ public class FriendlyNpcAI extends L2AttackableAI if (originalAttackTarget.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (originalAttackTarget.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) @@ -197,10 +197,10 @@ public class FriendlyNpcAI extends L2AttackableAI int range = npc.getPhysicalAttackRange() + combinedCollision; if (originalAttackTarget.isMoving()) { - range = range + 50; + range += 50; if (npc.isMoving()) { - range = range + 50; + range += 50; } } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 9b49df1495..4b37212d3a 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -757,7 +757,7 @@ public class L2AttackableAI extends L2CharacterAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = target.getX() + newX; + newX += target.getX(); } else { @@ -766,7 +766,7 @@ public class L2AttackableAI extends L2CharacterAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = target.getY() + newY; + newY += target.getY(); } else { @@ -799,20 +799,20 @@ public class L2AttackableAI extends L2CharacterAI if (target.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (target.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java index 21ed01119d..9d5fd311e8 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java @@ -132,7 +132,7 @@ public class StackIDFactory extends IdFactory else { id = _curOID; - _curOID = _curOID + 1; + _curOID += 1; } return id; } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/L2Object.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/L2Object.java index 7818e92ace..9b4b881ff9 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/L2Object.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/L2Object.java @@ -813,7 +813,7 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab int heading = Util.calculateHeadingFrom(this, target) - _heading; if (heading < 0) { - heading = 65535 + heading; + heading += 65535; } return Util.convertHeadingToDegree(heading); } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java index 806873802e..ce409e1e8a 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java @@ -102,7 +102,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance public void onReceiveFood() { // Eating food extends the duration by 20secs, to a max of 20minutes - _remainingTime = _remainingTime + DURATION_INCREASE_INTERVAL; + _remainingTime += DURATION_INCREASE_INTERVAL; if (_remainingTime > MAX_DURATION) { _remainingTime = MAX_DURATION; diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/entity/Hero.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/entity/Hero.java index 27be59aa41..b0f807cb38 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/entity/Hero.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/entity/Hero.java @@ -199,7 +199,7 @@ public class Hero private String calcFightTime(long FightTime) { final String format = String.format("%%0%dd", 2); - FightTime = FightTime / 1000; + FightTime /= 1000; final String seconds = String.format(format, FightTime % 60); final String minutes = String.format(format, (FightTime % 3600) / 60); return minutes + ":" + seconds; diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 07abdb1173..d727fe57a0 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -256,7 +256,7 @@ public final class Formulas // Autoattack critical depends on level difference at high levels as well. if ((activeChar.getLevel() >= 78) || (target.getLevel() >= 78)) { - rate = rate + (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); + rate += (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); } // Autoattack critical rate is limited between 3%-97%. diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index 0982f340af..617c98de98 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -112,13 +112,13 @@ public class ZoneCuboid extends L2ZoneForm final int _y2 = _r.y + _r.height; // x1->x2 - for (int x = _x1; x < _x2; x = x + STEP) + for (int x = _x1; x < _x2; x += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, x, _y1, z); dropDebugItem(Inventory.ADENA_ID, 1, x, _y2, z); } // y1->y2 - for (int y = _y1; y < _y2; y = y + STEP) + for (int y = _y1; y < _y2; y += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, _x1, y, z); dropDebugItem(Inventory.ADENA_ID, 1, _x2, y, z); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/Util.java index bba56f5466..cd566e6d3f 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/util/Util.java @@ -87,7 +87,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return angleTarget; } @@ -127,7 +127,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } @@ -137,7 +137,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(dy, dx)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/loginserver/GameServerThread.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/loginserver/GameServerThread.java index 7d9ec1824b..dcac78d9ca 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/loginserver/GameServerThread.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/loginserver/GameServerThread.java @@ -104,7 +104,7 @@ public class GameServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = _in.read(data, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index aebdbccc76..12d03d56a3 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -1242,7 +1242,7 @@ public class AdminEditChar implements IAdminCommandHandler name = player.getName(); if (name.toLowerCase().contains(CharacterToFind.toLowerCase())) { - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); @@ -1342,7 +1342,7 @@ public class AdminEditChar implements IAdminCommandHandler } name = player.getName(); - CharactersFound = CharactersFound + 1; + CharactersFound += 1; replyMSG.append(""); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/LoginServerThread.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/LoginServerThread.java index ba22e9ae11..dc4b70f0be 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/LoginServerThread.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/LoginServerThread.java @@ -187,7 +187,7 @@ public class LoginServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = in.read(incoming, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java index ace84cc7f1..873ee3d3df 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/FriendlyNpcAI.java @@ -125,7 +125,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = originalAttackTarget.getX() + newX; + newX += originalAttackTarget.getX(); } else { @@ -134,7 +134,7 @@ public class FriendlyNpcAI extends L2AttackableAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = originalAttackTarget.getY() + newY; + newY += originalAttackTarget.getY(); } else { @@ -167,20 +167,20 @@ public class FriendlyNpcAI extends L2AttackableAI if (originalAttackTarget.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (originalAttackTarget.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) @@ -197,10 +197,10 @@ public class FriendlyNpcAI extends L2AttackableAI int range = npc.getPhysicalAttackRange() + combinedCollision; if (originalAttackTarget.isMoving()) { - range = range + 50; + range += 50; if (npc.isMoving()) { - range = range + 50; + range += 50; } } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java index 9b49df1495..4b37212d3a 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/ai/L2AttackableAI.java @@ -757,7 +757,7 @@ public class L2AttackableAI extends L2CharacterAI int newX = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newX = target.getX() + newX; + newX += target.getX(); } else { @@ -766,7 +766,7 @@ public class L2AttackableAI extends L2CharacterAI int newY = combinedCollision + Rnd.get(40); if (Rnd.nextBoolean()) { - newY = target.getY() + newY; + newY += target.getY(); } else { @@ -799,20 +799,20 @@ public class L2AttackableAI extends L2CharacterAI if (target.getX() < posX) { - posX = posX + 300; + posX += 300; } else { - posX = posX - 300; + posX -= 300; } if (target.getY() < posY) { - posY = posY + 300; + posY += 300; } else { - posY = posY - 300; + posY -= 300; } if (GeoEngine.getInstance().canMoveToTarget(npc.getX(), npc.getY(), npc.getZ(), posX, posY, posZ, npc.getInstanceWorld())) diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java index 21ed01119d..9d5fd311e8 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/idfactory/StackIDFactory.java @@ -132,7 +132,7 @@ public class StackIDFactory extends IdFactory else { id = _curOID; - _curOID = _curOID + 1; + _curOID += 1; } return id; } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/L2Object.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/L2Object.java index 7818e92ace..9b4b881ff9 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/L2Object.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/L2Object.java @@ -813,7 +813,7 @@ public abstract class L2Object extends ListenersContainer implements IIdentifiab int heading = Util.calculateHeadingFrom(this, target) - _heading; if (heading < 0) { - heading = 65535 + heading; + heading += 65535; } return Util.convertHeadingToDegree(heading); } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java index 806873802e..ce409e1e8a 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2TamedBeastInstance.java @@ -102,7 +102,7 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance public void onReceiveFood() { // Eating food extends the duration by 20secs, to a max of 20minutes - _remainingTime = _remainingTime + DURATION_INCREASE_INTERVAL; + _remainingTime += DURATION_INCREASE_INTERVAL; if (_remainingTime > MAX_DURATION) { _remainingTime = MAX_DURATION; diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/entity/Hero.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/entity/Hero.java index 27be59aa41..b0f807cb38 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/entity/Hero.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/entity/Hero.java @@ -199,7 +199,7 @@ public class Hero private String calcFightTime(long FightTime) { final String format = String.format("%%0%dd", 2); - FightTime = FightTime / 1000; + FightTime /= 1000; final String seconds = String.format(format, FightTime % 60); final String minutes = String.format(format, (FightTime % 3600) / 60); return minutes + ":" + seconds; diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/Formulas.java index 07abdb1173..d727fe57a0 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/stats/Formulas.java @@ -256,7 +256,7 @@ public final class Formulas // Autoattack critical depends on level difference at high levels as well. if ((activeChar.getLevel() >= 78) || (target.getLevel() >= 78)) { - rate = rate + (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); + rate += (Math.sqrt(activeChar.getLevel()) * (activeChar.getLevel() - target.getLevel()) * 0.125); } // Autoattack critical rate is limited between 3%-97%. diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java index 0982f340af..617c98de98 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/zone/form/ZoneCuboid.java @@ -112,13 +112,13 @@ public class ZoneCuboid extends L2ZoneForm final int _y2 = _r.y + _r.height; // x1->x2 - for (int x = _x1; x < _x2; x = x + STEP) + for (int x = _x1; x < _x2; x += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, x, _y1, z); dropDebugItem(Inventory.ADENA_ID, 1, x, _y2, z); } // y1->y2 - for (int y = _y1; y < _y2; y = y + STEP) + for (int y = _y1; y < _y2; y += STEP) { dropDebugItem(Inventory.ADENA_ID, 1, _x1, y, z); dropDebugItem(Inventory.ADENA_ID, 1, _x2, y, z); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/Util.java index bba56f5466..cd566e6d3f 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/util/Util.java @@ -87,7 +87,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return angleTarget; } @@ -127,7 +127,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(toY - fromY, toX - fromX)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } @@ -137,7 +137,7 @@ public final class Util double angleTarget = Math.toDegrees(Math.atan2(dy, dx)); if (angleTarget < 0) { - angleTarget = 360 + angleTarget; + angleTarget += 360; } return (int) (angleTarget * 182.044444444); } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/loginserver/GameServerThread.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/loginserver/GameServerThread.java index 7d9ec1824b..dcac78d9ca 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/loginserver/GameServerThread.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/loginserver/GameServerThread.java @@ -104,7 +104,7 @@ public class GameServerThread extends Thread while ((newBytes != -1) && (receivedBytes < (length - 2))) { newBytes = _in.read(data, receivedBytes, left); - receivedBytes = receivedBytes + newBytes; + receivedBytes += newBytes; left -= newBytes; }