diff --git a/sku.0/sys.server/compiled/game/script/ai/beast.java b/sku.0/sys.server/compiled/game/script/ai/beast.java index 348bc92f2..2da012809 100755 --- a/sku.0/sys.server/compiled/game/script/ai/beast.java +++ b/sku.0/sys.server/compiled/game/script/ai/beast.java @@ -95,7 +95,7 @@ public class beast extends script.base_script experiencePercentage = (int)(((float)experienceProgress / experienceNeeded) * 100); } names[idx] = "level_progress"; - attribs[idx] = "" + experiencePercentage + "%"; + attribs[idx] = String.valueOf(experiencePercentage) + "%"; idx++; } if (beast_lib.getBeastCanLevel(self)) @@ -114,7 +114,7 @@ public class beast extends script.base_script String currentHappiness = utils.packStringId(beast_lib.convertHappinessString(beastBCD)); if (currentHappiness != null) { - attribs[idx] = "" + currentHappiness; + attribs[idx] = String.valueOf(currentHappiness); idx++; if (idx >= names.length) { @@ -125,7 +125,7 @@ public class beast extends script.base_script String currentLoyalty = utils.packStringId(beast_lib.convertLoyaltyString(beastBCD)); if (currentLoyalty != null) { - attribs[idx] = "" + currentLoyalty; + attribs[idx] = String.valueOf(currentLoyalty); idx++; if (idx >= names.length) { @@ -136,7 +136,7 @@ public class beast extends script.base_script if (loyaltyPercentage >= 0) { names[idx] = beast_lib.BEAST_LOYALTY_PERCENTAGE_TITLE; - attribs[idx] = "" + loyaltyPercentage + "%"; + attribs[idx] = String.valueOf(loyaltyPercentage) + "%"; idx++; if (idx >= names.length) { @@ -148,29 +148,29 @@ public class beast extends script.base_script if (!abilityList[3].equals("") && slotsAvalable >= 0 && !abilityList[3].equals("empty") && !abilityList[3].equals("disabled")) { names[idx] = "bm_ability_1"; - attribs[idx] = "" + utils.packStringId(new string_id("cmd_n", abilityList[3])); + attribs[idx] = String.valueOf(utils.packStringId(new string_id("cmd_n", abilityList[3]))); idx++; } if (!abilityList[4].equals("") && slotsAvalable >= 1 && !abilityList[4].equals("empty") && !abilityList[4].equals("disabled")) { names[idx] = "bm_ability_2"; - attribs[idx] = "" + utils.packStringId(new string_id("cmd_n", abilityList[4])); + attribs[idx] = String.valueOf(utils.packStringId(new string_id("cmd_n", abilityList[4]))); idx++; } if (!abilityList[5].equals("") && slotsAvalable >= 2 && !abilityList[5].equals("empty") && !abilityList[5].equals("disabled")) { names[idx] = "bm_ability_3"; - attribs[idx] = "" + utils.packStringId(new string_id("cmd_n", abilityList[5])); + attribs[idx] = String.valueOf(utils.packStringId(new string_id("cmd_n", abilityList[5]))); idx++; } if (!abilityList[6].equals("") && slotsAvalable >= 3 && !abilityList[6].equals("empty") && !abilityList[6].equals("disabled")) { names[idx] = "bm_ability_4"; - attribs[idx] = "" + utils.packStringId(new string_id("cmd_n", abilityList[6])); + attribs[idx] = String.valueOf(utils.packStringId(new string_id("cmd_n", abilityList[6]))); idx++; } names[idx] = "armorhpmax"; - attribs[idx] = "" + (utils.getIntScriptVar(self, "beast.display.armor") + getEnhancedSkillStatisticModifier(self, "private_armor_bonus")); + attribs[idx] = String.valueOf((utils.getIntScriptVar(self, "beast.display.armor") + getEnhancedSkillStatisticModifier(self, "private_armor_bonus"))); idx++; obj_id beastWeapon = getCurrentWeapon(self); if (isIdValid(beastWeapon)) @@ -182,14 +182,14 @@ public class beast extends script.base_script maxDamage = (int)(maxDamage * (1.0f + (expertiseDamageBonus / 100.0f))); float weaponSpeed = getWeaponAttackSpeed(beastWeapon); names[idx] = "damage"; - attribs[idx] = "" + minDamage + " - " + maxDamage; + attribs[idx] = minDamage + " - " + maxDamage; idx++; names[idx] = "attackspeed"; - attribs[idx] = "" + weaponSpeed; + attribs[idx] = String.valueOf(weaponSpeed); idx++; float beastDPS = utils.roundFloatByDecimal((minDamage + maxDamage) / weaponSpeed / 2); names[idx] = "basedps"; - attribs[idx] = "" + beastDPS; + attribs[idx] = String.valueOf(beastDPS); idx++; } else @@ -204,14 +204,14 @@ public class beast extends script.base_script minDamage = (int)(minDamage * (1.0f + (expertiseDamageBonus / 100.0f))); maxDamage = (int)(maxDamage * (1.0f + (expertiseDamageBonus / 100.0f))); names[idx] = "damage"; - attribs[idx] = "" + minDamage + " - " + maxDamage; + attribs[idx] = minDamage + " - " + maxDamage; idx++; names[idx] = "attackspeed"; - attribs[idx] = "" + weaponSpeed; + attribs[idx] = String.valueOf(weaponSpeed); idx++; float beastDPS = utils.roundFloatByDecimal((minDamage + maxDamage) / weaponSpeed / 2); names[idx] = "basedps"; - attribs[idx] = "" + beastDPS; + attribs[idx] = String.valueOf(beastDPS); idx++; } } @@ -225,13 +225,13 @@ public class beast extends script.base_script if (!name.equals("block_value_bonus")) { names[idx] = beast_lib.DISPLAY_NAMES[i]; - attribs[idx] = "" + utils.roundFloatByDecimal((utils.getFloatScriptVar(self, beast_lib.ARRAY_BEAST_INCUBATION_STATS[i]) * beast_lib.DISPLAY_CONVERSION_RATES[i])) + "%"; + attribs[idx] = String.valueOf(utils.roundFloatByDecimal((utils.getFloatScriptVar(self, beast_lib.ARRAY_BEAST_INCUBATION_STATS[i]) * beast_lib.DISPLAY_CONVERSION_RATES[i]))) + "%"; idx++; } else { names[idx] = beast_lib.DISPLAY_NAMES[i]; - attribs[idx] = "" + utils.roundFloatByDecimal(utils.getFloatScriptVar(self, beast_lib.ARRAY_BEAST_INCUBATION_STATS[i])); + attribs[idx] = String.valueOf(utils.roundFloatByDecimal(utils.getFloatScriptVar(self, beast_lib.ARRAY_BEAST_INCUBATION_STATS[i]))); idx++; } continue; @@ -239,7 +239,7 @@ public class beast extends script.base_script else { names[idx] = beast_lib.DISPLAY_NAMES[i]; - attribs[idx] = "" + utils.roundFloatByDecimal(utils.getFloatScriptVar(self, beast_lib.ARRAY_BEAST_INCUBATION_STATS[i])); + attribs[idx] = String.valueOf(utils.roundFloatByDecimal(utils.getFloatScriptVar(self, beast_lib.ARRAY_BEAST_INCUBATION_STATS[i]))); idx++; continue; } @@ -249,7 +249,7 @@ public class beast extends script.base_script if (glanceReduct > 0) { names[idx] = "bm_glance_reduct"; - attribs[idx] = "" + glanceReduct + "%"; + attribs[idx] = String.valueOf(glanceReduct) + "%"; idx++; if (idx >= names.length) { @@ -260,7 +260,7 @@ public class beast extends script.base_script if (damageReduct > 0) { names[idx] = "bm_damage_reduct"; - attribs[idx] = "" + damageReduct + "%"; + attribs[idx] = String.valueOf(damageReduct) + "%"; idx++; if (idx >= names.length) { @@ -271,7 +271,7 @@ public class beast extends script.base_script if (punishReduct > 0) { names[idx] = "bm_punish_reduct"; - attribs[idx] = "" + punishReduct + "%"; + attribs[idx] = String.valueOf(punishReduct) + "%"; idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/ai/beast_control_device.java b/sku.0/sys.server/compiled/game/script/ai/beast_control_device.java index 8de19fb4e..cab7e72a7 100755 --- a/sku.0/sys.server/compiled/game/script/ai/beast_control_device.java +++ b/sku.0/sys.server/compiled/game/script/ai/beast_control_device.java @@ -260,7 +260,7 @@ public class beast_control_device extends script.base_script String currentHappiness = utils.packStringId(beast_lib.convertHappinessString(self)); if (currentHappiness != null) { - attribs[idx] = "" + currentHappiness; + attribs[idx] = String.valueOf(currentHappiness); idx++; if (idx >= names.length) { @@ -271,7 +271,7 @@ public class beast_control_device extends script.base_script String currentLoyalty = utils.packStringId(beast_lib.convertLoyaltyString(self)); if (currentLoyalty != null) { - attribs[idx] = "" + currentLoyalty; + attribs[idx] = String.valueOf(currentLoyalty); idx++; if (idx >= names.length) { @@ -283,7 +283,7 @@ public class beast_control_device extends script.base_script if (trainingPoints > 0) { names[idx] = "bm_single_max_training_points"; - attribs[idx] = "" + trainingPoints; + attribs[idx] = String.valueOf(trainingPoints); idx++; if (idx >= names.length) { @@ -294,7 +294,7 @@ public class beast_control_device extends script.base_script if (pointsSpent > 0) { names[idx] = "bm_points_spent"; - attribs[idx] = "" + pointsSpent; + attribs[idx] = String.valueOf(pointsSpent); idx++; if (idx >= names.length) { @@ -305,7 +305,7 @@ public class beast_control_device extends script.base_script if (maxAvailableTrainingPoints > 0) { names[idx] = "bm_points_available"; - attribs[idx] = "" + maxAvailableTrainingPoints; + attribs[idx] = String.valueOf(maxAvailableTrainingPoints); idx++; if (idx >= names.length) { @@ -325,13 +325,13 @@ public class beast_control_device extends script.base_script if (!name.equals("block_value_bonus")) { names[idx] = beast_lib.DISPLAY_NAMES[i]; - attribs[idx] = "" + utils.roundFloatByDecimal(incubationBonuses[i] * beast_lib.DISPLAY_OBJVAR_CONVERSION_RATES[i]) + "%"; + attribs[idx] = String.valueOf(utils.roundFloatByDecimal(incubationBonuses[i] * beast_lib.DISPLAY_OBJVAR_CONVERSION_RATES[i])) + "%"; idx++; } else { names[idx] = beast_lib.DISPLAY_NAMES[i]; - attribs[idx] = "" + incubationBonuses[i]; + attribs[idx] = String.valueOf(incubationBonuses[i]); idx++; } continue; @@ -339,7 +339,7 @@ public class beast_control_device extends script.base_script else { names[idx] = beast_lib.DISPLAY_NAMES[i]; - attribs[idx] = "" + incubationBonuses[i]; + attribs[idx] = String.valueOf(incubationBonuses[i]); idx++; continue; } diff --git a/sku.0/sys.server/compiled/game/script/ai/pet.java b/sku.0/sys.server/compiled/game/script/ai/pet.java index e4c098744..ea3e40227 100755 --- a/sku.0/sys.server/compiled/game/script/ai/pet.java +++ b/sku.0/sys.server/compiled/game/script/ai/pet.java @@ -78,7 +78,7 @@ public class pet extends script.base_script location[] newPath = new location[oldPath.getNumItems()]; for (int i = 0; i < newPath.length; ++i) { - location point = oldPath.getLocationObjVar("" + i); + location point = oldPath.getLocationObjVar(String.valueOf(i)); newPath[i] = point; } setObjVar(self, pet_lib.OBJVAR_PET_PATROL_POINTS, newPath); @@ -109,7 +109,7 @@ public class pet extends script.base_script if (pet_lib.isDroidPet(self)) { names[idx] = "pet_stats.level"; - attribs[idx] = "" + getLevel(self); + attribs[idx] = String.valueOf(getLevel(self)); idx++; if (idx >= names.length) { @@ -131,7 +131,7 @@ public class pet extends script.base_script { int general_protection = getIntObjVar(petControlDevice, "creature_attribs.general_protection"); names[idx] = "pet_stats.dna_comp_armor_effectiveness"; - attribs[idx] = "" + general_protection; + attribs[idx] = String.valueOf(general_protection); idx++; if (idx >= names.length) { @@ -150,7 +150,7 @@ public class pet extends script.base_script { names[idx] = "pet_stats.creature_tohit"; int value = getIntObjVar(petControlDevice, "creature_attribs.toHitChance"); - attribs[idx] = "" + value; + attribs[idx] = String.valueOf(value); idx++; if (idx >= names.length) { @@ -161,7 +161,7 @@ public class pet extends script.base_script { names[idx] = "pet_stats.creature_defense"; int value = getIntObjVar(petControlDevice, "creature_attribs.defenseValue"); - attribs[idx] = "" + value; + attribs[idx] = String.valueOf(value); idx++; if (idx >= names.length) { @@ -172,7 +172,7 @@ public class pet extends script.base_script { names[idx] = "pet_stats.creature_state_resist"; float value = getFloatObjVar(petControlDevice, "creature_attribs.stateResist"); - attribs[idx] = "" + value * 100 + "%"; + attribs[idx] = String.valueOf(value * 100) + "%"; idx++; if (idx >= names.length) { @@ -183,7 +183,7 @@ public class pet extends script.base_script { names[idx] = "pet_stats.creature_crit_chance"; float value = getFloatObjVar(petControlDevice, "creature_attribs.critChance"); - attribs[idx] = "" + value * 100 + "%"; + attribs[idx] = String.valueOf(value * 100) + "%"; idx++; if (idx >= names.length) { @@ -194,7 +194,7 @@ public class pet extends script.base_script { names[idx] = "pet_stats.creature_crit_save"; float value = getFloatObjVar(petControlDevice, "creature_attribs.critSave"); - attribs[idx] = "" + value * 100 + "%"; + attribs[idx] = String.valueOf(value * 100) + "%"; idx++; if (idx >= names.length) { @@ -205,7 +205,7 @@ public class pet extends script.base_script { names[idx] = "pet_stats.creature_aggro_bonus"; float value = getFloatObjVar(petControlDevice, "creature_attribs.aggroBonus"); - attribs[idx] = "" + value * 100 + "%"; + attribs[idx] = String.valueOf(value * 100) + "%"; idx++; if (idx >= names.length) { @@ -221,7 +221,7 @@ public class pet extends script.base_script int[] dmgBonus = pet_lib.getPetAbilityDamageBonus(petControlDevice, min, max); min += dmgBonus[0]; max += dmgBonus[1]; - attribs[idx] = "" + min + " - " + max; + attribs[idx] = min + " - " + max; idx++; if (idx >= names.length) { @@ -263,7 +263,7 @@ public class pet extends script.base_script { names[idx] = "pet_stats.storage_module_rating"; int storage = getIntObjVar(petControlDevice, "storageModuleRating"); - attribs[idx] = "" + storage; + attribs[idx] = String.valueOf(storage); idx++; if (idx >= names.length) { @@ -274,7 +274,7 @@ public class pet extends script.base_script { names[idx] = "pet_stats.storage_module_rating"; int storage = getIntObjVar(petControlDevice, "ai.pet.hasContainer"); - attribs[idx] = "" + storage; + attribs[idx] = String.valueOf(storage); idx++; if (idx >= names.length) { @@ -287,7 +287,7 @@ public class pet extends script.base_script if (storage > 0) { names[idx] = "pet_stats.inventory_capacity"; - attribs[idx] = "" + storage; + attribs[idx] = String.valueOf(storage); idx++; if (idx >= names.length) { @@ -356,7 +356,7 @@ public class pet extends script.base_script return SCRIPT_CONTINUE; } names[idx] = "pet_stats.data_module_rating"; - attribs[idx] = "" + datastorage; + attribs[idx] = String.valueOf(datastorage); idx++; if (idx >= names.length) { @@ -369,7 +369,7 @@ public class pet extends script.base_script if (storage > 0) { names[idx] = "pet_stats.datapad_slots"; - attribs[idx] = "" + storage; + attribs[idx] = String.valueOf(storage); idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/ai/pet_control_device.java b/sku.0/sys.server/compiled/game/script/ai/pet_control_device.java index cb7891324..ea06478f5 100755 --- a/sku.0/sys.server/compiled/game/script/ai/pet_control_device.java +++ b/sku.0/sys.server/compiled/game/script/ai/pet_control_device.java @@ -722,7 +722,7 @@ public class pet_control_device extends script.base_script names[idx] = "rideables_current_of_max"; int currentRideables = callable.getNumStoredCDByType(player, callable.CALLABLE_TYPE_RIDEABLE); int maxRideables = callable.getMaxAllowedStoredRideables(player); - attribs[idx] = "" + target_dummy.BLUE + currentRideables + " of " + maxRideables; + attribs[idx] = target_dummy.BLUE + currentRideables + " of " + maxRideables; idx++; if (idx >= names.length) { @@ -763,7 +763,7 @@ public class pet_control_device extends script.base_script } else { - attribs[idx] = "" + available; + attribs[idx] = String.valueOf(available); idx++; if (idx >= names.length) { @@ -771,7 +771,7 @@ public class pet_control_device extends script.base_script } int trainingPts = getIntObjVar(self, "ai.petAbility.trainingPts"); names[idx] = "ability_points"; - attribs[idx] = "" + trainingPts; + attribs[idx] = String.valueOf(trainingPts); idx++; if (idx >= names.length) { @@ -780,7 +780,7 @@ public class pet_control_device extends script.base_script int xpEarned = getIntObjVar(self, "ai.petAdvance.xpEarned"); int xpToLevel = pet_lib.getPcdXpForNextLevel(self); names[idx] = "ability_xp"; - attribs[idx] = "" + xpEarned + "/" + xpToLevel; + attribs[idx] = xpEarned + "/" + xpToLevel; } idx++; if (idx >= names.length) @@ -801,7 +801,7 @@ public class pet_control_device extends script.base_script vitality = 0; } names[idx] = "creature_vitality"; - attribs[idx] = "" + vitality + "/" + maxVitality; + attribs[idx] = vitality + "/" + maxVitality; idx++; if (idx >= names.length) { @@ -816,13 +816,13 @@ public class pet_control_device extends script.base_script health += pet_lib.getPetAbilityHealthBonus(self, health); if (vitality < pet_lib.MAX_VITALITY_LOSS) { - attribs[idx] = "" + pet_lib.getReducedStatValue(health, vitality) + "/"; + attribs[idx] = pet_lib.getReducedStatValue(health, vitality) + "/"; } else { attribs[idx] = ""; } - attribs[idx] += "" + health; + attribs[idx] += String.valueOf(health); idx++; if (idx >= names.length) { @@ -836,13 +836,13 @@ public class pet_control_device extends script.base_script regen += pet_lib.getPetAbilityRegenBonus(self, regen); if (vitality < pet_lib.MAX_VITALITY_LOSS) { - attribs[idx] = "" + pet_lib.getReducedStatValue(regen, vitality) + "/"; + attribs[idx] = pet_lib.getReducedStatValue(regen, vitality) + "/"; } else { attribs[idx] = ""; } - attribs[idx] += "" + regen; + attribs[idx] += String.valueOf(regen); idx++; if (idx >= names.length) { @@ -853,7 +853,7 @@ public class pet_control_device extends script.base_script { int general_protection = getIntObjVar(self, "creature_attribs.general_protection"); names[idx] = "pet_stats.dna_comp_armor_effectiveness"; - attribs[idx] = "" + general_protection; + attribs[idx] = String.valueOf(general_protection); idx++; if (idx >= names.length) { @@ -867,7 +867,7 @@ public class pet_control_device extends script.base_script { names[idx] = "pet_stats.creature_tohit"; int value = getIntObjVar(self, "creature_attribs.toHitChance"); - attribs[idx] = "" + value; + attribs[idx] = String.valueOf(value); idx++; if (idx >= names.length) { @@ -878,7 +878,7 @@ public class pet_control_device extends script.base_script { names[idx] = "pet_stats.creature_defense"; int value = getIntObjVar(self, "creature_attribs.defenseValue"); - attribs[idx] = "" + value; + attribs[idx] = String.valueOf(value); idx++; if (idx >= names.length) { @@ -889,7 +889,7 @@ public class pet_control_device extends script.base_script { names[idx] = "pet_stats.creature_state_resist"; float value = getFloatObjVar(self, "creature_attribs.stateResist"); - attribs[idx] = "" + value * 100 + "%"; + attribs[idx] = String.valueOf(value * 100) + "%"; idx++; if (idx >= names.length) { @@ -900,7 +900,7 @@ public class pet_control_device extends script.base_script { names[idx] = "pet_stats.creature_crit_chance"; float value = getFloatObjVar(self, "creature_attribs.critChance"); - attribs[idx] = "" + value * 100 + "%"; + attribs[idx] = String.valueOf(value * 100) + "%"; idx++; if (idx >= names.length) { @@ -911,7 +911,7 @@ public class pet_control_device extends script.base_script { names[idx] = "pet_stats.creature_crit_save"; float value = getFloatObjVar(self, "creature_attribs.critSave"); - attribs[idx] = "" + value * 100 + "%"; + attribs[idx] = String.valueOf(value * 100) + "%"; idx++; if (idx >= names.length) { @@ -922,7 +922,7 @@ public class pet_control_device extends script.base_script { names[idx] = "pet_stats.creature_aggro_bonus"; float value = getFloatObjVar(self, "creature_attribs.aggroBonus"); - attribs[idx] = "" + value * 100 + "%"; + attribs[idx] = String.valueOf(value * 100) + "%"; idx++; if (idx >= names.length) { @@ -937,7 +937,7 @@ public class pet_control_device extends script.base_script int[] dmgBonus = pet_lib.getPetAbilityDamageBonus(self, min, max); min += dmgBonus[0]; max += dmgBonus[1]; - attribs[idx] = "" + min + " - " + max; + attribs[idx] = min + " - " + max; idx++; if (idx >= names.length) { @@ -1003,7 +1003,7 @@ public class pet_control_device extends script.base_script { names[idx] = "pet_stats.storage_module_rating"; int storage = getIntObjVar(self, "storageModuleRating"); - attribs[idx] = "" + storage; + attribs[idx] = String.valueOf(storage); idx++; if (idx >= names.length) { @@ -1014,7 +1014,7 @@ public class pet_control_device extends script.base_script { names[idx] = "pet_stats.storage_module_rating"; int storage = getIntObjVar(self, "ai.pet.hasContainer"); - attribs[idx] = "" + storage; + attribs[idx] = String.valueOf(storage); idx++; if (idx >= names.length) { @@ -1027,7 +1027,7 @@ public class pet_control_device extends script.base_script if (storage > 0) { names[idx] = "pet_stats.inventory_capacity"; - attribs[idx] = "" + storage; + attribs[idx] = String.valueOf(storage); idx++; if (idx >= names.length) { @@ -1096,7 +1096,7 @@ public class pet_control_device extends script.base_script return SCRIPT_CONTINUE; } names[idx] = "pet_stats.data_module_rating"; - attribs[idx] = "" + datastorage; + attribs[idx] = String.valueOf(datastorage); idx++; if (idx >= names.length) { @@ -1109,7 +1109,7 @@ public class pet_control_device extends script.base_script if (storage > 0) { names[idx] = "pet_stats.datapad_slots"; - attribs[idx] = "" + storage; + attribs[idx] = String.valueOf(storage); idx++; if (idx >= names.length) { @@ -1475,13 +1475,13 @@ public class pet_control_device extends script.base_script myHealth += pet_lib.getPetAbilityHealthBonus(self, myHealth); if (vitality < pet_lib.MAX_VITALITY_LOSS) { - attribs[idx] = "" + pet_lib.getReducedStatValue(myHealth, vitality) + "/"; + attribs[idx] = pet_lib.getReducedStatValue(myHealth, vitality) + "/"; } else { attribs[idx] = ""; } - attribs[idx] += "" + myHealth; + attribs[idx] += String.valueOf(myHealth); idx++; if (idx >= names.length) { @@ -1490,7 +1490,7 @@ public class pet_control_device extends script.base_script names[idx] = "pet_stats.creature_attack"; float attackSpeed = creatureDict.getInt("attackSpeed"); attackSpeed = (float)((int)(attackSpeed * 100) / 100.0f); - attribs[idx] = "" + attackSpeed; + attribs[idx] = String.valueOf(attackSpeed); idx++; if (idx >= names.length) { @@ -1498,7 +1498,7 @@ public class pet_control_device extends script.base_script } names[idx] = "pet_stats.creature_tohit"; int toHit = dataTableGetInt(create.STAT_BALANCE_TABLE, toHitLevel - 1, "ToHit"); - attribs[idx] = "" + toHit; + attribs[idx] = String.valueOf(toHit); idx++; if (idx >= names.length) { @@ -1506,7 +1506,7 @@ public class pet_control_device extends script.base_script } names[idx] = "pet_stats.creature_defense"; int defenseValue = dataTableGetInt(create.STAT_BALANCE_TABLE, toHitLevel - 1, "Def"); - attribs[idx] = "" + defenseValue; + attribs[idx] = String.valueOf(defenseValue); idx++; if (idx >= names.length) { @@ -1519,7 +1519,7 @@ public class pet_control_device extends script.base_script minDamage += dmgBonus[0]; maxDamage += dmgBonus[1]; names[idx] = "pet_stats.creature_damage"; - attribs[idx] = "" + minDamage + " - " + maxDamage; + attribs[idx] = minDamage + " - " + maxDamage; idx++; if (idx >= names.length) { @@ -1641,38 +1641,37 @@ public class pet_control_device extends script.base_script float fltBaseWalkSpeed = dctMountInfo.getFloat("fltBaseWalkSpeed"); float fltBurstRunSpeed = dctMountInfo.getFloat("fltBaseRunSpeed"); names[idx] = "mount"; - attribs[idx++] = "" + pet_lib.isMountPcd(self); + attribs[idx++] = Boolean.toString(pet_lib.isMountPcd(self)); if (hasObjVar(self, "mount_type")) { int mountType = getIntObjVar(self, "mount_type"); - if (mountType == 0) - { - names[idx] = "walkspeed"; - attribs[idx++] = "" + fltBaseWalkSpeed; - names[idx] = "runspeed"; - attribs[idx++] = "" + fltBurstRunSpeed; - } - else if (mountType == 1) - { - names[idx] = "glide_speed"; - attribs[idx++] = "" + fltBaseWalkSpeed; - names[idx] = "fly_speed"; - attribs[idx++] = "" + fltBurstRunSpeed; - } - else - { - names[idx] = "walkspeed"; - attribs[idx++] = "" + fltBaseWalkSpeed; - names[idx] = "runspeed"; - attribs[idx++] = "" + fltBurstRunSpeed; + switch (mountType) { + case 0: + names[idx] = "walkspeed"; + attribs[idx++] = Float.toString(fltBaseWalkSpeed); + names[idx] = "runspeed"; + attribs[idx++] = Float.toString(fltBurstRunSpeed); + break; + case 1: + names[idx] = "glide_speed"; + attribs[idx++] = Float.toString(fltBaseWalkSpeed); + names[idx] = "fly_speed"; + attribs[idx++] = Float.toString(fltBurstRunSpeed); + break; + default: + names[idx] = "walkspeed"; + attribs[idx++] = Float.toString(fltBaseWalkSpeed); + names[idx] = "runspeed"; + attribs[idx++] = Float.toString(fltBurstRunSpeed); + break; } } else { names[idx] = "walkspeed"; - attribs[idx++] = "" + fltBaseWalkSpeed; + attribs[idx++] = Float.toString(fltBaseWalkSpeed); names[idx] = "runspeed"; - attribs[idx++] = "" + fltBurstRunSpeed; + attribs[idx++] = Float.toString(fltBurstRunSpeed); } idx++; if (idx >= names.length) diff --git a/sku.0/sys.server/compiled/game/script/city/city_pathing_npc.java b/sku.0/sys.server/compiled/game/script/city/city_pathing_npc.java index e6c851a51..cac34d220 100755 --- a/sku.0/sys.server/compiled/game/script/city/city_pathing_npc.java +++ b/sku.0/sys.server/compiled/game/script/city/city_pathing_npc.java @@ -80,7 +80,7 @@ public class city_pathing_npc extends script.base_script } public void doFacingAction(obj_id npc, obj_id currentStop) throws InterruptedException { - obj_id objThingToFace = utils.stringToObjId("" + getIntObjVar(currentStop, "faceto")); + obj_id objThingToFace = utils.stringToObjId(Integer.toString(getIntObjVar(currentStop, "faceto"))); if (isIdValid(objThingToFace)) { faceTo(npc, objThingToFace); @@ -109,7 +109,7 @@ public class city_pathing_npc extends script.base_script { if (hasObjVar(currentStop, "destination")) { - obj_id dest = utils.stringToObjId("" + getIntObjVar(currentStop, "destination")); + obj_id dest = utils.stringToObjId(Integer.toString(getIntObjVar(currentStop, "destination"))); utils.setScriptVar(npc, "pathing.currentStop", dest); pathTo(npc, getLocation(dest)); } diff --git a/sku.0/sys.server/compiled/game/script/combat_engine.java b/sku.0/sys.server/compiled/game/script/combat_engine.java index 820cf26d0..1148a85e2 100755 --- a/sku.0/sys.server/compiled/game/script/combat_engine.java +++ b/sku.0/sys.server/compiled/game/script/combat_engine.java @@ -7,10 +7,11 @@ package script; +import java.util.HashMap; import script.library.combat_consts; import script.library.utils; -import java.util.Hashtable; +import java.util.Map; public class combat_engine { @@ -18,12 +19,12 @@ public class combat_engine * Combat constants */ - private static Hashtable m_CombatDataCache = new Hashtable(); - private static Hashtable m_BuffDataCache = new Hashtable(); - + private static final Map m_CombatDataCache = new HashMap<>(); + private static final Map m_BuffDataCache = new HashMap<>(); + public static final int OUT_OF_RANGE = Integer.MIN_VALUE; private static float MAX_MELEE_TARGET_RANGE = -1.0f; - private static float DEFAULT_MAX_MELEE_TARGET_RANGE = 24.0f; + private static final float DEFAULT_MAX_MELEE_TARGET_RANGE = 24.0f; private static float MAX_COMBAT_RANGE = -1.0f; @@ -629,17 +630,17 @@ public class combat_engine // Buff data public static buff_data getBuffData(int buffNameCrc) - { - if(m_BuffDataCache.containsKey("" + buffNameCrc)) + { + if(m_BuffDataCache.containsKey(Integer.toString(buffNameCrc))) { - return buff_data.clone((buff_data)m_BuffDataCache.get("" + buffNameCrc)); + return buff_data.clone((buff_data)m_BuffDataCache.get(Integer.toString(buffNameCrc))); } buff_data dat = loadBuffData(buffNameCrc); if(dat != null) { - m_BuffDataCache.put("" + buffNameCrc, dat); + m_BuffDataCache.put(Integer.toString(buffNameCrc), dat); } else { diff --git a/sku.0/sys.server/compiled/game/script/content_tools/spawn_generation_tool.java b/sku.0/sys.server/compiled/game/script/content_tools/spawn_generation_tool.java index a27c9a3eb..c99e91ba8 100755 --- a/sku.0/sys.server/compiled/game/script/content_tools/spawn_generation_tool.java +++ b/sku.0/sys.server/compiled/game/script/content_tools/spawn_generation_tool.java @@ -206,29 +206,27 @@ public class spawn_generation_tool extends script.base_script clearSUIDataSource(pid, sui.LISTBOX_DATASOURCE); if (!isIdValid(mso) || ast.equals(NOT_ASSIGNED)) { - addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "" + 0); + addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "0"); setSUIProperty(pid, sui.LISTBOX_DATASOURCE + "." + 0, sui.PROP_TEXT, "Create New Spawn Data"); - addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "" + 1); + addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "1"); setSUIProperty(pid, sui.LISTBOX_DATASOURCE + "." + 1, sui.PROP_TEXT, "Load Existing Spawn Data"); subscribeToSUIProperty(pid, sui.LISTBOX_LIST, sui.PROP_SELECTEDROW); subscribeToSUIProperty(pid, sui.LISTBOX_TITLE, sui.PROP_TEXT); showSUIPage(pid); flushSUIPage(pid); - return; } else { - addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "" + 0); + addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "0"); setSUIProperty(pid, sui.LISTBOX_DATASOURCE + "." + 0, sui.PROP_TEXT, "Use Existing Data"); - addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "" + 1); + addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "1"); setSUIProperty(pid, sui.LISTBOX_DATASOURCE + "." + 1, sui.PROP_TEXT, "Create New Spawn Data"); - addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "" + 2); + addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "2"); setSUIProperty(pid, sui.LISTBOX_DATASOURCE + "." + 2, sui.PROP_TEXT, "Load Existing Spawn Data"); subscribeToSUIProperty(pid, sui.LISTBOX_LIST, sui.PROP_SELECTEDROW); subscribeToSUIProperty(pid, sui.LISTBOX_TITLE, sui.PROP_TEXT); showSUIPage(pid); flushSUIPage(pid); - return; } } public void setMasterSpawnObject(obj_id player) throws InterruptedException @@ -249,14 +247,14 @@ public class spawn_generation_tool extends script.base_script clearSUIDataSource(pid, sui.LISTBOX_DATASOURCE); if (sortedList == null || sortedList.length == 0) { - addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "" + 0); + addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "0"); setSUIProperty(pid, sui.LISTBOX_DATASOURCE + "." + 0, sui.PROP_TEXT, "No Available Objects In Range"); } else { for (int i = 0; i < sortedList.length; i++) { - addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "" + i); + addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, Integer.toString(i)); setSUIProperty(pid, sui.LISTBOX_DATASOURCE + "." + i, sui.PROP_TEXT, sortedList[i]); } } @@ -281,9 +279,9 @@ public class spawn_generation_tool extends script.base_script setSUIProperty(pid, sui.LISTBOX_BTN_OK, sui.PROP_TEXT, "@ok"); setSUIProperty(pid, sui.LISTBOX_BTN_CANCEL, sui.PROP_TEXT, "@cancel"); clearSUIDataSource(pid, sui.LISTBOX_DATASOURCE); - addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "" + 0); + addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "0"); setSUIProperty(pid, sui.LISTBOX_DATASOURCE + "." + 0, sui.PROP_TEXT, "Create New Associated Spawn Table"); - addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "" + 1); + addSUIDataItem(pid, sui.LISTBOX_DATASOURCE, "1"); setSUIProperty(pid, sui.LISTBOX_DATASOURCE + "." + 1, sui.PROP_TEXT, "Load Exisisting Associated Spawn Table"); subscribeToSUIEvent(pid, sui_event_type.SET_onGenericSelection, sui.LISTBOX_LIST, "createSpawnGenerationSui"); subscribeToSUIPropertyForEvent(pid, sui_event_type.SET_onGenericSelection, sui.LISTBOX_LIST, sui.LISTBOX_LIST, sui.PROP_SELECTEDROW); diff --git a/sku.0/sys.server/compiled/game/script/conversation/faction_recruiter_imperial.java b/sku.0/sys.server/compiled/game/script/conversation/faction_recruiter_imperial.java index c6534ead8..7f400fbd1 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/faction_recruiter_imperial.java +++ b/sku.0/sys.server/compiled/game/script/conversation/faction_recruiter_imperial.java @@ -163,7 +163,6 @@ public class faction_recruiter_imperial extends script.base_script int faction_id = pvpGetAlignedFaction(player); String playerGcwFaction = factions.getFactionNameByHashCode(faction_id); faction_perk.displayAvailableFactionItemRanks(player, npc, playerGcwRank, playerGcwFaction); - return; } public String faction_recruiter_imperial_tokenTO_getFactionRankName(obj_id player, obj_id npc) throws InterruptedException { @@ -189,7 +188,7 @@ public class faction_recruiter_imperial extends script.base_script public String faction_recruiter_imperial_tokenTO_getRebelScoreString(obj_id player, obj_id npc) throws InterruptedException { int intTest = getIntObjVar(npc, "Rebel.controlScore"); - return "" + intTest; + return Integer.toString(intTest); } public int faction_recruiter_imperial_tokenDI_getImperialScore(obj_id player, obj_id npc) throws InterruptedException { diff --git a/sku.0/sys.server/compiled/game/script/conversation/faction_recruiter_rebel.java b/sku.0/sys.server/compiled/game/script/conversation/faction_recruiter_rebel.java index 291287bbf..fa96cf565 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/faction_recruiter_rebel.java +++ b/sku.0/sys.server/compiled/game/script/conversation/faction_recruiter_rebel.java @@ -158,7 +158,6 @@ public class faction_recruiter_rebel extends script.base_script int faction_id = pvpGetAlignedFaction(player); String playerGcwFaction = factions.getFactionNameByHashCode(faction_id); faction_perk.displayAvailableFactionItemRanks(player, npc, playerGcwRank, playerGcwFaction); - return; } public String faction_recruiter_rebel_tokenTO_getFactionRankName(obj_id player, obj_id npc) throws InterruptedException { @@ -173,7 +172,7 @@ public class faction_recruiter_rebel extends script.base_script } public String faction_recruiter_rebel_tokenTO_getRebelScoreString(obj_id player, obj_id npc) throws InterruptedException { - return "" + getIntObjVar(npc, "Rebel.controlScore"); + return getStringObjVar(npc, "Rebel.controlScore"); } public int faction_recruiter_rebel_tokenDI_getImperialScore(obj_id player, obj_id npc) throws InterruptedException { diff --git a/sku.0/sys.server/compiled/game/script/conversation/fs_medic_puzzle_head_medic.java b/sku.0/sys.server/compiled/game/script/conversation/fs_medic_puzzle_head_medic.java index 36d5f5064..26cf09c4a 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/fs_medic_puzzle_head_medic.java +++ b/sku.0/sys.server/compiled/game/script/conversation/fs_medic_puzzle_head_medic.java @@ -23,25 +23,11 @@ public class fs_medic_puzzle_head_medic extends script.base_script } public boolean fs_medic_puzzle_head_medic_condition_hasCompleted1(obj_id player, obj_id npc) throws InterruptedException { - if (quests.canActivate(MEDIC_QUEST_NAME_TWO, player) && quests.isComplete(MEDIC_QUEST_NAME_ONE, player)) - { - return true; - } - else - { - return false; - } + return quests.canActivate(MEDIC_QUEST_NAME_TWO, player) && quests.isComplete(MEDIC_QUEST_NAME_ONE, player); } public boolean fs_medic_puzzle_head_medic_condition_hasCompleted2(obj_id player, obj_id npc) throws InterruptedException { - if (quests.canActivate(MEDIC_QUEST_NAME_THREE, player) && quests.isComplete(MEDIC_QUEST_NAME_TWO, player)) - { - return true; - } - else - { - return false; - } + return quests.canActivate(MEDIC_QUEST_NAME_THREE, player) && quests.isComplete(MEDIC_QUEST_NAME_TWO, player); } public boolean fs_medic_puzzle_head_medic_condition_Finished(obj_id player, obj_id npc) throws InterruptedException { @@ -180,7 +166,7 @@ public class fs_medic_puzzle_head_medic extends script.base_script peopleHealed = peopleHealed - 5; } peopleHealed = 5 - peopleHealed; - return "" + peopleHealed; + return Integer.toString(peopleHealed); } public static final String MEDIC_QUEST_NAME_ONE = "fs_medic_puzzle_quest_01"; public static final String MEDIC_QUEST_NAME_TWO = "fs_medic_puzzle_quest_02"; diff --git a/sku.0/sys.server/compiled/game/script/cybernetic/cybernetic_crafted_item.java b/sku.0/sys.server/compiled/game/script/cybernetic/cybernetic_crafted_item.java index 66e23aba8..2d14f8abf 100755 --- a/sku.0/sys.server/compiled/game/script/cybernetic/cybernetic_crafted_item.java +++ b/sku.0/sys.server/compiled/game/script/cybernetic/cybernetic_crafted_item.java @@ -117,7 +117,7 @@ public class cybernetic_crafted_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("throwRangeMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("throwRangeMod")); } } if (cyberRow.getInt("rangedRangeMod") != 0) @@ -129,7 +129,7 @@ public class cybernetic_crafted_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("rangedRangeMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("rangedRangeMod")); } } if (cyberRow.getInt("healingMod") != 0) @@ -141,7 +141,7 @@ public class cybernetic_crafted_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("healingMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("healingMod")); } } if (cyberRow.getInt("rangedAccuracyMod") != 0) @@ -153,7 +153,7 @@ public class cybernetic_crafted_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("rangedAccuracyMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("rangedAccuracyMod")); } } if (cyberRow.getInt("meleeDefMod") != 0) @@ -165,7 +165,7 @@ public class cybernetic_crafted_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("meleeDefMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("meleeDefMod")); } } if (cyberRow.getInt("meleeAccuracyMod") != 0) @@ -177,7 +177,7 @@ public class cybernetic_crafted_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("meleeAccuracyMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("meleeAccuracyMod")); } } if (cyberRow.getInt("commandoLegs") != 0) diff --git a/sku.0/sys.server/compiled/game/script/cybernetic/cybernetic_item.java b/sku.0/sys.server/compiled/game/script/cybernetic/cybernetic_item.java index e8108046a..adcde8c25 100755 --- a/sku.0/sys.server/compiled/game/script/cybernetic/cybernetic_item.java +++ b/sku.0/sys.server/compiled/game/script/cybernetic/cybernetic_item.java @@ -138,7 +138,7 @@ public class cybernetic_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("throwRangeMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("throwRangeMod")); } } if (cyberRow.getInt("rangedRangeMod") != 0) @@ -150,7 +150,7 @@ public class cybernetic_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("rangedRangeMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("rangedRangeMod")); } } if (cyberRow.getInt("healingMod") != 0) @@ -162,7 +162,7 @@ public class cybernetic_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("healingMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("healingMod")); } } if (cyberRow.getInt("rangedAccuracyMod") != 0) @@ -174,7 +174,7 @@ public class cybernetic_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("rangedAccuracyMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("rangedAccuracyMod")); } } if (cyberRow.getInt("meleeDefMod") != 0) @@ -186,7 +186,7 @@ public class cybernetic_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("meleeDefMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("meleeDefMod")); } } if (cyberRow.getInt("meleeAccuracyMod") != 0) @@ -198,7 +198,7 @@ public class cybernetic_item extends script.base_script } else { - attribs[free++] = "" + cyberRow.getInt("meleeAccuracyMod"); + attribs[free++] = Integer.toString(cyberRow.getInt("meleeAccuracyMod")); } } if (cyberRow.getInt("commandoLegs") != 0) diff --git a/sku.0/sys.server/compiled/game/script/event/dianoga_dumpster.java b/sku.0/sys.server/compiled/game/script/event/dianoga_dumpster.java index 8d584845b..7f377be27 100755 --- a/sku.0/sys.server/compiled/game/script/event/dianoga_dumpster.java +++ b/sku.0/sys.server/compiled/game/script/event/dianoga_dumpster.java @@ -264,21 +264,20 @@ public class dianoga_dumpster extends script.base_script if (succesFeeds > 0) { names[idx] = "times_fed"; - attribs[idx] = "" + succesFeeds; + attribs[idx] = Integer.toString(succesFeeds); idx++; } names[idx] = "next_feed"; - if (currentStatus == 0) - { - attribs[idx] = getCalendarTimeStringLocal(lastFed + house_pet.getUpdateWeekly(self)); - } - else if (currentStatus == 1) - { - attribs[idx] = "Now"; - } - else - { - attribs[idx] = "Hopefully Soon"; + switch (currentStatus) { + case 0: + attribs[idx] = getCalendarTimeStringLocal(lastFed + house_pet.getUpdateWeekly(self)); + break; + case 1: + attribs[idx] = "Now"; + break; + default: + attribs[idx] = "Hopefully Soon"; + break; } idx++; names[idx] = "time_now"; diff --git a/sku.0/sys.server/compiled/game/script/event/housepackup/sarlacc_furniture_terminal.java b/sku.0/sys.server/compiled/game/script/event/housepackup/sarlacc_furniture_terminal.java index 842fb6c2b..9df1e9207 100755 --- a/sku.0/sys.server/compiled/game/script/event/housepackup/sarlacc_furniture_terminal.java +++ b/sku.0/sys.server/compiled/game/script/event/housepackup/sarlacc_furniture_terminal.java @@ -291,21 +291,20 @@ public class sarlacc_furniture_terminal extends script.base_script if (succesFeeds > 0) { names[idx] = "times_fed"; - attribs[idx] = "" + succesFeeds; + attribs[idx] = Integer.toString(succesFeeds); idx++; } names[idx] = "next_feed"; - if (currentStatus == 0) - { - attribs[idx] = getCalendarTimeStringLocal(lastFed + house_pet.getUpdateWeekly(self)); - } - else if (currentStatus == 1) - { - attribs[idx] = "Now"; - } - else - { - attribs[idx] = "Hopefully Soon"; + switch (currentStatus) { + case 0: + attribs[idx] = getCalendarTimeStringLocal(lastFed + house_pet.getUpdateWeekly(self)); + break; + case 1: + attribs[idx] = "Now"; + break; + default: + attribs[idx] = "Hopefully Soon"; + break; } idx++; names[idx] = "time_now"; @@ -505,7 +504,7 @@ public class sarlacc_furniture_terminal extends script.base_script { return SCRIPT_CONTINUE; } - if (params == null || params.equals("")) + if (params == null || params.isEmpty()) { return SCRIPT_CONTINUE; } @@ -527,7 +526,7 @@ public class sarlacc_furniture_terminal extends script.base_script { return SCRIPT_CONTINUE; } - if (params == null || params.equals("")) + if (params == null || params.isEmpty()) { return SCRIPT_CONTINUE; } @@ -553,7 +552,7 @@ public class sarlacc_furniture_terminal extends script.base_script { return SCRIPT_CONTINUE; } - if (params == null || params.equals("")) + if (params == null || params.isEmpty()) { return SCRIPT_CONTINUE; } @@ -646,21 +645,21 @@ public class sarlacc_furniture_terminal extends script.base_script CustomerServiceLog("sarlacc_minigame: ", "updateSarlaccPet - Sarlacc: " + sarlacc + " has a feeding iteration, continuing debug procedures."); } int currentPhase = getIntObjVar(sarlacc, house_pet.SARLACC_CURRENT_PHASE); - if (currentPhase == house_pet.SARLACC_DEATH) - { - CustomerServiceLog("sarlacc_minigame: ", "updateSarlaccPet - Sarlacc: " + sarlacc + " we haven't even started updating yet and the Sarlacc is currently DEAD."); - } - else if (currentPhase == house_pet.SARLACC_STARVING) - { - CustomerServiceLog("sarlacc_minigame: ", "updateSarlaccPet - Sarlacc: " + sarlacc + " we haven't even started updating yet and the Sarlacc is currently STARVING."); - } - else if (currentPhase == house_pet.SARLACC_HUNGRY) - { - CustomerServiceLog("sarlacc_minigame: ", "updateSarlaccPet - Sarlacc: " + sarlacc + " we haven't even started updating yet and the Sarlacc is currently HUNGRY."); - } - else if (currentPhase == house_pet.SARLACC_FED) - { - CustomerServiceLog("sarlacc_minigame: ", "updateSarlaccPet - Sarlacc: " + sarlacc + " we haven't even started updating yet and the Sarlacc is currently FED."); + switch (currentPhase) { + case house_pet.SARLACC_DEATH: + CustomerServiceLog("sarlacc_minigame: ", "updateSarlaccPet - Sarlacc: " + sarlacc + " we haven't even started updating yet and the Sarlacc is currently DEAD."); + break; + case house_pet.SARLACC_STARVING: + CustomerServiceLog("sarlacc_minigame: ", "updateSarlaccPet - Sarlacc: " + sarlacc + " we haven't even started updating yet and the Sarlacc is currently STARVING."); + break; + case house_pet.SARLACC_HUNGRY: + CustomerServiceLog("sarlacc_minigame: ", "updateSarlaccPet - Sarlacc: " + sarlacc + " we haven't even started updating yet and the Sarlacc is currently HUNGRY."); + break; + case house_pet.SARLACC_FED: + CustomerServiceLog("sarlacc_minigame: ", "updateSarlaccPet - Sarlacc: " + sarlacc + " we haven't even started updating yet and the Sarlacc is currently FED."); + break; + default: + break; } if (getIntObjVar(sarlacc, house_pet.SARLACC_FEEDING_ITERATION) >= house_pet.SARLACC_PHASE_WEEKS) { @@ -842,7 +841,7 @@ public class sarlacc_furniture_terminal extends script.base_script for (int i = 0; i < edibleItems.length; i++) { String name = getAssignedName(edibleItems[i]); - if (name.equals("") || name == null) + if (name.isEmpty() || name == null) { name = getString(getNameStringId(edibleItems[i])); } @@ -1328,7 +1327,7 @@ public class sarlacc_furniture_terminal extends script.base_script { logData += " No Sarlacc Penalty Variable."; } - if (logData == null || logData.equals("")) + if (logData.isEmpty() || logData.isBlank()) { return false; } diff --git a/sku.0/sys.server/compiled/game/script/fishing/fish.java b/sku.0/sys.server/compiled/game/script/fishing/fish.java index 256e25b13..c10344164 100755 --- a/sku.0/sys.server/compiled/game/script/fishing/fish.java +++ b/sku.0/sys.server/compiled/game/script/fishing/fish.java @@ -89,7 +89,7 @@ public class fish extends script.base_script if (length > 0.0f) { names[line] = "length"; - attribs[line] = "" + length + "m"; + attribs[line] = length + "m"; line++; if (line > names.length) { diff --git a/sku.0/sys.server/compiled/game/script/fishing/pole.java b/sku.0/sys.server/compiled/game/script/fishing/pole.java index 4faa1c61e..8e8ef1ed2 100755 --- a/sku.0/sys.server/compiled/game/script/fishing/pole.java +++ b/sku.0/sys.server/compiled/game/script/fishing/pole.java @@ -115,7 +115,7 @@ public class pole extends script.base_script { names[idx] = "useModifier"; float attrib = getIntObjVar(self, "useModifier"); - attribs[idx] = "" + attrib; + attribs[idx] = Float.toString(attrib); idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/gcw_score.java b/sku.0/sys.server/compiled/game/script/gcw_score.java index 8d0256270..7d1b19197 100755 --- a/sku.0/sys.server/compiled/game/script/gcw_score.java +++ b/sku.0/sys.server/compiled/game/script/gcw_score.java @@ -48,13 +48,13 @@ public class gcw_score allData[i][0] = playerGcwData.playerName; allData[i][1] = playerGcwData.playerFaction; allData[i][2] = playerGcwData.playerProfession; - allData[i][3] = "" + playerGcwData.playerLevel; - allData[i][4] = "" + playerGcwData.playerGCW; - allData[i][5] = "" + playerGcwData.playerPvpKills; - allData[i][6] = "" + playerGcwData.playerKills; - allData[i][7] = "" + playerGcwData.playerAssists; - allData[i][8] = "" + playerGcwData.playerCraftedItems; - allData[i][9] = "" + playerGcwData.playerDestroyedItems; + allData[i][3] = Integer.toString(playerGcwData.playerLevel); + allData[i][4] = Integer.toString(playerGcwData.playerGCW); + allData[i][5] = Integer.toString(playerGcwData.playerPvpKills); + allData[i][6] = Integer.toString(playerGcwData.playerKills); + allData[i][7] = Integer.toString(playerGcwData.playerAssists); + allData[i][8] = Integer.toString(playerGcwData.playerCraftedItems); + allData[i][9] = Integer.toString(playerGcwData.playerDestroyedItems); } } diff --git a/sku.0/sys.server/compiled/game/script/item/armor/dynamic_armor.java b/sku.0/sys.server/compiled/game/script/item/armor/dynamic_armor.java index 4a4e27e95..c10dfc9e4 100755 --- a/sku.0/sys.server/compiled/game/script/item/armor/dynamic_armor.java +++ b/sku.0/sys.server/compiled/game/script/item/armor/dynamic_armor.java @@ -132,7 +132,7 @@ public class dynamic_armor extends script.base_script if (requiredLevelToEquip != 0) { names[free] = utils.packStringId(new string_id("proc/proc", "required_combat_level")); - attribs[free++] = "" + requiredLevelToEquip; + attribs[free++] = Integer.toString(requiredLevelToEquip); } String requiredSkillToEquip = getStringObjVar(self, "dynamic_item.required_skill"); if (requiredSkillToEquip != null && !requiredSkillToEquip.equals("")) diff --git a/sku.0/sys.server/compiled/game/script/item/comestible/crafted.java b/sku.0/sys.server/compiled/game/script/item/comestible/crafted.java index 846bfbdc4..1642a4941 100755 --- a/sku.0/sys.server/compiled/game/script/item/comestible/crafted.java +++ b/sku.0/sys.server/compiled/game/script/item/comestible/crafted.java @@ -70,7 +70,7 @@ public class crafted extends script.item.comestible.comestible else { int numMods = am.length; - attribs[n] = "" + numMods; + attribs[n] = Integer.toString(numMods); n++; if (n > names.length) { @@ -84,7 +84,7 @@ public class crafted extends script.item.comestible.comestible if (val > 0) { sVal = "+" + val; } else if (val < 0) { - sVal = "" + val; + sVal = Integer.toString(val); } int minutes = duration / 60; int seconds = duration - (minutes * 60); diff --git a/sku.0/sys.server/compiled/game/script/item/comestible/dead_eye.java b/sku.0/sys.server/compiled/game/script/item/comestible/dead_eye.java index 82ce1157b..2a70b7373 100755 --- a/sku.0/sys.server/compiled/game/script/item/comestible/dead_eye.java +++ b/sku.0/sys.server/compiled/game/script/item/comestible/dead_eye.java @@ -74,7 +74,7 @@ public class dead_eye extends script.base_script if (hasObjVar(self, "deadeye_eff")) { names[idx] = "examine_dot_apply_power"; - attribs[idx] = "" + getIntObjVar(self, "deadeye_eff") + "%"; + attribs[idx] = getIntObjVar(self, "deadeye_eff") + "%"; idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/item/comestible/foraged.java b/sku.0/sys.server/compiled/game/script/item/comestible/foraged.java index f93f888d1..f8f7f2540 100755 --- a/sku.0/sys.server/compiled/game/script/item/comestible/foraged.java +++ b/sku.0/sys.server/compiled/game/script/item/comestible/foraged.java @@ -32,7 +32,7 @@ public class foraged extends script.item.comestible.comestible else { int numMods = am.length; - attribs[n] = "" + numMods; + attribs[n] = Integer.toString(numMods); n++; if (n > names.length) { @@ -47,7 +47,7 @@ public class foraged extends script.item.comestible.comestible if (newVal > 0) { sVal = "+" + newVal; } else if (newVal < 0) { - sVal = "" + newVal; + sVal = Integer.toString(newVal); } names[n] = toLower(consumable.STAT_NAME[attrib]); attribs[n] = sVal + "%, " + duration + "s"; diff --git a/sku.0/sys.server/compiled/game/script/item/comestible/spice.java b/sku.0/sys.server/compiled/game/script/item/comestible/spice.java index 9d28de211..29d06b131 100755 --- a/sku.0/sys.server/compiled/game/script/item/comestible/spice.java +++ b/sku.0/sys.server/compiled/game/script/item/comestible/spice.java @@ -152,7 +152,7 @@ public class spice extends script.base_script } else { - attribs[idx] = "" + numMods; + attribs[idx] = Integer.toString(numMods); } } return SCRIPT_CONTINUE; diff --git a/sku.0/sys.server/compiled/game/script/item/component/component_attribs.java b/sku.0/sys.server/compiled/game/script/item/component/component_attribs.java index d0e32763d..3ce2a2581 100755 --- a/sku.0/sys.server/compiled/game/script/item/component/component_attribs.java +++ b/sku.0/sys.server/compiled/game/script/item/component/component_attribs.java @@ -24,7 +24,7 @@ public class component_attribs extends script.base_script if (complexity >= 0) { names[i] = "@crafting:complexity"; - attribs[i] = "" + complexity; + attribs[i] = Float.toString(complexity); ++i; } obj_var_list componentData = getObjVarList(self, craftinglib.COMPONENT_ATTRIBUTE_OBJVAR_NAME); diff --git a/sku.0/sys.server/compiled/game/script/item/component/reverse_engineer_component.java b/sku.0/sys.server/compiled/game/script/item/component/reverse_engineer_component.java index e5a17f503..f631db039 100755 --- a/sku.0/sys.server/compiled/game/script/item/component/reverse_engineer_component.java +++ b/sku.0/sys.server/compiled/game/script/item/component/reverse_engineer_component.java @@ -20,7 +20,7 @@ public class reverse_engineer_component extends script.base_script { int powerModPower = getIntObjVar(self, "reverse_engineering.reverse_engineering_power"); names[i] = "@crafting:power_bit_power"; - attribs[i] = "" + powerModPower; + attribs[i] = Integer.toString(powerModPower); ++i; } if (hasObjVar(self, "reverse_engineering.reverse_engineering_modifier")) @@ -34,7 +34,7 @@ public class reverse_engineer_component extends script.base_script { int modBitRatio = getIntObjVar(self, "reverse_engineering.reverse_engineering_ratio"); names[i] = "@crafting:mod_bit_ratio"; - attribs[i] = "" + modBitRatio; + attribs[i] = Integer.toString(modBitRatio); ++i; } } diff --git a/sku.0/sys.server/compiled/game/script/item/dice/chance_cube.java b/sku.0/sys.server/compiled/game/script/item/dice/chance_cube.java index c0b88829a..b1c7a0c8f 100755 --- a/sku.0/sys.server/compiled/game/script/item/dice/chance_cube.java +++ b/sku.0/sys.server/compiled/game/script/item/dice/chance_cube.java @@ -55,7 +55,7 @@ public class chance_cube extends script.item.dice.base.base_dice { names[idx] = "usemodifier"; int attrib = (int)getFloatObjVar(self, craftinglib.COMPONENT_ATTRIBUTE_OBJVAR_NAME + ".useModifier"); - attribs[idx] = "" + attrib; + attribs[idx] = Integer.toString(attrib); idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/item/dice/configurable_group_dice.java b/sku.0/sys.server/compiled/game/script/item/dice/configurable_group_dice.java index 8250954a2..278aff807 100755 --- a/sku.0/sys.server/compiled/game/script/item/dice/configurable_group_dice.java +++ b/sku.0/sys.server/compiled/game/script/item/dice/configurable_group_dice.java @@ -76,7 +76,7 @@ public class configurable_group_dice extends script.item.dice.base.base_dice { names[idx] = "usemodifier"; int attrib = (int)getFloatObjVar(self, craftinglib.COMPONENT_ATTRIBUTE_OBJVAR_NAME + ".useModifier"); - attribs[idx] = "" + attrib; + attribs[idx] = Integer.toString(attrib); idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/item/dice/one_hundred_sided_dice_set.java b/sku.0/sys.server/compiled/game/script/item/dice/one_hundred_sided_dice_set.java index 472ddeebd..83fd4df16 100755 --- a/sku.0/sys.server/compiled/game/script/item/dice/one_hundred_sided_dice_set.java +++ b/sku.0/sys.server/compiled/game/script/item/dice/one_hundred_sided_dice_set.java @@ -59,7 +59,7 @@ public class one_hundred_sided_dice_set extends script.item.dice.base.base_dice { names[idx] = "usemodifier"; int attrib = (int)getFloatObjVar(self, craftinglib.COMPONENT_ATTRIBUTE_OBJVAR_NAME + ".useModifier"); - attribs[idx] = "" + attrib; + attribs[idx] = Integer.toString(attrib); idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/item/dice/six_sided_dice_set.java b/sku.0/sys.server/compiled/game/script/item/dice/six_sided_dice_set.java index 30e52f784..461597fd6 100755 --- a/sku.0/sys.server/compiled/game/script/item/dice/six_sided_dice_set.java +++ b/sku.0/sys.server/compiled/game/script/item/dice/six_sided_dice_set.java @@ -66,7 +66,7 @@ public class six_sided_dice_set extends script.item.dice.base.base_dice { names[idx] = "usemodifier"; int attrib = (int)getFloatObjVar(self, craftinglib.COMPONENT_ATTRIBUTE_OBJVAR_NAME + ".useModifier"); - attribs[idx] = "" + attrib; + attribs[idx] = Integer.toString(attrib); idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/item/dice/ten_sided_dice_set.java b/sku.0/sys.server/compiled/game/script/item/dice/ten_sided_dice_set.java index ba6acea20..a141235d6 100755 --- a/sku.0/sys.server/compiled/game/script/item/dice/ten_sided_dice_set.java +++ b/sku.0/sys.server/compiled/game/script/item/dice/ten_sided_dice_set.java @@ -59,7 +59,7 @@ public class ten_sided_dice_set extends script.item.dice.base.base_dice { names[idx] = "usemodifier"; int attrib = (int)getFloatObjVar(self, craftinglib.COMPONENT_ATTRIBUTE_OBJVAR_NAME + ".useModifier"); - attribs[idx] = "" + attrib; + attribs[idx] = Integer.toString(attrib); idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/item/dice/twelve_sided_dice_set.java b/sku.0/sys.server/compiled/game/script/item/dice/twelve_sided_dice_set.java index 3c8549346..50bbfe97a 100755 --- a/sku.0/sys.server/compiled/game/script/item/dice/twelve_sided_dice_set.java +++ b/sku.0/sys.server/compiled/game/script/item/dice/twelve_sided_dice_set.java @@ -59,7 +59,7 @@ public class twelve_sided_dice_set extends script.item.dice.base.base_dice { names[idx] = "usemodifier"; int attrib = (int)getFloatObjVar(self, craftinglib.COMPONENT_ATTRIBUTE_OBJVAR_NAME + ".useModifier"); - attribs[idx] = "" + attrib; + attribs[idx] = Integer.toString(attrib); idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/item/dice/twenty_sided_dice_set.java b/sku.0/sys.server/compiled/game/script/item/dice/twenty_sided_dice_set.java index 064be5b0f..320fe6935 100755 --- a/sku.0/sys.server/compiled/game/script/item/dice/twenty_sided_dice_set.java +++ b/sku.0/sys.server/compiled/game/script/item/dice/twenty_sided_dice_set.java @@ -59,7 +59,7 @@ public class twenty_sided_dice_set extends script.item.dice.base.base_dice { names[idx] = "usemodifier"; int attrib = (int)getFloatObjVar(self, craftinglib.COMPONENT_ATTRIBUTE_OBJVAR_NAME + ".useModifier"); - attribs[idx] = "" + attrib; + attribs[idx] = Integer.toString(attrib); idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/item/food.java b/sku.0/sys.server/compiled/game/script/item/food.java index 930a62f4e..d6221c328 100755 --- a/sku.0/sys.server/compiled/game/script/item/food.java +++ b/sku.0/sys.server/compiled/game/script/item/food.java @@ -63,7 +63,7 @@ public class food extends script.base_script float duration = buff.getDuration(buff_name); duration *= dur; String durString = formatTime((int)duration); - attribs[idx] = "" + durString + "\n"; + attribs[idx] = durString + "\n"; attribs[idx] += "\n" + "The duration of the buff from this item can be increased cumulatively by eating more of the same food " + "as long as the resulting duration does not exceed 2 hours. \n\n" + "Note that the value of primary buffed modifier of the last one eaten will be the one used by the buff."; idx++; if (idx >= names.length) @@ -98,7 +98,7 @@ public class food extends script.base_script { value *= eff; } - attribs[idx] = "" + value; + attribs[idx] = Float.toString(value); switch (buff_name) { case "drink_ruby_bliel": names[idx] = "food_stimpack_roundtime"; @@ -144,7 +144,7 @@ public class food extends script.base_script { attribs[idx] = "+"; } - attribs[idx] += "" + value; + attribs[idx] += Float.toString(value); if (param.contains("percent")) { attribs[idx] += "%"; @@ -384,7 +384,7 @@ public class food extends script.base_script seconds -= (minutes * 60); if (hours > 0) { - result += "" + hours + ":"; + result += hours + ":"; } if (minutes > 0 || hours > 0) { @@ -392,13 +392,13 @@ public class food extends script.base_script { result += "0"; } - result += "" + minutes + ":"; + result += minutes + ":"; } if (minutes > 0 && seconds < 10) { result += "0"; } - result += "" + seconds; + result += seconds; return result; } public boolean isClickyCombatNerfed(String buff_name) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/item/heroic_token_box.java b/sku.0/sys.server/compiled/game/script/item/heroic_token_box.java index b79debbe7..7420efda7 100755 --- a/sku.0/sys.server/compiled/game/script/item/heroic_token_box.java +++ b/sku.0/sys.server/compiled/game/script/item/heroic_token_box.java @@ -51,7 +51,7 @@ public class heroic_token_box extends script.base_script for (int i = 0; i < tokenTypes.length; i++) { names[free] = utils.packStringId(new string_id("static_item_n", trial.HEROIC_TOKENS[i])); - attribs[free++] = "" + tokenTypes[i]; + attribs[free++] = Integer.toString(tokenTypes[i]); } } return SCRIPT_CONTINUE; diff --git a/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/fryer.java b/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/fryer.java index bc13c15b8..d7b6a3206 100755 --- a/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/fryer.java +++ b/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/fryer.java @@ -159,7 +159,7 @@ public class fryer extends script.base_script } int currentStatus = getIntObjVar(self, DECAY); names[idx] = "fryer_status"; - attribs[idx] = "" + currentStatus + "%"; + attribs[idx] = currentStatus + "%"; idx++; return SCRIPT_CONTINUE; } @@ -338,7 +338,7 @@ public class fryer extends script.base_script while (randomRows.size() < (collection.ICE_CREAM_BUFF_ARRAY.length - 2)) { int randomNum = rand(BASIC_BUFF_ROWS, datatableLength); - randomRows.add("" + randomNum); + randomRows.add(Integer.toString(randomNum)); blog("getRandomRowNumbersWithoutDuplicates - adding this to hash: " + randomNum); } String[] allNumbers = new String[randomRows.size()]; diff --git a/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/ice_cream_fail.java b/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/ice_cream_fail.java index 21ca71647..48ee7910c 100755 --- a/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/ice_cream_fail.java +++ b/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/ice_cream_fail.java @@ -170,7 +170,7 @@ public class ice_cream_fail extends script.base_script seconds -= (minutes * 60); if (hours > 0) { - result += "" + hours + ":"; + result += hours + ":"; } if (minutes > 0 || hours > 0) { @@ -178,13 +178,13 @@ public class ice_cream_fail extends script.base_script { result += "0"; } - result += "" + minutes + ":"; + result += minutes + ":"; } if (minutes > 0 && seconds < 10) { result += "0"; } - result += "" + seconds; + result += seconds; return result; } public int removeItemFoodScript(obj_id self, dictionary params) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/ice_cream_nobuff.java b/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/ice_cream_nobuff.java index cb12afaa5..2bcb3004b 100755 --- a/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/ice_cream_nobuff.java +++ b/sku.0/sys.server/compiled/game/script/item/ice_cream_fryer/ice_cream_nobuff.java @@ -170,7 +170,7 @@ public class ice_cream_nobuff extends script.base_script seconds -= (minutes * 60); if (hours > 0) { - result += "" + hours + ":"; + result += hours + ":"; } if (minutes > 0 || hours > 0) { @@ -178,13 +178,13 @@ public class ice_cream_nobuff extends script.base_script { result += "0"; } - result += "" + minutes + ":"; + result += minutes + ":"; } if (minutes > 0 && seconds < 10) { result += "0"; } - result += "" + seconds; + result += seconds; return result; } public int removeItemFoodScript(obj_id self, dictionary params) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/item/instance_reset.java b/sku.0/sys.server/compiled/game/script/item/instance_reset.java index 813929faf..5e5a77452 100755 --- a/sku.0/sys.server/compiled/game/script/item/instance_reset.java +++ b/sku.0/sys.server/compiled/game/script/item/instance_reset.java @@ -194,7 +194,7 @@ public class instance_reset extends script.base_script obj_id owner = instance_data.getObjId("owner"); int startTime = instance_data.getInt("start_time"); int resetAt = getCalendarTime(); - setObjVar(player, instance.PLAYER_INSTANCE + "." + instanceToRemove, "" + resetAt + "_" + instance_id + "_" + owner + "_" + newStartTime); + setObjVar(player, instance.PLAYER_INSTANCE + "." + instanceToRemove, resetAt + "_" + instance_id + "_" + owner + "_" + newStartTime); instance_data = instance.getLockoutData(player, instanceToRemove); if (instance_data != null && !instance_data.isEmpty()) { diff --git a/sku.0/sys.server/compiled/game/script/item/medicine/enhancer.java b/sku.0/sys.server/compiled/game/script/item/medicine/enhancer.java index bed99ab78..b69cd51ff 100755 --- a/sku.0/sys.server/compiled/game/script/item/medicine/enhancer.java +++ b/sku.0/sys.server/compiled/game/script/item/medicine/enhancer.java @@ -51,7 +51,7 @@ public class enhancer extends script.base_script if (hasObjVar(self, "healing.enhancement")) { names[idx] = "enhancer_power"; - attribs[idx] = "" + Math.floor(getFloatObjVar(self, "healing.enhancement")); + attribs[idx] = Double.toString(Math.floor(getFloatObjVar(self, "healing.enhancement"))); } return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/item/medicine/stimpack.java b/sku.0/sys.server/compiled/game/script/item/medicine/stimpack.java index 509aefc4f..eca5c9af1 100755 --- a/sku.0/sys.server/compiled/game/script/item/medicine/stimpack.java +++ b/sku.0/sys.server/compiled/game/script/item/medicine/stimpack.java @@ -22,7 +22,7 @@ public class stimpack extends script.base_script { names[idx] = "healing_power"; int value = getIntObjVar(self, "healing.power"); - attribs[idx] = "" + value; + attribs[idx] = Integer.toString(value); idx++; if (idx >= names.length) { @@ -33,7 +33,7 @@ public class stimpack extends script.base_script { names[idx] = "healing_combat_level_required"; int value = getIntObjVar(self, "healing.combat_level_required"); - attribs[idx] = "" + value; + attribs[idx] = Integer.toString(value); idx++; if (idx >= names.length) { @@ -42,7 +42,7 @@ public class stimpack extends script.base_script } names[idx] = "count"; int value = getCount(self); - attribs[idx] = "" + value; + attribs[idx] = Integer.toString(value); return SCRIPT_CONTINUE; } public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info mi) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/item/medicine/stimpack_crafted.java b/sku.0/sys.server/compiled/game/script/item/medicine/stimpack_crafted.java index 2fa7ea65d..59ba6e961 100755 --- a/sku.0/sys.server/compiled/game/script/item/medicine/stimpack_crafted.java +++ b/sku.0/sys.server/compiled/game/script/item/medicine/stimpack_crafted.java @@ -23,7 +23,7 @@ public class stimpack_crafted extends script.base_script { names[idx] = "healing_power"; int value = getIntObjVar(self, "healing.power"); - attribs[idx] = "" + value; + attribs[idx] = Integer.toString(value); idx++; if (idx >= names.length) { @@ -34,7 +34,7 @@ public class stimpack_crafted extends script.base_script { names[idx] = "healing_combat_level_required"; int value = getIntObjVar(self, "healing.combat_level_required"); - attribs[idx] = "" + value; + attribs[idx] = Integer.toString(value); idx++; if (idx >= names.length) { @@ -43,7 +43,7 @@ public class stimpack_crafted extends script.base_script } names[idx] = "count"; int value = getCount(self); - attribs[idx] = "" + value; + attribs[idx] = Integer.toString(value); return SCRIPT_CONTINUE; } public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info mi) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/item/medicine/stimpack_pet.java b/sku.0/sys.server/compiled/game/script/item/medicine/stimpack_pet.java index 10d7f0b6c..027cb917c 100755 --- a/sku.0/sys.server/compiled/game/script/item/medicine/stimpack_pet.java +++ b/sku.0/sys.server/compiled/game/script/item/medicine/stimpack_pet.java @@ -24,7 +24,7 @@ public class stimpack_pet extends script.base_script { names[idx] = "healing_power"; float value = getIntObjVar(self, "healing.power"); - attribs[idx] = "" + value; + attribs[idx] = Float.toString(value); idx++; if (idx >= names.length) { @@ -33,7 +33,7 @@ public class stimpack_pet extends script.base_script } names[idx] = "count"; int value = getCount(self); - attribs[idx] = "" + value; + attribs[idx] = Integer.toString(value); return SCRIPT_CONTINUE; } public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info mi) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/item/parrot_cage/parrot_cage.java b/sku.0/sys.server/compiled/game/script/item/parrot_cage/parrot_cage.java index bede5fdfe..4f0b89948 100755 --- a/sku.0/sys.server/compiled/game/script/item/parrot_cage/parrot_cage.java +++ b/sku.0/sys.server/compiled/game/script/item/parrot_cage/parrot_cage.java @@ -201,7 +201,7 @@ public class parrot_cage extends script.base_script { names[idx] = "usemodifier"; int attrib = (int)getFloatObjVar(self, craftinglib.COMPONENT_ATTRIBUTE_OBJVAR_NAME + ".useModifier"); - attribs[idx] = "" + attrib; + attribs[idx] = Integer.toString(attrib); idx++; if (idx >= names.length) { diff --git a/sku.0/sys.server/compiled/game/script/item/skill_buff/base.java b/sku.0/sys.server/compiled/game/script/item/skill_buff/base.java index 16726d792..af701cf4a 100755 --- a/sku.0/sys.server/compiled/game/script/item/skill_buff/base.java +++ b/sku.0/sys.server/compiled/game/script/item/skill_buff/base.java @@ -150,7 +150,7 @@ public class base extends script.base_script return SCRIPT_CONTINUE; } names[idx] = "skill_modifier_amount"; - attribs[idx] = "" + value; + attribs[idx] = Integer.toString(value); idx++; if (idx >= names.length) { @@ -243,7 +243,7 @@ public class base extends script.base_script seconds -= (minutes * 60); if (hours > 0) { - result += "" + hours + ":"; + result += hours + ":"; } if (minutes > 0 || hours > 0) { @@ -251,13 +251,13 @@ public class base extends script.base_script { result += "0"; } - result += "" + minutes + ":"; + result += minutes + ":"; } if (minutes > 0 && seconds < 10) { result += "0"; } - result += "" + seconds; + result += seconds; return result; } } diff --git a/sku.0/sys.server/compiled/game/script/item/spice.java b/sku.0/sys.server/compiled/game/script/item/spice.java index b311e774e..25d0007bd 100755 --- a/sku.0/sys.server/compiled/game/script/item/spice.java +++ b/sku.0/sys.server/compiled/game/script/item/spice.java @@ -29,7 +29,7 @@ public class spice extends script.base_script float duration = buff.getDuration(buff_name); String durString = formatTime((int)duration); names[idx] = "duration"; - attribs[idx] = "" + durString + "\n"; + attribs[idx] = durString + "\n"; idx++; if (idx >= names.length) { @@ -176,7 +176,7 @@ public class spice extends script.base_script seconds -= (minutes * 60); if (hours > 0) { - result += "" + hours + ":"; + result += hours + ":"; } if (minutes > 0 || hours > 0) { @@ -184,13 +184,13 @@ public class spice extends script.base_script { result += "0"; } - result += "" + minutes + ":"; + result += minutes + ":"; } if (minutes > 0 && seconds < 10) { result += "0"; } - result += "" + seconds; + result += seconds; return result; } } diff --git a/sku.0/sys.server/compiled/game/script/item/static_item_base.java b/sku.0/sys.server/compiled/game/script/item/static_item_base.java index 2621dc18f..3f6f5a18d 100755 --- a/sku.0/sys.server/compiled/game/script/item/static_item_base.java +++ b/sku.0/sys.server/compiled/game/script/item/static_item_base.java @@ -177,7 +177,7 @@ public class static_item_base extends script.base_script if (requiredLevelToEquip != 0 && !hasScript(self, "systems.combat.combat_weapon")) { names[free] = utils.packStringId(new string_id("proc/proc", "required_combat_level")); - attribs[free++] = "" + requiredLevelToEquip; + attribs[free++] = Integer.toString(requiredLevelToEquip); } String requiredSkillToEquip = itemData.getString("required_skill"); if (requiredSkillToEquip != null && !requiredSkillToEquip.equals("") && !hasScript(self, "systems.combat.combat_weapon")) @@ -230,7 +230,7 @@ public class static_item_base extends script.base_script if (requiredLevelForEffect != 0) { names[free] = utils.packStringId(new string_id("proc/proc", "effect_level")); - attribs[free++] = "" + requiredLevelForEffect; + attribs[free++] = Integer.toString(requiredLevelForEffect); } String buffName = typeData.getString("buff_name"); if (buffName != null && !buffName.equals("") && buffIdentity == 0) @@ -316,9 +316,9 @@ public class static_item_base extends script.base_script } int tier = itemData.getInt("tier"); names[free] = "tier"; - attribs[free++] = "" + tier; + attribs[free++] = Integer.toString(tier); names[free] = "tooltip.tier"; - attribs[free++] = "" + tier; + attribs[free++] = Integer.toString(tier); if (static_item.isUniqueStaticItem(self)) { names[free] = "unique"; diff --git a/sku.0/sys.server/compiled/game/script/item/texture_kit/texture_kit.java b/sku.0/sys.server/compiled/game/script/item/texture_kit/texture_kit.java index b42bd8afa..5a8c9b0e8 100755 --- a/sku.0/sys.server/compiled/game/script/item/texture_kit/texture_kit.java +++ b/sku.0/sys.server/compiled/game/script/item/texture_kit/texture_kit.java @@ -95,7 +95,7 @@ public class texture_kit extends script.base_script return SCRIPT_CONTINUE; } names[idx] = "charges"; - attribs[idx] = "" + getCount(self); + attribs[idx] = Integer.toString(getCount(self)); idx++; return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/item/tool/medikit.java b/sku.0/sys.server/compiled/game/script/item/tool/medikit.java index c4ad9791a..41330f6b1 100755 --- a/sku.0/sys.server/compiled/game/script/item/tool/medikit.java +++ b/sku.0/sys.server/compiled/game/script/item/tool/medikit.java @@ -54,7 +54,7 @@ public class medikit extends script.base_script { names[idx] = "useModifier"; int attrib = getIntObjVar(self, "medikit.quality"); - attribs[idx] = "" + attrib; + attribs[idx] = Integer.toString(attrib); idx++; if (idx >= names.length) { @@ -197,14 +197,7 @@ public class medikit extends script.base_script } public boolean haveChargedMedTool(obj_id player, obj_id medikitTool) throws InterruptedException { - if ((getCount(medikitTool) > 0) && (utils.isNestedWithin(medikitTool, player))) - { - return true; - } - else - { - return false; - } + return (getCount(medikitTool) > 0) && (utils.isNestedWithin(medikitTool, player)); } public void clearTrackingScriptVars(obj_id self) throws InterruptedException { diff --git a/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_poweredup_item.java b/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_poweredup_item.java index 125723224..a937e2748 100755 --- a/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_poweredup_item.java +++ b/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_poweredup_item.java @@ -143,13 +143,13 @@ public class reverse_engineering_poweredup_item extends script.base_script attribs[i] = "@stat_n:" + mod; i++; names[i] = "@spam:pup_power"; - attribs[i] = "" + (power / ratio); + attribs[i] = Integer.toString((power / ratio)); i++; } float expiration = reverse_engineering.getDieTime(reverse_engineering.EXPIRATION_TIME, self); float timeInMinutes = expiration / 60; names[i] = "@spam:pup_expire_time"; - attribs[i] = "" + (int)timeInMinutes; + attribs[i] = Float.toString(timeInMinutes); } return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_powerup.java b/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_powerup.java index 66ebc69e6..c3879666a 100755 --- a/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_powerup.java +++ b/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_powerup.java @@ -53,7 +53,7 @@ public class reverse_engineering_powerup extends script.base_script String mod = getStringObjVar(self, reverse_engineering.ENGINEERING_MODIFIER); int ratio = getIntObjVar(self, reverse_engineering.ENGINEERING_RATIO); names[i] = "@stat_n:" + mod; - attribs[i] = "" + power / ratio; + attribs[i] = Integer.toString(power / ratio); } } return SCRIPT_CONTINUE; diff --git a/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_tool.java b/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_tool.java index 67607bd50..2d4937e0a 100755 --- a/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_tool.java +++ b/sku.0/sys.server/compiled/game/script/item/tool/reverse_engineering_tool.java @@ -498,7 +498,6 @@ public class reverse_engineering_tool extends script.base_script { sendSystemMessage(player, new string_id("spam", "powerup_wrong_components")); } - return; } public void generatePowerBit(obj_id self, obj_id player) throws InterruptedException { @@ -612,7 +611,6 @@ public class reverse_engineering_tool extends script.base_script setName(powerBit, finalName); } } - return; } public void generateModifierBit(obj_id self, obj_id player) throws InterruptedException { @@ -668,7 +666,6 @@ public class reverse_engineering_tool extends script.base_script } prependModNameToObject(powerBit, modName); } - return; } public boolean isJunk(obj_id item) throws InterruptedException { @@ -697,11 +694,7 @@ public class reverse_engineering_tool extends script.base_script { return false; } - if (hasObjVar(item, "skillmod.bonus")) - { - return true; - } - return false; + return hasObjVar(item, "skillmod.bonus"); } public int getPowerBitType(obj_id item) throws InterruptedException { @@ -723,19 +716,11 @@ public class reverse_engineering_tool extends script.base_script return false; } String templateName = getTemplateName(item); - if (templateName.equals("object/tangible/component/reverse_engineering/enhancement_module.iff")) - { - return true; - } - return false; + return templateName.equals("object/tangible/component/reverse_engineering/enhancement_module.iff"); } public boolean isModifierBit(obj_id item) throws InterruptedException { - if (hasObjVar(item, "reverse_engineering.reverse_engineering_modifier") && hasObjVar(item, "reverse_engineering.reverse_engineering_ratio") && !hasScript(item, "item.tool.reverse_engineering_powerup") && !hasScript(item, "item.tool.reverse_engineering_poweredup_item")) - { - return true; - } - return false; + return hasObjVar(item, "reverse_engineering.reverse_engineering_modifier") && hasObjVar(item, "reverse_engineering.reverse_engineering_ratio") && !hasScript(item, "item.tool.reverse_engineering_powerup") && !hasScript(item, "item.tool.reverse_engineering_poweredup_item"); } public int getFinalAttachmentLevel(obj_id item) throws InterruptedException { @@ -759,11 +744,7 @@ public class reverse_engineering_tool extends script.base_script public boolean canUpgradeAttachment(obj_id player) throws InterruptedException { float skillMod = getEnhancedSkillStatisticModifierUncapped(player, "expertise_attachment_upgrade"); - if (skillMod > 0) - { - return true; - } - return false; + return skillMod > 0; } public String getGemTemplateByClass(obj_id player, int ratio, int type) throws InterruptedException { @@ -805,13 +786,13 @@ public class reverse_engineering_tool extends script.base_script { float power = getFloatObjVar(self, "crafting.stationMod"); names[idx] = "@obj_attr_n:experiment_bonus_eff"; - attribs[idx] = "" + power; + attribs[idx] = Float.toString(power); idx++; } if (hasObjVar(self, "res_quality")) { names[idx] = "quality_bonus"; - attribs[idx] = "" + getFloatObjVar(self, "res_quality"); + attribs[idx] = Float.toString(getFloatObjVar(self, "res_quality")); idx++; } return SCRIPT_CONTINUE; @@ -830,7 +811,6 @@ public class reverse_engineering_tool extends script.base_script String newName = modName + " " + stringName; setName(object, newName); } - return; } public float getReverseEngineeringBonusMultiplier() throws InterruptedException { diff --git a/sku.0/sys.server/compiled/game/script/item/vet_instance_reset.java b/sku.0/sys.server/compiled/game/script/item/vet_instance_reset.java index 55898d6ec..534b1d498 100755 --- a/sku.0/sys.server/compiled/game/script/item/vet_instance_reset.java +++ b/sku.0/sys.server/compiled/game/script/item/vet_instance_reset.java @@ -247,7 +247,7 @@ public class vet_instance_reset extends script.base_script obj_id owner = instance_data.getObjId("owner"); int startTime = instance_data.getInt("start_time"); int resetAt = getCalendarTime(); - setObjVar(player, instance.PLAYER_INSTANCE + "." + instanceToRemove, "" + resetAt + "_" + instance_id + "_" + owner + "_" + newStartTime); + setObjVar(player, instance.PLAYER_INSTANCE + "." + instanceToRemove, resetAt + "_" + instance_id + "_" + owner + "_" + newStartTime); instance_data = instance.getLockoutData(player, instanceToRemove); if (instance_data != null && !instance_data.isEmpty()) { diff --git a/sku.0/sys.server/compiled/game/script/library/advanced_turret.java b/sku.0/sys.server/compiled/game/script/library/advanced_turret.java index f053e90ef..6bb24ab8b 100755 --- a/sku.0/sys.server/compiled/game/script/library/advanced_turret.java +++ b/sku.0/sys.server/compiled/game/script/library/advanced_turret.java @@ -134,7 +134,6 @@ public class advanced_turret extends script.base_script dictionary dict = new dictionary(); dict.put("range", range); messageTo(turret, "createTriggerVolume", dict, 0.0f, false); - return; } public static void deactivateTurret(obj_id turret) throws InterruptedException { @@ -146,7 +145,6 @@ public class advanced_turret extends script.base_script stopTrackingTarget(turret); utils.removeScriptVar(turret, IS_ACTIVE); setInvulnerable(turret, true); - return; } public static boolean isActive(obj_id turret) throws InterruptedException { @@ -175,7 +173,6 @@ public class advanced_turret extends script.base_script return; } utils.setScriptVar(turret, IS_ENGAGED, target); - return; } public static void stopTrackingTarget(obj_id turret) throws InterruptedException { @@ -185,7 +182,6 @@ public class advanced_turret extends script.base_script return; } utils.removeScriptVar(turret, IS_ENGAGED); - return; } public static boolean isEngaged(obj_id turret) throws InterruptedException { @@ -193,11 +189,7 @@ public class advanced_turret extends script.base_script { return false; } - if (utils.hasScriptVar(turret, IS_ENGAGED)) - { - return true; - } - return false; + return utils.hasScriptVar(turret, IS_ENGAGED); } public static obj_id getCurrentTarget(obj_id turret) throws InterruptedException { @@ -276,7 +268,6 @@ public class advanced_turret extends script.base_script ri.maxRange = range; setWeaponRangeInfo(objWeapon, ri); activateTurret(turret); - return; } public static boolean isValidTarget(obj_id turret, obj_id target) throws InterruptedException { @@ -367,7 +358,7 @@ public class advanced_turret extends script.base_script { if (!isValidTarget(turret, target)) { - doLogging("addTarget", "" + getName(target) + "/" + target + " was invalid"); + doLogging("addTarget", getName(target) + "/" + target + " was invalid"); return; } Vector targets = null; @@ -391,7 +382,6 @@ public class advanced_turret extends script.base_script attackPulse(turret); } } - return; } public static void addTargets(obj_id turret, obj_id[] newTargets) throws InterruptedException { @@ -406,7 +396,7 @@ public class advanced_turret extends script.base_script } for (obj_id newTarget : newTargets) { if (!isValidTarget(turret, newTarget) || targets.indexOf(newTarget) != -1) { - doLogging("addTargets", "" + getName(newTarget) + "/" + newTarget + " was invalid or already in my target array"); + doLogging("addTargets", getName(newTarget) + "/" + newTarget + " was invalid or already in my target array"); continue; } targets.add(newTarget); @@ -419,7 +409,6 @@ public class advanced_turret extends script.base_script messageTo(turret, "handleTurretAttack", null, 1, false); } } - return; } public static void removeTarget(obj_id turret, obj_id target) throws InterruptedException { @@ -451,7 +440,6 @@ public class advanced_turret extends script.base_script utils.setBatchScriptVar(turret, TARGETS, targets); } } - return; } public static boolean handleTurretDamage(obj_id turret, obj_id attacker, obj_id weapon, int dmgAmount) throws InterruptedException { @@ -505,7 +493,6 @@ public class advanced_turret extends script.base_script deactivateTurret(turret); playClientEffectLoc(turret, "clienteffect/combat_explosion_lair_large.cef", death, 0); messageTo(turret, "handleDestroyTurret", null, 2, false); - return; } public static obj_id getGoodTurretTarget(obj_id turret) throws InterruptedException { @@ -583,7 +570,6 @@ public class advanced_turret extends script.base_script dictionary params = new dictionary(); params.put("target", target); messageTo(turret, "turretShot", params, getWeaponAttackSpeed(weapon), false); - return; } public static void doLogging(String section, String message) throws InterruptedException { diff --git a/sku.0/sys.server/compiled/game/script/library/beast_lib.java b/sku.0/sys.server/compiled/game/script/library/beast_lib.java index 07fc6f7ac..f48c1071a 100755 --- a/sku.0/sys.server/compiled/game/script/library/beast_lib.java +++ b/sku.0/sys.server/compiled/game/script/library/beast_lib.java @@ -329,11 +329,7 @@ public class beast_lib extends script.base_script { return false; } - if (hasScript(beast, "ai.beast")) - { - return true; - } - return false; + return hasScript(beast, "ai.beast"); } public static boolean isBeastMaster(obj_id player) throws InterruptedException { @@ -366,11 +362,7 @@ public class beast_lib extends script.base_script { return false; } - if (!hasObjVar(bcd, OBJVAR_BEAST_TYPE)) - { - return false; - } - return true; + return hasObjVar(bcd, OBJVAR_BEAST_TYPE); } public static boolean isValidPlayer(obj_id player) throws InterruptedException { @@ -536,11 +528,7 @@ public class beast_lib extends script.base_script } public static boolean hasBCDBeastName(obj_id bcd) throws InterruptedException { - if (hasObjVar(bcd, "beast.beastName")) - { - return true; - } - return false; + return hasObjVar(bcd, "beast.beastName"); } public static String getBCDBeastName(obj_id bcd) throws InterruptedException { @@ -632,7 +620,7 @@ public class beast_lib extends script.base_script return ""; } String template = getTemplateName(beast); - String[] templateSplit = split(template, '/'); + String[] templateSplit = template.split("/"); template = templateSplit[templateSplit.length - 1]; int row = dataTableSearchColumnForString(template, "template", BEASTS_TABLE); dictionary dict = dataTableGetRow(BEASTS_TABLE, row); @@ -990,11 +978,7 @@ public class beast_lib extends script.base_script { return false; } - if (hasObjVar(bcd, OBJVAR_BEAST_HAPPINESS)) - { - return true; - } - return false; + return hasObjVar(bcd, OBJVAR_BEAST_HAPPINESS); } public static int getBeastHappiness(obj_id beast) throws InterruptedException { @@ -1039,11 +1023,7 @@ public class beast_lib extends script.base_script { return false; } - if (hasObjVar(bcd, PET_LOYALTY_OBJVAR)) - { - return true; - } - return false; + return hasObjVar(bcd, PET_LOYALTY_OBJVAR); } public static float getBeastLoyalty(obj_id beast) throws InterruptedException { @@ -1206,11 +1186,7 @@ public class beast_lib extends script.base_script { return false; } - if (hasObjVar(bcd, PET_LOYALTY_LEVEL_OBJVAR)) - { - return true; - } - return false; + return hasObjVar(bcd, PET_LOYALTY_LEVEL_OBJVAR); } public static int getBeastLoyaltyLevel(obj_id beast) throws InterruptedException { @@ -1308,11 +1284,7 @@ public class beast_lib extends script.base_script { return false; } - if (hasObjVar(bcd, OBJVAR_BEAST_FOOD)) - { - return true; - } - return false; + return hasObjVar(bcd, OBJVAR_BEAST_FOOD); } public static int[] getBeastFood(obj_id beast) throws InterruptedException { @@ -2012,11 +1984,7 @@ public class beast_lib extends script.base_script return false; } int experience = (int)beastStatsDict.getInt("XP"); - if (experience > 0 && getBeastExperience(beast) >= experience) - { - return true; - } - return false; + return experience > 0 && getBeastExperience(beast) >= experience; } public static void grantBeastExperience(obj_id beast) throws InterruptedException { @@ -2144,7 +2112,6 @@ public class beast_lib extends script.base_script messageTo(beast, "checkMovementSpeed", params, 1, false); return; } - return; } public static void doConfusedEmote(obj_id beast) throws InterruptedException { @@ -2281,7 +2248,6 @@ public class beast_lib extends script.base_script { doAnimationAction(beast, "trick_" + trickNumber); } - return; } public static void setupHappinessLoyalty(obj_id beastBCD) throws InterruptedException { @@ -3215,11 +3181,7 @@ public class beast_lib extends script.base_script { return false; } - if (!isValidBeastSkillForCreature(getBeastOnPlayer(player), actionName)) - { - return false; - } - return true; + return isValidBeastSkillForCreature(getBeastOnPlayer(player), actionName); } public static void doBmProvokeCommand(obj_id self, obj_id target, int provokeLevel) throws InterruptedException { @@ -3273,7 +3235,6 @@ public class beast_lib extends script.base_script return; } initializeBeastStats(BCD, beast); - return; } public static void removeAttentionPenaltyDebuff(obj_id player) throws InterruptedException { @@ -3420,7 +3381,6 @@ public class beast_lib extends script.base_script if (currentHappiness >= 0) { buff.applyBuff(beast, "bm_happiness_content"); - return; } } public static string_id convertLoyaltyString(obj_id beastBCD) throws InterruptedException @@ -3636,14 +3596,7 @@ public class beast_lib extends script.base_script } public static boolean isChargeAttack(String actionName) throws InterruptedException { - if (actionName.startsWith("bm_charge") || actionName.startsWith("bm_trample")) - { - return true; - } - else - { - return false; - } + return actionName.startsWith("bm_charge") || actionName.startsWith("bm_trample"); } public static boolean setBCDBeastHueFromEgg(obj_id bcd, obj_id egg) throws InterruptedException { @@ -3940,19 +3893,19 @@ public class beast_lib extends script.base_script dictionary creatureDict = dataTableGetRow("datatables/mob/creatures.iff", creatureName); if (ck_skill > -1) { - if (creatureDict.getString("hideType") != "none") + if (!creatureDict.getString("hideType").equalsIgnoreCase("none")) { names[idx] = "creature_resource_hide"; attribs[idx] = utils.packStringId(new string_id("obj_attr_n", creatureDict.getString("hideType"))); idx++; } - if (creatureDict.getString("meatType") != "none") + if (!creatureDict.getString("meatType").equalsIgnoreCase("none")) { names[idx] = "creature_resource_meat"; attribs[idx] = utils.packStringId(new string_id("obj_attr_n", creatureDict.getString("meatType"))); idx++; } - if (creatureDict.getString("boneType") != "none") + if (!creatureDict.getString("boneType").equalsIgnoreCase("none")) { names[idx] = "creature_resource_bone"; attribs[idx] = utils.packStringId(new string_id("obj_attr_n", creatureDict.getString("boneType"))); @@ -3962,10 +3915,10 @@ public class beast_lib extends script.base_script if (ck_skill > 0) { names[idx] = "aggro"; - attribs[idx] = "" + creatureDict.getFloat("aggressive"); + attribs[idx] = Float.toString(creatureDict.getFloat("aggressive")); idx++; names[idx] = "assist_range"; - attribs[idx] = "" + creatureDict.getFloat("assist"); + attribs[idx] = Float.toString(creatureDict.getFloat("assist")); idx++; names[idx] = "deathblow"; boolean deathBlow = (creatureDict.getInt("death_blow") > 0); @@ -3993,22 +3946,22 @@ public class beast_lib extends script.base_script int minDamage = Math.round((dps * attackSpeed) * 0.5f); int maxDamage = Math.round((dps * attackSpeed) * 1.5f); names[idx] = "damage_min"; - attribs[idx] = "" + minDamage; + attribs[idx] = Integer.toString(minDamage); idx++; names[idx] = "damage_max"; - attribs[idx] = "" + maxDamage; + attribs[idx] = Integer.toString(maxDamage); idx++; names[idx] = "attackspeed"; - attribs[idx] = "" + attackSpeed; + attribs[idx] = Float.toString(attackSpeed); idx++; names[idx] = "damage_dps"; - attribs[idx] = "" + dps; + attribs[idx] = Float.toString(dps); idx++; } if (ck_skill > 5) { names[idx] = "armor_rating"; - attribs[idx] = "" + statDict.getInt(prefix + "Armor"); + attribs[idx] = Integer.toString(statDict.getInt(prefix + "Armor")); idx++; } if (ck_skill > 7) @@ -4676,14 +4629,7 @@ public class beast_lib extends script.base_script exp = 1; } } - if (exp > 1) - { - return true; - } - else - { - return false; - } + return exp > 1; } public static int useBeastInjector(obj_id player, obj_id injector, obj_id beast, String beastFamily, String[] injectorFamilies, int mark) throws InterruptedException { diff --git a/sku.0/sys.server/compiled/game/script/library/factions.java b/sku.0/sys.server/compiled/game/script/library/factions.java index a6595d851..92851b4b0 100755 --- a/sku.0/sys.server/compiled/game/script/library/factions.java +++ b/sku.0/sys.server/compiled/game/script/library/factions.java @@ -147,7 +147,6 @@ public class factions extends script.base_script setObjVar(objPlayer, "intChangingFactionStatus", 1); pvpPrepareToBeCovert(objPlayer); messageTo(objPlayer, "msgGoCovert", null, fltDelay, true); - return; } public static void goCovert(obj_id objPlayer) throws InterruptedException { @@ -165,14 +164,12 @@ public class factions extends script.base_script buff.removeAllAuraBuffs(objPlayer); pvpMakeCovert(objPlayer); CustomerServiceLog("player_faction", "PLAYER-FACTION ALTERED|TIME:" + getGameTime() + "|PLAYER:" + objPlayer + "|PLAYER NAME:" + getName(objPlayer) + "|ZONE:" + getCurrentSceneName() + "|Player has been set to covert"); - return; } public static void goOvertWithDelay(obj_id objPlayer, float fltDelay) throws InterruptedException { setObjVar(objPlayer, "intChangingFactionStatus", 1); pvpPrepareToBeDeclared(objPlayer); messageTo(objPlayer, "msgGoOvert", null, fltDelay, true); - return; } public static void goOvert(obj_id objPlayer) throws InterruptedException { @@ -186,7 +183,6 @@ public class factions extends script.base_script buff.removeAllAuraBuffs(objPlayer); pvpMakeDeclared(objPlayer); CustomerServiceLog("player_faction", "PLAYER-FACTION ALTERED|TIME:" + getGameTime() + "|PLAYER:" + objPlayer + "|PLAYER NAME:" + getName(objPlayer) + "|ZONE:" + getCurrentSceneName() + "|Player has been set to overt"); - return; } public static void goOnLeaveWithDelay(obj_id objPlayer, float fltDelay) throws InterruptedException { @@ -197,7 +193,6 @@ public class factions extends script.base_script setObjVar(objPlayer, "intChangingFactionStatus", 1); pvpPrepareToBeNeutral(objPlayer); messageTo(objPlayer, "msgGoOnLeave", null, fltDelay, true); - return; } public static void goOnLeave(obj_id objPlayer) throws InterruptedException { @@ -254,7 +249,6 @@ public class factions extends script.base_script } } } - return; } public static boolean isDeclared(obj_id target) throws InterruptedException { @@ -322,11 +316,7 @@ public class factions extends script.base_script { return false; } - if ((370444368) == currentMercenaryFaction) - { - return true; - } - return false; + return (370444368) == currentMercenaryFaction; } public static boolean isImperialHelper(obj_id target) throws InterruptedException { @@ -339,11 +329,7 @@ public class factions extends script.base_script { return false; } - if ((-615855020) == currentMercenaryFaction) - { - return true; - } - return false; + return (-615855020) == currentMercenaryFaction; } public static boolean isRebelorRebelHelper(obj_id target) throws InterruptedException { @@ -351,11 +337,7 @@ public class factions extends script.base_script { return false; } - if (isRebelHelper(target) || getFactionFlag(target) == FACTION_FLAG_REBEL) - { - return true; - } - return false; + return isRebelHelper(target) || getFactionFlag(target) == FACTION_FLAG_REBEL; } public static boolean isImperialorImperialHelper(obj_id target) throws InterruptedException { @@ -363,11 +345,7 @@ public class factions extends script.base_script { return false; } - if (isImperialHelper(target) || getFactionFlag(target) == FACTION_FLAG_IMPERIAL) - { - return true; - } - return false; + return isImperialHelper(target) || getFactionFlag(target) == FACTION_FLAG_IMPERIAL; } public static boolean isSameFactionorFactionHelper(obj_id target, obj_id target2) throws InterruptedException { @@ -375,11 +353,7 @@ public class factions extends script.base_script { return false; } - if ((isImperialorImperialHelper(target) && isImperialorImperialHelper(target2)) || (isRebelorRebelHelper(target) && isRebelorRebelHelper(target2))) - { - return true; - } - return false; + return (isImperialorImperialHelper(target) && isImperialorImperialHelper(target2)) || (isRebelorRebelHelper(target) && isRebelorRebelHelper(target2)); } public static float getFactionStanding(obj_id target, int intFaction) throws InterruptedException { @@ -393,7 +367,7 @@ public class factions extends script.base_script } if (!isPlayer(target)) { - if (getFaction(target) == factionName) + if (getFaction(target).equals(factionName)) { return FACTION_RATING_MAX; } @@ -529,7 +503,7 @@ public class factions extends script.base_script String title = utils.packStringId(SID_SUI_DELEGATE_FACTION); prose_package ppSuiTitle = prose.getPackage(SID_SUI_DELEGATE_FACTION_TEXT); prose.setTT(ppSuiTitle, getRankNameStringId(rank, faction)); - prose.setTO(ppSuiTitle, "" + ratioFrom + ":" + ratioTo); + prose.setTO(ppSuiTitle, ratioFrom + ":" + ratioTo); prose.setDI(ppSuiTitle, available); String prompt = " \0" + packOutOfBandProsePackage(null, ppSuiTitle); int pid = sui.transfer(self, self, prompt, title, utils.packStringId(SID_SUI_DELEGATE_FACTION_TITLE), available, utils.packStringId(SID_SUI_DELEGATE_FACTION_CAT), 0, "handleDelegateSui", ratioFrom, ratioTo); @@ -552,7 +526,7 @@ public class factions extends script.base_script { prose_package ppLackPointsToGive = prose.getPackage(SID_FACTION_LACK_POINTS_TO_GIVE); prose.setTT(ppLackPointsToGive, target); - prose.setTO(ppLackPointsToGive, "" + amt); + prose.setTO(ppLackPointsToGive, Integer.toString(amt)); prose.setDI(ppLackPointsToGive, required); sendSystemMessageProse(self, ppLackPointsToGive); } @@ -582,7 +556,7 @@ public class factions extends script.base_script prose_package ppDelegate = prose.getPackage(SID_FACTION_DELEGATE_X_TO_TARGET); prose.setTT(ppDelegate, target); prose.setDI(ppDelegate, amt); - prose.setTO(ppDelegate, "" + required); + prose.setTO(ppDelegate, Integer.toString(required)); sendSystemMessageProse(self, ppDelegate); CustomerServiceLog("faction_perk", getFirstName(self) + "(" + self + ") delegated " + amt + " points to " + getFirstName(target) + " for a cost of " + required + " points."); } @@ -753,11 +727,7 @@ public class factions extends script.base_script } public static boolean grantFactionBonus(obj_id target, String factionName, float value) throws InterruptedException { - if (!isIdValid(target) || factionName == null || factionName.equals("") || value == 0.0f) - { - return false; - } - return true; + return !(!isIdValid(target) || factionName == null || factionName.equals("") || value == 0.0f); } public static float getFactionStoryReward(obj_id target, String factionName, float value) throws InterruptedException { @@ -854,13 +824,12 @@ public class factions extends script.base_script { return; } - boolean pvp_only = pvpOnly == 1 ? true : false; if (factionName.equals(FACTION_IMPERIAL)) { setAttributeAttained(target, attrib.IMPERIAL); setAttributeInterested(target, attrib.REBEL); ai_lib.setDefaultCalmMood(target, "npc_imperial"); - if (pvp_only) + if (pvpOnly == 1) { setObjVar(target, "huysMagicSpecialForcesOnlyObjvar", true); } @@ -869,7 +838,7 @@ public class factions extends script.base_script { setAttributeAttained(target, attrib.REBEL); setAttributeInterested(target, attrib.IMPERIAL); - if (pvp_only) + if (pvpOnly == 1) { setObjVar(target, "huysMagicSpecialForcesOnlyObjvar", true); } @@ -908,11 +877,7 @@ public class factions extends script.base_script { return true; } - if (pvpGetType(target) == PVPTYPE_NEUTRAL) - { - return true; - } - return false; + return pvpGetType(target) == PVPTYPE_NEUTRAL; } public static String getFactionNameByHashCode(int hashCode) throws InterruptedException { @@ -1115,11 +1080,7 @@ public class factions extends script.base_script value += bonus; } } - if (addFactionStanding(player, factionName, value)) - { - return true; - } - return false; + return addFactionStanding(player, factionName, value); } public static void grantCombatFaction(obj_id killer, obj_id target, double percentDamage) throws InterruptedException { @@ -1332,7 +1293,6 @@ public class factions extends script.base_script changeFactionPoints(factions.FACTION_REBEL, intPoints); changeFactionPoints(factions.FACTION_IMPERIAL, intPoints * -1); } - return; } public static boolean isFactionWinning(String strFaction) throws InterruptedException { @@ -1343,11 +1303,7 @@ public class factions extends script.base_script int intImperial = getIntObjVar(objParent, "gcw." + strImperial); if (strFaction.equals(strRebel)) { - if (intRebel > intImperial) - { - return true; - } - return false; + return intRebel > intImperial; } if (strFaction.equals(strImperial)) { @@ -1388,14 +1344,7 @@ public class factions extends script.base_script { return false; } - if (utils.hasScriptVar(player, VAR_NEWLY_DECLARED)) - { - return true; - } - else - { - return false; - } + return utils.hasScriptVar(player, VAR_NEWLY_DECLARED); } public static boolean canUseFactionItem(obj_id player, obj_id item) throws InterruptedException { @@ -1460,7 +1409,6 @@ public class factions extends script.base_script ammount *= -1; pp = prose.getPackage(PROSE_LOSE_FACTION, getLocalizedFactionName(HSSKOR), (int)ammount); sendSystemMessageProse(player, pp); - return; } public static void awardHsskorFaction(obj_id player, int ammount) throws InterruptedException { @@ -1488,7 +1436,6 @@ public class factions extends script.base_script ammount *= -1; pp = prose.getPackage(PROSE_LOSE_FACTION, getLocalizedFactionName(KASHYYYK), (int)ammount); sendSystemMessageProse(player, pp); - return; } public static void validateBalance(obj_id player, String faction) throws InterruptedException { @@ -1523,7 +1470,6 @@ public class factions extends script.base_script setObjVar(player, checkHsskor, -1 * getFactionStanding(player, KASHYYYK)); } } - return; } public static boolean isUnaligned(obj_id player) throws InterruptedException { @@ -1534,11 +1480,7 @@ public class factions extends script.base_script { return true; } - if (getFloatObjVar(player, hsskor) != 0) - { - return false; - } - return true; + return getFloatObjVar(player, hsskor) == 0; } public static boolean isAlignedKashyyyk(obj_id player) throws InterruptedException { @@ -1559,11 +1501,7 @@ public class factions extends script.base_script public static boolean isImperial(obj_id objPlayer) throws InterruptedException { int intPlayerFaction = pvpGetAlignedFaction(objPlayer); - if (intPlayerFaction == (-615855020)) - { - return true; - } - return false; + return intPlayerFaction == (-615855020); } public static boolean isRebel(obj_id objPlayer) throws InterruptedException { @@ -1577,11 +1515,7 @@ public class factions extends script.base_script public static boolean isOnLeave(obj_id objPlayer) throws InterruptedException { int intFaction = pvpGetAlignedFaction(objPlayer); - if ((intFaction != 0) && pvpGetType(objPlayer) == PVPTYPE_NEUTRAL) - { - return true; - } - return false; + return (intFaction != 0) && pvpGetType(objPlayer) == PVPTYPE_NEUTRAL; } public static boolean isActiveImperial(obj_id objPlayer) throws InterruptedException { @@ -1669,14 +1603,7 @@ public class factions extends script.base_script { return false; } - if (player_faction_id == npc_faction_id) - { - return true; - } - else - { - return false; - } + return player_faction_id == npc_faction_id; } public static boolean joinFaction(obj_id player, int faction_id, boolean returnFromReserves) throws InterruptedException { @@ -1712,11 +1639,7 @@ public class factions extends script.base_script } public static boolean isOnLeaveFromFriendlyFaction(obj_id objPlayer, obj_id objNPC) throws InterruptedException { - if (pvpGetAlignedFaction(objPlayer) == pvpGetAlignedFaction(objNPC) && (pvpGetType(objPlayer) == PVPTYPE_NEUTRAL)) - { - return true; - } - return false; + return pvpGetAlignedFaction(objPlayer) == pvpGetAlignedFaction(objNPC) && (pvpGetType(objPlayer) == PVPTYPE_NEUTRAL); } public static boolean isInEnemyFaction(obj_id objPlayer, obj_id objNPC) throws InterruptedException { @@ -1729,11 +1652,7 @@ public class factions extends script.base_script } public static boolean isInFriendlyFaction(obj_id objPlayer, obj_id objNPC) throws InterruptedException { - if (pvpGetAlignedFaction(objPlayer) == pvpGetAlignedFaction(objNPC)) - { - return true; - } - return false; + return pvpGetAlignedFaction(objPlayer) == pvpGetAlignedFaction(objNPC); } public static boolean isOnLeaveFromEnemyFaction(obj_id objPlayer, obj_id objNPC) throws InterruptedException { @@ -1758,11 +1677,7 @@ public class factions extends script.base_script } int cost = factions.getRankCost(current_rank + 1); int faction_standing = (int)factions.getFactionStanding(objPlayer, intFaction); - if (faction_standing >= cost) - { - return true; - } - return false; + return faction_standing >= cost; } public static void applyPromotion(obj_id objPlayer, int intFaction) throws InterruptedException { @@ -1777,7 +1692,6 @@ public class factions extends script.base_script factions.setRank(objPlayer, current_rank + 1); } } - return; } public static boolean isSmuggler(obj_id player) throws InterruptedException { @@ -1956,48 +1870,46 @@ public class factions extends script.base_script int intYourPVPType = pvpGetType(objTarget); string_id strTitleId = new string_id("gcw", "gcw_status_change"); String strTitle = utils.packStringId(strTitleId); - if (intMyPVPType == PVPTYPE_NEUTRAL) - { - if (intYourPVPType == PVPTYPE_COVERT) - { - string_id strSpam = new string_id("gcw", "gcw_status_change_covert"); - String strPrompt = utils.packStringId(strSpam); - int pid = sui.inputbox(objPlayer, objPlayer, strPrompt, strTitle, "handleGoCovert", ""); - return; - } - else if (intYourPVPType == PVPTYPE_DECLARED) - { - string_id strSpam = new string_id("gcw", "gcw_status_change_overt"); - String strPrompt = utils.packStringId(strSpam); - int pid = sui.inputbox(objPlayer, objPlayer, strPrompt, strTitle, "handleGoOvert", ""); - return; - } - else - { - sendSystemMessageTestingOnly(objPlayer, "Error # 4 : You got a PVP error message. Your PVP Type is " + intMyPVPType + ". Your faction is" + pvpGetAlignedFaction(objPlayer) + ". Your target is " + objTarget + " their pvp type is " + pvpGetType(objTarget) + " and their faction is " + pvpGetAlignedFaction(objTarget)); - } - } - else if (intMyPVPType == PVPTYPE_COVERT) - { - if (intYourPVPType == PVPTYPE_COVERT) - { - sendSystemMessageTestingOnly(objPlayer, "Error # 1 : You got a PVP error message. Your PVP Type is " + intMyPVPType + ". Your faction is" + pvpGetAlignedFaction(objPlayer) + ". Your target is " + objTarget + " their pvp type is " + pvpGetType(objTarget) + " and their faction is " + pvpGetAlignedFaction(objTarget)); - } - else if (intYourPVPType == PVPTYPE_DECLARED) - { - string_id strSpam = new string_id("gcw", "gcw_status_change_overt"); - String strPrompt = utils.packStringId(strSpam); - int pid = sui.inputbox(objPlayer, objPlayer, strPrompt, strTitle, "handleGoOvert", ""); - return; - } - else - { - sendSystemMessageTestingOnly(objPlayer, "Error # 3 : You got a PVP error message. Your PVP Type is " + intMyPVPType + ". Your faction is" + pvpGetAlignedFaction(objPlayer) + ". Your target is " + objTarget + " their pvp type is " + pvpGetType(objTarget) + " and their faction is " + pvpGetAlignedFaction(objTarget)); - } - } - else - { - sendSystemMessageTestingOnly(objPlayer, "Error # 2 : You got a PVP error message. Your PVP Type is " + intMyPVPType + ". Your faction is" + pvpGetAlignedFaction(objPlayer) + ". Your target is " + objTarget + " their pvp type is " + pvpGetType(objTarget) + " and their faction is " + pvpGetAlignedFaction(objTarget)); + switch (intMyPVPType) { + case PVPTYPE_NEUTRAL: + switch (intYourPVPType) { + case PVPTYPE_COVERT: + { + string_id strSpam = new string_id("gcw", "gcw_status_change_covert"); + String strPrompt = utils.packStringId(strSpam); + int pid = sui.inputbox(objPlayer, objPlayer, strPrompt, strTitle, "handleGoCovert", ""); + return; + } + case PVPTYPE_DECLARED: + { + string_id strSpam = new string_id("gcw", "gcw_status_change_overt"); + String strPrompt = utils.packStringId(strSpam); + int pid = sui.inputbox(objPlayer, objPlayer, strPrompt, strTitle, "handleGoOvert", ""); + return; + } + default: + sendSystemMessageTestingOnly(objPlayer, "Error # 4 : You got a PVP error message. Your PVP Type is " + intMyPVPType + ". Your faction is" + pvpGetAlignedFaction(objPlayer) + ". Your target is " + objTarget + " their pvp type is " + pvpGetType(objTarget) + " and their faction is " + pvpGetAlignedFaction(objTarget)); + break; + } + break; + case PVPTYPE_COVERT: + switch (intYourPVPType) { + case PVPTYPE_COVERT: + sendSystemMessageTestingOnly(objPlayer, "Error # 1 : You got a PVP error message. Your PVP Type is " + intMyPVPType + ". Your faction is" + pvpGetAlignedFaction(objPlayer) + ". Your target is " + objTarget + " their pvp type is " + pvpGetType(objTarget) + " and their faction is " + pvpGetAlignedFaction(objTarget)); + break; + case PVPTYPE_DECLARED: + string_id strSpam = new string_id("gcw", "gcw_status_change_overt"); + String strPrompt = utils.packStringId(strSpam); + int pid = sui.inputbox(objPlayer, objPlayer, strPrompt, strTitle, "handleGoOvert", ""); + return; + default: + sendSystemMessageTestingOnly(objPlayer, "Error # 3 : You got a PVP error message. Your PVP Type is " + intMyPVPType + ". Your faction is" + pvpGetAlignedFaction(objPlayer) + ". Your target is " + objTarget + " their pvp type is " + pvpGetType(objTarget) + " and their faction is " + pvpGetAlignedFaction(objTarget)); + break; + } + break; + default: + sendSystemMessageTestingOnly(objPlayer, "Error # 2 : You got a PVP error message. Your PVP Type is " + intMyPVPType + ". Your faction is" + pvpGetAlignedFaction(objPlayer) + ". Your target is " + objTarget + " their pvp type is " + pvpGetType(objTarget) + " and their faction is " + pvpGetAlignedFaction(objTarget)); + break; } } public static boolean pvpDoAllowedHelpCheck(obj_id objPlayer, obj_id objTarget) throws InterruptedException @@ -2045,11 +1957,7 @@ public class factions extends script.base_script } public static boolean canGoOnLeave(obj_id objPlayer) throws InterruptedException { - if (isInAdhocPvpArea(objPlayer)) - { - return false; - } - return true; + return !isInAdhocPvpArea(objPlayer); } public static boolean canGoCovert(obj_id objPlayer) throws InterruptedException { @@ -2131,7 +2039,6 @@ public class factions extends script.base_script skill.revokeSkill(player, "pvp_rebel_last_man_ability"); skill.revokeSkill(player, "pvp_rebel_aura_buff_self"); skill.revokeSkill(player, "pvp_rebel_airstrike_ability"); - return; } public static boolean shareSocialGroup(obj_id creatureOne, obj_id creatureTwo) throws InterruptedException {