Small code improvements.
This commit is contained in:
@@ -59,7 +59,7 @@ public class PcStat extends PlayableStat
|
||||
public static final int MAX_VITALITY_POINTS = 140000;
|
||||
public static final int MIN_VITALITY_POINTS = 0;
|
||||
|
||||
private final static int FANCY_FISHING_ROD_SKILL = 21484;
|
||||
private static final int FANCY_FISHING_ROD_SKILL = 21484;
|
||||
|
||||
public PcStat(L2PcInstance activeChar)
|
||||
{
|
||||
|
@@ -242,29 +242,26 @@ public class PlayerVariables extends AbstractVariables
|
||||
final String data = getString(EXTEND_DROP, "");
|
||||
if (data.isEmpty())
|
||||
{
|
||||
result = Integer.toString(id) + "," + Long.toString(count);
|
||||
result = id + "," + count;
|
||||
}
|
||||
else if (data.contains(";"))
|
||||
{
|
||||
for (String s : data.split(";"))
|
||||
{
|
||||
final String[] drop = s.split(",");
|
||||
if (drop[0].equals(Integer.toString(id)))
|
||||
{
|
||||
s += ";" + drop[0] + "," + count;
|
||||
continue;
|
||||
}
|
||||
|
||||
result += ";" + s;
|
||||
}
|
||||
result = result.substring(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (data.contains(";"))
|
||||
{
|
||||
for (String s : data.split(";"))
|
||||
{
|
||||
final String[] drop = s.split(",");
|
||||
if (drop[0].equals(Integer.toString(id)))
|
||||
{
|
||||
s += ";" + drop[0] + "," + Long.toString(count);
|
||||
continue;
|
||||
}
|
||||
|
||||
result += ";" + s;
|
||||
}
|
||||
result = result.substring(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = Integer.toString(id) + "," + Long.toString(count);
|
||||
}
|
||||
result = id + "," + count;
|
||||
}
|
||||
set(EXTEND_DROP, result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user