Code style changes.

This commit is contained in:
MobiusDev
2016-04-26 19:21:19 +00:00
parent 6a13705766
commit fc070c9238
768 changed files with 3338 additions and 4252 deletions

View File

@@ -537,13 +537,13 @@ final class MasterHandler
// TODO: Add configuration options for this voiced commands:
// CastleVCmd.class,
// SetVCmd.class,
(Config.L2JMOD_ALLOW_WEDDING ? Wedding.class : null),
(Config.BANKING_SYSTEM_ENABLED ? Banking.class : null),
(Config.L2JMOD_CHAT_ADMIN ? ChatAdmin.class : null),
(Config.L2JMOD_MULTILANG_ENABLE && Config.L2JMOD_MULTILANG_VOICED_ALLOW ? Lang.class : null),
(Config.L2JMOD_DEBUG_VOICE_COMMAND ? Debug.class : null),
(Config.L2JMOD_ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null),
(Config.PREMIUM_SYSTEM_ENABLED ? Premium.class : null),
Config.L2JMOD_ALLOW_WEDDING ? Wedding.class : null,
Config.BANKING_SYSTEM_ENABLED ? Banking.class : null,
Config.L2JMOD_CHAT_ADMIN ? ChatAdmin.class : null,
Config.L2JMOD_MULTILANG_ENABLE && Config.L2JMOD_MULTILANG_VOICED_ALLOW ? Lang.class : null,
Config.L2JMOD_DEBUG_VOICE_COMMAND ? Debug.class : null,
Config.L2JMOD_ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null,
Config.PREMIUM_SYSTEM_ENABLED ? Premium.class : null,
},
{
// Target Handlers

View File

@@ -89,41 +89,38 @@ public class L2PcInstanceAction implements IActionHandler
{
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, player);
}
else
// Check if this L2PcInstance is autoAttackable
else if (player.isAutoAttackable(activeChar))
{
// Check if this L2PcInstance is autoAttackable
if (player.isAutoAttackable(activeChar))
if ((player.isCursedWeaponEquipped() && (activeChar.getLevel() < CURSED_WEAPON_VICTIM_MIN_LEVEL)) //
|| (activeChar.isCursedWeaponEquipped() && (player.getLevel() < CURSED_WEAPON_VICTIM_MIN_LEVEL)))
{
if ((player.isCursedWeaponEquipped() && (activeChar.getLevel() < CURSED_WEAPON_VICTIM_MIN_LEVEL)) //
|| (activeChar.isCursedWeaponEquipped() && (player.getLevel() < CURSED_WEAPON_VICTIM_MIN_LEVEL)))
{
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
}
else
{
if (GeoData.getInstance().canSeeTarget(activeChar, player))
{
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
}
else
{
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, GeoData.getInstance().moveCheck(activeChar, player));
}
activeChar.onActionRequest();
}
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
}
else
{
// This Action Failed packet avoids activeChar getting stuck when clicking three or more times
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
if (GeoData.getInstance().canSeeTarget(activeChar, player))
{
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
}
else
{
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, GeoData.getInstance().moveCheck(activeChar, player));
}
activeChar.onActionRequest();
}
}
else
{
// This Action Failed packet avoids activeChar getting stuck when clicking three or more times
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
if (GeoData.getInstance().canSeeTarget(activeChar, player))
{
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
}
else
{
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, GeoData.getInstance().moveCheck(activeChar, player));
}
}
}

View File

@@ -51,29 +51,26 @@ public class L2StaticObjectInstanceAction implements IActionHandler
// Notify the L2PcInstance AI with AI_INTENTION_INTERACT
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, staticObject);
}
else
else if (staticObject.getType() == 2)
{
if (staticObject.getType() == 2)
final String filename = (staticObject.getId() == 24230101) ? "html/signboards/tomb_of_crystalgolem.htm" : "html/signboards/pvp_signboard.htm";
final String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), filename);
final NpcHtmlMessage html = new NpcHtmlMessage(staticObject.getObjectId());
if (content != null)
{
final String filename = (staticObject.getId() == 24230101) ? "html/signboards/tomb_of_crystalgolem.htm" : "html/signboards/pvp_signboard.htm";
final String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), filename);
final NpcHtmlMessage html = new NpcHtmlMessage(staticObject.getObjectId());
if (content == null)
{
html.setHtml("<html><body>Signboard is missing:<br>" + filename + "</body></html>");
}
else
{
html.setHtml(content);
}
activeChar.sendPacket(html);
html.setHtml(content);
}
else if (staticObject.getType() == 0)
else
{
activeChar.sendPacket(staticObject.getMap());
html.setHtml("<html><body>Signboard is missing:<br>" + filename + "</body></html>");
}
activeChar.sendPacket(html);
}
else if (staticObject.getType() == 0)
{
activeChar.sendPacket(staticObject.getMap());
}
}
return true;

View File

@@ -72,12 +72,9 @@ public class L2SummonAction implements IActionHandler
{
activeChar.updateNotMoveUntil();
}
else
else if (GeoData.getInstance().canSeeTarget(activeChar, target))
{
if (GeoData.getInstance().canSeeTarget(activeChar, target))
{
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, target);
}
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, target);
}
}
}

View File

