diff --git a/2006Redone Server/src/com/rebotted/game/content/combat/CombatAssistant.java b/2006Redone Server/src/com/rebotted/game/content/combat/CombatAssistant.java index 70dd1ad9..d00ca484 100644 --- a/2006Redone Server/src/com/rebotted/game/content/combat/CombatAssistant.java +++ b/2006Redone Server/src/com/rebotted/game/content/combat/CombatAssistant.java @@ -569,7 +569,7 @@ public class CombatAssistant { return; } } - if (c.isWoodcutting == true) { + if (c.isWoodcutting) { c.getPacketSender().sendMessage("You can't attack an npc while woodcutting."); resetPlayerAttack(); return; diff --git a/2006Redone Server/src/com/rebotted/game/content/combat/range/DwarfCannon.java b/2006Redone Server/src/com/rebotted/game/content/combat/range/DwarfCannon.java index 5ebac9c3..3e5c004e 100644 --- a/2006Redone Server/src/com/rebotted/game/content/combat/range/DwarfCannon.java +++ b/2006Redone Server/src/com/rebotted/game/content/combat/range/DwarfCannon.java @@ -98,7 +98,7 @@ public class DwarfCannon { } public void placeCannon() { - if (settingUp == true) { + if (settingUp) { return; } if (noSetUpArea()) { @@ -250,7 +250,7 @@ public class DwarfCannon { } if (myBalls >= 1 && rotating == false) { shoot(); - } else if (myBalls >= 1 && rotating == true) { + } else if (myBalls >= 1 && rotating) { player.getPacketSender().sendMessage("Your cannon is already shooting."); } } @@ -283,7 +283,7 @@ public class DwarfCannon { } public void shoot() { - if (justClicked == true) { + if (justClicked) { return; } rotating = true; @@ -302,7 +302,7 @@ public class DwarfCannon { rotating = false; e.stop(); } - if (rotating == true) { + if (rotating) { rotation += 1; rotateCannon(); shootNpcs(); @@ -360,7 +360,7 @@ public class DwarfCannon { player.getPacketSender().sendMessage("You can't pick up somebody else's cannon!"); return; } - if (rotating == true) { + if (rotating) { rotating = false; } if (player.getItemAssistant().freeSlots() > 3) { diff --git a/2006Redone Server/src/com/rebotted/game/content/minigames/castlewars/CastleWars.java b/2006Redone Server/src/com/rebotted/game/content/minigames/castlewars/CastleWars.java index e3d601be..be02e2a4 100644 --- a/2006Redone Server/src/com/rebotted/game/content/minigames/castlewars/CastleWars.java +++ b/2006Redone Server/src/com/rebotted/game/content/minigames/castlewars/CastleWars.java @@ -126,7 +126,7 @@ public class CastleWars { public static void addToWaitRoom(Player p, int team) { if (p == null) { return; - } else if (gameStarted == true) { + } else if (gameStarted) { p.getPacketSender() .sendMessage( "There's already a Castle Wars going. Please wait a few minutes before trying again."); diff --git a/2006Redone Server/src/com/rebotted/game/content/minigames/trawler/Trawler.java b/2006Redone Server/src/com/rebotted/game/content/minigames/trawler/Trawler.java index 2c60f03d..60b39e01 100644 --- a/2006Redone Server/src/com/rebotted/game/content/minigames/trawler/Trawler.java +++ b/2006Redone Server/src/com/rebotted/game/content/minigames/trawler/Trawler.java @@ -218,7 +218,7 @@ public class Trawler extends GroupMinigame { } GameEngine.objectHandler.removeObject(GameEngine.objectHandler.getObjectByPosition(w.x, w.y)); GameEngine.objectHandler.removeObject(GameEngine.objectHandler.getObjectByPosition(w.x + (isSunk ? -128 : 128), w.y)); - if (wall_status[index] == true) { + if (wall_status[index]) { GameEngine.objectHandler.createAnObject(leaking_wall, w.x, w.y, w.y == 4826 ? 1 : 3); if (isSunk) diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/SkillHandler.java b/2006Redone Server/src/com/rebotted/game/content/skills/SkillHandler.java index 24288244..30b98548 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/SkillHandler.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/SkillHandler.java @@ -35,7 +35,7 @@ public class SkillHandler { || player.isMining || player.isWoodcutting || player.isSmithing || player.isSmelting || player.isSpinning || player.isPotionMaking || player.isPotCrafting || player.isFiremaking - || player.playerSkilling[player.playerHerblore] == true + || player.playerSkilling[player.playerHerblore] || player.playerSkilling[13]) { return true; } @@ -46,7 +46,7 @@ public class SkillHandler { public static void resetItemOnNpc(Player player) { if (player.isMining) {// mining Mining.resetMining(player); - } else if (player.playerIsFletching == true) {// fletching + } else if (player.playerIsFletching) {// fletching player.playerIsFletching = false; } else if (player.playerIsCooking) {// cooking Cooking.resetCooking(player); @@ -56,7 +56,7 @@ public class SkillHandler { isSkilling[12] = false; } else if (player.isSmelting) { player.isSmelting = false; - } else if (player.isCrafting == true) { + } else if (player.isCrafting) { player.isCrafting = false; } else if (player.isPotionMaking) {// herblore Herblore.resetHerblore(player); @@ -64,7 +64,7 @@ public class SkillHandler { Woodcutting.stopWoodcutting(player); } else if (player.isSpinning) {// spinning player.isSpinning = false; - } else if (player.isPotCrafting == true) {// pot crafting + } else if (player.isPotCrafting) {// pot crafting player.isPotCrafting = false; } else if (player.playerIsCooking) {// cooking Cooking.resetCooking(player); @@ -79,7 +79,7 @@ public class SkillHandler { Fishing.resetFishing(player); } else if (player.isMining) {// mining Mining.resetMining(player); - } else if (player.playerIsFletching == true) {// fletching + } else if (player.playerIsFletching) {// fletching player.playerIsFletching = false; } else if (player.playerIsCooking) {// cooking Cooking.resetCooking(player); @@ -89,7 +89,7 @@ public class SkillHandler { isSkilling[12] = false; } else if (player.isSmelting) { player.isSmelting = false; - } else if (player.isCrafting == true) { + } else if (player.isCrafting) { player.isCrafting = false; } else if (player.isPotionMaking) {// herblore Herblore.resetHerblore(player); @@ -97,7 +97,7 @@ public class SkillHandler { Woodcutting.stopWoodcutting(player); } else if (player.isSpinning) {// spinning player.isSpinning = false; - } else if (player.isPotCrafting == true) {// pot crafting + } else if (player.isPotCrafting) {// pot crafting player.isPotCrafting = false; } } diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/agility/ApeAtollAgility.java b/2006Redone Server/src/com/rebotted/game/content/skills/agility/ApeAtollAgility.java index 57b1e09e..5f78b839 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/agility/ApeAtollAgility.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/agility/ApeAtollAgility.java @@ -58,7 +58,7 @@ public class ApeAtollAgility { c.getAgility().climbUpTropicalTree(c.getX(), c.getY(), 2); c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[0] == true) { + if (c.getAgility().agilityProgress[0]) { c.getAgility().agilityProgress[1] = true; } } @@ -81,7 +81,7 @@ public class ApeAtollAgility { c.getAgility().getAnimation(objectId), -1); c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[1] == true) { + if (c.getAgility().agilityProgress[1]) { c.getAgility().agilityProgress[2] = true; } } @@ -102,7 +102,7 @@ public class ApeAtollAgility { c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); c.getPacketSender().sendMessage("You climb your way up"); - if (c.getAgility().agilityProgress[2] == true) { + if (c.getAgility().agilityProgress[2]) { c.getAgility().agilityProgress[3] = true; } } @@ -122,7 +122,7 @@ public class ApeAtollAgility { c.getAgility().getAnimation(objectId), -1); c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[3] == true) { + if (c.getAgility().agilityProgress[3]) { c.getAgility().agilityProgress[4] = true; } CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() { @@ -161,7 +161,7 @@ public class ApeAtollAgility { c.getAgility().moveHeight = 0; c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[4] == true) { + if (c.getAgility().agilityProgress[4]) { c.getAgility().agilityProgress[5] = true; } c.getAgility().lapBonus = 2700; diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/agility/BarbarianAgility.java b/2006Redone Server/src/com/rebotted/game/content/skills/agility/BarbarianAgility.java index 2bc423e2..7588e41f 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/agility/BarbarianAgility.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/agility/BarbarianAgility.java @@ -56,7 +56,7 @@ public class BarbarianAgility { if (c.getAgility().hotSpot(2551, 3546)) { c.getAgility().walk(-10, 0, c.getAgility().getAnimation(objectId), -1); c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[0] == true) { + if (c.getAgility().agilityProgress[0]) { c.getAgility().agilityProgress[1] = true; } } else if (c.absX < 2551 && c.absX > 2541) { @@ -72,7 +72,7 @@ public class BarbarianAgility { c.getAgility().climbUp(c.getX() - 1, c.getY(), 1); c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[1] == true) { + if (c.getAgility().agilityProgress[1]) { c.getAgility().agilityProgress[2] = true; } } else { @@ -90,7 +90,7 @@ public class BarbarianAgility { c.getAgility().getAnimation(objectId), -1); c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[2] == true) { + if (c.getAgility().agilityProgress[2]) { c.getAgility().agilityProgress[3] = true; } } else if (c.absX < 2536 && c.absX > 2532) { @@ -109,7 +109,7 @@ public class BarbarianAgility { } c.getAgility().climbDown(c.getX(), c.getY(), 0); c.getPacketSender().sendMessage("You climb down."); - if (c.getAgility().agilityProgress[3] == true) { + if (c.getAgility().agilityProgress[3]) { c.getAgility().agilityProgress[4] = true; } return true; @@ -123,10 +123,10 @@ public class BarbarianAgility { c.getAgility().getAnimation(objectId), -1); c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[4] == true) { + if (c.getAgility().agilityProgress[4]) { c.getAgility().agilityProgress[5] = true; } - if (c.getAgility().agilityProgress[5] == true) { + if (c.getAgility().agilityProgress[5]) { c.getAgility().lapBonus = 1700 / 30; c.getAgility().lapFinished(); c.getAgility().resetAgilityProgress(); diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/agility/GnomeAgility.java b/2006Redone Server/src/com/rebotted/game/content/skills/agility/GnomeAgility.java index 891a67fb..c56549ec 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/agility/GnomeAgility.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/agility/GnomeAgility.java @@ -34,7 +34,7 @@ public class GnomeAgility { case NET1_OBJECT: c.getAgility().climbUp(c.getX(), c.getY() - 2, 1); c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[0] == true) { + if (c.getAgility().agilityProgress[0]) { c.getAgility().agilityProgress[1] = true; } return true; @@ -42,7 +42,7 @@ public class GnomeAgility { case TREE_OBJECT: c.getAgility().climbUp(c.getX(), c.getY() - 3, 2); c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[1] == true) { + if (c.getAgility().agilityProgress[1]) { c.getAgility().agilityProgress[2] = true; } return true; @@ -58,7 +58,7 @@ public class GnomeAgility { c.getPlayerAssistant().movePlayer(2483, 3420, 2); } c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[2] == true) { + if (c.getAgility().agilityProgress[2]) { c.getAgility().agilityProgress[3] = true; } return true; @@ -66,7 +66,7 @@ public class GnomeAgility { case TREE_BRANCH_OBJECT: c.getAgility().climbDown(c.getX(), c.getY(), 0); c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[3] == true) { + if (c.getAgility().agilityProgress[3]) { c.getAgility().agilityProgress[4] = true; } return true; @@ -79,7 +79,7 @@ public class GnomeAgility { c.getAgility().climbUp(c.getX(), c.getY() + 2, 0); c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); clickTimer = System.currentTimeMillis(); - if (c.getAgility().agilityProgress[4] == true) { + if (c.getAgility().agilityProgress[4]) { c.getAgility().agilityProgress[5] = true; } } @@ -88,7 +88,7 @@ public class GnomeAgility { case PIPES1_OBJECT: if (c.getAgility().hotSpot(2484, 3430)) { c.getAgility().walk(0, 7, c.getAgility().getAnimation(objectId), 748); - if (c.getAgility().agilityProgress[5] == true) { + if (c.getAgility().agilityProgress[5]) { c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); c.getAgility().lapBonus = 1400 / 30; c.getAgility().lapFinished(); @@ -105,7 +105,7 @@ public class GnomeAgility { case PIPES2_OBJECT: if (c.getAgility().hotSpot(2487, 3430)) { c.getAgility().walk(0, 7, c.getAgility().getAnimation(objectId), 748); - if (c.getAgility().agilityProgress[5] == true) { + if (c.getAgility().agilityProgress[5]) { c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); c.getAgility().lapBonus = 1400 / 30; diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/agility/WerewolfAgility.java b/2006Redone Server/src/com/rebotted/game/content/skills/agility/WerewolfAgility.java index 5b3e876b..34cb3f0c 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/agility/WerewolfAgility.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/agility/WerewolfAgility.java @@ -82,7 +82,7 @@ public class WerewolfAgility { c.getAgility().getAnimation(objectId), -1); c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[0] == true) { + if (c.getAgility().agilityProgress[0]) { c.getAgility().agilityProgress[1] = true; } CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() { @@ -113,7 +113,7 @@ public class WerewolfAgility { c.getAgility().getAnimation(objectId), 748); c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[1] == true) { + if (c.getAgility().agilityProgress[1]) { c.getAgility().agilityProgress[2] = true; } } else if (c.getAgility().hotSpot(3541, 9904)) { @@ -121,7 +121,7 @@ public class WerewolfAgility { c.getAgility().getAnimation(objectId), 748); c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[1] == true) { + if (c.getAgility().agilityProgress[1]) { c.getAgility().agilityProgress[2] = true; } } else if (c.getAgility().hotSpot(3544, 9904)) { @@ -129,7 +129,7 @@ public class WerewolfAgility { c.getAgility().getAnimation(objectId), 748); c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[1] == true) { + if (c.getAgility().agilityProgress[1]) { c.getAgility().agilityProgress[2] = true; } } @@ -144,7 +144,7 @@ public class WerewolfAgility { c.getAgility().getAnimation(objectId), -1); c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[2] == true) { + if (c.getAgility().agilityProgress[2]) { c.getAgility().agilityProgress[3] = true; } } @@ -159,7 +159,7 @@ public class WerewolfAgility { WerewolfAgility.WEREWOLF_SLING_OBJECT), 743); c.getPlayerAssistant().addSkillXP( c.getAgility().getXp(objectId), c.playerAgility); - if (c.getAgility().agilityProgress[3] == true) { + if (c.getAgility().agilityProgress[3]) { c.getAgility().agilityProgress[4] = true; } c.getAgility().agilityProgress[5] = true; diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/agility/WildernessAgility.java b/2006Redone Server/src/com/rebotted/game/content/skills/agility/WildernessAgility.java index cc353d97..b530adbb 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/agility/WildernessAgility.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/agility/WildernessAgility.java @@ -46,7 +46,7 @@ public class WildernessAgility { if (c.getAgility().hotSpot(3005, 3953) || ((c.absX >= 3004 && c.absX <= 3006) && (c.absY > 3950 && c.absY < 3953))) { c.getAgility().walk(0, 1, c.getAgility().getAnimation(objectId), -1); - if (c.getAgility().agilityProgress[0] == true) { + if (c.getAgility().agilityProgress[0]) { c.getAgility().agilityProgress[1] = true; } c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); @@ -82,7 +82,7 @@ public class WildernessAgility { c.getAgility().steppingStone = 6; c.getAgility().steppingStoneTimer = 2; c.getAgility().steppingStone--; - if (c.getAgility().agilityProgress[2] == true) { + if (c.getAgility().agilityProgress[2]) { c.getAgility().agilityProgress[3] = true; } return true; @@ -102,7 +102,7 @@ public class WildernessAgility { c.getAgility().getAnimation(objectId), -1); } - if (c.getAgility().agilityProgress[3] == true) { + if (c.getAgility().agilityProgress[3]) { c.getAgility().agilityProgress[5] = true; } c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); @@ -116,7 +116,7 @@ public class WildernessAgility { return false; } c.getAgility().walk(0, -4, c.getAgility().getAnimation(objectId), -1); - if (c.getAgility().agilityProgress[5] == true) { + if (c.getAgility().agilityProgress[5]) { c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility); c.getAgility().lapBonus = 2400 / 30; c.getAgility().lapFinished(); diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/crafting/GemCutting.java b/2006Redone Server/src/com/rebotted/game/content/skills/crafting/GemCutting.java index a2f8acd1..57ff4e33 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/crafting/GemCutting.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/crafting/GemCutting.java @@ -13,7 +13,7 @@ public class GemCutting extends CraftingData { public static boolean cutGem(final Player player, final int itemUsed, final int usedWith) { /* - * if (c.isCrafting == true) { return false; } + * if (c.isCrafting) { return false; } */ final int itemId = itemUsed == 1755 ? usedWith : itemUsed; for (final cutGemData g : cutGemData.values()) { @@ -43,7 +43,7 @@ public class GemCutting extends CraftingData { player.getItemAssistant().deleteItem(itemId, 1); player.getPlayerAssistant().addSkillXP(1, 12); } - if (player.isCrafting == true) { + if (player.isCrafting) { if (player.getItemAssistant().playerHasItem(itemId)) { player.getItemAssistant().deleteItem(itemId, 1); player.getItemAssistant().addItem(g.getCut(), 1); diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/crafting/LeatherMaking.java b/2006Redone Server/src/com/rebotted/game/content/skills/crafting/LeatherMaking.java index 851e9db0..f5b30074 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/crafting/LeatherMaking.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/crafting/LeatherMaking.java @@ -62,7 +62,7 @@ public class LeatherMaking extends CraftingData { private static int amount; public static void craftLeather(final Player player, final int buttonId) { - if (player.isCrafting == true) { + if (player.isCrafting) { return; } for (final leatherData l : leatherData.values()) { @@ -106,7 +106,7 @@ public class LeatherMaking extends CraftingData { @Override public void execute( CycleEventContainer container) { - if (player.isCrafting == true) { + if (player.isCrafting) { if (!player.getItemAssistant() .playerHasItem(1734)) { player.getPacketSender() diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/crafting/Pottery.java b/2006Redone Server/src/com/rebotted/game/content/skills/crafting/Pottery.java index 85395a43..471fcdc4 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/crafting/Pottery.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/crafting/Pottery.java @@ -54,7 +54,7 @@ public class Pottery { c.doAmount = amount; c.isPotCrafting = true; if (c.getItemAssistant().playerHasItem(softClay) - && c.playerLevel[12] >= level && c.isPotCrafting == true) { + && c.playerLevel[12] >= level && c.isPotCrafting) { c.startAnimation(unFire); c.getItemAssistant().deleteItem(softClay, 1); c.getItemAssistant().addItem(id, 1); @@ -70,7 +70,7 @@ public class Pottery { public void execute(CycleEventContainer container) { if (c.getItemAssistant().playerHasItem(softClay) && c.playerLevel[12] >= level && !(c.doAmount <= 0) - && c.isPotCrafting == true) { + && c.isPotCrafting) { c.startAnimation(unFire); c.getItemAssistant().deleteItem(softClay, 1); c.getItemAssistant().addItem(id, 1); @@ -118,7 +118,7 @@ public class Pottery { player.doAmount = amount; player.isPotCrafting = true; if (player.getItemAssistant().playerHasItem(startId) - && player.playerLevel[12] >= level && player.isPotCrafting == true) { + && player.playerLevel[12] >= level && player.isPotCrafting) { player.getItemAssistant().deleteItem(startId, 1); player.getItemAssistant().addItem(finishId, 1); player.startAnimation(Fire); @@ -151,7 +151,7 @@ public class Pottery { public void execute(CycleEventContainer container) { if (player.getItemAssistant().playerHasItem(startId) && player.playerLevel[12] >= level - && player.isPotCrafting == true && !(player.doAmount <= 0)) { + && player.isPotCrafting && !(player.doAmount <= 0)) { player.getItemAssistant().deleteItem(startId, 1); player.getItemAssistant().addItem(finishId, 1); player.startAnimation(Fire); diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/crafting/Spinning.java b/2006Redone Server/src/com/rebotted/game/content/skills/crafting/Spinning.java index 88774ab7..dd40f748 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/crafting/Spinning.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/crafting/Spinning.java @@ -40,7 +40,7 @@ public class Spinning extends CraftingData { @Override public void execute(CycleEventContainer container) { - if (c.isSpinning == true) { + if (c.isSpinning) { if (c.getItemAssistant().playerHasItem(before)) { if (c.playerLevel[c.playerCrafting] < level) { c.getDialogueHandler().sendStatement( diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/firemaking/Firemaking.java b/2006Redone Server/src/com/rebotted/game/content/skills/firemaking/Firemaking.java index 77a47eb1..48ce015c 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/firemaking/Firemaking.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/firemaking/Firemaking.java @@ -28,7 +28,7 @@ public class Firemaking { public static void attemptFire(final Player c, final int itemUsed, final int usedWith, final int x, final int y, final boolean groundObject) { int firemakingItems[] = {590, 7329, 7330, 7331}; for (int i = 0; i < firemakingItems.length; i++) { - if (Firemaking.pickedUpFiremakingLog == true) { + if (Firemaking.pickedUpFiremakingLog) { c.getPacketSender().sendMessage("You can't do that!"); Firemaking.pickedUpFiremakingLog = false; return; @@ -87,20 +87,20 @@ public class Firemaking { walk = false; } c.startAnimation(733); - c.getPlayerAssistant().walkTo(walk == true ? -1 : 1, 0); + c.getPlayerAssistant().walkTo(walk ? -1 : 1, 0); stopFiremaking = false; CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() { @Override public void execute(CycleEventContainer container) { - if (stopFiremaking == true) { + if (stopFiremaking) { stopFiremaking = false; return; } if (c.isWoodcutting || c.playerIsFletching || c.isFletching) { container.stop(); } - if (c.isFiremaking == true) { + if (c.isFiremaking) { GameEngine.itemHandler.removeGroundItem(c, logId, x, y, false); c.getPacketSender().sendSound(SoundList.FIRE_SUCCESSFUL, 100, 0); if (itemUsed == 7331 || usedWith == 7331) @@ -120,7 +120,7 @@ public class Firemaking { @Override public void execute(CycleEventContainer container) { - c.turnPlayerTo(walk == true ? x + 1 : x - 1, y); + c.turnPlayerTo(walk ? x + 1 : x - 1, y); logLit = true; stopFiremaking(c); container.stop(); diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/fletching/ArrowMaking.java b/2006Redone Server/src/com/rebotted/game/content/skills/fletching/ArrowMaking.java index d9b29d6d..8c9ed713 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/fletching/ArrowMaking.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/fletching/ArrowMaking.java @@ -79,7 +79,7 @@ public class ArrowMaking { if (arrowData == null) { return false; } - if (player.isWoodcutting == true) { + if (player.isWoodcutting) { return false; } if (player.playerLevel[9] < arrowData.getLevel()) { diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/fletching/LogCutting.java b/2006Redone Server/src/com/rebotted/game/content/skills/fletching/LogCutting.java index 15d5b67a..b8f1b7f8 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/fletching/LogCutting.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/fletching/LogCutting.java @@ -16,7 +16,7 @@ public class LogCutting { private static final int KNIFE = 946, CUT_SOUND = 375; public static void resetFletching(Player player) { - if (player.playerIsFletching == true) { + if (player.playerIsFletching) { player.playerIsFletching = false; player.startAnimation(65535); } @@ -70,7 +70,7 @@ public class LogCutting { } public static void handleClick(Player c, int buttonId) { - if (c.doAmount == 28 && c.playerIsFletching == true) { + if (c.doAmount == 28 && c.playerIsFletching) { c.getPacketSender().closeAllWindows(); c.playerIsFletching = false; return; @@ -80,7 +80,7 @@ public class LogCutting { * normal log (item on interface 3) */ case 34185: - if (c.playerIsFletching == true) { + if (c.playerIsFletching) { cutLog(c, 52, 1, 5, 1); c.playerIsFletching = false; return; @@ -96,7 +96,7 @@ public class LogCutting { cutLog(c, 52, 1, 5, 28); return; case 34189: - if (c.playerIsFletching == true) { + if (c.playerIsFletching) { cutLog(c, 50, 5, 5, 1); c.playerIsFletching = false; return; @@ -112,7 +112,7 @@ public class LogCutting { cutLog(c, 50, 5, 5, 28); return; case 34193: - if (c.playerIsFletching == true) { + if (c.playerIsFletching) { cutLog(c, 48, 10, 10, 1); c.playerIsFletching = false; return; @@ -134,23 +134,23 @@ public class LogCutting { * first item */ case 34170: - if (LogCuttingInterface.log == 1521 && c.playerIsFletching == true) { + if (LogCuttingInterface.log == 1521 && c.playerIsFletching) { cutLog(c, 54, 20, 16.5, 1); c.playerIsFletching = false; } - if (LogCuttingInterface.log == 1519 && c.playerIsFletching == true) { + if (LogCuttingInterface.log == 1519 && c.playerIsFletching) { cutLog(c, 60, 35, 33.3, 1); c.playerIsFletching = false; } - if (LogCuttingInterface.log == 1517 && c.playerIsFletching == true) { + if (LogCuttingInterface.log == 1517 && c.playerIsFletching) { cutLog(c, 64, 50, 50, 1); c.playerIsFletching = false; } - if (LogCuttingInterface.log == 1515 && c.playerIsFletching == true) { + if (LogCuttingInterface.log == 1515 && c.playerIsFletching) { cutLog(c, 68, 65, 67.5, 1); c.playerIsFletching = false; } - if (LogCuttingInterface.log == 1513 && c.playerIsFletching == true) { + if (LogCuttingInterface.log == 1513 && c.playerIsFletching) { cutLog(c, 72, 80, 83.25, 1); c.playerIsFletching = false; } @@ -210,23 +210,23 @@ public class LogCutting { * second item */ case 34174: - if (LogCuttingInterface.log == 1521 && c.playerIsFletching == true) { + if (LogCuttingInterface.log == 1521 && c.playerIsFletching) { cutLog(c, 56, 25, 25, 1); c.playerIsFletching = false; } - if (LogCuttingInterface.log == 1519 && c.playerIsFletching == true) { + if (LogCuttingInterface.log == 1519 && c.playerIsFletching) { cutLog(c, 58, 40, 41.5, 1); c.playerIsFletching = false; } - if (LogCuttingInterface.log == 1517 && c.playerIsFletching == true) { + if (LogCuttingInterface.log == 1517 && c.playerIsFletching) { cutLog(c, 62, 55, 58.3, 1); c.playerIsFletching = false; } - if (LogCuttingInterface.log == 1515 && c.playerIsFletching == true) { + if (LogCuttingInterface.log == 1515 && c.playerIsFletching) { cutLog(c, 66, 70, 70, 1); c.playerIsFletching = false; } - if (LogCuttingInterface.log == 1513 && c.playerIsFletching == true) { + if (LogCuttingInterface.log == 1513 && c.playerIsFletching) { cutLog(c, 70, 85, 91.5, 1); c.playerIsFletching = false; } diff --git a/2006Redone Server/src/com/rebotted/game/content/skills/thieving/ThieveOther.java b/2006Redone Server/src/com/rebotted/game/content/skills/thieving/ThieveOther.java index 2be57557..2edf03a4 100644 --- a/2006Redone Server/src/com/rebotted/game/content/skills/thieving/ThieveOther.java +++ b/2006Redone Server/src/com/rebotted/game/content/skills/thieving/ThieveOther.java @@ -59,7 +59,7 @@ public class ThieveOther { client.getPacketSender().sendMessage("Thieving is currently disabled."); return; } - if (isPicking == true) { + if (isPicking) { client.getPacketSender().sendMessage("You are already picking a lock."); return; } diff --git a/2006Redone Server/src/com/rebotted/game/content/traveling/GnomeGlider.java b/2006Redone Server/src/com/rebotted/game/content/traveling/GnomeGlider.java index a9633664..9cd3b8a4 100644 --- a/2006Redone Server/src/com/rebotted/game/content/traveling/GnomeGlider.java +++ b/2006Redone Server/src/com/rebotted/game/content/traveling/GnomeGlider.java @@ -17,7 +17,7 @@ public class GnomeGlider { }; public static void flightButtons(Player player, int button) { - if (player.gliderOpen == true) { + if (player.gliderOpen) { for (int i = 0; i < getLength(); i++) { if (getButton(i) == button) { handleFlight(player, i); diff --git a/2006Redone Server/src/com/rebotted/game/dialogues/DialogueHandler.java b/2006Redone Server/src/com/rebotted/game/dialogues/DialogueHandler.java index 2766b9a3..5dc40518 100644 --- a/2006Redone Server/src/com/rebotted/game/dialogues/DialogueHandler.java +++ b/2006Redone Server/src/com/rebotted/game/dialogues/DialogueHandler.java @@ -76,7 +76,7 @@ public class DialogueHandler { break; case 4: - if (player.luthas == true && player.bananas >= 2) { + if (player.luthas && player.bananas >= 2) { player.getItemAssistant().addOrDropItem(995, 30); sendNpcChat1( "Thank you for your services you have been rewarded 30 coins.", @@ -4703,14 +4703,14 @@ public class DialogueHandler { "for 50 coins?", player.talkingNpc, NpcHandler.getNpcListName(player.talkingNpc)); player.nextChat = 1350; - } else if (player.hasPaid == true && player.absY > 3485 + } else if (player.hasPaid && player.absY > 3485 && player.absY < 3489) { sendNpcChat1( "Hello, are you interested in a free ride up the river?", player.talkingNpc, NpcHandler.getNpcListName(player.talkingNpc)); player.nextChat = 1350; - } else if (player.hasPaid == true) { + } else if (player.hasPaid) { sendNpcChat1( "Hello, are you interested in a free back down the river?", player.talkingNpc, @@ -4745,12 +4745,12 @@ public class DialogueHandler { "modern"); player.hasPaid = true; player.nextChat = 0; - } else if (player.hasPaid == true && player.absY > 3485 + } else if (player.hasPaid && player.absY > 3485 && player.absY < 3489) { sendPlayerChat1("Yes please."); player.getPlayerAssistant().startTeleport(2358, 3640, 0, "modern"); - } else if (player.hasPaid == true) { + } else if (player.hasPaid) { sendPlayerChat1("Yes please."); player.getPlayerAssistant().startTeleport(2367, 3488, 0, "modern"); @@ -6743,7 +6743,7 @@ public class DialogueHandler { VotingHandler.setAsReceived(client.playerName); client.recievedMask = true; client.nextChat = 0; - } else if (client.recievedMask == true && Constants.HALLOWEEN) { + } else if (client.recievedMask && Constants.HALLOWEEN) { sendNpcChat2("You have already recieved a halloween mask.", "What reward would you like?", 945, "" + Constants.SERVER_NAME + " Guide"); client.nextChat = 3207; } diff --git a/2006Redone Server/src/com/rebotted/game/items/ItemAssistant.java b/2006Redone Server/src/com/rebotted/game/items/ItemAssistant.java index 5a137070..239fa358 100644 --- a/2006Redone Server/src/com/rebotted/game/items/ItemAssistant.java +++ b/2006Redone Server/src/com/rebotted/game/items/ItemAssistant.java @@ -1800,7 +1800,7 @@ public class ItemAssistant { if (!CastleWars.deleteCastleWarsItems(c, itemID)) { return false; } - if (c.otherBank == true) { + if (c.otherBank) { c.getPacketSender().closeAllWindows(); c.getPacketSender().sendMessage("You can't bank while viewing someones bank!"); c.otherBank = false; diff --git a/2006Redone Server/src/com/rebotted/game/items/UseItem.java b/2006Redone Server/src/com/rebotted/game/items/UseItem.java index f9a989f1..fc9358f6 100644 --- a/2006Redone Server/src/com/rebotted/game/items/UseItem.java +++ b/2006Redone Server/src/com/rebotted/game/items/UseItem.java @@ -176,7 +176,7 @@ public class UseItem { for (int i = 0; i < firemakingItems.length; i++) { if (itemUsed == firemakingItems[i] || useWith == firemakingItems[i] && player.isFiremaking == false) { Firemaking.attemptFire(player, itemUsed, useWith, player.absX, player.absY, false); - } else if (itemUsed == firemakingItems[i] || useWith == firemakingItems[i] && player.isFiremaking == true) { + } else if (itemUsed == firemakingItems[i] || useWith == firemakingItems[i] && player.isFiremaking) { player.getPacketSender().sendMessage("You can't do that, you are already firemaking."); } } diff --git a/2006Redone Server/src/com/rebotted/game/npcs/Npc.java b/2006Redone Server/src/com/rebotted/game/npcs/Npc.java index 34500168..56de2175 100644 --- a/2006Redone Server/src/com/rebotted/game/npcs/Npc.java +++ b/2006Redone Server/src/com/rebotted/game/npcs/Npc.java @@ -69,7 +69,7 @@ public class Npc { player.getPacketSender().sendMessage("You need " + ItemAssistant.getItemName(itemId).toLowerCase() + " to do that."); return false; } - if (NpcHandler.npcs[npcId].isTransformed == true) + if (NpcHandler.npcs[npcId].isTransformed) return false; if (animation > 0) player.startAnimation(animation); diff --git a/2006Redone Server/src/com/rebotted/game/npcs/NpcHandler.java b/2006Redone Server/src/com/rebotted/game/npcs/NpcHandler.java index 56668136..ea273be8 100644 --- a/2006Redone Server/src/com/rebotted/game/npcs/NpcHandler.java +++ b/2006Redone Server/src/com/rebotted/game/npcs/NpcHandler.java @@ -667,7 +667,7 @@ public class NpcHandler { npcs[i].actionTimer = 4; // delete time resetPlayersInCombat(i); } else if (npcs[i].actionTimer == 0 - && npcs[i].applyDead == true + && npcs[i].applyDead && npcs[i].needRespawn == false) { npcs[i].needRespawn = true; npcs[i].actionTimer = NpcData.getRespawnTime(i); // respawn @@ -698,7 +698,7 @@ public class NpcHandler { if (player.tutorialProgress == 24) { handleratdeath(i); } else if (player.tutorialProgress == 25 - && player.ratdied2 == true) { + && player.ratdied2) { handleratdeath2(i); } } @@ -744,7 +744,7 @@ public class NpcHandler { GameEngine.objectManager.removeObject(npcs[i].absX, npcs[i].absY); } - } else if (npcs[i].actionTimer == 0 && npcs[i].needRespawn == true && npcs[i].npcType != 1158) { + } else if (npcs[i].actionTimer == 0 && npcs[i].needRespawn && npcs[i].npcType != 1158) { if (npcs[i].spawnedBy > 0) { npcs[i] = null; } else { diff --git a/2006Redone Server/src/com/rebotted/game/objects/ObjectsActions.java b/2006Redone Server/src/com/rebotted/game/objects/ObjectsActions.java index a2b9c55f..6d5080a4 100644 --- a/2006Redone Server/src/com/rebotted/game/objects/ObjectsActions.java +++ b/2006Redone Server/src/com/rebotted/game/objects/ObjectsActions.java @@ -66,7 +66,7 @@ public class ObjectsActions { Webs.slashWeb(player, objectType, objectX, objectY); return; } - if (player.stopPlayerPacket == true) { + if (player.stopPlayerPacket) { return; } //LogCutting.resetFletching(player); @@ -907,8 +907,8 @@ public class ObjectsActions { case 3015: case 3016: - if (player.tutorialProgress == 7 || player.diedOnTut == true) { - if (player.diedOnTut == true) { + if (player.tutorialProgress == 7 || player.diedOnTut) { + if (player.diedOnTut) { player.getPlayerAssistant().movePlayer(player.absX - 1, player.absY, 0); player.getPacketSender().createArrow(3078, 3084, @@ -1117,7 +1117,7 @@ public class ObjectsActions { case 3020: case 3021: - if (player.diedOnTut == true && (player.getY() == 9502 || player.getY() == 9503)) { + if (player.diedOnTut && (player.getY() == 9502 || player.getY() == 9503)) { player.getDialogueHandler() .sendStatement2( "You have died so now all you need to do is continue", @@ -1171,8 +1171,8 @@ public class ObjectsActions { case 3022: if (player.tutorialProgress >= 24 && (player.getY() == 9519 || player.getY() == 9518) - || player.diedOnTut == true) { - if (player.diedOnTut == true) { + || player.diedOnTut) { + if (player.diedOnTut) { player.getDialogueHandler() .sendStatement2("Be more careful this time", "now continue to kill the rat and talk to the guide."); @@ -1361,8 +1361,8 @@ public class ObjectsActions { break; case 3029: - if (player.tutorialProgress >= 14 || player.diedOnTut == true) { - if (player.diedOnTut == true) { + if (player.tutorialProgress >= 14 || player.diedOnTut) { + if (player.diedOnTut) { player.startAnimation(828); player.getPlayerAssistant().movePlayer(3088, 9520, 0); player.getPacketSender().createArrow(3094, 9503, @@ -1781,7 +1781,7 @@ public class ObjectsActions { NpcHandler.spawnNpc(player, 757, player.getX(), player.getY(), 0, 0, 50, 10, 30, 30, true, true); player.getPacketSender().sendMessage("You will need a stake and hammer to attack count draynor."); player.clickedVamp = true; - } else if (player.vampSlayer == 3 && player.clickedVamp == true) { + } else if (player.vampSlayer == 3 && player.clickedVamp) { player.getPacketSender().sendMessage("You have already spawned the vampyre."); return; } else if (player.vampSlayer > 3) { @@ -1820,7 +1820,7 @@ public class ObjectsActions { case 2072: // crate if (player.getItemAssistant().playerHasItem(1963, 10) - && player.luthas == true) { + && player.luthas) { player.getItemAssistant().deleteItem(1963, 10); player.getDialogueHandler().sendStatement( "You pack your bananas in the crate..."); @@ -1859,7 +1859,7 @@ public class ObjectsActions { case 2073: // Banana tree case 4754: if (System.currentTimeMillis() - player.waitTime > 2000) { - if (player.luthas == true) { + if (player.luthas) { player.bananas += 1; player.getItemAssistant().addItem(1963, 1); player.waitTime = System.currentTimeMillis(); diff --git a/2006Redone Server/src/com/rebotted/game/players/Player.java b/2006Redone Server/src/com/rebotted/game/players/Player.java index b1d70eb6..aab6ea25 100644 --- a/2006Redone Server/src/com/rebotted/game/players/Player.java +++ b/2006Redone Server/src/com/rebotted/game/players/Player.java @@ -511,7 +511,7 @@ public abstract class Player { PestControl.leaveWaitingBoat(this); getPlayerAssistant().movePlayer(2657, 2639, 0); } - if (hasNpc == true) { + if (hasNpc) { getSummon().pickUpPet(this, summonId); } @@ -599,7 +599,7 @@ public abstract class Player { lastY = absY; lastH = heightLevel; CycleEventHandler.getSingleton().stopEvents(this); - if (hasNpc == true) { + if (hasNpc) { getSummon().pickUpPet(this, summonId); } if (forceLogout || System.currentTimeMillis() - logoutDelay > 2500) { @@ -2063,7 +2063,7 @@ public abstract class Player { if (heightLevel != npc.heightLevel) { return false; } - if (npc.needRespawn == true) { + if (npc.needRespawn) { return false; } int deltaX = npc.absX - absX, deltaY = npc.absY - absY; diff --git a/2006Redone Server/src/com/rebotted/game/players/PlayerAssistant.java b/2006Redone Server/src/com/rebotted/game/players/PlayerAssistant.java index 2b873dcd..8be0c197 100644 --- a/2006Redone Server/src/com/rebotted/game/players/PlayerAssistant.java +++ b/2006Redone Server/src/com/rebotted/game/players/PlayerAssistant.java @@ -737,7 +737,7 @@ public class PlayerAssistant { if (player.playerIndex > 0 || player.npcIndex > 0) { player.getCombatAssistant().resetPlayerAttack(); } - if (player.clickedTree == true) { + if (player.clickedTree) { player.clickedTree = false; } player.stopMovement(); @@ -1450,13 +1450,13 @@ public class PlayerAssistant { GameLogger.writeLog(player.playerName, "duelingkilled", player.playerName + " was killed by " + duelOpponent.playerName + " in the duel arena."); } } - if (player.vampSlayer == 3 && player.clickedVamp == true) { + if (player.vampSlayer == 3 && player.clickedVamp) { player.clickedVamp = false; } else if (player.isWoodcutting) { player.isWoodcutting = false; } else if (player.playerSkilling[10]) { player.playerSkilling[10] = false; - } else if(player.clickedTree == true) { + } else if(player.clickedTree) { player.clickedTree = false; } resetDamageDone(); @@ -2117,7 +2117,7 @@ public class PlayerAssistant { } return false; } - if (player.tutorialProgress < 36 && player.playerLevel[skill] == 3 && GameConstants.TUTORIAL_ISLAND == true) { + if (player.tutorialProgress < 36 && player.playerLevel[skill] == 3 && GameConstants.TUTORIAL_ISLAND) { return false; } amount *= GameConstants.XP_RATE; @@ -2174,7 +2174,7 @@ public class PlayerAssistant { return false; } if (player.tutorialProgress < 36 && player.playerLevel[skill] == 3 - && GameConstants.TUTORIAL_ISLAND == true) { + && GameConstants.TUTORIAL_ISLAND) { return false; } amount *= GameConstants.XP_RATE; diff --git a/2006Redone Server/src/com/rebotted/game/players/PlayerHandler.java b/2006Redone Server/src/com/rebotted/game/players/PlayerHandler.java index ced4e75d..976658ce 100644 --- a/2006Redone Server/src/com/rebotted/game/players/PlayerHandler.java +++ b/2006Redone Server/src/com/rebotted/game/players/PlayerHandler.java @@ -141,7 +141,7 @@ public class PlayerHandler { players[i].lastX = players[i].absX; players[i].lastY = players[i].absY; players[i].lastH = players[i].heightLevel; - if (players[i].hasNpc == true) { + if (players[i].hasNpc) { t.getSummon().quickPickup(t, players[i].summonId); } if (players[i].duelStatus == 5) { @@ -212,7 +212,7 @@ public class PlayerHandler { players[i].lastX = players[i].absX; players[i].lastY = players[i].absY; players[i].lastH = players[i].heightLevel; - if (players[i].hasNpc == true) { + if (players[i].hasNpc) { t.getSummon().quickPickup(t, players[i].summonId); } if (players[i].duelStatus == 5) { @@ -282,7 +282,7 @@ public class PlayerHandler { int size = plr.npcListSize; plr.npcListSize = 0; for (int i = 0; i < size; i++) { - if (plr.rebuildNPCList == false && plr.withinDistance(plr.npcList[i]) == true) { + if (plr.rebuildNPCList == false && plr.withinDistance(plr.npcList[i])) { plr.npcList[i].updateNPCMovement(str); plr.npcList[i].appendNPCUpdateBlock(updateBlock); plr.npcList[plr.npcListSize++] = plr.npcList[i]; diff --git a/2006Redone Server/src/com/rebotted/game/shops/ShopAssistant.java b/2006Redone Server/src/com/rebotted/game/shops/ShopAssistant.java index a0fa218e..ea7f7f9f 100644 --- a/2006Redone Server/src/com/rebotted/game/shops/ShopAssistant.java +++ b/2006Redone Server/src/com/rebotted/game/shops/ShopAssistant.java @@ -41,7 +41,7 @@ public class ShopAssistant { public void updatePlayerShop() { for (int i = 0; i < PlayerHandler.players.length; i++) { if (PlayerHandler.players[i] != null) { - if (PlayerHandler.players[i].isShopping == true + if (PlayerHandler.players[i].isShopping && PlayerHandler.players[i].shopId == player.shopId && i != player.playerId) { PlayerHandler.players[i].updateShop = true; diff --git a/2006Redone Server/src/com/rebotted/net/PacketBuffer.java b/2006Redone Server/src/com/rebotted/net/PacketBuffer.java index 79040786..2344b7be 100644 --- a/2006Redone Server/src/com/rebotted/net/PacketBuffer.java +++ b/2006Redone Server/src/com/rebotted/net/PacketBuffer.java @@ -36,7 +36,7 @@ public class PacketBuffer { } public PacketBuffer addBoolean(boolean val) { - return addByte(val == true ? 1 : 0); + return addByte(val ? 1 : 0); } public boolean getBoolean() { diff --git a/2006Redone Server/src/com/rebotted/net/PacketSender.java b/2006Redone Server/src/com/rebotted/net/PacketSender.java index d64499e8..064eae46 100644 --- a/2006Redone Server/src/com/rebotted/net/PacketSender.java +++ b/2006Redone Server/src/com/rebotted/net/PacketSender.java @@ -49,7 +49,7 @@ public class PacketSender { } player.lastLoginDate = player.getLastLogin(); QuestAssistant.sendStages(player); - if (player.hasNpc == true) { + if (player.hasNpc) { if (player.summonId > 0) { GameEngine.npcHandler.spawnNpc3(player, player.summonId, player.absX, player.absY - 1, player.heightLevel, 0, 120, 25, 200, 200, true, false, true); } @@ -98,7 +98,7 @@ public class PacketSender { if (player.inWild()) { player.WildernessWarning = true; } - if (player.splitChat == true) { + if (player.splitChat) { player.getPacketSender().sendConfig(502, 1); player.getPacketSender().sendConfig(287, 1); } else { diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/ClickObject.java b/2006Redone Server/src/com/rebotted/net/packets/impl/ClickObject.java index 74fb65b9..d5ccd1e9 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/ClickObject.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/ClickObject.java @@ -142,7 +142,7 @@ public class ClickObject implements PacketType { } switch (p.objectId) { case 1292: - if (p.spiritTree == false && p.clickedTree == true) { + if (p.spiritTree == false && p.clickedTree) { p.getPacketSender().sendMessage("You have already spawned a tree spirit."); return; } @@ -150,7 +150,7 @@ public class ClickObject implements PacketType { p.getPacketSender().sendMessage("You attempt to chop the tree, and a tree spirit appears."); NpcHandler.spawnNpc(p, 655, p.getX(), p.getY(), 0, 0, 225, 20, 80, 80, true, false); p.clickedTree = true; - } else if (p.spiritTree == true) { + } else if (p.spiritTree) { Woodcutting.startWoodcutting(p, p.objectId, p.objectX, p.objectY, p.clickObjectType); } break; diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/ClickingButtons.java b/2006Redone Server/src/com/rebotted/net/packets/impl/ClickingButtons.java index bb5a0fda..449bdb01 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/ClickingButtons.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/ClickingButtons.java @@ -57,7 +57,7 @@ public class ClickingButtons implements PacketType { Climbing.handleLadderButtons(player, actionButtonId); Specials.specialClicking(player, actionButtonId); DialogueOptions.handleDialogueOptions(player, actionButtonId); - if (player.musicOn == true) { + if (player.musicOn) { player.getPlayList().handleButton(actionButtonId); } @@ -253,7 +253,7 @@ public class ClickingButtons implements PacketType { case 34185: case 34193: case 34189: - if (player.clickedSpinning == true) { + if (player.clickedSpinning) { Spinning.getAmount(player, 1); } break; @@ -261,7 +261,7 @@ public class ClickingButtons implements PacketType { case 34184: case 34188: case 34192: - if (player.clickedSpinning == true) { + if (player.clickedSpinning) { Spinning.getAmount(player, 5); } break; @@ -269,7 +269,7 @@ public class ClickingButtons implements PacketType { case 34183: case 34187: case 34191: - if (player.clickedSpinning == true) { + if (player.clickedSpinning) { Spinning.getAmount(player, 10); } break; @@ -277,7 +277,7 @@ public class ClickingButtons implements PacketType { case 34182: case 34186: case 34190: - if (player.clickedSpinning == true) { + if (player.clickedSpinning) { Spinning.getAmount(player, 28); } break; @@ -287,100 +287,100 @@ public class ClickingButtons implements PacketType { */ // item 1 case 34245: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1787, 6.3, 1, 1); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1787, 1931, 1, 6.3, 1); } break; case 34244: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1787, 6.3, 1, 5); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1787, 1931, 1, 6.3, 5); } break; case 34243: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1787, 6.3, 1, 10); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1787, 1931, 1, 6.3, 10); } break; case 34242: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1787, 6.3, 1, 28); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1787, 1931, 1, 6.3, 28); } break; // item 2 case 34249: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1789, 15, 7, 1); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1789, 2313, 7, 10, 1); } break; case 34248: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1789, 15, 7, 5); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1789, 2313, 7, 10, 5); } break; case 34247: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1789, 15, 7, 10); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1789, 2313, 7, 10, 10); } break; case 34246: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1789, 15, 7, 28); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1789, 2313, 7, 10, 28); } break; // item 3 case 34253: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1791, 18, 8, 1); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1791, 1923, 8, 15, 1); } break; case 34252: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1791, 18, 8, 5); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1791, 1923, 8, 15, 5); } break; case 34251: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1791, 18, 8, 10); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1791, 1923, 8, 15, 10); } break; case 34250: - if (player.showedUnfire == true) { + if (player.showedUnfire) { Pottery.makeUnfire(player, 1791, 18, 8, 28); } - if (player.showedFire == true) { + if (player.showedFire) { Pottery.makeFire(player, 1791, 1923, 8, 15, 28); } break; @@ -623,7 +623,7 @@ public class ClickingButtons implements PacketType { break; case 3162: - if (player.musicOn == true) { + if (player.musicOn) { player.musicOn = false; } else { player.getPacketSender().sendMessage("Your music is already turned off."); @@ -1765,7 +1765,7 @@ public class ClickingButtons implements PacketType { player.getPacketSender().sendConfig(502, 1); player.getPacketSender().sendConfig(287, 1); player.splitChat = true; - } else if (player.splitChat == true) { + } else if (player.splitChat) { player.getPacketSender().sendConfig(502, 0); player.getPacketSender().sendConfig(287, 0); player.splitChat = false; diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/DropItem.java b/2006Redone Server/src/com/rebotted/net/packets/impl/DropItem.java index a7941a64..cbad5cfb 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/DropItem.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/DropItem.java @@ -50,7 +50,7 @@ public class DropItem implements PacketType { "You can't drop items while trading!"); return; } - if (player.hasNpc == true) { + if (player.hasNpc) { player.getPacketSender().sendMessage( "You already have a pet dropped."); return; @@ -96,7 +96,7 @@ public class DropItem implements PacketType { for (int p : Pets.CAT_ITEMS) { if (p == itemId) { - if (player.hasNpc == true) { + if (player.hasNpc) { droppable = false; break; } diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/ItemOnNpc.java b/2006Redone Server/src/com/rebotted/net/packets/impl/ItemOnNpc.java index 2921e91b..80af46b9 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/ItemOnNpc.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/ItemOnNpc.java @@ -23,7 +23,7 @@ public class ItemOnNpc implements PacketType { player.getPacketSender().sendMessage("Your inventory is full."); return; } - if (player == null || player.disconnected == true || !player.getItemAssistant().playerHasItem(itemId, 1, slot) || NpcHandler.npcs[i] == null || NpcHandler.npcs[i].isDead || player.isDead || player.isTeleporting) { + if (player == null || player.disconnected || !player.getItemAssistant().playerHasItem(itemId, 1, slot) || NpcHandler.npcs[i] == null || NpcHandler.npcs[i].isDead || player.isDead || player.isTeleporting) { return; } player.faceNpc(i); diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/PickupItem.java b/2006Redone Server/src/com/rebotted/net/packets/impl/PickupItem.java index 9a8d0576..55b6104c 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/PickupItem.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/PickupItem.java @@ -59,7 +59,7 @@ public class PickupItem implements PacketType { return; } for (LogData logData : LogData.values()) { - if (player.isFiremaking == true && player.pItemId == logData.getLogId()) { + if (player.isFiremaking && player.pItemId == logData.getLogId()) { player.getPacketSender().sendMessage("You can't do that!"); Firemaking.stopFiremaking = true; return; diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/Walking.java b/2006Redone Server/src/com/rebotted/net/packets/impl/Walking.java index a90c943e..dde3c124 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/Walking.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/Walking.java @@ -42,13 +42,13 @@ public class Walking implements PacketType { if (player.playerStun) { return; } - if (player.stopPlayer == true) { + if (player.stopPlayer) { return; } - if (player.isFiremaking == true) { + if (player.isFiremaking) { player.isFiremaking = false; } - if (player.stopPlayerPacket == true) { + if (player.stopPlayerPacket) { return; } if (player.inTrade) { @@ -65,10 +65,10 @@ public class Walking implements PacketType { if (player.closeTutorialInterface == false && player.tutorialProgress == 36) { player.getDialogueHandler().sendDialogues(3116, player.npcType); } - if (player.gliderOpen == true) { + if (player.gliderOpen) { player.gliderOpen = false; } - if (player.isBanking == true) { + if (player.isBanking) { player.isBanking = false; } if (player.canWalkTutorial == false && player.tutorialProgress < 36) { diff --git a/2006Redone Server/src/com/rebotted/world/ObjectManager.java b/2006Redone Server/src/com/rebotted/world/ObjectManager.java index 2c33e7a0..452dd2a1 100644 --- a/2006Redone Server/src/com/rebotted/world/ObjectManager.java +++ b/2006Redone Server/src/com/rebotted/world/ObjectManager.java @@ -184,11 +184,11 @@ public class ObjectManager { public void loadCustomSpawns(Player c) { c.getPacketSender().checkObjectSpawn(2474, 3233, 9312, 0, 10); - if (c.rope == true) { + if (c.rope) { c.getPacketSender().object(3828, 3227, 3108, 0, 0, 10); Region.addObject(3828, 3227, 3108, 0, 10, 0, false); } - if (c.rope2 == true) { + if (c.rope2) { c.getPacketSender().object(3828, 3509, 9497, 2, 0, 10); Region.addObject(3828, 3509, 9497, 2, 10, 0, false); }