Minor code improvements.
This commit is contained in:
@@ -47,7 +47,7 @@ public final class Evolve
|
||||
{
|
||||
protected static final Logger _log = Logger.getLogger(Evolve.class.getName());
|
||||
|
||||
public static final boolean doEvolve(L2PcInstance player, L2Npc npc, int itemIdtake, int itemIdgive, int petminlvl)
|
||||
public static boolean doEvolve(L2PcInstance player, L2Npc npc, int itemIdtake, int itemIdgive, int petminlvl)
|
||||
{
|
||||
if ((itemIdtake == 0) || (itemIdgive == 0) || (petminlvl == 0))
|
||||
{
|
||||
@@ -158,7 +158,7 @@ public final class Evolve
|
||||
return true;
|
||||
}
|
||||
|
||||
public static final boolean doRestore(L2PcInstance player, L2Npc npc, int itemIdtake, int itemIdgive, int petminlvl)
|
||||
public static boolean doRestore(L2PcInstance player, L2Npc npc, int itemIdtake, int itemIdgive, int petminlvl)
|
||||
{
|
||||
if ((itemIdtake == 0) || (itemIdgive == 0) || (petminlvl == 0))
|
||||
{
|
||||
|
@@ -331,7 +331,7 @@ public class MinionList
|
||||
* @param minionId The L2NpcTemplate Identifier of the Minion to spawn
|
||||
* @return
|
||||
*/
|
||||
public static final L2MonsterInstance spawnMinion(L2MonsterInstance master, int minionId)
|
||||
public static L2MonsterInstance spawnMinion(L2MonsterInstance master, int minionId)
|
||||
{
|
||||
// Get the template of the Minion to spawn
|
||||
final L2NpcTemplate minionTemplate = NpcData.getInstance().getTemplate(minionId);
|
||||
@@ -343,7 +343,7 @@ public class MinionList
|
||||
return initializeNpcInstance(master, new L2MonsterInstance(minionTemplate));
|
||||
}
|
||||
|
||||
protected static final L2MonsterInstance initializeNpcInstance(L2MonsterInstance master, L2MonsterInstance minion)
|
||||
protected static L2MonsterInstance initializeNpcInstance(L2MonsterInstance master, L2MonsterInstance minion)
|
||||
{
|
||||
minion.stopAllEffects();
|
||||
minion.setIsDead(false);
|
||||
|
@@ -345,7 +345,7 @@ public final class PrimeFinder
|
||||
* @param desiredCapacity the capacity desired by the user.
|
||||
* @return the capacity which should be used for a hashtable.
|
||||
*/
|
||||
public static final int nextPrime(int desiredCapacity)
|
||||
public static int nextPrime(int desiredCapacity)
|
||||
{
|
||||
int i = Arrays.binarySearch(PRIME_CAPACITIES, desiredCapacity);
|
||||
if (i < 0)
|
||||
|
@@ -493,7 +493,7 @@ public final class Util
|
||||
|
||||
if (Config.HTML_ACTION_CACHE_DEBUG)
|
||||
{
|
||||
LOGGER.info("Cached html bypass(" + scope.toString() + "): '" + bypass + "'");
|
||||
LOGGER.info("Cached html bypass(" + scope + "): '" + bypass + "'");
|
||||
}
|
||||
player.addHtmlAction(scope, bypass);
|
||||
bypassStart = htmlLower.indexOf("=\"bypass ", bypassEnd);
|
||||
@@ -530,7 +530,7 @@ public final class Util
|
||||
|
||||
if (Config.HTML_ACTION_CACHE_DEBUG)
|
||||
{
|
||||
LOGGER.info("Cached html link(" + scope.toString() + "): '" + htmlLink + "'");
|
||||
LOGGER.info("Cached html link(" + scope + "): '" + htmlLink + "'");
|
||||
}
|
||||
// let's keep an action cache with "link " lowercase literal kept
|
||||
player.addHtmlAction(scope, "link " + htmlLink);
|
||||
@@ -556,7 +556,7 @@ public final class Util
|
||||
|
||||
if (Config.HTML_ACTION_CACHE_DEBUG)
|
||||
{
|
||||
LOGGER.info("Set html action npc(" + scope.toString() + "): " + npcObjId);
|
||||
LOGGER.info("Set html action npc(" + scope + "): " + npcObjId);
|
||||
}
|
||||
player.setHtmlActionOriginObjectId(scope, npcObjId);
|
||||
buildHtmlBypassCache(player, scope, html);
|
||||
@@ -645,32 +645,29 @@ public final class Util
|
||||
activeChar.sendPacket(new ShowBoard(html, "1001"));
|
||||
fillMultiEditContent(activeChar, fillMultiEdit);
|
||||
}
|
||||
else if (html.length() < 16250)
|
||||
{
|
||||
activeChar.sendPacket(new ShowBoard(html, "101"));
|
||||
activeChar.sendPacket(new ShowBoard(null, "102"));
|
||||
activeChar.sendPacket(new ShowBoard(null, "103"));
|
||||
}
|
||||
else if (html.length() < (16250 * 2))
|
||||
{
|
||||
activeChar.sendPacket(new ShowBoard(html.substring(0, 16250), "101"));
|
||||
activeChar.sendPacket(new ShowBoard(html.substring(16250), "102"));
|
||||
activeChar.sendPacket(new ShowBoard(null, "103"));
|
||||
}
|
||||
else if (html.length() < (16250 * 3))
|
||||
{
|
||||
activeChar.sendPacket(new ShowBoard(html.substring(0, 16250), "101"));
|
||||
activeChar.sendPacket(new ShowBoard(html.substring(16250, 16250 * 2), "102"));
|
||||
activeChar.sendPacket(new ShowBoard(html.substring(16250 * 2), "103"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (html.length() < 16250)
|
||||
{
|
||||
activeChar.sendPacket(new ShowBoard(html, "101"));
|
||||
activeChar.sendPacket(new ShowBoard(null, "102"));
|
||||
activeChar.sendPacket(new ShowBoard(null, "103"));
|
||||
}
|
||||
else if (html.length() < (16250 * 2))
|
||||
{
|
||||
activeChar.sendPacket(new ShowBoard(html.substring(0, 16250), "101"));
|
||||
activeChar.sendPacket(new ShowBoard(html.substring(16250), "102"));
|
||||
activeChar.sendPacket(new ShowBoard(null, "103"));
|
||||
}
|
||||
else if (html.length() < (16250 * 3))
|
||||
{
|
||||
activeChar.sendPacket(new ShowBoard(html.substring(0, 16250), "101"));
|
||||
activeChar.sendPacket(new ShowBoard(html.substring(16250, 16250 * 2), "102"));
|
||||
activeChar.sendPacket(new ShowBoard(html.substring(16250 * 2), "103"));
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendPacket(new ShowBoard("<html><body><br><center>Error: HTML was too long!</center></body></html>", "101"));
|
||||
activeChar.sendPacket(new ShowBoard(null, "102"));
|
||||
activeChar.sendPacket(new ShowBoard(null, "103"));
|
||||
}
|
||||
activeChar.sendPacket(new ShowBoard("<html><body><br><center>Error: HTML was too long!</center></body></html>", "101"));
|
||||
activeChar.sendPacket(new ShowBoard(null, "102"));
|
||||
activeChar.sendPacket(new ShowBoard(null, "103"));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user