@@ -40,7 +40,7 @@ import com.l2jmobius.util.StringUtil;
public class AdminBuffs implements IAdminCommandHandler
{
private final static int PAGE_LIMIT = 20;
private static final int PAGE_LIMIT = 20;
private static final String[] ADMIN_COMMANDS =
{
@@ -253,7 +253,7 @@ public class AdminBuffs implements IAdminCommandHandler
}
final StringBuilder html = StringUtil.startAppend(500 + (effects.size() * 200), "<html><table width=\"100%\"><tr><td width=45><button value=\"Main\" action=\"bypass -h admin_admin\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td width=180><center><font color=\"LEVEL\">Effects of ", target.getName(), "</font></td><td width=45><button value=\"Back\" action=\"bypass -h admin_current_player\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table><br><table width=\"100%\"><tr><td width=200>Skill</td><td width=30>Rem. Time</td><td width=70>Action</td></tr>");
final int start = ((page - 1) * PAGE_LIMIT);
final int start = (page - 1) * PAGE_LIMIT;
final int end = Math.min(((page - 1) * PAGE_LIMIT) + PAGE_LIMIT, effects.size());
int count = 0;
for (BuffInfo info : effects)
@@ -294,7 +294,7 @@ public class AdminBuffs implements IAdminCommandHandler
html.append("</tr></table>");
// Buttons
StringUtil.append(html, "<br><center><button value=\"Refresh\" action=\"bypass -h admin_getbuffs", (passive ? "_ps " : " "), target.getName(), "\" width=80 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
StringUtil.append(html, "<br><center><button value=\"Refresh\" action=\"bypass -h admin_getbuffs", passive ? "_ps " : " ", target.getName(), "\" width=80 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
StringUtil.append(html, "<button value=\"Remove All\" action=\"bypass -h admin_stopallbuffs ", Integer.toString(target.getObjectId()), "\" width=80 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"><br>");
// Legend
if (!passive)

View File

@@ -250,7 +250,7 @@ public final class AdminCastle implements IAdminCommandHandler
private boolean checkTarget(L2PcInstance player)
{
return ((player.getTarget() != null) && player.getTarget().isPlayer() && (((L2PcInstance) player.getTarget()).getClan() != null));
return (player.getTarget() != null) && player.getTarget().isPlayer() && (((L2PcInstance) player.getTarget()).getClan() != null);
}
@Override

View File

@@ -187,7 +187,7 @@ public class AdminCreateItem implements IAdminCommandHandler
}
for (L2PcInstance onlinePlayer : L2World.getInstance().getPlayers())
{
if ((activeChar != onlinePlayer) && onlinePlayer.isOnline() && ((onlinePlayer.getClient() != null) && !onlinePlayer.getClient().isDetached()))
if ((activeChar != onlinePlayer) && onlinePlayer.isOnline() && (onlinePlayer.getClient() != null) && !onlinePlayer.getClient().isDetached())
{
onlinePlayer.getInventory().addItem("Admin", idval, numval, onlinePlayer, activeChar);
onlinePlayer.sendMessage("Admin spawned " + numval + " " + template.getName() + " in your inventory.");

View File

@@ -100,7 +100,7 @@ public class AdminCursedWeapons implements IAdminCommandHandler
if (cw.isActivated())
{
final L2PcInstance pl = cw.getPlayer();
StringUtil.append(replyMSG, "<tr><td>Weilder:</td><td>", (pl == null ? "null" : pl.getName()), "</td></tr><tr><td>Karma:</td><td>", String.valueOf(cw.getPlayerKarma()), "</td></tr><tr><td>Kills:</td><td>", String.valueOf(cw.getPlayerPkKills()), "/", String.valueOf(cw.getNbKills()), "</td></tr><tr><td>Time remaining:</td><td>", String.valueOf(cw.getTimeLeft() / 60000), " min.</td></tr><tr><td><button value=\"Remove\" action=\"bypass -h admin_cw_remove ", String.valueOf(itemId), "\" width=73 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><button value=\"Go\" action=\"bypass -h admin_cw_goto ", String.valueOf(itemId), "\" width=73 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
StringUtil.append(replyMSG, "<tr><td>Weilder:</td><td>", pl == null ? "null" : pl.getName(), "</td></tr><tr><td>Karma:</td><td>", String.valueOf(cw.getPlayerKarma()), "</td></tr><tr><td>Kills:</td><td>", String.valueOf(cw.getPlayerPkKills()), "/", String.valueOf(cw.getNbKills()), "</td></tr><tr><td>Time remaining:</td><td>", String.valueOf(cw.getTimeLeft() / 60000), " min.</td></tr><tr><td><button value=\"Remove\" action=\"bypass -h admin_cw_remove ", String.valueOf(itemId), "\" width=73 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><button value=\"Go\" action=\"bypass -h admin_cw_goto ", String.valueOf(itemId), "\" width=73 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
}
else if (cw.isDropped())
{

View File

@@ -117,7 +117,7 @@ public class AdminEditChar implements IAdminCommandHandler
else if (command.startsWith("admin_character_info"))
{
final String[] data = command.split(" ");
if ((data.length > 1))
if (data.length > 1)
{
showCharacterInfo(activeChar, L2World.getInstance().getPlayer(data[1]));
}
@@ -185,7 +185,7 @@ public class AdminEditChar implements IAdminCommandHandler
else if (command.startsWith("admin_edit_character"))
{
final String[] data = command.split(" ");
if ((data.length > 1))
if (data.length > 1)
{
editCharacter(activeChar, data[1]);
}
@@ -481,7 +481,7 @@ public class AdminEditChar implements IAdminCommandHandler
{
return false;
}
player.getAppearance().setSex(player.getAppearance().getSex() ? false : true);
player.getAppearance().setSex(!player.getAppearance().getSex());
player.sendMessage("Your gender has been changed by a GM");
player.broadcastUserInfo();
}
@@ -574,17 +574,14 @@ public class AdminEditChar implements IAdminCommandHandler
ps.execute();
}
}
else // removing penalty
if (changeCreateExpiryTime)
{
player.setClanCreateExpiryTime(0);
}
else
{
// removing penalty
if (changeCreateExpiryTime)
{
player.setClanCreateExpiryTime(0);
}
else
{
player.setClanJoinExpiryTime(0);
}
player.setClanJoinExpiryTime(0);
}
activeChar.sendMessage("Clan penalty successfully removed to character: " + playerName);
@@ -634,7 +631,7 @@ public class AdminEditChar implements IAdminCommandHandler
{
final String[] data = command.split(" ");
L2PcInstance pl = null;
if ((data.length > 1))
if (data.length > 1)
{
pl = L2World.getInstance().getPlayer(data[1]);
}
@@ -798,7 +795,7 @@ public class AdminEditChar implements IAdminCommandHandler
{
player = activeChar;
}
else if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance))
else if (activeChar.getTarget() instanceof L2PcInstance)
{
player = (L2PcInstance) activeChar.getTarget();
}
@@ -1067,7 +1064,7 @@ public class AdminEditChar implements IAdminCommandHandler
if (target instanceof L2PcInstance)
{
gatherCharacterInfo(activeChar, ((L2PcInstance) target), "charedit.htm");
gatherCharacterInfo(activeChar, (L2PcInstance) target, "charedit.htm");
}
}
@@ -1137,12 +1134,9 @@ public class AdminEditChar implements IAdminCommandHandler
{
findDisconnected = true;
}
else
else if (!IpAdress.matches("^(?:(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))$"))
{
if (!IpAdress.matches("^(?:(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))$"))
{
throw new IllegalArgumentException("Malformed IPv4 number");
}
throw new IllegalArgumentException("Malformed IPv4 number");
}
int CharactersFound = 0;
@@ -1270,13 +1264,13 @@ public class AdminEditChar implements IAdminCommandHandler
if (ipMap.get(ip).size() >= multibox)
{
final Integer count = dualboxIPs.get(ip);
if (count == null)
if (count != null)
{
dualboxIPs.put(ip, multibox);
dualboxIPs.put(ip, count + 1);
}
else
{
dualboxIPs.put(ip, count + 1);
dualboxIPs.put(ip, multibox);
}
}
}
@@ -1322,13 +1316,13 @@ public class AdminEditChar implements IAdminCommandHandler
if (ipMap.get(pack).size() >= multibox)
{
final Integer count = dualboxIPs.get(pack);
if (count == null)
if (count != null)
{
dualboxIPs.put(pack, multibox);
dualboxIPs.put(pack, count + 1);
}
else
{
dualboxIPs.put(pack, count + 1);
dualboxIPs.put(pack, multibox);
}
}
}

View File

@@ -688,12 +688,12 @@ public class AdminEffects implements IAdminCommandHandler
activeChar.sendPacket(SystemMessageId.NOTHING_HAPPENED);
return false;
}
if ((target.isNpc()) && ((action < 1) || (action > 20)))
if (target.isNpc() && ((action < 1) || (action > 20)))
{
activeChar.sendPacket(SystemMessageId.NOTHING_HAPPENED);
return false;
}
if ((target.isPlayer()) && ((action < 2) || ((action > 18) && (action != SocialAction.LEVEL_UP))))
if (target.isPlayer() && ((action < 2) || ((action > 18) && (action != SocialAction.LEVEL_UP))))
{
activeChar.sendPacket(SystemMessageId.NOTHING_HAPPENED);
return false;

View File

@@ -140,13 +140,13 @@ public class AdminElement implements IAdminCommandHandler
{
String old, current;
final Elementals element = itemInstance.getElemental(type);
if (element == null)
if (element != null)
{
old = "None";
old = element.toString();
}
else
{
old = element.toString();
old = "None";
}
// set enchant value
@@ -161,13 +161,13 @@ public class AdminElement implements IAdminCommandHandler
}
player.getInventory().equipItem(itemInstance);
if (itemInstance.getElementals() == null)
if (itemInstance.getElementals() != null)
{
current = "None";
current = itemInstance.getElemental(type).toString();
}
else
{
current = itemInstance.getElemental(type).toString();
current = "None";
}
// send packets

View File

@@ -385,12 +385,9 @@ public class AdminEventEngine implements IAdminCommandHandler
}
}
}
else
else if (activeChar.getTarget() instanceof L2PcInstance)
{
if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance))
{
L2Event.removeAndResetPlayer((L2PcInstance) activeChar.getTarget());
}
L2Event.removeAndResetPlayer((L2PcInstance) activeChar.getTarget());
}
showEventControl(activeChar);
}
@@ -502,7 +499,7 @@ public class AdminEventEngine implements IAdminCommandHandler
replyMSG.append("<center><multiedit var=\"txt\" width=270 height=100> <button value=\"Add text\" action=\"bypass -h admin_add $txt\" width=120 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
replyMSG.append("<button value=\"Remove text\" action=\"bypass -h admin_delete_buffer\" width=120 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
if (!(tempName.isEmpty() && tempBuffer.isEmpty()))
if (!tempName.isEmpty() || !tempBuffer.isEmpty())
{
replyMSG.append("<br><button value=\"Store Event Data\" action=\"bypass -h admin_event_store\" width=160 height=32 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
}

View File

@@ -64,7 +64,7 @@ public class AdminFortSiege implements IAdminCommandHandler
fort = FortManager.getInstance().getFortById(fortId);
}
// Get fort
if (((fort == null) || (fortId == 0)))
if ((fort == null) || (fortId == 0))
{
// No fort specified
showFortSelectPage(activeChar);
@@ -84,18 +84,15 @@ public class AdminFortSiege implements IAdminCommandHandler
{
activeChar.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
}
else if (fort.getSiege().addAttacker(player, false) == 4)
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOUR_CLAN_HAS_BEEN_REGISTERED_TO_S1_S_FORTRESS_BATTLE);
sm.addCastleId(fort.getResidenceId());
player.sendPacket(sm);
}
else
{
if (fort.getSiege().addAttacker(player, false) == 4)
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOUR_CLAN_HAS_BEEN_REGISTERED_TO_S1_S_FORTRESS_BATTLE);
sm.addCastleId(fort.getResidenceId());
player.sendPacket(sm);
}
else
{
player.sendMessage("During registering error occurred!");
}
player.sendMessage("During registering error occurred!");
}
}
else if (command.equalsIgnoreCase("admin_clear_fortsiege_list"))

View File

@@ -112,7 +112,7 @@ public class AdminGmChat implements IAdminCommandHandler
offset = 13;
}
text = command.substring(offset);
AdminData.getInstance().broadcastToGMs((new CreatureSay(0, ChatType.ALLIANCE, activeChar.getName(), text)));
AdminData.getInstance().broadcastToGMs(new CreatureSay(0, ChatType.ALLIANCE, activeChar.getName(), text));
}
catch (StringIndexOutOfBoundsException e)
{

View File

@@ -96,7 +96,7 @@ public class AdminHtml implements IAdminCommandHandler
}
else
{
content = HtmCache.getInstance().loadFile((new File(Config.DATAPACK_ROOT, path)));
content = HtmCache.getInstance().loadFile(new File(Config.DATAPACK_ROOT, path));
}
final NpcHtmlMessage html = new NpcHtmlMessage();
if (content != null)

View File

