Separated multiple variable declarations.

This commit is contained in:
MobiusDev
2018-09-09 23:01:15 +00:00
parent d33bfa17b2
commit 0f430720db
881 changed files with 3909 additions and 1507 deletions

View File

@@ -128,7 +128,8 @@ public final class Parade extends AbstractNpcAI
public Parade() public Parade()
{ {
// Starts at 8:00 and repeats every 6 hours. // Starts at 8:00 and repeats every 6 hours.
final long diff = timeLeftMilli(8, 0, 0), cycle = 3600000; final long diff = timeLeftMilli(8, 0, 0);
final long cycle = 3600000;
ThreadPool.scheduleAtFixedRate(new Start(), diff, cycle); ThreadPool.scheduleAtFixedRate(new Start(), diff, cycle);
// Test - Starts 3 minutes after server startup and repeats every 20 minutes. // Test - Starts 3 minutes after server startup and repeats every 20 minutes.

View File

@@ -288,7 +288,8 @@ public final class TalentShow extends AbstractNpcAI
final int gameTime = GameTimeController.getInstance().getGameTime(); final int gameTime = GameTimeController.getInstance().getGameTime();
final int hours = (gameTime / 60) % 24; final int hours = (gameTime / 60) % 24;
final int minutes = gameTime % 60; final int minutes = gameTime % 60;
int hourDiff, minDiff; int hourDiff;
int minDiff;
hourDiff = 20 - hours; hourDiff = 20 - hours;
if (hourDiff < 0) if (hourDiff < 0)
{ {

View File

@@ -915,7 +915,8 @@ public class Lindvior extends AbstractNpcAI
private void spawnServitor(int count, int radius, Location loc, int... npcIds) private void spawnServitor(int count, int radius, Location loc, int... npcIds)
{ {
int x = loc.getX(), y = loc.getY(); int x = loc.getX();
int y = loc.getY();
if (radius > 0) if (radius > 0)
{ {
x += Rnd.get(-radius, radius); x += Rnd.get(-radius, radius);

View File

@@ -775,9 +775,8 @@ public class AdminEditChar implements IAdminCommandHandler
{ {
final String val = command.substring(20); final String val = command.substring(20);
final int level = Integer.parseInt(val); final int level = Integer.parseInt(val);
long newexp, oldexp = 0; final long oldexp = pet.getStat().getExp();
oldexp = pet.getStat().getExp(); final long newexp = pet.getStat().getExpForLevel(level);
newexp = pet.getStat().getExpForLevel(level);
if (oldexp > newexp) if (oldexp > newexp)
{ {
pet.getStat().removeExp(oldexp - newexp); pet.getStat().removeExp(oldexp - newexp);
@@ -1309,7 +1308,7 @@ public class AdminEditChar implements IAdminCommandHandler
int CharactersFound = 0; int CharactersFound = 0;
L2GameClient client; L2GameClient client;
String name, ip = "0.0.0.0"; String ip = "0.0.0.0";
final StringBuilder replyMSG = new StringBuilder(1000); final StringBuilder replyMSG = new StringBuilder(1000);
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
adminReply.setFile(activeChar, "data/html/admin/ipfind.htm"); adminReply.setFile(activeChar, "data/html/admin/ipfind.htm");
@@ -1345,7 +1344,7 @@ public class AdminEditChar implements IAdminCommandHandler
} }
} }
name = player.getName(); final String name = player.getName();
CharactersFound += 1; CharactersFound += 1;
replyMSG.append("<tr><td width=80><a action=\"bypass -h admin_character_info "); replyMSG.append("<tr><td width=80><a action=\"bypass -h admin_character_info ");
replyMSG.append(name); replyMSG.append(name);

View File

@@ -567,7 +567,8 @@ public class AdminEffects implements IAdminCommandHandler
try try
{ {
L2Object obj = activeChar.getTarget(); L2Object obj = activeChar.getTarget();
int level = 1, hittime = 1; int level = 1;
int hittime = 1;
final int skill = Integer.parseInt(st.nextToken()); final int skill = Integer.parseInt(st.nextToken());
if (st.hasMoreTokens()) if (st.hasMoreTokens())
{ {

View File

@@ -140,7 +140,8 @@ public class AdminElement implements IAdminCommandHandler
if (itemInstance != null) if (itemInstance != null)
{ {
String old, current; String old;
String current;
final AttributeHolder element = itemInstance.getAttribute(type); final AttributeHolder element = itemInstance.getAttribute(type);
if (element == null) if (element == null)
{ {

View File

@@ -194,7 +194,10 @@ public class AdminQuest implements IAdminCommandHandler
{ {
final String questName = command.substring("admin_quest_info ".length()); final String questName = command.substring("admin_quest_info ".length());
final Quest quest = QuestManager.getInstance().getQuest(questName); final Quest quest = QuestManager.getInstance().getQuest(questName);
String events = "", npcs = "", items = "", timers = ""; String events = "";
String npcs = "";
String items = "";
String timers = "";
int counter = 0; int counter = 0;
if (quest == null) if (quest == null)
{ {

View File

@@ -231,7 +231,9 @@ public class AdminTeleport implements IAdminCommandHandler
else if (command.startsWith("admin_go")) else if (command.startsWith("admin_go"))
{ {
int intVal = 150; int intVal = 150;
int x = activeChar.getX(), y = activeChar.getY(), z = activeChar.getZ(); int x = activeChar.getX();
int y = activeChar.getY();
int z = activeChar.getZ();
try try
{ {
final String val = command.substring(8); final String val = command.substring(8);

View File

@@ -38,7 +38,8 @@ public class VoiceCommand implements IBypassHandler
// only voice commands allowed // only voice commands allowed
if ((command.length() > 7) && (command.charAt(6) == '.')) if ((command.length() > 7) && (command.charAt(6) == '.'))
{ {
final String vc, vparams; final String vc;
final String vparams;
final int endOfCommand = command.indexOf(" ", 7); final int endOfCommand = command.indexOf(" ", 7);
if (endOfCommand > 0) if (endOfCommand > 0)
{ {

View File

@@ -253,7 +253,8 @@ public class Debug implements ITelnetCommand
static String getServerStatus() static String getServerStatus()
{ {
int playerCount = 0, objectCount = 0; int playerCount = 0;
int objectCount = 0;
final int max = LoginServerThread.getInstance().getMaxPlayer(); final int max = LoginServerThread.getInstance().getMaxPlayer();
playerCount = L2World.getInstance().getPlayers().size(); playerCount = L2World.getInstance().getPlayers().size();

View File

@@ -46,7 +46,9 @@ public class ChangePassword implements IVoicedCommandHandler
final StringTokenizer st = new StringTokenizer(target); final StringTokenizer st = new StringTokenizer(target);
try try
{ {
String curpass = null, newpass = null, repeatnewpass = null; String curpass = null;
String newpass = null;
String repeatnewpass = null;
if (st.hasMoreTokens()) if (st.hasMoreTokens())
{ {
curpass = st.nextToken(); curpass = st.nextToken();

View File

@@ -1083,7 +1083,10 @@ public final class BlowfishEngine
private static final int BLOCK_SIZE = 8; // bytes = 64 bits private static final int BLOCK_SIZE = 8; // bytes = 64 bits
private static final int SBOX_SK = 256; private static final int SBOX_SK = 256;
private static final int P_SZ = ROUNDS + 2; private static final int P_SZ = ROUNDS + 2;
private final int[] S0, S1, S2, S3; // the s-boxes private final int[] S0; // the s-boxes
private final int[] S1; // the s-boxes
private final int[] S2; // the s-boxes
private final int[] S3; // the s-boxes
private final int[] P; // the p-array private final int[] P; // the p-array
private byte[] workingKey = null; private byte[] workingKey = null;

View File

@@ -140,7 +140,8 @@ public final class GameTimeController extends Thread
{ {
LOGGER.info(getClass().getSimpleName() + ": Started."); LOGGER.info(getClass().getSimpleName() + ": Started.");
long nextTickTime, sleepTime; long nextTickTime;
long sleepTime;
boolean isNight = isNight(); boolean isNight = isNight();
EventDispatcher.getInstance().notifyEventAsync(new OnDayNightChange(isNight)); EventDispatcher.getInstance().notifyEventAsync(new OnDayNightChange(isNight));

View File

@@ -30,7 +30,8 @@ public class MonsterRace
private final L2Npc[] _monsters; private final L2Npc[] _monsters;
private int[][] _speeds; private int[][] _speeds;
private final int[] _first, _second; private final int[] _first;
private final int[] _second;
protected MonsterRace() protected MonsterRace()
{ {

View File

@@ -544,9 +544,8 @@ public class L2AttackableAI extends L2CharacterAI
if (npc.calculateDistanceSq2D(leader) > (offset * offset)) if (npc.calculateDistanceSq2D(leader) > (offset * offset))
{ {
int x1, y1, z1; int x1 = Rnd.get(minRadius * 2, offset * 2); // x
x1 = Rnd.get(minRadius * 2, offset * 2); // x int y1 = Rnd.get(x1, offset * 2); // distance
y1 = Rnd.get(x1, offset * 2); // distance
y1 = (int) Math.sqrt((y1 * y1) - (x1 * x1)); // y y1 = (int) Math.sqrt((y1 * y1) - (x1 * x1)); // y
if (x1 > (offset + minRadius)) if (x1 > (offset + minRadius))
{ {
@@ -565,9 +564,8 @@ public class L2AttackableAI extends L2CharacterAI
y1 = (leader.getY() - y1) + minRadius; y1 = (leader.getY() - y1) + minRadius;
} }
z1 = leader.getZ();
// Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast) // Move the actor to Location (x,y,z) server side AND client side by sending Server->Client packet CharMoveToLocation (broadcast)
moveTo(x1, y1, z1); moveTo(x1, y1, leader.getZ());
return; return;
} }
else if (Rnd.nextInt(RANDOM_WALK_RATE) == 0) else if (Rnd.nextInt(RANDOM_WALK_RATE) == 0)

View File

@@ -70,7 +70,8 @@ public class L2CharacterAI extends AbstractAI
public static class IntentionCommand public static class IntentionCommand
{ {
protected final CtrlIntention _crtlIntention; protected final CtrlIntention _crtlIntention;
protected final Object _arg0, _arg1; protected final Object _arg0;
protected final Object _arg1;
protected IntentionCommand(CtrlIntention pIntention, Object pArg0, Object pArg1) protected IntentionCommand(CtrlIntention pIntention, Object pArg0, Object pArg1)
{ {

View File

@@ -121,12 +121,11 @@ public final class DoorData implements IGameXmlReader
// Insert Collision data // Insert Collision data
if (set.contains("nodeX_0") && set.contains("nodeY_0") && set.contains("nodeX_1") && set.contains("nodeX_1")) if (set.contains("nodeX_0") && set.contains("nodeY_0") && set.contains("nodeX_1") && set.contains("nodeX_1"))
{ {
int posX, posY, nodeX, nodeY, height; final int height = set.getInt("height", 150);
height = set.getInt("height", 150); final int nodeX = set.getInt("nodeX_0");
nodeX = set.getInt("nodeX_0"); final int nodeY = set.getInt("nodeY_0");
nodeY = set.getInt("nodeY_0"); final int posX = set.getInt("nodeX_1");
posX = set.getInt("nodeX_1"); final int posY = set.getInt("nodeX_1");
posY = set.getInt("nodeX_1");
int collisionRadius; // (max) radius for movement checks int collisionRadius; // (max) radius for movement checks
collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY)); collisionRadius = Math.min(Math.abs(nodeX - posX), Math.abs(nodeY - posY));
if (collisionRadius < 20) if (collisionRadius < 20)

View File

@@ -568,7 +568,10 @@ public final class BotReportTable
{ {
if (qName.equals("punishment")) if (qName.equals("punishment"))
{ {
int reportCount = -1, skillId = -1, skillLevel = 1, sysMessage = -1; int reportCount = -1;
int skillId = -1;
int skillLevel = 1;
int sysMessage = -1;
try try
{ {
reportCount = Integer.parseInt(attr.getValue("neededReportCount")); reportCount = Integer.parseInt(attr.getValue("neededReportCount"));

View File

@@ -115,7 +115,8 @@ public class DBSpawnManager
final NpcSpawnTemplate spawnTemplate = spawns.get(0); final NpcSpawnTemplate spawnTemplate = spawns.get(0);
spawn.setSpawnTemplate(spawnTemplate); spawn.setSpawnTemplate(spawnTemplate);
int respawn = 0, respawnRandom = 0; int respawn = 0;
int respawnRandom = 0;
if (spawnTemplate.getRespawnTime() != null) if (spawnTemplate.getRespawnTime() != null)
{ {
respawn = (int) spawnTemplate.getRespawnTime().getSeconds(); respawn = (int) spawnTemplate.getRespawnTime().getSeconds();

View File

@@ -148,8 +148,11 @@ public final class ZoneManager implements IGameXmlReader
Node attribute; Node attribute;
String zoneName; String zoneName;
int[][] coords; int[][] coords;
int zoneId, minZ, maxZ; int zoneId;
String zoneType, zoneShape; int minZ;
int maxZ;
String zoneType;
String zoneShape;
final List<int[]> rs = new ArrayList<>(); final List<int[]> rs = new ArrayList<>();
for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())

View File

@@ -80,7 +80,10 @@ public final class L2Radar
public static class RadarMarker public static class RadarMarker
{ {
// Simple class to model radar points. // Simple class to model radar points.
public int _type, _x, _y, _z; public int _type;
public int _x;
public int _y;
public int _z;
public RadarMarker(int type, int x, int y, int z) public RadarMarker(int type, int x, int y, int z)
{ {

View File

@@ -32,7 +32,11 @@ public class L2Territory
protected static class Point protected static class Point
{ {
protected int _x, _y, _zmin, _zmax, _proc; protected int _x;
protected int _y;
protected int _zmin;
protected int _zmax;
protected int _proc;
Point(int x, int y, int zmin, int zmax, int proc) Point(int x, int y, int zmin, int zmax, int proc)
{ {

View File

@@ -63,7 +63,8 @@ public class SeedProduction
public final boolean decreaseAmount(long val) public final boolean decreaseAmount(long val)
{ {
long current, next; long current;
long next;
do do
{ {
current = _amount.get(); current = _amount.get();

View File

@@ -23,7 +23,8 @@ public class TeleportBookmark extends Location
{ {
private final int _id; private final int _id;
private int _icon; private int _icon;
private String _name, _tag; private String _name;
private String _tag;
public TeleportBookmark(int id, int x, int y, int z, int icon, String tag, String name) public TeleportBookmark(int id, int x, int y, int z, int icon, String tag, String name)
{ {

View File

@@ -394,7 +394,8 @@ public class TradeList
} }
// Synchronization order to avoid deadlock // Synchronization order to avoid deadlock
TradeList sync1, sync2; TradeList sync1;
TradeList sync2;
if (getOwner().getObjectId() > partnerList.getOwner().getObjectId()) if (getOwner().getObjectId() > partnerList.getOwner().getObjectId())
{ {
sync1 = partnerList; sync1 = partnerList;

View File

@@ -2890,7 +2890,9 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
final int yPrev = getY(); final int yPrev = getY();
int zPrev = getZ(); // the z coordinate may be modified by coordinate synchronizations int zPrev = getZ(); // the z coordinate may be modified by coordinate synchronizations
double dx, dy, dz; double dx;
double dy;
double dz;
if (Config.COORD_SYNCHRONIZE == 1) if (Config.COORD_SYNCHRONIZE == 1)
// the only method that can modify x,y while moving (otherwise _move would/should be set null) // the only method that can modify x,y while moving (otherwise _move would/should be set null)
{ {

View File

@@ -157,7 +157,8 @@ public class L2FortManagerInstance extends L2MerchantInstance
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
html.setFile(player, "data/html/fortress/foreman-castlereport.htm"); html.setFile(player, "data/html/fortress/foreman-castlereport.htm");
html.replace("%objectId%", String.valueOf(getObjectId())); html.replace("%objectId%", String.valueOf(getObjectId()));
int hour, minutes; int hour;
int minutes;
if (Config.FS_MAX_OWN_TIME > 0) if (Config.FS_MAX_OWN_TIME > 0)
{ {
hour = (int) Math.floor(getFort().getTimeTillRebelArmy() / 3600); hour = (int) Math.floor(getFort().getTimeTillRebelArmy() / 3600);

View File

@@ -352,7 +352,8 @@ public class L2RaceManagerInstance extends L2Npc
return; return;
} }
final int npcId = getTemplate().getId(); final int npcId = getTemplate().getId();
String filename, search; String filename;
String search;
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
filename = getHtmlPath(npcId, 5); filename = getHtmlPath(npcId, 5);
html.setFile(player, filename); html.setFile(player, filename);
@@ -371,7 +372,8 @@ public class L2RaceManagerInstance extends L2Npc
public void showMonsterInfo(L2PcInstance player) public void showMonsterInfo(L2PcInstance player)
{ {
final int npcId = getTemplate().getId(); final int npcId = getTemplate().getId();
String filename, search; String filename;
String search;
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
filename = getHtmlPath(npcId, 6); filename = getHtmlPath(npcId, 6);
html.setFile(player, filename); html.setFile(player, filename);
@@ -394,7 +396,9 @@ public class L2RaceManagerInstance extends L2Npc
} }
final int npcId = getTemplate().getId(); final int npcId = getTemplate().getId();
SystemMessage sm; SystemMessage sm;
String filename, search, replace; String filename;
String search;
String replace;
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
if (val < 10) if (val < 10)
{ {

View File

@@ -55,7 +55,9 @@ public final class L2TamedBeastInstance extends L2FeedableBeastInstance
private static final int DURATION_INCREASE_INTERVAL = 20000; // 20 secs (gained upon feeding) private static final int DURATION_INCREASE_INTERVAL = 20000; // 20 secs (gained upon feeding)
private static final int BUFF_INTERVAL = 5000; // 5 seconds private static final int BUFF_INTERVAL = 5000; // 5 seconds
private int _remainingTime = MAX_DURATION; private int _remainingTime = MAX_DURATION;
private int _homeX, _homeY, _homeZ; private int _homeX;
private int _homeY;
private int _homeZ;
protected L2PcInstance _owner; protected L2PcInstance _owner;
private Future<?> _buffTask = null; private Future<?> _buffTask = null;
private Future<?> _durationCheckTask = null; private Future<?> _durationCheckTask = null;

View File

@@ -319,7 +319,9 @@ public final class BlockCheckerEngine
public class StartEvent implements Runnable public class StartEvent implements Runnable
{ {
// In event used skills // In event used skills
private final Skill _freeze, _transformationRed, _transformationBlue; private final Skill _freeze;
private final Skill _transformationRed;
private final Skill _transformationBlue;
// Common and unparametizer packet // Common and unparametizer packet
private final ExCubeGameCloseUI _closeUserInterface = ExCubeGameCloseUI.STATIC_PACKET; private final ExCubeGameCloseUI _closeUserInterface = ExCubeGameCloseUI.STATIC_PACKET;
@@ -670,8 +672,10 @@ public final class BlockCheckerEngine
} }
} }
int first = 0, second = 0; int first = 0;
L2PcInstance winner1 = null, winner2 = null; int second = 0;
L2PcInstance winner1 = null;
L2PcInstance winner2 = null;
for (Entry<L2PcInstance, Integer> entry : tempPoints.entrySet()) for (Entry<L2PcInstance, Integer> entry : tempPoints.entrySet())
{ {
final L2PcInstance pc = entry.getKey(); final L2PcInstance pc = entry.getKey();

View File

@@ -124,7 +124,9 @@ public class Duel
private double _mp; private double _mp;
private double _cp; private double _cp;
private boolean _paDuel; private boolean _paDuel;
private int _x, _y, _z; private int _x;
private int _y;
private int _z;
private Set<Skill> _debuffs; private Set<Skill> _debuffs;
public PlayerCondition(L2PcInstance player, boolean partyDuel) public PlayerCondition(L2PcInstance player, boolean partyDuel)

View File

@@ -42,12 +42,16 @@ public class Message
public static final int READED = 1; public static final int READED = 1;
public static final int REJECTED = 2; public static final int REJECTED = 2;
private final int _messageId, _senderId, _receiverId; private final int _messageId;
private final int _senderId;
private final int _receiverId;
private final long _expiration; private final long _expiration;
private String _senderName = null; private String _senderName = null;
private String _receiverName = null; private String _receiverName = null;
private final String _subject, _content; private final String _subject;
private boolean _unread, _returned; private final String _content;
private boolean _unread;
private boolean _returned;
private MailType _messageType = MailType.REGULAR; private MailType _messageType = MailType.REGULAR;
private boolean _deletedBySender; private boolean _deletedBySender;
private boolean _deletedByReceiver; private boolean _deletedByReceiver;

View File

@@ -260,7 +260,8 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
// Now iterate over conditions and determine enter group data // Now iterate over conditions and determine enter group data
boolean onlyCC = false; boolean onlyCC = false;
int min = 1, max = 1; int min = 1;
int max = 1;
for (Condition cond : _conditions) for (Condition cond : _conditions)
{ {
if (cond instanceof ConditionCommandChannel) if (cond instanceof ConditionCommandChannel)

View File

@@ -363,7 +363,8 @@ public class NpcSpawnTemplate implements Cloneable, IParameterized<StatsSet>
spawn.setXYZ(loc); spawn.setXYZ(loc);
spawn.setHeading(loc.getHeading()); spawn.setHeading(loc.getHeading());
spawn.setLocation(loc); spawn.setLocation(loc);
int respawn = 0, respawnRandom = 0; int respawn = 0;
int respawnRandom = 0;
if (_respawnTime != null) if (_respawnTime != null)
{ {
respawn = (int) _respawnTime.getSeconds(); respawn = (int) _respawnTime.getSeconds();

View File

@@ -30,7 +30,8 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneForm;
*/ */
public class ZoneCuboid extends L2ZoneForm public class ZoneCuboid extends L2ZoneForm
{ {
private final int _z1, _z2; private final int _z1;
private final int _z2;
private final Rectangle _r; private final Rectangle _r;
public ZoneCuboid(int x1, int x2, int y1, int y2, int z1, int z2) public ZoneCuboid(int x1, int x2, int y1, int y2, int z1, int z2)

View File

@@ -28,7 +28,12 @@ import com.l2jmobius.gameserver.model.zone.L2ZoneForm;
*/ */
public class ZoneCylinder extends L2ZoneForm public class ZoneCylinder extends L2ZoneForm
{ {
private final int _x, _y, _z1, _z2, _rad, _radS; private final int _x;
private final int _y;
private final int _z1;
private final int _z2;
private final int _rad;
private final int _radS;
public ZoneCylinder(int x, int y, int z1, int z2, int rad) public ZoneCylinder(int x, int y, int z1, int z2, int rad)
{ {
@@ -133,12 +138,10 @@ public class ZoneCylinder extends L2ZoneForm
@Override @Override
public Location getRandomPoint() public Location getRandomPoint()
{ {
int x, y, q, r; final int q = (int) (Rnd.get() * 2 * Math.PI);
final int r = (int) Math.sqrt(Rnd.get());
q = (int) (Rnd.get() * 2 * Math.PI); final int x = (int) ((_rad * r * Math.cos(q)) + _x);
r = (int) Math.sqrt(Rnd.get()); final int y = (int) ((_rad * r * Math.sin(q)) + _y);
x = (int) ((_rad * r * Math.cos(q)) + _x);
y = (int) ((_rad * r * Math.sin(q)) + _y);
return new Location(x, y, GeoEngine.getInstance().getHeight(x, y, _z1)); return new Location(x, y, GeoEngine.getInstance().getHeight(x, y, _z1));
} }

View File

@@ -65,7 +65,8 @@ public class ZoneNPoly extends L2ZoneForm
{ {
final int[] _x = _p.xpoints; final int[] _x = _p.xpoints;
final int[] _y = _p.ypoints; final int[] _y = _p.ypoints;
double test, shortestDist = Math.pow(_x[0] - x, 2) + Math.pow(_y[0] - y, 2); double test;
double shortestDist = Math.pow(_x[0] - x, 2) + Math.pow(_y[0] - y, 2);
for (int i = 1; i < _p.npoints; i++) for (int i = 1; i < _p.npoints; i++)
{ {
@@ -111,15 +112,13 @@ public class ZoneNPoly extends L2ZoneForm
@Override @Override
public Location getRandomPoint() public Location getRandomPoint()
{ {
int x, y;
final int _minX = _p.getBounds().x; final int _minX = _p.getBounds().x;
final int _maxX = _p.getBounds().x + _p.getBounds().width; final int _maxX = _p.getBounds().x + _p.getBounds().width;
final int _minY = _p.getBounds().y; final int _minY = _p.getBounds().y;
final int _maxY = _p.getBounds().y + _p.getBounds().height; final int _maxY = _p.getBounds().y + _p.getBounds().height;
x = Rnd.get(_minX, _maxX); int x = Rnd.get(_minX, _maxX);
y = Rnd.get(_minY, _maxY); int y = Rnd.get(_minY, _maxY);
int antiBlocker = 0; int antiBlocker = 0;
while (!_p.contains(x, y) && (antiBlocker++ < 1000)) while (!_p.contains(x, y) && (antiBlocker++ < 1000))

View File

@@ -33121,7 +33121,8 @@ public final class NpcStringId
private static int parseMessageParameters(String name) private static int parseMessageParameters(String name)
{ {
int paramCount = 0; int paramCount = 0;
char c1, c2; char c1;
char c2;
for (int i = 0; i < (name.length() - 1); i++) for (int i = 0; i < (name.length() - 1); i++)
{ {
c1 = name.charAt(i); c1 = name.charAt(i);

View File

@@ -13995,7 +13995,8 @@ public final class SystemMessageId
private static int parseMessageParameters(String name) private static int parseMessageParameters(String name)
{ {
int paramCount = 0; int paramCount = 0;
char c1, c2; char c1;
char c2;
for (int i = 0; i < (name.length() - 1); i++) for (int i = 0; i < (name.length() - 1); i++)
{ {
c1 = name.charAt(i); c1 = name.charAt(i);

View File

@@ -40,7 +40,8 @@ public class RequestChangeNicknameColor implements IClientIncomingPacket
0x999999, // Silver 0x999999, // Silver
}; };
private int _colorNum, _itemObjectId; private int _colorNum;
private int _itemObjectId;
private String _title; private String _title;
@Override @Override

View File

@@ -60,7 +60,8 @@ public final class RequestDuelAnswerStart implements IClientIncomingPacket
if (_response == 1) if (_response == 1)
{ {
SystemMessage msg1 = null, msg2 = null; SystemMessage msg1 = null;
SystemMessage msg2 = null;
if (requestor.isInDuel()) if (requestor.isInDuel())
{ {
msg1 = SystemMessage.getSystemMessage(SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_ALREADY_ENGAGED_IN_A_DUEL); msg1 = SystemMessage.getSystemMessage(SystemMessageId.C1_CANNOT_DUEL_BECAUSE_C1_IS_ALREADY_ENGAGED_IN_A_DUEL);

View File

@@ -29,7 +29,8 @@ import com.l2jmobius.gameserver.security.SecondaryPasswordAuth;
public class RequestEx2ndPasswordReq implements IClientIncomingPacket public class RequestEx2ndPasswordReq implements IClientIncomingPacket
{ {
private int _changePass; private int _changePass;
private String _password, _newPassword; private String _password;
private String _newPassword;
@Override @Override
public boolean read(L2GameClient client, PacketReader packet) public boolean read(L2GameClient client, PacketReader packet)

View File

@@ -26,7 +26,9 @@ import com.l2jmobius.gameserver.network.serverpackets.ExListMpccWaiting;
*/ */
public class RequestExListMpccWaiting implements IClientIncomingPacket public class RequestExListMpccWaiting implements IClientIncomingPacket
{ {
private int _page, _location, _level; private int _page;
private int _location;
private int _level;
@Override @Override
public boolean read(L2GameClient client, PacketReader packet) public boolean read(L2GameClient client, PacketReader packet)

View File

@@ -29,7 +29,10 @@ import com.l2jmobius.gameserver.network.serverpackets.StopMoveInVehicle;
*/ */
public final class RequestGetOffVehicle implements IClientIncomingPacket public final class RequestGetOffVehicle implements IClientIncomingPacket
{ {
private int _boatId, _x, _y, _z; private int _boatId;
private int _x;
private int _y;
private int _z;
@Override @Override
public boolean read(L2GameClient client, PacketReader packet) public boolean read(L2GameClient client, PacketReader packet)

View File

@@ -38,12 +38,8 @@ public final class RequestGetOnVehicle implements IClientIncomingPacket
@Override @Override
public boolean read(L2GameClient client, PacketReader packet) public boolean read(L2GameClient client, PacketReader packet)
{ {
int x, y, z;
_boatId = packet.readD(); _boatId = packet.readD();
x = packet.readD(); _pos = new Location(packet.readD(), packet.readD(), packet.readD());
y = packet.readD();
z = packet.readD();
_pos = new Location(x, y, z);
return true; return true;
} }

View File

@@ -26,8 +26,10 @@ import com.l2jmobius.gameserver.network.L2GameClient;
*/ */
public final class RequestModifyBookMarkSlot implements IClientIncomingPacket public final class RequestModifyBookMarkSlot implements IClientIncomingPacket
{ {
private int id, icon; private int id;
private String name, tag; private int icon;
private String name;
private String tag;
@Override @Override
public boolean read(L2GameClient client, PacketReader packet) public boolean read(L2GameClient client, PacketReader packet)

View File

@@ -29,7 +29,8 @@ import com.l2jmobius.gameserver.network.serverpackets.ListPartyWaiting;
public final class RequestPartyMatchConfig implements IClientIncomingPacket public final class RequestPartyMatchConfig implements IClientIncomingPacket
{ {
private int _page, _location; private int _page;
private int _location;
private PartyMatchingRoomLevelType _type; private PartyMatchingRoomLevelType _type;
@Override @Override

View File

@@ -67,7 +67,8 @@ public final class RequestPledgeSetAcademyMaster implements IClientIncomingPacke
return; return;
} }
L2ClanMember apprenticeMember, sponsorMember; L2ClanMember apprenticeMember;
L2ClanMember sponsorMember;
if (currentMember.getPledgeType() == L2Clan.SUBUNIT_ACADEMY) if (currentMember.getPledgeType() == L2Clan.SUBUNIT_ACADEMY)
{ {
apprenticeMember = currentMember; apprenticeMember = currentMember;

View File

@@ -105,7 +105,8 @@ public class RequestProcureCropList implements IClientIncomingPacket
return; return;
} }
int slots = 0, weight = 0; int slots = 0;
int weight = 0;
for (CropHolder i : _items) for (CropHolder i : _items)
{ {
final L2ItemInstance item = player.getInventory().getItemByObjectId(i.getObjectId()); final L2ItemInstance item = player.getInventory().getItemByObjectId(i.getObjectId());

View File

@@ -27,7 +27,8 @@ import com.l2jmobius.gameserver.network.L2GameClient;
public final class RequestSaveBookMarkSlot implements IClientIncomingPacket public final class RequestSaveBookMarkSlot implements IClientIncomingPacket
{ {
private int icon; private int icon;
private String name, tag; private String name;
private String tag;
@Override @Override
public boolean read(L2GameClient client, PacketReader packet) public boolean read(L2GameClient client, PacketReader packet)

View File

@@ -76,7 +76,9 @@ public class ValidatePosition implements IClientIncomingPacket
} }
} }
int dx, dy, dz; int dx;
int dy;
int dz;
double diffSq; double diffSq;
if (activeChar.isInBoat()) if (activeChar.isInBoat())

View File

@@ -47,7 +47,9 @@ public class AllianceInfo implements IClientOutgoingPacket
final Collection<L2Clan> allies = ClanTable.getInstance().getClanAllies(allianceId); final Collection<L2Clan> allies = ClanTable.getInstance().getClanAllies(allianceId);
_allies = new ClanInfo[allies.size()]; _allies = new ClanInfo[allies.size()];
int idx = 0, total = 0, online = 0; int idx = 0;
int total = 0;
int online = 0;
for (L2Clan clan : allies) for (L2Clan clan : allies)
{ {
final ClanInfo ci = new ClanInfo(clan); final ClanInfo ci = new ClanInfo(clan);

View File

@@ -24,7 +24,9 @@ public class ChangeWaitType implements IClientOutgoingPacket
{ {
private final int _charObjId; private final int _charObjId;
private final int _moveType; private final int _moveType;
private final int _x, _y, _z; private final int _x;
private final int _y;
private final int _z;
public static final int WT_SITTING = 0; public static final int WT_SITTING = 0;
public static final int WT_STANDING = 1; public static final int WT_STANDING = 1;

View File

@@ -36,10 +36,14 @@ public class CharInfo implements IClientOutgoingPacket
{ {
private final L2PcInstance _activeChar; private final L2PcInstance _activeChar;
private int _objId; private int _objId;
private int _x, _y, _z, _heading; private int _x;
private final int _mAtkSpd, _pAtkSpd; private int _y;
private int _z;
private final int _runSpd, _walkSpd; private int _heading;
private final int _mAtkSpd;
private final int _pAtkSpd;
private final int _runSpd;
private final int _walkSpd;
private final int _swimRunSpd; private final int _swimRunSpd;
private final int _swimWalkSpd; private final int _swimWalkSpd;
private final int _flyRunSpd; private final int _flyRunSpd;

View File

@@ -29,7 +29,8 @@ public class Ex2ndPasswordVerify implements IClientOutgoingPacket
public static final int PASSWORD_WRONG = 0x01; public static final int PASSWORD_WRONG = 0x01;
public static final int PASSWORD_BAN = 0x02; public static final int PASSWORD_BAN = 0x02;
private final int _wrongTentatives, _mode; private final int _wrongTentatives;
private final int _mode;
public Ex2ndPasswordVerify(int mode, int wrongTentatives) public Ex2ndPasswordVerify(int mode, int wrongTentatives)
{ {

View File

@@ -24,7 +24,14 @@ public class ExAirShipInfo implements IClientOutgoingPacket
{ {
// store some parameters, because they can be changed during broadcast // store some parameters, because they can be changed during broadcast
private final L2AirShipInstance _ship; private final L2AirShipInstance _ship;
private final int _x, _y, _z, _heading, _moveSpeed, _rotationSpeed, _captain, _helm; private final int _x;
private final int _y;
private final int _z;
private final int _heading;
private final int _moveSpeed;
private final int _rotationSpeed;
private final int _captain;
private final int _helm;
public ExAirShipInfo(L2AirShipInstance ship) public ExAirShipInfo(L2AirShipInstance ship)
{ {

View File

@@ -23,7 +23,11 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public class ExAirShipStopMove implements IClientOutgoingPacket public class ExAirShipStopMove implements IClientOutgoingPacket
{ {
private final int _playerId, _airShipId, _x, _y, _z; private final int _playerId;
private final int _airShipId;
private final int _x;
private final int _y;
private final int _z;
public ExAirShipStopMove(L2PcInstance player, L2AirShipInstance ship, int x, int y, int z) public ExAirShipStopMove(L2PcInstance player, L2AirShipInstance ship, int x, int y, int z)
{ {

View File

@@ -27,7 +27,9 @@ public class ExChangeClientEffectInfo implements IClientOutgoingPacket
public static final ExChangeClientEffectInfo STATIC_FREYA_DEFAULT = new ExChangeClientEffectInfo(0, 0, 1); public static final ExChangeClientEffectInfo STATIC_FREYA_DEFAULT = new ExChangeClientEffectInfo(0, 0, 1);
public static final ExChangeClientEffectInfo STATIC_FREYA_DESTROYED = new ExChangeClientEffectInfo(0, 0, 2); public static final ExChangeClientEffectInfo STATIC_FREYA_DESTROYED = new ExChangeClientEffectInfo(0, 0, 2);
private final int _type, _key, _value; private final int _type;
private final int _key;
private final int _value;
/** /**
* @param type * @param type

View File

@@ -22,7 +22,11 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public class ExGetOffAirShip implements IClientOutgoingPacket public class ExGetOffAirShip implements IClientOutgoingPacket
{ {
private final int _playerId, _airShipId, _x, _y, _z; private final int _playerId;
private final int _airShipId;
private final int _x;
private final int _y;
private final int _z;
public ExGetOffAirShip(L2Character player, L2Character ship, int x, int y, int z) public ExGetOffAirShip(L2Character player, L2Character ship, int x, int y, int z)
{ {

View File

@@ -24,7 +24,8 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public class ExGetOnAirShip implements IClientOutgoingPacket public class ExGetOnAirShip implements IClientOutgoingPacket
{ {
private final int _playerId, _airShipId; private final int _playerId;
private final int _airShipId;
private final Location _pos; private final Location _pos;
public ExGetOnAirShip(L2PcInstance player, L2Character ship) public ExGetOnAirShip(L2PcInstance player, L2Character ship)

View File

@@ -25,7 +25,9 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
*/ */
public class ExMPCCPartyInfoUpdate implements IClientOutgoingPacket public class ExMPCCPartyInfoUpdate implements IClientOutgoingPacket
{ {
private final int _mode, _LeaderOID, _memberCount; private final int _mode;
private final int _LeaderOID;
private final int _memberCount;
private final String _name; private final String _name;
/** /**

View File

@@ -22,7 +22,13 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public class ExMoveToLocationAirShip implements IClientOutgoingPacket public class ExMoveToLocationAirShip implements IClientOutgoingPacket
{ {
private final int _objId, _tx, _ty, _tz, _x, _y, _z; private final int _objId;
private final int _tx;
private final int _ty;
private final int _tz;
private final int _x;
private final int _y;
private final int _z;
public ExMoveToLocationAirShip(L2Character cha) public ExMoveToLocationAirShip(L2Character cha)
{ {

View File

@@ -27,7 +27,8 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
*/ */
public class ExNeedToChangeName implements IClientOutgoingPacket public class ExNeedToChangeName implements IClientOutgoingPacket
{ {
private final int _type, _subType; private final int _type;
private final int _subType;
private final String _name; private final String _name;
public ExNeedToChangeName(int type, int subType, String name) public ExNeedToChangeName(int type, int subType, String name)

View File

@@ -24,7 +24,8 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
*/ */
public class ExRotation implements IClientOutgoingPacket public class ExRotation implements IClientOutgoingPacket
{ {
private final int _charId, _heading; private final int _charId;
private final int _heading;
public ExRotation(int charId, int heading) public ExRotation(int charId, int heading)
{ {

View File

@@ -25,7 +25,11 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
*/ */
public class ExStopMoveAirShip implements IClientOutgoingPacket public class ExStopMoveAirShip implements IClientOutgoingPacket
{ {
private final int _objectId, _x, _y, _z, _heading; private final int _objectId;
private final int _x;
private final int _y;
private final int _z;
private final int _heading;
public ExStopMoveAirShip(L2Character ship) public ExStopMoveAirShip(L2Character ship)
{ {

View File

@@ -28,7 +28,8 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public class ExValidateLocationInAirShip implements IClientOutgoingPacket public class ExValidateLocationInAirShip implements IClientOutgoingPacket
{ {
private final L2PcInstance _activeChar; private final L2PcInstance _activeChar;
private final int _shipId, _heading; private final int _shipId;
private final int _heading;
private final Location _loc; private final Location _loc;
public ExValidateLocationInAirShip(L2PcInstance player) public ExValidateLocationInAirShip(L2PcInstance player)

View File

@@ -36,9 +36,14 @@ public class FakePlayerInfo implements IClientOutgoingPacket
{ {
private final L2Npc _npc; private final L2Npc _npc;
private final int _objId; private final int _objId;
private final int _x, _y, _z, _heading; private final int _x;
private final int _mAtkSpd, _pAtkSpd; private final int _y;
private final int _runSpd, _walkSpd; private final int _z;
private final int _heading;
private final int _mAtkSpd;
private final int _pAtkSpd;
private final int _runSpd;
private final int _walkSpd;
private final int _swimRunSpd; private final int _swimRunSpd;
private final int _swimWalkSpd; private final int _swimWalkSpd;
private final int _flyRunSpd; private final int _flyRunSpd;

View File

@@ -26,8 +26,13 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
*/ */
public final class FlyToLocation implements IClientOutgoingPacket public final class FlyToLocation implements IClientOutgoingPacket
{ {
private final int _destX, _destY, _destZ; private final int _destX;
private final int _chaObjId, _chaX, _chaY, _chaZ; private final int _destY;
private final int _destZ;
private final int _chaObjId;
private final int _chaX;
private final int _chaY;
private final int _chaZ;
private final FlyType _type; private final FlyType _type;
private int _flySpeed; private int _flySpeed;
private int _flyDelay; private int _flyDelay;

View File

@@ -26,9 +26,12 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public class GMViewCharacterInfo implements IClientOutgoingPacket public class GMViewCharacterInfo implements IClientOutgoingPacket
{ {
private final L2PcInstance _activeChar; private final L2PcInstance _activeChar;
private final int _runSpd, _walkSpd; private final int _runSpd;
private final int _swimRunSpd, _swimWalkSpd; private final int _walkSpd;
private final int _flyRunSpd, _flyWalkSpd; private final int _swimRunSpd;
private final int _swimWalkSpd;
private final int _flyRunSpd;
private final int _flyWalkSpd;
private final double _moveMultiplier; private final double _moveMultiplier;
public GMViewCharacterInfo(L2PcInstance cha) public GMViewCharacterInfo(L2PcInstance cha)

View File

@@ -24,7 +24,11 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
*/ */
public class GetOffVehicle implements IClientOutgoingPacket public class GetOffVehicle implements IClientOutgoingPacket
{ {
private final int _charObjId, _boatObjId, _x, _y, _z; private final int _charObjId;
private final int _boatObjId;
private final int _x;
private final int _y;
private final int _z;
/** /**
* @param charObjId * @param charObjId

View File

@@ -25,7 +25,9 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
*/ */
public class L2FriendSay implements IClientOutgoingPacket public class L2FriendSay implements IClientOutgoingPacket
{ {
private final String _sender, _receiver, _message; private final String _sender;
private final String _receiver;
private final String _message;
public L2FriendSay(String sender, String reciever, String message) public L2FriendSay(String sender, String reciever, String message)
{ {

View File

@@ -22,7 +22,13 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public final class MoveToLocation implements IClientOutgoingPacket public final class MoveToLocation implements IClientOutgoingPacket
{ {
private final int _charObjId, _x, _y, _z, _xDst, _yDst, _zDst; private final int _charObjId;
private final int _x;
private final int _y;
private final int _z;
private final int _xDst;
private final int _yDst;
private final int _zDst;
public MoveToLocation(L2Character cha) public MoveToLocation(L2Character cha)
{ {

View File

@@ -26,7 +26,12 @@ public class MoveToPawn implements IClientOutgoingPacket
private final int _charObjId; private final int _charObjId;
private final int _targetId; private final int _targetId;
private final int _distance; private final int _distance;
private final int _x, _y, _z, _tx, _ty, _tz; private final int _x;
private final int _y;
private final int _z;
private final int _tx;
private final int _ty;
private final int _tz;
public MoveToPawn(L2Character cha, L2Object target, int distance) public MoveToPawn(L2Character cha, L2Object target, int distance)
{ {

View File

@@ -29,7 +29,8 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public final class MultiSellList extends AbstractItemPacket public final class MultiSellList extends AbstractItemPacket
{ {
private int _size, _index; private int _size;
private int _index;
private final PreparedMultisellListHolder _list; private final PreparedMultisellListHolder _list;
private final boolean _finished; private final boolean _finished;

View File

@@ -30,7 +30,8 @@ public class PetInfo implements IClientOutgoingPacket
{ {
private final L2Summon _summon; private final L2Summon _summon;
private final int _val; private final int _val;
private final int _runSpd, _walkSpd; private final int _runSpd;
private final int _walkSpd;
private final int _swimRunSpd; private final int _swimRunSpd;
private final int _swimWalkSpd; private final int _swimWalkSpd;
private final int _flRunSpd = 0; private final int _flRunSpd = 0;
@@ -38,7 +39,8 @@ public class PetInfo implements IClientOutgoingPacket
private final int _flyRunSpd; private final int _flyRunSpd;
private final int _flyWalkSpd; private final int _flyWalkSpd;
private final double _moveMultiplier; private final double _moveMultiplier;
private int _maxFed, _curFed; private int _maxFed;
private int _curFed;
private int _statusMask = 0; private int _statusMask = 0;
public PetInfo(L2Summon summon, int val) public PetInfo(L2Summon summon, int val)

View File

@@ -29,7 +29,8 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public class PetStatusUpdate implements IClientOutgoingPacket public class PetStatusUpdate implements IClientOutgoingPacket
{ {
private final L2Summon _summon; private final L2Summon _summon;
private int _maxFed, _curFed; private int _maxFed;
private int _curFed;
public PetStatusUpdate(L2Summon summon) public PetStatusUpdate(L2Summon summon)
{ {

View File

@@ -23,7 +23,8 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public class RecipeShopSellList implements IClientOutgoingPacket public class RecipeShopSellList implements IClientOutgoingPacket
{ {
private final L2PcInstance _buyer, _manufacturer; private final L2PcInstance _buyer;
private final L2PcInstance _manufacturer;
public RecipeShopSellList(L2PcInstance buyer, L2PcInstance manufacturer) public RecipeShopSellList(L2PcInstance buyer, L2PcInstance manufacturer)
{ {

View File

@@ -54,7 +54,11 @@ public final class RelationChanged implements IClientOutgoingPacket
protected static class Relation protected static class Relation
{ {
int _objId, _relation, _autoAttackable, _reputation, _pvpFlag; int _objId;
int _relation;
int _autoAttackable;
int _reputation;
int _pvpFlag;
} }
private Relation _singled; private Relation _singled;

View File

@@ -27,10 +27,14 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public final class ServerObjectInfo implements IClientOutgoingPacket public final class ServerObjectInfo implements IClientOutgoingPacket
{ {
private final L2Npc _activeChar; private final L2Npc _activeChar;
private final int _x, _y, _z, _heading; private final int _x;
private final int _y;
private final int _z;
private final int _heading;
private final int _idTemplate; private final int _idTemplate;
private final boolean _isAttackable; private final boolean _isAttackable;
private final double _collisionHeight, _collisionRadius; private final double _collisionHeight;
private final double _collisionRadius;
private final String _name; private final String _name;
public ServerObjectInfo(L2Npc activeChar, L2Character actor) public ServerObjectInfo(L2Npc activeChar, L2Character actor)

View File

@@ -21,7 +21,10 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public final class StartRotation implements IClientOutgoingPacket public final class StartRotation implements IClientOutgoingPacket
{ {
private final int _charObjId, _degree, _side, _speed; private final int _charObjId;
private final int _degree;
private final int _side;
private final int _speed;
public StartRotation(int objectId, int degree, int side, int speed) public StartRotation(int objectId, int degree, int side, int speed)
{ {

View File

@@ -21,7 +21,9 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
public class StopRotation implements IClientOutgoingPacket public class StopRotation implements IClientOutgoingPacket
{ {
private final int _charObjId, _degree, _speed; private final int _charObjId;
private final int _degree;
private final int _speed;
public StopRotation(int objectId, int degree, int speed) public StopRotation(int objectId, int degree, int speed)
{ {

View File

@@ -25,7 +25,12 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
*/ */
public class VehicleDeparture implements IClientOutgoingPacket public class VehicleDeparture implements IClientOutgoingPacket
{ {
private final int _objId, _x, _y, _z, _moveSpeed, _rotationSpeed; private final int _objId;
private final int _x;
private final int _y;
private final int _z;
private final int _moveSpeed;
private final int _rotationSpeed;
public VehicleDeparture(L2BoatInstance boat) public VehicleDeparture(L2BoatInstance boat)
{ {

View File

@@ -25,7 +25,11 @@ import com.l2jmobius.gameserver.network.OutgoingPackets;
*/ */
public class VehicleInfo implements IClientOutgoingPacket public class VehicleInfo implements IClientOutgoingPacket
{ {
private final int _objId, _x, _y, _z, _heading; private final int _objId;
private final int _x;
private final int _y;
private final int _z;
private final int _heading;
public VehicleInfo(L2BoatInstance boat) public VehicleInfo(L2BoatInstance boat)
{ {

View File

@@ -29,7 +29,8 @@ import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
*/ */
public class L2Friend implements IClientOutgoingPacket public class L2Friend implements IClientOutgoingPacket
{ {
private final boolean _action, _online; private final boolean _action;
private final boolean _online;
private final int _objid; private final int _objid;
private final String _name; private final String _name;

View File

@@ -28,8 +28,12 @@ public class ExMoveToLocationInShuttle implements IClientOutgoingPacket
{ {
private final int _charObjId; private final int _charObjId;
private final int _airShipId; private final int _airShipId;
private final int _targetX, _targetY, _targetZ; private final int _targetX;
private final int _fromX, _fromY, _fromZ; private final int _targetY;
private final int _targetZ;
private final int _fromX;
private final int _fromY;
private final int _fromZ;
public ExMoveToLocationInShuttle(L2PcInstance player, int fromX, int fromY, int fromZ) public ExMoveToLocationInShuttle(L2PcInstance player, int fromX, int fromY, int fromZ)
{ {

View File

@@ -28,7 +28,8 @@ import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
*/ */
public class ExShuttleGetOn implements IClientOutgoingPacket public class ExShuttleGetOn implements IClientOutgoingPacket
{ {
private final int _playerObjectId, _shuttleObjectId; private final int _playerObjectId;
private final int _shuttleObjectId;
private final Location _pos; private final Location _pos;
public ExShuttleGetOn(L2PcInstance player, L2ShuttleInstance shuttle) public ExShuttleGetOn(L2PcInstance player, L2ShuttleInstance shuttle)

View File

@@ -27,7 +27,9 @@ import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
public class ExShuttleMove implements IClientOutgoingPacket public class ExShuttleMove implements IClientOutgoingPacket
{ {
private final L2ShuttleInstance _shuttle; private final L2ShuttleInstance _shuttle;
private final int _x, _y, _z; private final int _x;
private final int _y;
private final int _z;
public ExShuttleMove(L2ShuttleInstance shuttle, int x, int y, int z) public ExShuttleMove(L2ShuttleInstance shuttle, int x, int y, int z)
{ {

View File

@@ -28,7 +28,8 @@ import com.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
public class ExValidateLocationInShuttle implements IClientOutgoingPacket public class ExValidateLocationInShuttle implements IClientOutgoingPacket
{ {
private final L2PcInstance _activeChar; private final L2PcInstance _activeChar;
private final int _shipId, _heading; private final int _shipId;
private final int _heading;
private final Location _loc; private final Location _loc;
public ExValidateLocationInShuttle(L2PcInstance player) public ExValidateLocationInShuttle(L2PcInstance player)

View File

@@ -28,7 +28,8 @@ import java.util.logging.Logger;
public class DateRange public class DateRange
{ {
protected static final Logger LOGGER = Logger.getLogger(DateRange.class.getName()); protected static final Logger LOGGER = Logger.getLogger(DateRange.class.getName());
private final Date _startDate, _endDate; private final Date _startDate;
private final Date _endDate;
public DateRange(Date from, Date to) public DateRange(Date from, Date to)
{ {

View File

@@ -71,7 +71,8 @@ public class SecondaryPasswordAuth
private void loadPassword() private void loadPassword()
{ {
String var, value = null; String var = null;
String value = null;
try (Connection con = DatabaseFactory.getConnection(); try (Connection con = DatabaseFactory.getConnection();
PreparedStatement statement = con.prepareStatement(SELECT_PASSWORD)) PreparedStatement statement = con.prepareStatement(SELECT_PASSWORD))
{ {

View File

@@ -214,7 +214,8 @@ public final class TaskManager
private boolean launchTask(ExecutedTask task) private boolean launchTask(ExecutedTask task)
{ {
final TaskTypes type = task.getType(); final TaskTypes type = task.getType();
long delay, interval; long delay;
long interval;
switch (type) switch (type)
{ {
case TYPE_STARTUP: case TYPE_STARTUP:

View File

@@ -71,7 +71,9 @@ public class MinionList
return; return;
} }
int minionCount, minionId, minionsToSpawn; int minionCount;
int minionId;
int minionsToSpawn;
for (MinionHolder minion : minions) for (MinionHolder minion : minions)
{ {
minionCount = minion.getCount(); minionCount = minion.getCount();

View File

@@ -505,7 +505,8 @@ public class LoginController
ps.setString(1, info.getLogin()); ps.setString(1, info.getLogin());
try (ResultSet rset = ps.executeQuery()) try (ResultSet rset = ps.executeQuery())
{ {
String ip, type; String ip;
String type;
while (rset.next()) while (rset.next())
{ {
ip = rset.getString("ip"); ip = rset.getString("ip");

View File

@@ -32,7 +32,13 @@ public class AuthGameGuard implements IIncomingPacket<L2LoginClient>
private int _sessionId; private int _sessionId;
@SuppressWarnings("unused") @SuppressWarnings("unused")
private int _data1, _data2, _data3, _data4; private int _data1;
@SuppressWarnings("unused")
private int _data2;
@SuppressWarnings("unused")
private int _data3;
@SuppressWarnings("unused")
private int _data4;
@Override @Override
public boolean read(L2LoginClient client, PacketReader packet) public boolean read(L2LoginClient client, PacketReader packet)

View File

@@ -36,7 +36,8 @@ import com.l2jmobius.loginserver.network.OutgoingPackets;
*/ */
public final class LoginOk implements IOutgoingPacket public final class LoginOk implements IOutgoingPacket
{ {
private final int _loginOk1, _loginOk2; private final int _loginOk1;
private final int _loginOk2;
public LoginOk(SessionKey sessionKey) public LoginOk(SessionKey sessionKey)
{ {

View File

@@ -23,7 +23,8 @@ import com.l2jmobius.loginserver.network.OutgoingPackets;
public final class PlayOk implements IOutgoingPacket public final class PlayOk implements IOutgoingPacket
{ {
private final int _playOk1, _playOk2; private final int _playOk1;
private final int _playOk2;
public PlayOk(SessionKey sessionKey) public PlayOk(SessionKey sessionKey)
{ {

View File

@@ -128,7 +128,8 @@ public final class Parade extends AbstractNpcAI
public Parade() public Parade()
{ {
// Starts at 8:00 and repeats every 6 hours. // Starts at 8:00 and repeats every 6 hours.
final long diff = timeLeftMilli(8, 0, 0), cycle = 3600000; final long diff = timeLeftMilli(8, 0, 0);
final long cycle = 3600000;
ThreadPool.scheduleAtFixedRate(new Start(), diff, cycle); ThreadPool.scheduleAtFixedRate(new Start(), diff, cycle);
// Test - Starts 3 minutes after server startup and repeats every 20 minutes. // Test - Starts 3 minutes after server startup and repeats every 20 minutes.

View File

@@ -288,7 +288,8 @@ public final class TalentShow extends AbstractNpcAI
final int gameTime = GameTimeController.getInstance().getGameTime(); final int gameTime = GameTimeController.getInstance().getGameTime();
final int hours = (gameTime / 60) % 24; final int hours = (gameTime / 60) % 24;
final int minutes = gameTime % 60; final int minutes = gameTime % 60;
int hourDiff, minDiff; int hourDiff;
int minDiff;
hourDiff = 20 - hours; hourDiff = 20 - hours;
if (hourDiff < 0) if (hourDiff < 0)
{ {

View File

@@ -915,7 +915,8 @@ public class Lindvior extends AbstractNpcAI
private void spawnServitor(int count, int radius, Location loc, int... npcIds) private void spawnServitor(int count, int radius, Location loc, int... npcIds)
{ {
int x = loc.getX(), y = loc.getY(); int x = loc.getX();
int y = loc.getY();
if (radius > 0) if (radius > 0)
{ {
x += Rnd.get(-radius, radius); x += Rnd.get(-radius, radius);

View File

@@ -775,9 +775,8 @@ public class AdminEditChar implements IAdminCommandHandler
{ {
final String val = command.substring(20); final String val = command.substring(20);
final int level = Integer.parseInt(val); final int level = Integer.parseInt(val);
long newexp, oldexp = 0; final long oldexp = pet.getStat().getExp();
oldexp = pet.getStat().getExp(); final long newexp = pet.getStat().getExpForLevel(level);
newexp = pet.getStat().getExpForLevel(level);
if (oldexp > newexp) if (oldexp > newexp)
{ {
pet.getStat().removeExp(oldexp - newexp); pet.getStat().removeExp(oldexp - newexp);
@@ -1329,7 +1328,7 @@ public class AdminEditChar implements IAdminCommandHandler
int CharactersFound = 0; int CharactersFound = 0;
L2GameClient client; L2GameClient client;
String name, ip = "0.0.0.0"; String ip = "0.0.0.0";
final StringBuilder replyMSG = new StringBuilder(1000); final StringBuilder replyMSG = new StringBuilder(1000);
final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1); final NpcHtmlMessage adminReply = new NpcHtmlMessage(0, 1);
adminReply.setFile(activeChar, "data/html/admin/ipfind.htm"); adminReply.setFile(activeChar, "data/html/admin/ipfind.htm");
@@ -1365,7 +1364,7 @@ public class AdminEditChar implements IAdminCommandHandler
} }
} }
name = player.getName(); final String name = player.getName();
CharactersFound += 1; CharactersFound += 1;
replyMSG.append("<tr><td width=80><a action=\"bypass -h admin_character_info "); replyMSG.append("<tr><td width=80><a action=\"bypass -h admin_character_info ");
replyMSG.append(name); replyMSG.append(name);

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