Code style changes.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -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))
|
||||
{
|
||||
|
@@ -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
|
||||
|
@@ -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());
|
||||
|
@@ -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;
|
||||
|
@@ -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())
|
||||
{
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user