@@ -106,13 +106,12 @@ public class AdminLogin implements IAdminCommandHandler
Config.SERVER_LIST_TYPE = newType;
LoginServerThread.getInstance().sendServerType();
activeChar.sendMessage("Server Type changed to " + getServerTypeName(newType));
showMainPage(activeChar);
}
else
{
activeChar.sendMessage("Server Type is already " + getServerTypeName(newType));
showMainPage(activeChar);
}
showMainPage(activeChar);
}
else
{
@@ -135,13 +134,12 @@ public class AdminLogin implements IAdminCommandHandler
Config.SERVER_LIST_TYPE = age;
LoginServerThread.getInstance().sendServerStatus(ServerStatus.SERVER_AGE, age);
activeChar.sendMessage("Server Age changed to " + age);
showMainPage(activeChar);
}
else
{
activeChar.sendMessage("Server Age is already " + age);
showMainPage(activeChar);
}
showMainPage(activeChar);
}
catch (NumberFormatException e)
{

View File

@@ -95,7 +95,7 @@ public class AdminMobGroup implements IAdminCommandHandler
{
if (activeChar.getTarget() instanceof L2Character)
{
attack(command, activeChar, ((L2Character) activeChar.getTarget()));
attack(command, activeChar, (L2Character) activeChar.getTarget());
}
}
else if (command.startsWith("admin_mobgroup_rnd"))

View File

@@ -99,7 +99,7 @@ public final class AdminPCBangPoints implements IAdminCommandHandler
return false;
}
int pcBangCount = Math.min((target.getPcBangPoints() + value), Config.PC_BANG_MAX_POINTS);
int pcBangCount = Math.min(target.getPcBangPoints() + value, Config.PC_BANG_MAX_POINTS);
if (pcBangCount < 0)
{
pcBangCount = Config.PC_BANG_MAX_POINTS;
@@ -166,7 +166,7 @@ public final class AdminPCBangPoints implements IAdminCommandHandler
continue;
}
int pcBangCount = Math.min((temp.getPcBangPoints() + value), Integer.MAX_VALUE);
int pcBangCount = Math.min(temp.getPcBangPoints() + value, Integer.MAX_VALUE);
if (pcBangCount < 0)
{
pcBangCount = Integer.MAX_VALUE;

View File

@@ -67,12 +67,12 @@ public final class AdminPForge implements IAdminCommandHandler
opCodes.add(token);
}
if (opCodes == null)
if (opCodes != null)
{
return null;
return opCodes.toArray(new String[opCodes.size()]);
}
return opCodes.toArray(new String[opCodes.size()]);
return null;
}
private boolean validateOpCodes(String[] opCodes)
@@ -201,13 +201,13 @@ public final class AdminPForge implements IAdminCommandHandler
private void showSendUsage(L2PcInstance activeChar, String[] opCodes, String format)
{
activeChar.sendMessage("Usage: //forge_send sc|sb|cs opcode1[;opcode2[;opcode3]][ format value1 ... valueN] ");
if (opCodes == null)
if (opCodes != null)
{
showMainPage(activeChar);
showValuesPage(activeChar, opCodes, format);
}
else
{
showValuesPage(activeChar, opCodes, format);
showMainPage(activeChar);
}
}
@@ -466,7 +466,7 @@ public final class AdminPForge implements IAdminCommandHandler
case "$tboid":
{
target = activeChar.getTarget();
if ((target != null) && (target instanceof L2Playable))
if (target instanceof L2Playable)
{
boat = ((L2Playable) target).getActingPlayer().getBoat();
value = boat != null ? String.valueOf(boat.getObjectId()) : "0";
@@ -476,7 +476,7 @@ public final class AdminPForge implements IAdminCommandHandler
case "$ttitle":
{
target = activeChar.getTarget();
value = (target != null) && (target instanceof L2Character) ? String.valueOf(((L2Character) target).getTitle()) : "";
value = target instanceof L2Character ? String.valueOf(((L2Character) target).getTitle()) : "";
break;
}
case "$tname":

View File

@@ -119,13 +119,13 @@ public class AdminPledge implements IAdminCommandHandler
ClanTable.getInstance().destroyClan(targetPlayer.getClanId());
clan = targetPlayer.getClan();
if (clan == null)
if (clan != null)
{
activeChar.sendMessage("Clan disbanded.");
activeChar.sendMessage("There was a problem while destroying the clan.");
}
else
{
activeChar.sendMessage("There was a problem while destroying the clan.");
activeChar.sendMessage("Clan disbanded.");
}
break;
}

View File

@@ -85,7 +85,7 @@ public final class AdminPrimePoints implements IAdminCommandHandler
return false;
}
int primeCount = Math.min((target.getPrimePoints() + value), Integer.MAX_VALUE);
int primeCount = Math.min(target.getPrimePoints() + value, Integer.MAX_VALUE);
if (primeCount < 0)
{
primeCount = Integer.MAX_VALUE;
@@ -150,7 +150,7 @@ public final class AdminPrimePoints implements IAdminCommandHandler
continue;
}
int primeCount = Math.min((temp.getPrimePoints() + value), Integer.MAX_VALUE);
int primeCount = Math.min(temp.getPrimePoints() + value, Integer.MAX_VALUE);
if (primeCount < 0)
{
primeCount = Integer.MAX_VALUE;

View File

@@ -384,7 +384,7 @@ public class AdminPunishment implements IAdminCommandHandler
return true;
}
private static final String findCharId(String key)
private static String findCharId(String key)
{
final int charId = CharNameTable.getInstance().getIdByName(key);
return charId > 0 ? Integer.toString(charId) : key;

View File

@@ -151,7 +151,7 @@ public class AdminServerInfo implements IAdminCommandHandler
for (L2PcInstance onlinePlayer : L2World.getInstance().getPlayers())
{
if (((onlinePlayer != null) && (onlinePlayer.getClient() != null)) && !onlinePlayer.getClient().isDetached())
if ((onlinePlayer != null) && (onlinePlayer.getClient() != null) && !onlinePlayer.getClient().isDetached())
{
realPlayers.add(onlinePlayer.getIPAddress());
}

View File

@@ -309,7 +309,7 @@ public class AdminSkill implements IAdminCommandHandler
for (int x = 0; x < maxPages; x++)
{
StringUtil.append(replyMSG, "<td><a action=\"bypass -h admin_remove_skills ", String.valueOf(x), "\">Page ", String.valueOf((x + 1)), "</a></td>");
StringUtil.append(replyMSG, "<td><a action=\"bypass -h admin_remove_skills ", String.valueOf(x), "\">Page ", String.valueOf(x + 1), "</a></td>");
}
replyMSG.append("</tr></table></center><br><table width=270><tr><td width=80>Name:</td><td width=60>Level:</td><td width=40>Id:</td></tr>");

View File

@@ -345,16 +345,13 @@ public class AdminSpawn implements IAdminCommandHandler
}
}
}
else if (showposition && (npc != null))
{
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + npc.getX() + " " + npc.getY() + " " + npc.getZ());
}
else
{
if (showposition && (npc != null))
{
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + npc.getX() + " " + npc.getY() + " " + npc.getZ());
}
else
{
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + spawn.getX() + " " + spawn.getY() + " " + spawn.getZ());
}
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + spawn.getX() + " " + spawn.getY() + " " + spawn.getZ());
}
}

View File

