Use of isEmpty method when possible.
This commit is contained in:
		| @@ -447,7 +447,7 @@ public class Attackable extends Npc | ||||
| 			 | ||||
| 			final PartyContainer mostDamageParty; | ||||
| 			damagingParties.sort(Comparator.comparingLong(c -> c.damage)); | ||||
| 			mostDamageParty = damagingParties.size() > 0 ? damagingParties.get(0) : null; | ||||
| 			mostDamageParty = !damagingParties.isEmpty() ? damagingParties.get(0) : null; | ||||
| 			 | ||||
| 			// Calculate raidboss points | ||||
| 			if (_isRaid && !_isRaidMinion) | ||||
|   | ||||
| @@ -129,7 +129,7 @@ public class RequestLuckyGamePlay implements IClientIncomingPacket | ||||
| 		final int totalWeight = rewards.values().stream().mapToInt(list -> list.stream().mapToInt(item -> ItemTable.getInstance().getTemplate(item.getId()).getWeight()).sum()).sum(); | ||||
| 		 | ||||
| 		// Check inventory capacity | ||||
| 		if ((rewards.size() > 0) && (!player.getInventory().validateCapacity(rewards.size()) || !player.getInventory().validateWeight(totalWeight))) | ||||
| 		if (!rewards.isEmpty() && (!player.getInventory().validateCapacity(rewards.size()) || !player.getInventory().validateWeight(totalWeight))) | ||||
| 		{ | ||||
| 			player.sendPacket(_type == LuckyGameType.LUXURY ? ExBettingLuckyGameResult.LUXURY_INVALID_CAPACITY : ExBettingLuckyGameResult.NORMAL_INVALID_CAPACITY); | ||||
| 			player.sendPacket(SystemMessageId.YOUR_INVENTORY_IS_EITHER_FULL_OR_OVERWEIGHT); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment