if (fisher.getName().equalsIgnoreCase(pl.getName()))
{
if (fisher.getLength() < len)
{
fisher.setLength(len);
pl.sendMessage(new CustomMessage("lineage2.gameserver.instancemanager.games.FishingChampionShipManager.ResultImproveOn", pl));
recalculateMinLength();
}
return;
}
}
_tmpPlayers.add(new Fisher(pl.getName(), len, 0));
pl.sendMessage(new CustomMessage("lineage2.gameserver.instancemanager.games.FishingChampionShipManager.YouInAPrizeList", pl));
recalculateMinLength();
}
else if (_minFishLength < len)
{
for (Fisher fisher : _tmpPlayers)
{
if (fisher.getName().equalsIgnoreCase(pl.getName()))
{
if (fisher.getLength() < len)
{
fisher.setLength(len);
pl.sendMessage(new CustomMessage("lineage2.gameserver.instancemanager.games.FishingChampionShipManager.ResultImproveOn", pl));
recalculateMinLength();
}
return;
}
}
Fisher minFisher = null;
double minLen = 99999.;
for (Fisher fisher : _tmpPlayers)
{
if (fisher.getLength() < minLen)
{
minFisher = fisher;
minLen = minFisher.getLength();
}
}
_tmpPlayers.remove(minFisher);
_tmpPlayers.add(new Fisher(pl.getName(), len, 0));
pl.sendMessage(new CustomMessage("lineage2.gameserver.instancemanager.games.FishingChampionShipManager.YouInAPrizeList", pl));
recalculateMinLength();
}
}