@@ -113,23 +113,23 @@ public class AdminZone implements IAdminCommandHandler
final String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "html/admin/zone.htm");
final NpcHtmlMessage adminReply = new NpcHtmlMessage();
adminReply.setHtml(htmContent);
adminReply.replace("%PEACE%", (activeChar.isInsideZone(ZoneId.PEACE) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%PVP%", (activeChar.isInsideZone(ZoneId.PVP) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%SIEGE%", (activeChar.isInsideZone(ZoneId.SIEGE) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%TOWN%", (activeChar.isInsideZone(ZoneId.TOWN) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%CASTLE%", (activeChar.isInsideZone(ZoneId.CASTLE) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%FORT%", (activeChar.isInsideZone(ZoneId.FORT) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%HQ%", (activeChar.isInsideZone(ZoneId.HQ) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%CLANHALL%", (activeChar.isInsideZone(ZoneId.CLAN_HALL) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%LAND%", (activeChar.isInsideZone(ZoneId.LANDING) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%NOLAND%", (activeChar.isInsideZone(ZoneId.NO_LANDING) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%NOSUMMON%", (activeChar.isInsideZone(ZoneId.NO_SUMMON_FRIEND) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%WATER%", (activeChar.isInsideZone(ZoneId.WATER) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%FISHING%", (activeChar.isInsideZone(ZoneId.FISHING) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%SWAMP%", (activeChar.isInsideZone(ZoneId.SWAMP) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%DANGER%", (activeChar.isInsideZone(ZoneId.DANGER_AREA) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%NOSTORE%", (activeChar.isInsideZone(ZoneId.NO_STORE) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%SCRIPT%", (activeChar.isInsideZone(ZoneId.SCRIPT) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%PEACE%", activeChar.isInsideZone(ZoneId.PEACE) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%PVP%", activeChar.isInsideZone(ZoneId.PVP) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%SIEGE%", activeChar.isInsideZone(ZoneId.SIEGE) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%TOWN%", activeChar.isInsideZone(ZoneId.TOWN) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%CASTLE%", activeChar.isInsideZone(ZoneId.CASTLE) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%FORT%", activeChar.isInsideZone(ZoneId.FORT) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%HQ%", activeChar.isInsideZone(ZoneId.HQ) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%CLANHALL%", activeChar.isInsideZone(ZoneId.CLAN_HALL) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%LAND%", activeChar.isInsideZone(ZoneId.LANDING) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%NOLAND%", activeChar.isInsideZone(ZoneId.NO_LANDING) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%NOSUMMON%", activeChar.isInsideZone(ZoneId.NO_SUMMON_FRIEND) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%WATER%", activeChar.isInsideZone(ZoneId.WATER) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%FISHING%", activeChar.isInsideZone(ZoneId.FISHING) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%SWAMP%", activeChar.isInsideZone(ZoneId.SWAMP) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%DANGER%", activeChar.isInsideZone(ZoneId.DANGER_AREA) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%NOSTORE%", activeChar.isInsideZone(ZoneId.NO_STORE) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%SCRIPT%", activeChar.isInsideZone(ZoneId.SCRIPT) ? "<font color=\"LEVEL\">YES</font>" : "NO");
final StringBuilder zones = new StringBuilder(100);
final L2WorldRegion region = L2World.getInstance().getRegion(activeChar.getX(), activeChar.getY());
for (L2ZoneType zone : region.getZones())
@@ -163,8 +163,8 @@ public class AdminZone implements IAdminCommandHandler
{
final int worldX = activeChar.getX();
final int worldY = activeChar.getY();
final int geoX = ((((worldX - (-327680)) >> 4) >> 11) + 10);
final int geoY = ((((worldY - (-262144)) >> 4) >> 11) + 10);
final int geoX = (((worldX - -327680) >> 4) >> 11) + 10;
final int geoY = (((worldY - -262144) >> 4) >> 11) + 10;
activeChar.sendMessage("GeoRegion: " + geoX + "_" + geoY + "");
}

View File

@@ -128,7 +128,7 @@ public class ClanWarehouse implements IBypassHandler
return false;
}
private static final void showWithdrawWindow(L2PcInstance player, WarehouseListType itemtype, byte sortorder)
private static void showWithdrawWindow(L2PcInstance player, WarehouseListType itemtype, byte sortorder)
{
player.sendPacket(ActionFailed.STATIC_PACKET);

View File

@@ -90,7 +90,7 @@ public class Loto implements IBypassHandler
// 23 - current lottery jackpot
// 24 - Previous winning numbers/Prize claim
// >24 - check lottery ticket by item object id
private static final void showLotoWindow(L2PcInstance player, L2Npc npc, int val)
private static void showLotoWindow(L2PcInstance player, L2Npc npc, int val)
{
final int npcId = npc.getTemplate().getId();
String filename;
@@ -99,7 +99,7 @@ public class Loto implements IBypassHandler
if (val == 0) // 0 - first buy lottery ticket window
{
filename = (npc.getHtmlPath(npcId, 1));
filename = npc.getHtmlPath(npcId, 1);
html.setFile(player.getHtmlPrefix(), filename);
}
else if ((val >= 1) && (val <= 21)) // 1-20 - buttons, 21 - second buy lottery ticket window
@@ -117,7 +117,7 @@ public class Loto implements IBypassHandler
return;
}
filename = (npc.getHtmlPath(npcId, 5));
filename = npc.getHtmlPath(npcId, 5);
html.setFile(player.getHtmlPrefix(), filename);
int count = 0;
@@ -240,17 +240,17 @@ public class Loto implements IBypassHandler
iu.addModifiedItem(adenaupdate);
player.sendPacket(iu);
filename = (npc.getHtmlPath(npcId, 6));
filename = npc.getHtmlPath(npcId, 6);
html.setFile(player.getHtmlPrefix(), filename);
}
else if (val == 23) // 23 - current lottery jackpot
{
filename = (npc.getHtmlPath(npcId, 3));
filename = npc.getHtmlPath(npcId, 3);
html.setFile(player.getHtmlPrefix(), filename);
}
else if (val == 24) // 24 - Previous winning numbers/Prize claim
{
filename = (npc.getHtmlPath(npcId, 4));
filename = npc.getHtmlPath(npcId, 4);
html.setFile(player.getHtmlPrefix(), filename);
final int lotonumber = Lottery.getInstance().getId();
@@ -308,7 +308,7 @@ public class Loto implements IBypassHandler
}
else if (val == 25) // 25 - lottery instructions
{
filename = (npc.getHtmlPath(npcId, 2));
filename = npc.getHtmlPath(npcId, 2);
html.setFile(player.getHtmlPrefix(), filename);
}
else if (val > 25) // >25 - check lottery ticket by item object id

View File

@@ -114,7 +114,7 @@ public class NpcViewMod implements IBypassHandler
{
return false;
}
sendNpcDropList(activeChar, npc, dropListScope, (st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0));
sendNpcDropList(activeChar, npc, dropListScope, st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0);
}
catch (NumberFormatException e)
{
@@ -327,13 +327,9 @@ public class NpcViewMod implements IBypassHandler
final MinMax minMax = getPreciseMinMax(normalized.getChance(), generalDropItem.getMin(npc, activeChar), generalDropItem.getMax(npc, activeChar), generalDropItem.isPreciseCalculated());
final long min = minMax.min;
final long max = minMax.max;
if (min == max)
sb.append(amountFormat.format(min));
if (min != max)
{
sb.append(amountFormat.format(min));
}
else
{
sb.append(amountFormat.format(min));
sb.append(" - ");
sb.append(amountFormat.format(max));
}
@@ -407,13 +403,9 @@ public class NpcViewMod implements IBypassHandler
final long min = minMax.min;
final long max = minMax.max;
if (min == max)
sb.append(amountFormat.format(min));
if (min != max)
{
sb.append(amountFormat.format(min));
}
else
{
sb.append(amountFormat.format(min));
sb.append(" - ");
sb.append(amountFormat.format(max));
}
@@ -442,7 +434,7 @@ public class NpcViewMod implements IBypassHandler
return new MinMax(min, max);
}
final int mult = (int) (chance) / 100;
final int mult = (int) chance / 100;
return new MinMax(mult * min, (chance % 100) > 0 ? (mult + 1) * max : mult * max);
}
}

View File

@@ -155,7 +155,7 @@ public class Observation implements IBypassHandler
return false;
}
private static final void doObserve(L2PcInstance player, L2Npc npc, Location pos, long cost)
private static void doObserve(L2PcInstance player, L2Npc npc, Location pos, long cost)
{
if (player.reduceAdena("Broadcast", cost, npc, true))
{

View File

@@ -126,14 +126,13 @@ public class OlympiadManagerLink implements IBypassHandler
html.replace("%olympiad_period%", String.valueOf(Olympiad.getInstance().getPeriod()));
html.replace("%olympiad_cycle%", String.valueOf(Olympiad.getInstance().getCurrentCycle()));
html.replace("%olympiad_opponent%", String.valueOf(OlympiadManager.getInstance().getCountOpponents()));
activeChar.sendPacket(html);
}
else
{
html.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "noble_unregister.htm");
html.replace("%objectId%", String.valueOf(target.getObjectId()));
activeChar.sendPacket(html);
}
activeChar.sendPacket(html);
break;
}
case 1: // unregister
@@ -199,15 +198,13 @@ public class OlympiadManagerLink implements IBypassHandler
if (passes > 0)
{
html.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "noble_settle.htm");
html.replace("%objectId%", String.valueOf(target.getObjectId()));
activeChar.sendPacket(html);
}
else
{
html.setFile(activeChar.getHtmlPrefix(), Olympiad.OLYMPIAD_HTML_PATH + "noble_nopoints2.htm");
html.replace("%objectId%", String.valueOf(target.getObjectId()));
activeChar.sendPacket(html);
}
html.replace("%objectId%", String.valueOf(target.getObjectId()));
activeChar.sendPacket(html);
break;
}
case 7: // Equipment Rewards

View File

@@ -106,7 +106,7 @@ public class PrivateWarehouse implements IBypassHandler
return false;
}
private static final void showWithdrawWindow(L2PcInstance player, WarehouseListType itemtype, byte sortorder)
private static void showWithdrawWindow(L2PcInstance player, WarehouseListType itemtype, byte sortorder)
{
player.sendPacket(ActionFailed.STATIC_PACKET);
player.setActiveWarehouse(player.getWarehouse());

View File

@@ -213,7 +213,7 @@ public class QuestLink implements IBypassHandler
if (q != null)
{
if (((q.getId() >= 1) && (q.getId() < 20000)) && ((player.getWeightPenalty() >= 3) || !player.isInventoryUnder90(true)))
if ((q.getId() >= 1) && (q.getId() < 20000) && ((player.getWeightPenalty() >= 3) || !player.isInventoryUnder90(true)))
{
player.sendPacket(SystemMessageId.UNABLE_TO_PROCESS_THIS_REQUEST_UNTIL_YOUR_INVENTORY_S_WEIGHT_AND_SLOT_COUNT_ARE_LESS_THAN_80_PERCENT_OF_CAPACITY);
return;

View File

@@ -78,7 +78,7 @@ public class RentPet implements IBypassHandler
return false;
}
private static final void tryRentPet(L2PcInstance player, int val)
private static void tryRentPet(L2PcInstance player, int val)
{
if ((player == null) || player.hasSummon() || player.isMounted() || player.isRentedPet() || player.isTransformed() || player.isCursedWeaponEquipped())
{

View File

@@ -68,7 +68,7 @@ public class Wear implements IBypassHandler
return false;
}
private static final void showWearWindow(L2PcInstance player, int val)
private static void showWearWindow(L2PcInstance player, int val)
{
final L2BuyList buyList = BuyListData.getInstance().getBuyList(val);
if (buyList == null)

View File

@@ -65,8 +65,8 @@ public class RegionBoard implements IWriteBoardHandler
final L2Clan clan = ClanTable.getInstance().getClan(castle.getOwnerId());
String link = list.replaceAll("%region_id%", String.valueOf(i));
link = link.replace("%region_name%", String.valueOf(REGIONS[i]));
link = link.replace("%region_owning_clan%", (clan != null ? clan.getName() : "NPC"));
link = link.replace("%region_owning_clan_alliance%", ((clan != null) && (clan.getAllyName() != null) ? clan.getAllyName() : ""));
link = link.replace("%region_owning_clan%", clan != null ? clan.getName() : "NPC");
link = link.replace("%region_owning_clan_alliance%", (clan != null) && (clan.getAllyName() != null) ? clan.getAllyName() : "");
link = link.replace("%region_tax_rate%", String.valueOf(castle.getTaxRate() * 100) + "%");
sb.append(link);
}

View File

@@ -42,7 +42,7 @@ public final class ChameleonRest extends AbstractEffect
@Override
public int getEffectFlags()
{
return (EffectFlag.SILENT_MOVE.getMask() | EffectFlag.RELAXING.getMask());
return EffectFlag.SILENT_MOVE.getMask() | EffectFlag.RELAXING.getMask();
}
@Override

View File

@@ -36,7 +36,7 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
public class ClassChange extends AbstractEffect
{
private final int _index;
private final static int IDENTITY_CRISIS_SKILL_ID = 1570;
private static final int IDENTITY_CRISIS_SKILL_ID = 1570;
public ClassChange(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
{

View File

@@ -56,7 +56,7 @@ public final class CpHealPercent extends AbstractEffect
double amount = 0;
final double power = _power;
final boolean full = (power == 100.0);
final boolean full = power == 100.0;
amount = full ? target.getMaxCp() : (target.getMaxCp() * power) / 100.0;
// Prevents overheal and negative amount

View File

@@ -87,7 +87,7 @@ public final class DispelBySlot extends AbstractEffect
for (Entry<AbnormalType, Short> entry : _dispelAbnormals.entrySet())
{
// Dispel transformations (buff and by GM)
if ((entry.getKey() == AbnormalType.TRANSFORM) && (effected.isTransformed() || (effected.isPlayer() || (entry.getValue() == effected.getActingPlayer().getTransformationId()) || (entry.getValue() < 0))))
if ((entry.getKey() == AbnormalType.TRANSFORM) && (effected.isTransformed() || effected.isPlayer() || (entry.getValue() == effected.getActingPlayer().getTransformationId()) || (entry.getValue() < 0)))
{
info.getEffected().stopTransformation(true);
continue;

View File

@@ -89,10 +89,10 @@ public final class DispelBySlotProbability extends AbstractEffect
// Operation of O(n) for the amount of slots to dispel (which is usually small) and O(1) to get the buff.
for (Entry<AbnormalType, Short> entry : _dispelAbnormals.entrySet())
{
if ((Rnd.get(100) < _rate))
if (Rnd.get(100) < _rate)
{
// Dispel transformations (buff and by GM)
if ((entry.getKey() == AbnormalType.TRANSFORM) && (effected.isTransformed() || (effected.isPlayer() || (entry.getValue() == effected.getActingPlayer().getTransformationId()) || (entry.getValue() < 0))))
if ((entry.getKey() == AbnormalType.TRANSFORM) && (effected.isTransformed() || effected.isPlayer() || (entry.getValue() == effected.getActingPlayer().getTransformationId()) || (entry.getValue() < 0)))
{
info.getEffected().stopTransformation(true);
}

View File

@@ -144,7 +144,7 @@ public final class EnergyAttack extends AbstractEffect
attacker.decreaseCharges(3);
}
final double addPower = (attacker.getStat().calcStat(Stats.MOMENTUM_SKILL_POWER, 1, null, null));
final double addPower = attacker.getStat().calcStat(Stats.MOMENTUM_SKILL_POWER, 1, null, null);
attack += _power;
attack *= addPower;
@@ -171,7 +171,7 @@ public final class EnergyAttack extends AbstractEffect
if (damage > 0)
{
// reduce damage if target has maxdamage buff
final double maxDamage = (target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null));
final double maxDamage = target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null);
if (maxDamage > 0)
{
damage = (int) maxDamage;

View File

@@ -101,7 +101,7 @@ public final class FatalBlow extends AbstractEffect
}
// reduce damage if target has maxdamage buff
final double maxDamage = (target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null));
final double maxDamage = target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null);
if (maxDamage > 0)
{
damage = (int) maxDamage;

View File

@@ -31,15 +31,15 @@ import com.l2jmobius.gameserver.model.skills.Skill;
*/
public class FeohStance extends AbstractEffect
{
private final static int FIRE_STANCE = 11007;
private final static int WATER_STANCE = 11008;
private final static int WIND_STANCE = 11009;
private final static int EARTH_STANCE = 11010;
private final static int ELEMENTAL_SPIKE = 11011;
private final static int ELEMENTAL_CRASH = 11017;
private final static int ELEMENTAL_DESTRUCTION = 11023;
private final static int ELEMENTAL_BLAST = 11034;
private final static int ELEMENTAL_STORM = 11040;
private static final int FIRE_STANCE = 11007;
private static final int WATER_STANCE = 11008;
private static final int WIND_STANCE = 11009;
private static final int EARTH_STANCE = 11010;
private static final int ELEMENTAL_SPIKE = 11011;
private static final int ELEMENTAL_CRASH = 11017;
private static final int ELEMENTAL_DESTRUCTION = 11023;
private static final int ELEMENTAL_BLAST = 11034;
private static final int ELEMENTAL_STORM = 11040;
private final HashSet<Skill> _skillList = new HashSet<>();
private int _stanceId;

View File

@@ -100,7 +100,7 @@ public final class Fishing extends AbstractEffect
// check for equiped fishing rod
final L2Weapon equipedWeapon = player.getActiveWeaponItem();
if (((equipedWeapon == null) || (equipedWeapon.getItemType() != WeaponType.FISHINGROD)))
if ((equipedWeapon == null) || (equipedWeapon.getItemType() != WeaponType.FISHINGROD))
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_A_FISHING_POLE_EQUIPPED);
return;
@@ -230,12 +230,12 @@ public final class Fishing extends AbstractEffect
*/
private static int computeBaitZ(L2PcInstance player, int baitX, int baitY, L2FishingZone fishingZone, L2WaterZone waterZone)
{
if ((fishingZone == null))
if (fishingZone == null)
{
return Integer.MIN_VALUE;
}
if ((waterZone == null))
if (waterZone == null)
{
return Integer.MIN_VALUE;
}

View File

@@ -50,7 +50,7 @@ public final class FocusMaxEnergy extends AbstractEffect
final int maxCharge = (sonicMastery != null) ? sonicMastery.getLevel() : (focusMastery != null) ? focusMastery.getLevel() : (maximumForceMastery != null) ? 15 : 0;
if (maxCharge != 0)
{
info.getEffected().getActingPlayer().increaseCharges((maxCharge - info.getEffected().getActingPlayer().getCharges()), maxCharge);
info.getEffected().getActingPlayer().increaseCharges(maxCharge - info.getEffected().getActingPlayer().getCharges(), maxCharge);
}
}
}

View File

@@ -57,7 +57,7 @@ public final class FocusSouls extends AbstractEffect
final int maxSouls = (int) target.calcStat(Stats.MAX_SOULS, 0, null, null);
if (maxSouls > 0)
{
if ((target.getChargedSouls() < maxSouls))
if (target.getChargedSouls() < maxSouls)
{
target.increaseSouls(((target.getChargedSouls() + _charge) <= maxSouls) ? _charge : (maxSouls - target.getChargedSouls()));
}

View File

@@ -118,7 +118,7 @@ public final class Harvesting extends AbstractEffect
final int levelPlayer = activeChar.getLevel();
final int levelTarget = target.getLevel();
int diff = (levelPlayer - levelTarget);
int diff = levelPlayer - levelTarget;
if (diff < 0)
{
diff = -diff;

View File

@@ -74,7 +74,7 @@ public final class Heal extends AbstractEffect
final boolean sps = info.getSkill().isMagic() && activeChar.isChargedShot(ShotType.SPIRITSHOTS);
final boolean bss = info.getSkill().isMagic() && activeChar.isChargedShot(ShotType.BLESSED_SPIRITSHOTS);
if (((sps || bss) && (activeChar.isPlayer() && activeChar.getActingPlayer().isMageClass())) || activeChar.isSummon())
if (((sps || bss) && activeChar.isPlayer() && activeChar.getActingPlayer().isMageClass()) || activeChar.isSummon())
{
staticShotBonus = info.getSkill().getMpConsume(); // static bonus for spiritshots
mAtkMul = bss ? 4 : 2;
@@ -128,21 +128,18 @@ public final class Heal extends AbstractEffect
{
target.sendPacket(SystemMessageId.REJUVENATING_HP);
}
else if (activeChar.isPlayer() && (activeChar != target))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S2_HP_HAS_BEEN_RESTORED_BY_C1);
sm.addString(activeChar.getName());
sm.addInt((int) amount);
target.sendPacket(sm);
}
else
{
if (activeChar.isPlayer() && (activeChar != target))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S2_HP_HAS_BEEN_RESTORED_BY_C1);
sm.addString(activeChar.getName());
sm.addInt((int) amount);
target.sendPacket(sm);
}
else
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HP_HAS_BEEN_RESTORED);
sm.addInt((int) amount);
target.sendPacket(sm);
}
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HP_HAS_BEEN_RESTORED);
sm.addInt((int) amount);
target.sendPacket(sm);
}
}
}

View File

@@ -63,7 +63,7 @@ public final class HealPercent extends AbstractEffect
double amount = 0;
final double power = _power;
final boolean full = (power == 100.0);
final boolean full = power == 100.0;
amount = full ? target.getMaxHp() : (target.getMaxHp() * power) / 100.0;
// Prevents overheal and negative amount

View File

@@ -61,7 +61,7 @@ public final class HpByLevel extends AbstractEffect
// Calculation
final double abs = _power;
final double absorb = ((info.getEffector().getCurrentHp() + abs) > info.getEffector().getMaxHp() ? info.getEffector().getMaxHp() : (info.getEffector().getCurrentHp() + abs));
final double absorb = (info.getEffector().getCurrentHp() + abs) > info.getEffector().getMaxHp() ? info.getEffector().getMaxHp() : (info.getEffector().getCurrentHp() + abs);
final int restored = (int) (absorb - info.getEffector().getCurrentHp());
info.getEffector().setCurrentHp(absorb);
// System message

View File

@@ -74,7 +74,7 @@ public final class HpCpHeal extends AbstractEffect
final boolean sps = info.getSkill().isMagic() && activeChar.isChargedShot(ShotType.SPIRITSHOTS);
final boolean bss = info.getSkill().isMagic() && activeChar.isChargedShot(ShotType.BLESSED_SPIRITSHOTS);
if (((sps || bss) && (activeChar.isPlayer() && activeChar.getActingPlayer().isMageClass())) || activeChar.isSummon())
if (((sps || bss) && activeChar.isPlayer() && activeChar.getActingPlayer().isMageClass()) || activeChar.isSummon())
{
staticShotBonus = info.getSkill().getMpConsume(); // static bonus for spiritshots
mAtkMul = bss ? 4 : 2;
@@ -151,19 +151,18 @@ public final class HpCpHeal extends AbstractEffect
{
target.setCurrentCp(amount + target.getCurrentCp());
final SystemMessage sm;
if (activeChar.isPlayer() && (activeChar != target))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S2_CP_HAS_BEEN_RESTORED_BY_C1);
sm = SystemMessage.getSystemMessage(SystemMessageId.S2_CP_HAS_BEEN_RESTORED_BY_C1);
sm.addString(activeChar.getName());
sm.addInt((int) amount);
target.sendPacket(sm);
}
else
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CP_HAS_BEEN_RESTORED);
sm.addInt((int) amount);
target.sendPacket(sm);
sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CP_HAS_BEEN_RESTORED);
}
sm.addInt((int) amount);
target.sendPacket(sm);
}
}
}

View File

@@ -87,8 +87,8 @@ public final class HpDrain extends AbstractEffect
drain = damage;
}
final double hpAdd = (_power * drain);
final double hpFinal = ((activeChar.getCurrentHp() + hpAdd) > activeChar.getMaxHp() ? activeChar.getMaxHp() : (activeChar.getCurrentHp() + hpAdd));
final double hpAdd = _power * drain;
final double hpFinal = (activeChar.getCurrentHp() + hpAdd) > activeChar.getMaxHp() ? activeChar.getMaxHp() : (activeChar.getCurrentHp() + hpAdd);
activeChar.setCurrentHp(hpFinal);
if (damage > 0)

View File

@@ -79,7 +79,7 @@ public final class MagicalAttack extends AbstractEffect
}
// reduce damage if target has maxdamage buff
final double maxDamage = (target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null));
final double maxDamage = target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null);
if (maxDamage > 0)
{
damage = (int) maxDamage;

View File

@@ -73,12 +73,12 @@ public final class MagicalAttackByAbnormal extends AbstractEffect
int damage = (int) Formulas.calcMagicDam(activeChar, target, info.getSkill(), shld, sps, bss, mcrit);
// each buff increase +30%
damage *= (((target.getBuffCount() * 0.3) + 1.3) / 4);
damage *= ((target.getBuffCount() * 0.3) + 1.3) / 4;
if (damage > 0)
{
// reduce damage if target has maxdamage buff
final double maxDamage = (target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null));
final double maxDamage = target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null);
if (maxDamage > 0)
{
damage = (int) maxDamage;

View File

@@ -91,7 +91,7 @@ public final class MagicalAttackMp extends AbstractEffect
final byte shld = Formulas.calcShldUse(activeChar, target, info.getSkill());
final boolean mcrit = Formulas.calcMCrit(activeChar.getMCriticalHit(target, info.getSkill()));
final double damage = Formulas.calcManaDam(activeChar, target, info.getSkill(), shld, sps, bss, mcrit);
final double mp = (damage > target.getCurrentMp() ? target.getCurrentMp() : damage);
final double mp = damage > target.getCurrentMp() ? target.getCurrentMp() : damage;
if (damage > 0)
{

View File

@@ -80,7 +80,7 @@ public final class MagicalSoulAttack extends AbstractEffect
if (damage > 0)
{
// reduce damage if target has maxdamage buff
final double maxDamage = (target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null));
final double maxDamage = target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null);
if (maxDamage > 0)
{
damage = (int) maxDamage;

View File

@@ -63,7 +63,7 @@ public final class ManaHealPercent extends AbstractEffect
double amount = 0;
final double power = _power;
final boolean full = (power == 100.0);
final boolean full = power == 100.0;
amount = full ? target.getMaxMp() : (target.getMaxMp() * power) / 100.0;
// Prevents overheal and negative amount

View File

@@ -81,7 +81,7 @@ public final class MarkRetriever extends AbstractEffect
if (damage > 0)
{
// reduce damage if target has maxdamage buff
final double maxDamage = (effected.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null));
final double maxDamage = effected.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null);
if (maxDamage > 0)
{
damage = maxDamage;

View File

@@ -80,7 +80,7 @@ public final class MaxCp extends AbstractEffect
charStat.getActiveChar().addStatFunc(new FuncAdd(Stats.MAX_CP, 1, this, _power, null));
if (_heal)
{
effected.setCurrentCp((currentCp + _power));
effected.setCurrentCp(currentCp + _power);
}
break;
}

View File

@@ -80,7 +80,7 @@ public final class MaxHp extends AbstractEffect
charStat.getActiveChar().addStatFunc(new FuncAdd(Stats.MAX_HP, 1, this, _power, null));
if (_heal)
{
effected.setCurrentHp((currentHp + _power));
effected.setCurrentHp(currentHp + _power);
}
break;
}

View File

@@ -135,7 +135,7 @@ public final class PhysicalAttack extends AbstractEffect
if (damage > 0)
{
// reduce damage if target has maxdamage buff
final double maxDamage = (target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null));
final double maxDamage = target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null);
if (maxDamage > 0)
{
damage = (int) maxDamage;

View File

@@ -88,7 +88,7 @@ public final class PhysicalAttackHpLink extends AbstractEffect
if (damage > 0)
{
// reduce damage if target has maxdamage buff
final double maxDamage = (target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null));
final double maxDamage = target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null);
if (maxDamage > 0)
{
damage = (int) maxDamage;

View File

@@ -103,7 +103,7 @@ public final class PhysicalSoulAttack extends AbstractEffect
if (damage > 0)
{
// reduce damage if target has maxdamage buff
final double maxDamage = (target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null));
final double maxDamage = target.getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null);
if (maxDamage > 0)
{
damage = (int) maxDamage;

View File

@@ -73,7 +73,7 @@ public final class RebalanceHP extends AbstractEffect
}
final L2Summon summon = member.getPet();
if ((summon != null) && (!summon.isDead() && Util.checkIfInRange(skill.getAffectRange(), effector, summon, true)))
if ((summon != null) && !summon.isDead() && Util.checkIfInRange(skill.getAffectRange(), effector, summon, true))
{
fullHP += summon.getMaxHp();
currentHPs += summon.getCurrentHp();
@@ -106,7 +106,7 @@ public final class RebalanceHP extends AbstractEffect
member.setCurrentHp(newHP);
}
final L2Summon summon = member.getPet();
if ((summon != null) && (!summon.isDead() && Util.checkIfInRange(skill.getAffectRange(), effector, summon, true)))
if ((summon != null) && !summon.isDead() && Util.checkIfInRange(skill.getAffectRange(), effector, summon, true))
{
double newHP = (summon.getMaxHp() * currentHPs) / fullHP;
if (newHP > summon.getCurrentHp()) // The target gets healed

View File

@@ -58,7 +58,7 @@ public final class Sow extends AbstractEffect
final L2PcInstance player = info.getEffector().getActingPlayer();
final L2MonsterInstance target = (L2MonsterInstance) info.getEffected();
if (target.isDead() || (!target.getTemplate().canBeSown()) || target.isSeeded() || (target.getSeederId() != player.getObjectId()))
if (target.isDead() || !target.getTemplate().canBeSown() || target.isSeeded() || (target.getSeederId() != player.getObjectId()))
{
return;
}
@@ -116,7 +116,7 @@ public final class Sow extends AbstractEffect
// 5% decrease in chance if player level
// is more than +/- 5 levels to _target's_ level
int diff = (levelPlayer - levelTarget);
int diff = levelPlayer - levelTarget;
if (diff < 0)
{
diff = -diff;

View File

@@ -52,7 +52,7 @@ public final class StaticDamage extends AbstractEffect
}
// reduce damage if target has maxdamage buff
final double maxDamage = (info.getEffected().getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null));
final double maxDamage = info.getEffected().getStat().calcStat(Stats.MAX_SKILL_DAMAGE, 0, null, null);
if (maxDamage > 0)
{
_power = (int) maxDamage;

View File

@@ -155,8 +155,8 @@ public final class SummonNpc extends AbstractEffect
int y = player.getY();
if (_randomOffset)
{
x += (Rnd.nextBoolean() ? Rnd.get(20, 50) : Rnd.get(-50, -20));
y += (Rnd.nextBoolean() ? Rnd.get(20, 50) : Rnd.get(-50, -20));
x += Rnd.nextBoolean() ? Rnd.get(20, 50) : Rnd.get(-50, -20);
y += Rnd.nextBoolean() ? Rnd.get(20, 50) : Rnd.get(-50, -20);
}
spawn.setX(x);

View File

@@ -79,7 +79,7 @@ public final class ThrowHorizontal extends AbstractEffect
final int z = info.getEffected().getZ();
// Prevent using skill with this effect on NPC that not monster
if (!(info.getEffected().isMonster() || info.getEffected().isRaidMinion() || info.getEffected().isMinion() || info.getEffected().isSummon() || info.getEffected().isPlayer()))
if (!info.getEffected().isMonster() && !info.getEffected().isRaidMinion() && !info.getEffected().isMinion() && !info.getEffected().isSummon() && !info.getEffected().isPlayer())
{
final L2PcInstance effector = (L2PcInstance) info.getEffector();
effector.sendPacket(SystemMessageId.INVALID_TARGET);

View File

@@ -67,7 +67,7 @@ public final class TransferHate extends AbstractEffect
continue;
}
final L2Attackable hater = ((L2Attackable) obj);
final L2Attackable hater = (L2Attackable) obj;
final int hate = hater.getHating(info.getEffector());
if (hate <= 0)
{

View File

@@ -114,10 +114,10 @@ public final class TriggerForce extends AbstractEffect
// apply offensive aura to enemies
if ((_skill.getSkillId() == RAGE_AURA) || (_skill.getSkillId() == ROLLING_THUNDER))
{
final boolean srcInArena = (effector.isInsideZone(ZoneId.PVP) && (!effector.isInsideZone(ZoneId.SIEGE)));
final boolean srcInArena = effector.isInsideZone(ZoneId.PVP) && !effector.isInsideZone(ZoneId.SIEGE);
for (L2Character obj : effector.getKnownList().getKnownCharactersInRadius(200))
{
if (((obj.isAttackable() || obj.isPlayable()) && !obj.isDoor()) && Skill.checkForAreaOffensiveSkills(effector, obj, _skill.getSkill(), srcInArena) && !_affectedObjects.contains(obj))
if ((obj.isAttackable() || obj.isPlayable()) && !obj.isDoor() && Skill.checkForAreaOffensiveSkills(effector, obj, _skill.getSkill(), srcInArena) && !_affectedObjects.contains(obj))
{
_affectedObjects.add(obj);
_skill.getSkill().applyEffects(effector, obj);
@@ -159,7 +159,7 @@ public final class TriggerForce extends AbstractEffect
}
if (!member.getEffectList().isAffectedBySkill(_skill.getSkillId()) && (member.calculateDistance(effector, true, false) < 900) && (_skill.getSkillId() != RAGE_AURA) && (_skill.getSkillId() != ROLLING_THUNDER))
{
if ((member != effector))
if (member != effector)
{
_skill.getSkill().applyEffects(effector, member);
}
@@ -234,13 +234,13 @@ public final class TriggerForce extends AbstractEffect
activeForces++;
}
if (((activeForces < 4) || ((member.getEffectList().getBuffInfoBySkillId(AEORE_FORCE) == null) || (member.getEffectList().getBuffInfoBySkillId(SIGEL_FORCE) == null))) && (member.getEffectList().getBuffInfoBySkillId(PARTY_SOLIDARITY) != null))
if (((activeForces < 4) || (member.getEffectList().getBuffInfoBySkillId(AEORE_FORCE) == null) || (member.getEffectList().getBuffInfoBySkillId(SIGEL_FORCE) == null)) && (member.getEffectList().getBuffInfoBySkillId(PARTY_SOLIDARITY) != null))
{
member.getEffectList().remove(true, member.getEffectList().getBuffInfoBySkillId(PARTY_SOLIDARITY));
}
if ((activeForces >= 4) && (member.getEffectList().getBuffInfoBySkillId(AEORE_FORCE) != null) && (member.getEffectList().getBuffInfoBySkillId(SIGEL_FORCE) != null) && (!member.getEffectList().isAffectedBySkill(PARTY_SOLIDARITY) || (member.getEffectList().getBuffInfoBySkillId(PARTY_SOLIDARITY).getSkill().getLevel() != Math.min((activeForces - 3), 3))))
if ((activeForces >= 4) && (member.getEffectList().getBuffInfoBySkillId(AEORE_FORCE) != null) && (member.getEffectList().getBuffInfoBySkillId(SIGEL_FORCE) != null) && (!member.getEffectList().isAffectedBySkill(PARTY_SOLIDARITY) || (member.getEffectList().getBuffInfoBySkillId(PARTY_SOLIDARITY).getSkill().getLevel() != Math.min(activeForces - 3, 3))))
{
member.makeTriggerCast(SkillData.getInstance().getSkill(PARTY_SOLIDARITY, Math.min((activeForces - 3), 3)), member);
member.makeTriggerCast(SkillData.getInstance().getSkill(PARTY_SOLIDARITY, Math.min(activeForces - 3, 3)), member);
}
}
}

View File

@@ -84,7 +84,7 @@ public final class TriggerSkillByAttack extends AbstractEffect
public void onAttackEvent(OnCreatureDamageDealt event)
{
if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLvl() == 0)))
if (event.isDamageOverTime() || (_chance == 0) || (_skill.getSkillId() == 0) || (_skill.getSkillLvl() == 0))
{
return;
}
@@ -130,7 +130,7 @@ public final class TriggerSkillByAttack extends AbstractEffect
}
if (!((L2Character) triggerTarget).isInvul())
{
event.getAttacker().makeTriggerCast(triggerSkill, ((L2Character) triggerTarget));
event.getAttacker().makeTriggerCast(triggerSkill, (L2Character) triggerTarget);
}
}
}

View File

@@ -59,7 +59,7 @@ public final class TriggerSkillByAvoid extends AbstractEffect
public void onAvoidEvent(OnCreatureAttackAvoid event)
{
if (event.isDamageOverTime() || (_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLvl() == 0)))
if (event.isDamageOverTime() || (_chance == 0) || (_skill.getSkillId() == 0) || (_skill.getSkillLvl() == 0))
{
return;
}
@@ -85,7 +85,7 @@ public final class TriggerSkillByAvoid extends AbstractEffect
}
if (!((L2Character) triggerTarget).isInvul())
{
event.getTarget().makeTriggerCast(triggerSkill, ((L2Character) triggerTarget));
event.getTarget().makeTriggerCast(triggerSkill, (L2Character) triggerTarget);
}
}
}

View File

@@ -98,7 +98,7 @@ public final class TriggerSkillByDamage extends AbstractEffect
}
if (!((L2Character) triggerTarget).isInvul())
{
event.getTarget().makeTriggerCast(triggerSkill, ((L2Character) triggerTarget));
event.getTarget().makeTriggerCast(triggerSkill, (L2Character) triggerTarget);
}
}
}

View File

@@ -62,7 +62,7 @@ public final class TriggerSkillBySkill extends AbstractEffect
public void onSkillUseEvent(OnCreatureSkillUse event)
{
if ((_chance == 0) || ((_skill.getSkillId() == 0) || (_skill.getSkillLvl() == 0) || ((_castSkillId == 0) && (_skill.getSkillId() != AQUAMARINE))))
if ((_chance == 0) || (_skill.getSkillId() == 0) || (_skill.getSkillLvl() == 0) || ((_castSkillId == 0) && (_skill.getSkillId() != AQUAMARINE)))
{
return;
}
@@ -93,7 +93,7 @@ public final class TriggerSkillBySkill extends AbstractEffect
}
if (!((L2Character) triggerTarget).isInvul())
{
event.getCaster().makeTriggerCast(triggerSkill, ((L2Character) triggerTarget));
event.getCaster().makeTriggerCast(triggerSkill, (L2Character) triggerTarget);
}
}
}

View File

@@ -45,11 +45,7 @@ public final class Unsummon extends AbstractEffect
public boolean calcSuccess(BuffInfo info)
{
final int magicLevel = info.getSkill().getMagicLevel();
if (((magicLevel <= 0) || ((info.getEffected().getLevel() - 9) <= magicLevel)) && ((_chance * Formulas.calcAttributeBonus(info.getEffector(), info.getEffected(), info.getSkill()) * Formulas.calcGeneralTraitBonus(info.getEffector(), info.getEffected(), info.getSkill().getTraitType(), false)) > (Rnd.nextDouble() * 100)))
{
return true;
}
return false;
return ((magicLevel <= 0) || ((info.getEffected().getLevel() - 9) <= magicLevel)) && ((_chance * Formulas.calcAttributeBonus(info.getEffector(), info.getEffected(), info.getSkill()) * Formulas.calcGeneralTraitBonus(info.getEffector(), info.getEffected(), info.getSkill().getTraitType(), false)) > (Rnd.nextDouble() * 100));
}
@Override

View File

@@ -117,15 +117,15 @@ public class BeastSoulShot implements IItemHandler
{
pet.setChargedShot(ShotType.SOULSHOTS, true);
// Visual effect change if player has equipped Ruby lvl 3 or higher
if ((activeOwner.getInventory().getItemByItemId(38859) != null) && (activeOwner.getInventory().getItemByItemId(38859).isEquipped()))
if ((activeOwner.getInventory().getItemByItemId(38859) != null) && activeOwner.getInventory().getItemByItemId(38859).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(pet, pet, 17817, 1, 0, 0), 600);
}
else if ((activeOwner.getInventory().getItemByItemId(38858) != null) && (activeOwner.getInventory().getItemByItemId(38858).isEquipped()))
else if ((activeOwner.getInventory().getItemByItemId(38858) != null) && activeOwner.getInventory().getItemByItemId(38858).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(pet, pet, 17816, 1, 0, 0), 600);
}
else if ((activeOwner.getInventory().getItemByItemId(38857) != null) && (activeOwner.getInventory().getItemByItemId(38857).isEquipped()))
else if ((activeOwner.getInventory().getItemByItemId(38857) != null) && activeOwner.getInventory().getItemByItemId(38857).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(pet, pet, 17815, 1, 0, 0), 600);
}

View File

@@ -68,7 +68,7 @@ public class BeastSpiritShot implements IItemHandler
}
final int itemId = item.getId();
final boolean isBlessed = ((itemId == 6647) || (itemId == 20334)); // TODO: Unhardcode these!
final boolean isBlessed = (itemId == 6647) || (itemId == 20334); // TODO: Unhardcode these!
final SkillHolder[] skills = item.getItem().getSkills();
final ShotType shotType = isBlessed ? ShotType.BLESSED_SPIRITSHOTS : ShotType.SPIRITSHOTS;
@@ -119,15 +119,15 @@ public class BeastSpiritShot implements IItemHandler
{
pet.setChargedShot(shotType, true);
// Visual effect change if player has equipped Sapphire lvl 3 or higher
if ((activeOwner.getInventory().getItemByItemId(38931) != null) && (activeOwner.getInventory().getItemByItemId(38931).isEquipped()))
if ((activeOwner.getInventory().getItemByItemId(38931) != null) && activeOwner.getInventory().getItemByItemId(38931).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(pet, pet, 17821, 2, 0, 0), 600);
}
else if ((activeOwner.getInventory().getItemByItemId(38930) != null) && (activeOwner.getInventory().getItemByItemId(38930).isEquipped()))
else if ((activeOwner.getInventory().getItemByItemId(38930) != null) && activeOwner.getInventory().getItemByItemId(38930).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(pet, pet, 17820, 2, 0, 0), 600);
}
else if ((activeOwner.getInventory().getItemByItemId(38929) != null) && (activeOwner.getInventory().getItemByItemId(38929).isEquipped()))
else if ((activeOwner.getInventory().getItemByItemId(38929) != null) && activeOwner.getInventory().getItemByItemId(38929).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUse(pet, pet, 17819, 2, 0, 0), 600);
}

View File

@@ -97,15 +97,15 @@ public class BlessedSpiritShot implements IItemHandler
activeChar.sendPacket(SystemMessageId.YOUR_SPIRITSHOT_HAS_BEEN_ENABLED);
activeChar.setChargedShot(ShotType.BLESSED_SPIRITSHOTS, true);
// Visual effect change if player has equipped Sapphire lvl 3 or higher
if ((activeChar.getInventory().getItemByItemId(38931) != null) && (activeChar.getInventory().getItemByItemId(38931).isEquipped()))
if ((activeChar.getInventory().getItemByItemId(38931) != null) && activeChar.getInventory().getItemByItemId(38931).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, 17821, 2, 0, 0), 600);
}
else if ((activeChar.getInventory().getItemByItemId(38930) != null) && (activeChar.getInventory().getItemByItemId(38930).isEquipped()))
else if ((activeChar.getInventory().getItemByItemId(38930) != null) && activeChar.getInventory().getItemByItemId(38930).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, 17820, 2, 0, 0), 600);
}
else if ((activeChar.getInventory().getItemByItemId(38929) != null) && (activeChar.getInventory().getItemByItemId(38929).isEquipped()))
else if ((activeChar.getInventory().getItemByItemId(38929) != null) && activeChar.getInventory().getItemByItemId(38929).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, 17819, 2, 0, 0), 600);
}

View File

@@ -44,14 +44,13 @@ public class Bypass implements IItemHandler
if (content == null)
{
html.setHtml("<html><body>My Text is missing:<br>" + filename + "</body></html>");
activeChar.sendPacket(html);
}
else
{
html.setHtml(content);
html.replace("%itemId%", String.valueOf(item.getObjectId()));
activeChar.sendPacket(html);
}
activeChar.sendPacket(html);
return true;
}
}

View File

@@ -199,25 +199,24 @@ public class ExtractableItems implements IItemHandler
private void sendMessage(L2PcInstance player, L2ItemInstance item)
{
final SystemMessage sm;
if (item.getCount() > 1)
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_OBTAINED_S2_S1);
sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_OBTAINED_S2_S1);
sm.addItemName(item);
sm.addLong(item.getCount());
player.sendPacket(sm);
}
else if (item.getEnchantLevel() > 0)
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_OBTAINED_A_S1_S2);
sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_OBTAINED_A_S1_S2);
sm.addInt(item.getEnchantLevel());
sm.addItemName(item);
player.sendPacket(sm);
}
else
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_OBTAINED_S1);
sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_OBTAINED_S1);
sm.addItemName(item);
player.sendPacket(sm);
}
player.sendPacket(sm);
}
}

View File

@@ -74,20 +74,17 @@ public class FatedSupportBox implements IItemHandler
{
player.addItem(getClass().getSimpleName(), 37316, 1, player, true);
}
else if (CategoryData.getInstance().isInCategory(CategoryType.SUB_GROUP_ROGUE, classId.getId()))
{
player.addItem(getClass().getSimpleName(), 37318, 1, player, true);
}
else if (CategoryData.getInstance().isInCategory(CategoryType.SUB_GROUP_KNIGHT, classId.getId()))
{
player.addItem(getClass().getSimpleName(), 37315, 1, player, true);
}
else
{
if (CategoryData.getInstance().isInCategory(CategoryType.SUB_GROUP_ROGUE, classId.getId()))
{
player.addItem(getClass().getSimpleName(), 37318, 1, player, true);
}
else if (CategoryData.getInstance().isInCategory(CategoryType.SUB_GROUP_KNIGHT, classId.getId()))
{
player.addItem(getClass().getSimpleName(), 37315, 1, player, true);
}
else
{
player.addItem(getClass().getSimpleName(), 37317, 1, player, true);
}
player.addItem(getClass().getSimpleName(), 37317, 1, player, true);
}
break;
}

View File

@@ -64,14 +64,14 @@ public class Recipes implements IItemHandler
if (rp.isDwarvenRecipe())
{
canCraft = activeChar.hasDwarvenCraft();
recipeLevel = (rp.getLevel() > activeChar.getDwarvenCraft());
recipeLimit = (activeChar.getDwarvenRecipeBook().length >= activeChar.getDwarfRecipeLimit());
recipeLevel = rp.getLevel() > activeChar.getDwarvenCraft();
recipeLimit = activeChar.getDwarvenRecipeBook().length >= activeChar.getDwarfRecipeLimit();
}
else
{
canCraft = activeChar.hasCommonCraft();
recipeLevel = (rp.getLevel() > activeChar.getCommonCraft());
recipeLimit = (activeChar.getCommonRecipeBook().length >= activeChar.getCommonRecipeLimit());
recipeLevel = rp.getLevel() > activeChar.getCommonCraft();
recipeLimit = activeChar.getCommonRecipeBook().length >= activeChar.getCommonRecipeLimit();
}
if (!canCraft)

View File

@@ -111,15 +111,15 @@ public class SoulShots implements IItemHandler
// Send message to client
activeChar.sendPacket(SystemMessageId.YOUR_SOULSHOTS_ARE_ENABLED);
// Visual effect change if player has equipped Ruby lvl 3 or higher
if ((activeChar.getInventory().getItemByItemId(38859) != null) && (activeChar.getInventory().getItemByItemId(38859).isEquipped()))
if ((activeChar.getInventory().getItemByItemId(38859) != null) && activeChar.getInventory().getItemByItemId(38859).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, 17817, 1, 0, 0), 600);
}
else if ((activeChar.getInventory().getItemByItemId(38858) != null) && (activeChar.getInventory().getItemByItemId(38858).isEquipped()))
else if ((activeChar.getInventory().getItemByItemId(38858) != null) && activeChar.getInventory().getItemByItemId(38858).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, 17816, 1, 0, 0), 600);
}
else if ((activeChar.getInventory().getItemByItemId(38857) != null) && (activeChar.getInventory().getItemByItemId(38857).isEquipped()))
else if ((activeChar.getInventory().getItemByItemId(38857) != null) && activeChar.getInventory().getItemByItemId(38857).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, 17815, 1, 0, 0), 600);
}

View File

@@ -98,15 +98,15 @@ public class SpiritShot implements IItemHandler
// Send message to client
activeChar.sendPacket(SystemMessageId.YOUR_SPIRITSHOT_HAS_BEEN_ENABLED);
// Visual effect change if player has equipped Sapphire lvl 3 or higher
if ((activeChar.getInventory().getItemByItemId(38931) != null) && (activeChar.getInventory().getItemByItemId(38931).isEquipped()))
if ((activeChar.getInventory().getItemByItemId(38931) != null) && activeChar.getInventory().getItemByItemId(38931).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, 17821, 1, 0, 0), 600);
}
else if ((activeChar.getInventory().getItemByItemId(38930) != null) && (activeChar.getInventory().getItemByItemId(38930).isEquipped()))
else if ((activeChar.getInventory().getItemByItemId(38930) != null) && activeChar.getInventory().getItemByItemId(38930).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, 17820, 1, 0, 0), 600);
}
else if ((activeChar.getInventory().getItemByItemId(38929) != null) && (activeChar.getInventory().getItemByItemId(38929).isEquipped()))
else if ((activeChar.getInventory().getItemByItemId(38929) != null) && activeChar.getInventory().getItemByItemId(38929).isEquipped())
{
Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUse(activeChar, activeChar, 17819, 1, 0, 0), 600);
}

View File

@@ -126,7 +126,7 @@ public class ChatBanHandler implements IPunishmentHandler
*/
private static void applyToPlayer(PunishmentTask task, L2PcInstance player)
{
final long delay = ((task.getExpirationTime() - System.currentTimeMillis()) / 1000);
final long delay = (task.getExpirationTime() - System.currentTimeMillis()) / 1000;
if (delay > 0)
{
player.sendMessage("You've been chat banned for " + (delay > 60 ? ((delay / 60) + " minutes.") : delay + " seconds."));

View File

@@ -186,7 +186,7 @@ public class JailHandler implements IPunishmentHandler
player.sendPacket(msg);
if (task != null)
{
final long delay = ((task.getExpirationTime() - System.currentTimeMillis()) / 1000);
final long delay = (task.getExpirationTime() - System.currentTimeMillis()) / 1000;
if (delay > 0)
{
player.sendMessage("You've been jailed for " + (delay > 60 ? ((delay / 60) + " minutes.") : delay + " seconds."));

View File

@@ -38,14 +38,14 @@ public class Area implements ITargetTypeHandler
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
{
final List<L2Character> targetList = new ArrayList<>();
if ((target == null) || (((target == activeChar) || target.isAlikeDead()) && (skill.getCastRange() >= 0)) || (!(target.isAttackable() || target.isPlayable())))
if ((target == null) || (((target == activeChar) || target.isAlikeDead()) && (skill.getCastRange() >= 0)) || (!target.isAttackable() && !target.isPlayable()))
{
activeChar.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
return EMPTY_TARGET_LIST;
}
final L2Character origin;
final boolean srcInArena = (activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE));
final boolean srcInArena = activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE);
if (skill.getCastRange() >= 0)
{
@@ -74,7 +74,7 @@ public class Area implements ITargetTypeHandler
final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
for (L2Character obj : objs)
{
if (!(obj.isAttackable() || obj.isPlayable()) || (obj == origin))
if ((!obj.isAttackable() && !obj.isPlayable()) || (obj == origin))
{
continue;
}

View File

@@ -58,7 +58,7 @@ public class AreaCorpseMob implements ITargetTypeHandler
final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharacters();
for (L2Character obj : objs)
{
if (!(obj.isAttackable() || obj.isPlayable()) || !Util.checkIfInRange(skill.getAffectRange(), target, obj, true))
if ((!obj.isAttackable() && !obj.isPlayable()) || !Util.checkIfInRange(skill.getAffectRange(), target, obj, true))
{
continue;
}

View File

@@ -167,7 +167,7 @@ public class AreaFriendly implements ITargetTypeHandler
@Override
public int compare(L2Character char1, L2Character char2)
{
return Double.compare((char1.getCurrentHp() / char1.getMaxHp()), (char2.getCurrentHp() / char2.getMaxHp()));
return Double.compare(char1.getCurrentHp() / char1.getMaxHp(), char2.getCurrentHp() / char2.getMaxHp());
}
}

View File

@@ -50,7 +50,7 @@ public class AreaSummon implements ITargetTypeHandler
};
}
final boolean srcInArena = (activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE));
final boolean srcInArena = activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE);
final Collection<L2Character> objs = target.getKnownList().getKnownCharacters();
final int maxTargets = skill.getAffectLimit();
@@ -66,7 +66,7 @@ public class AreaSummon implements ITargetTypeHandler
continue;
}
if (!(obj.isAttackable() || obj.isPlayable()))
if (!obj.isAttackable() && !obj.isPlayable())
{
continue;
}

View File

@@ -37,7 +37,7 @@ public class Aura implements ITargetTypeHandler
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
{
final List<L2Character> targetList = new ArrayList<>();
final boolean srcInArena = (activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE));
final boolean srcInArena = activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE);
for (L2Character obj : activeChar.getKnownList().getKnownCharactersInRadius(skill.getAffectRange()))
{
if (obj.isDoor() || obj.isAttackable() || obj.isPlayable())

View File

@@ -38,14 +38,14 @@ public class BehindArea implements ITargetTypeHandler
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
{
final List<L2Character> targetList = new ArrayList<>();
if ((target == null) || (((target == activeChar) || target.isAlikeDead()) && (skill.getCastRange() >= 0)) || (!(target.isAttackable() || target.isPlayable())))
if ((target == null) || (((target == activeChar) || target.isAlikeDead()) && (skill.getCastRange() >= 0)) || (!target.isAttackable() && !target.isPlayable()))
{
activeChar.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
return EMPTY_TARGET_LIST;
}
final L2Character origin;
final boolean srcInArena = (activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE));
final boolean srcInArena = activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE);
if (skill.getCastRange() >= 0)
{
@@ -74,7 +74,7 @@ public class BehindArea implements ITargetTypeHandler
final int maxTargets = skill.getAffectLimit();
for (L2Character obj : objs)
{
if (!(obj.isAttackable() || obj.isPlayable()))
if (!obj.isAttackable() && !obj.isPlayable())
{
continue;
}

View File

@@ -36,7 +36,7 @@ public class BehindAura implements ITargetTypeHandler
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
{
final List<L2Character> targetList = new ArrayList<>();
final boolean srcInArena = (activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE));
final boolean srcInArena = activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE);
final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getAffectRange());
final int maxTargets = skill.getAffectLimit();
for (L2Character obj : objs)

View File

@@ -38,14 +38,14 @@ public class FrontArea implements ITargetTypeHandler
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
{
final List<L2Character> targetList = new ArrayList<>();
if ((target == null) || (((target == activeChar) || target.isAlikeDead()) && (skill.getCastRange() >= 0)) || (!(target.isAttackable() || target.isPlayable())))
if ((target == null) || (((target == activeChar) || target.isAlikeDead()) && (skill.getCastRange() >= 0)) || (!target.isAttackable() && !target.isPlayable()))
{
activeChar.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
return EMPTY_TARGET_LIST;
}
final L2Character origin;
final boolean srcInArena = (activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE));
final boolean srcInArena = activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE);
if (skill.getCastRange() >= 0)
{
@@ -74,7 +74,7 @@ public class FrontArea implements ITargetTypeHandler
final int maxTargets = skill.getAffectLimit();
for (L2Character obj : objs)
{
if (!(obj.isAttackable() || obj.isPlayable()))
if (!obj.isAttackable() && !obj.isPlayable())
{
continue;
}

View File

@@ -36,7 +36,7 @@ public class FrontAura implements ITargetTypeHandler
public L2Object[] getTargetList(Skill skill, L2Character activeChar, boolean onlyFirst, L2Character target)
{
final List<L2Character> targetList = new ArrayList<>();
final boolean srcInArena = (activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE));
final boolean srcInArena = activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE);
final Collection<L2Character> objs = activeChar.getKnownList().getKnownCharactersInRadius(skill.getAffectRange());
final int maxTargets = skill.getAffectLimit();
for (L2Character obj : objs)

View File

@@ -39,7 +39,7 @@ public class Ground implements ITargetTypeHandler
final List<L2Character> targetList = new ArrayList<>();
final L2PcInstance player = (L2PcInstance) activeChar;
final int maxTargets = skill.getAffectLimit();
final boolean srcInArena = (activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE));
final boolean srcInArena = activeChar.isInsideZone(ZoneId.PVP) && !activeChar.isInsideZone(ZoneId.SIEGE);
for (L2Character character : activeChar.getKnownList().getKnownCharacters())
{

View File

@@ -72,7 +72,7 @@ public class PartyClan implements ITargetTypeHandler
});
// if player in clan and not in party
if (!(hasClan || hasParty))
if (!hasClan && !hasParty)
{
return targetList.toArray(new L2Character[targetList.size()]);
}
@@ -117,7 +117,7 @@ public class PartyClan implements ITargetTypeHandler
}
}
if (!((hasClan && (obj.getClanId() == player.getClanId())) || (hasParty && obj.isInParty() && (player.getParty().getLeaderObjectId() == obj.getParty().getLeaderObjectId()))))
if ((!hasClan || (obj.getClanId() != player.getClanId())) && (!hasParty || !obj.isInParty() || (player.getParty().getLeaderObjectId() != obj.getParty().getLeaderObjectId())))
{
continue;
}

View File

@@ -36,7 +36,7 @@ public class PartyMember implements ITargetTypeHandler
activeChar.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
return EMPTY_TARGET_LIST;
}
if (!target.isDead() && ((target == activeChar) || (activeChar.isInParty() && target.isInParty() && (activeChar.getParty().getLeaderObjectId() == target.getParty().getLeaderObjectId())) || ((activeChar.isPlayer() && target.isSummon() && ((activeChar.getPet() == target) || activeChar.hasServitor(target.getObjectId()))) || (activeChar.isSummon() && target.isPlayer() && ((activeChar == target.getPet()) || target.hasServitor(activeChar.getObjectId()))))))
if (!target.isDead() && ((target == activeChar) || (activeChar.isInParty() && target.isInParty() && (activeChar.getParty().getLeaderObjectId() == target.getParty().getLeaderObjectId())) || (activeChar.isPlayer() && target.isSummon() && ((activeChar.getPet() == target) || activeChar.hasServitor(target.getObjectId()))) || (activeChar.isSummon() && target.isPlayer() && ((activeChar == target.getPet()) || target.hasServitor(activeChar.getObjectId())))))
{
return new L2Character[]
{

View File

@@ -51,7 +51,7 @@ public class TargetParty implements ITargetTypeHandler
{
for (L2PcInstance partyMember : player.getParty().getMembers())
{
if ((partyMember == null))
if (partyMember == null)
{
continue;
}

Some files were not shown because too many files have changed in this diff Show More