Code style changes.

This commit is contained in:
MobiusDev
2016-04-26 19:21:19 +00:00
parent 6a13705766
commit fc070c9238
768 changed files with 3338 additions and 4252 deletions

View File

@@ -40,7 +40,7 @@ import com.l2jmobius.util.StringUtil;
public class AdminBuffs implements IAdminCommandHandler
{
private final static int PAGE_LIMIT = 20;
private static final int PAGE_LIMIT = 20;
private static final String[] ADMIN_COMMANDS =
{
@@ -253,7 +253,7 @@ public class AdminBuffs implements IAdminCommandHandler
}
final StringBuilder html = StringUtil.startAppend(500 + (effects.size() * 200), "<html><table width=\"100%\"><tr><td width=45><button value=\"Main\" action=\"bypass -h admin_admin\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td width=180><center><font color=\"LEVEL\">Effects of ", target.getName(), "</font></td><td width=45><button value=\"Back\" action=\"bypass -h admin_current_player\" width=45 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table><br><table width=\"100%\"><tr><td width=200>Skill</td><td width=30>Rem. Time</td><td width=70>Action</td></tr>");
final int start = ((page - 1) * PAGE_LIMIT);
final int start = (page - 1) * PAGE_LIMIT;
final int end = Math.min(((page - 1) * PAGE_LIMIT) + PAGE_LIMIT, effects.size());
int count = 0;
for (BuffInfo info : effects)
@@ -294,7 +294,7 @@ public class AdminBuffs implements IAdminCommandHandler
html.append("</tr></table>");
// Buttons
StringUtil.append(html, "<br><center><button value=\"Refresh\" action=\"bypass -h admin_getbuffs", (passive ? "_ps " : " "), target.getName(), "\" width=80 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
StringUtil.append(html, "<br><center><button value=\"Refresh\" action=\"bypass -h admin_getbuffs", passive ? "_ps " : " ", target.getName(), "\" width=80 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
StringUtil.append(html, "<button value=\"Remove All\" action=\"bypass -h admin_stopallbuffs ", Integer.toString(target.getObjectId()), "\" width=80 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"><br>");
// Legend
if (!passive)

View File

@@ -250,7 +250,7 @@ public final class AdminCastle implements IAdminCommandHandler
private boolean checkTarget(L2PcInstance player)
{
return ((player.getTarget() != null) && player.getTarget().isPlayer() && (((L2PcInstance) player.getTarget()).getClan() != null));
return (player.getTarget() != null) && player.getTarget().isPlayer() && (((L2PcInstance) player.getTarget()).getClan() != null);
}
@Override

View File

@@ -187,7 +187,7 @@ public class AdminCreateItem implements IAdminCommandHandler
}
for (L2PcInstance onlinePlayer : L2World.getInstance().getPlayers())
{
if ((activeChar != onlinePlayer) && onlinePlayer.isOnline() && ((onlinePlayer.getClient() != null) && !onlinePlayer.getClient().isDetached()))
if ((activeChar != onlinePlayer) && onlinePlayer.isOnline() && (onlinePlayer.getClient() != null) && !onlinePlayer.getClient().isDetached())
{
onlinePlayer.getInventory().addItem("Admin", idval, numval, onlinePlayer, activeChar);
onlinePlayer.sendMessage("Admin spawned " + numval + " " + template.getName() + " in your inventory.");

View File

@@ -100,7 +100,7 @@ public class AdminCursedWeapons implements IAdminCommandHandler
if (cw.isActivated())
{
final L2PcInstance pl = cw.getPlayer();
StringUtil.append(replyMSG, "<tr><td>Weilder:</td><td>", (pl == null ? "null" : pl.getName()), "</td></tr><tr><td>Karma:</td><td>", String.valueOf(cw.getPlayerKarma()), "</td></tr><tr><td>Kills:</td><td>", String.valueOf(cw.getPlayerPkKills()), "/", String.valueOf(cw.getNbKills()), "</td></tr><tr><td>Time remaining:</td><td>", String.valueOf(cw.getTimeLeft() / 60000), " min.</td></tr><tr><td><button value=\"Remove\" action=\"bypass -h admin_cw_remove ", String.valueOf(itemId), "\" width=73 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><button value=\"Go\" action=\"bypass -h admin_cw_goto ", String.valueOf(itemId), "\" width=73 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
StringUtil.append(replyMSG, "<tr><td>Weilder:</td><td>", pl == null ? "null" : pl.getName(), "</td></tr><tr><td>Karma:</td><td>", String.valueOf(cw.getPlayerKarma()), "</td></tr><tr><td>Kills:</td><td>", String.valueOf(cw.getPlayerPkKills()), "/", String.valueOf(cw.getNbKills()), "</td></tr><tr><td>Time remaining:</td><td>", String.valueOf(cw.getTimeLeft() / 60000), " min.</td></tr><tr><td><button value=\"Remove\" action=\"bypass -h admin_cw_remove ", String.valueOf(itemId), "\" width=73 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><button value=\"Go\" action=\"bypass -h admin_cw_goto ", String.valueOf(itemId), "\" width=73 height=21 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr>");
}
else if (cw.isDropped())
{

View File

@@ -117,7 +117,7 @@ public class AdminEditChar implements IAdminCommandHandler
else if (command.startsWith("admin_character_info"))
{
final String[] data = command.split(" ");
if ((data.length > 1))
if (data.length > 1)
{
showCharacterInfo(activeChar, L2World.getInstance().getPlayer(data[1]));
}
@@ -185,7 +185,7 @@ public class AdminEditChar implements IAdminCommandHandler
else if (command.startsWith("admin_edit_character"))
{
final String[] data = command.split(" ");
if ((data.length > 1))
if (data.length > 1)
{
editCharacter(activeChar, data[1]);
}
@@ -481,7 +481,7 @@ public class AdminEditChar implements IAdminCommandHandler
{
return false;
}
player.getAppearance().setSex(player.getAppearance().getSex() ? false : true);
player.getAppearance().setSex(!player.getAppearance().getSex());
player.sendMessage("Your gender has been changed by a GM");
player.broadcastUserInfo();
}
@@ -574,17 +574,14 @@ public class AdminEditChar implements IAdminCommandHandler
ps.execute();
}
}
else // removing penalty
if (changeCreateExpiryTime)
{
player.setClanCreateExpiryTime(0);
}
else
{
// removing penalty
if (changeCreateExpiryTime)
{
player.setClanCreateExpiryTime(0);
}
else
{
player.setClanJoinExpiryTime(0);
}
player.setClanJoinExpiryTime(0);
}
activeChar.sendMessage("Clan penalty successfully removed to character: " + playerName);
@@ -634,7 +631,7 @@ public class AdminEditChar implements IAdminCommandHandler
{
final String[] data = command.split(" ");
L2PcInstance pl = null;
if ((data.length > 1))
if (data.length > 1)
{
pl = L2World.getInstance().getPlayer(data[1]);
}
@@ -798,7 +795,7 @@ public class AdminEditChar implements IAdminCommandHandler
{
player = activeChar;
}
else if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance))
else if (activeChar.getTarget() instanceof L2PcInstance)
{
player = (L2PcInstance) activeChar.getTarget();
}
@@ -1067,7 +1064,7 @@ public class AdminEditChar implements IAdminCommandHandler
if (target instanceof L2PcInstance)
{
gatherCharacterInfo(activeChar, ((L2PcInstance) target), "charedit.htm");
gatherCharacterInfo(activeChar, (L2PcInstance) target, "charedit.htm");
}
}
@@ -1137,12 +1134,9 @@ public class AdminEditChar implements IAdminCommandHandler
{
findDisconnected = true;
}
else
else if (!IpAdress.matches("^(?:(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))$"))
{
if (!IpAdress.matches("^(?:(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))$"))
{
throw new IllegalArgumentException("Malformed IPv4 number");
}
throw new IllegalArgumentException("Malformed IPv4 number");
}
int CharactersFound = 0;
@@ -1270,13 +1264,13 @@ public class AdminEditChar implements IAdminCommandHandler
if (ipMap.get(ip).size() >= multibox)
{
final Integer count = dualboxIPs.get(ip);
if (count == null)
if (count != null)
{
dualboxIPs.put(ip, multibox);
dualboxIPs.put(ip, count + 1);
}
else
{
dualboxIPs.put(ip, count + 1);
dualboxIPs.put(ip, multibox);
}
}
}
@@ -1322,13 +1316,13 @@ public class AdminEditChar implements IAdminCommandHandler
if (ipMap.get(pack).size() >= multibox)
{
final Integer count = dualboxIPs.get(pack);
if (count == null)
if (count != null)
{
dualboxIPs.put(pack, multibox);
dualboxIPs.put(pack, count + 1);
}
else
{
dualboxIPs.put(pack, count + 1);
dualboxIPs.put(pack, multibox);
}
}
}

View File

@@ -688,12 +688,12 @@ public class AdminEffects implements IAdminCommandHandler
activeChar.sendPacket(SystemMessageId.NOTHING_HAPPENED);
return false;
}
if ((target.isNpc()) && ((action < 1) || (action > 20)))
if (target.isNpc() && ((action < 1) || (action > 20)))
{
activeChar.sendPacket(SystemMessageId.NOTHING_HAPPENED);
return false;
}
if ((target.isPlayer()) && ((action < 2) || ((action > 18) && (action != SocialAction.LEVEL_UP))))
if (target.isPlayer() && ((action < 2) || ((action > 18) && (action != SocialAction.LEVEL_UP))))
{
activeChar.sendPacket(SystemMessageId.NOTHING_HAPPENED);
return false;

View File

@@ -140,13 +140,13 @@ public class AdminElement implements IAdminCommandHandler
{
String old, current;
final Elementals element = itemInstance.getElemental(type);
if (element == null)
if (element != null)
{
old = "None";
old = element.toString();
}
else
{
old = element.toString();
old = "None";
}
// set enchant value
@@ -161,13 +161,13 @@ public class AdminElement implements IAdminCommandHandler
}
player.getInventory().equipItem(itemInstance);
if (itemInstance.getElementals() == null)
if (itemInstance.getElementals() != null)
{
current = "None";
current = itemInstance.getElemental(type).toString();
}
else
{
current = itemInstance.getElemental(type).toString();
current = "None";
}
// send packets

View File

@@ -385,12 +385,9 @@ public class AdminEventEngine implements IAdminCommandHandler
}
}
}
else
else if (activeChar.getTarget() instanceof L2PcInstance)
{
if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance))
{
L2Event.removeAndResetPlayer((L2PcInstance) activeChar.getTarget());
}
L2Event.removeAndResetPlayer((L2PcInstance) activeChar.getTarget());
}
showEventControl(activeChar);
}
@@ -502,7 +499,7 @@ public class AdminEventEngine implements IAdminCommandHandler
replyMSG.append("<center><multiedit var=\"txt\" width=270 height=100> <button value=\"Add text\" action=\"bypass -h admin_add $txt\" width=120 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
replyMSG.append("<button value=\"Remove text\" action=\"bypass -h admin_delete_buffer\" width=120 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
if (!(tempName.isEmpty() && tempBuffer.isEmpty()))
if (!tempName.isEmpty() || !tempBuffer.isEmpty())
{
replyMSG.append("<br><button value=\"Store Event Data\" action=\"bypass -h admin_event_store\" width=160 height=32 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
}

View File

@@ -64,7 +64,7 @@ public class AdminFortSiege implements IAdminCommandHandler
fort = FortManager.getInstance().getFortById(fortId);
}
// Get fort
if (((fort == null) || (fortId == 0)))
if ((fort == null) || (fortId == 0))
{
// No fort specified
showFortSelectPage(activeChar);
@@ -84,18 +84,15 @@ public class AdminFortSiege implements IAdminCommandHandler
{
activeChar.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
}
else if (fort.getSiege().addAttacker(player, false) == 4)
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOUR_CLAN_HAS_BEEN_REGISTERED_TO_S1_S_FORTRESS_BATTLE);
sm.addCastleId(fort.getResidenceId());
player.sendPacket(sm);
}
else
{
if (fort.getSiege().addAttacker(player, false) == 4)
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOUR_CLAN_HAS_BEEN_REGISTERED_TO_S1_S_FORTRESS_BATTLE);
sm.addCastleId(fort.getResidenceId());
player.sendPacket(sm);
}
else
{
player.sendMessage("During registering error occurred!");
}
player.sendMessage("During registering error occurred!");
}
}
else if (command.equalsIgnoreCase("admin_clear_fortsiege_list"))

View File

@@ -112,7 +112,7 @@ public class AdminGmChat implements IAdminCommandHandler
offset = 13;
}
text = command.substring(offset);
AdminData.getInstance().broadcastToGMs((new CreatureSay(0, ChatType.ALLIANCE, activeChar.getName(), text)));
AdminData.getInstance().broadcastToGMs(new CreatureSay(0, ChatType.ALLIANCE, activeChar.getName(), text));
}
catch (StringIndexOutOfBoundsException e)
{

View File

@@ -96,7 +96,7 @@ public class AdminHtml implements IAdminCommandHandler
}
else
{
content = HtmCache.getInstance().loadFile((new File(Config.DATAPACK_ROOT, path)));
content = HtmCache.getInstance().loadFile(new File(Config.DATAPACK_ROOT, path));
}
final NpcHtmlMessage html = new NpcHtmlMessage();
if (content != null)

View File

@@ -106,13 +106,12 @@ public class AdminLogin implements IAdminCommandHandler
Config.SERVER_LIST_TYPE = newType;
LoginServerThread.getInstance().sendServerType();
activeChar.sendMessage("Server Type changed to " + getServerTypeName(newType));
showMainPage(activeChar);
}
else
{
activeChar.sendMessage("Server Type is already " + getServerTypeName(newType));
showMainPage(activeChar);
}
showMainPage(activeChar);
}
else
{
@@ -135,13 +134,12 @@ public class AdminLogin implements IAdminCommandHandler
Config.SERVER_LIST_TYPE = age;
LoginServerThread.getInstance().sendServerStatus(ServerStatus.SERVER_AGE, age);
activeChar.sendMessage("Server Age changed to " + age);
showMainPage(activeChar);
}
else
{
activeChar.sendMessage("Server Age is already " + age);
showMainPage(activeChar);
}
showMainPage(activeChar);
}
catch (NumberFormatException e)
{

View File

@@ -95,7 +95,7 @@ public class AdminMobGroup implements IAdminCommandHandler
{
if (activeChar.getTarget() instanceof L2Character)
{
attack(command, activeChar, ((L2Character) activeChar.getTarget()));
attack(command, activeChar, (L2Character) activeChar.getTarget());
}
}
else if (command.startsWith("admin_mobgroup_rnd"))

View File

@@ -99,7 +99,7 @@ public final class AdminPCBangPoints implements IAdminCommandHandler
return false;
}
int pcBangCount = Math.min((target.getPcBangPoints() + value), Config.PC_BANG_MAX_POINTS);
int pcBangCount = Math.min(target.getPcBangPoints() + value, Config.PC_BANG_MAX_POINTS);
if (pcBangCount < 0)
{
pcBangCount = Config.PC_BANG_MAX_POINTS;
@@ -166,7 +166,7 @@ public final class AdminPCBangPoints implements IAdminCommandHandler
continue;
}
int pcBangCount = Math.min((temp.getPcBangPoints() + value), Integer.MAX_VALUE);
int pcBangCount = Math.min(temp.getPcBangPoints() + value, Integer.MAX_VALUE);
if (pcBangCount < 0)
{
pcBangCount = Integer.MAX_VALUE;

View File

@@ -67,12 +67,12 @@ public final class AdminPForge implements IAdminCommandHandler
opCodes.add(token);
}
if (opCodes == null)
if (opCodes != null)
{
return null;
return opCodes.toArray(new String[opCodes.size()]);
}
return opCodes.toArray(new String[opCodes.size()]);
return null;
}
private boolean validateOpCodes(String[] opCodes)
@@ -201,13 +201,13 @@ public final class AdminPForge implements IAdminCommandHandler
private void showSendUsage(L2PcInstance activeChar, String[] opCodes, String format)
{
activeChar.sendMessage("Usage: //forge_send sc|sb|cs opcode1[;opcode2[;opcode3]][ format value1 ... valueN] ");
if (opCodes == null)
if (opCodes != null)
{
showMainPage(activeChar);
showValuesPage(activeChar, opCodes, format);
}
else
{
showValuesPage(activeChar, opCodes, format);
showMainPage(activeChar);
}
}
@@ -466,7 +466,7 @@ public final class AdminPForge implements IAdminCommandHandler
case "$tboid":
{
target = activeChar.getTarget();
if ((target != null) && (target instanceof L2Playable))
if (target instanceof L2Playable)
{
boat = ((L2Playable) target).getActingPlayer().getBoat();
value = boat != null ? String.valueOf(boat.getObjectId()) : "0";
@@ -476,7 +476,7 @@ public final class AdminPForge implements IAdminCommandHandler
case "$ttitle":
{
target = activeChar.getTarget();
value = (target != null) && (target instanceof L2Character) ? String.valueOf(((L2Character) target).getTitle()) : "";
value = target instanceof L2Character ? String.valueOf(((L2Character) target).getTitle()) : "";
break;
}
case "$tname":

View File

@@ -119,13 +119,13 @@ public class AdminPledge implements IAdminCommandHandler
ClanTable.getInstance().destroyClan(targetPlayer.getClanId());
clan = targetPlayer.getClan();
if (clan == null)
if (clan != null)
{
activeChar.sendMessage("Clan disbanded.");
activeChar.sendMessage("There was a problem while destroying the clan.");
}
else
{
activeChar.sendMessage("There was a problem while destroying the clan.");
activeChar.sendMessage("Clan disbanded.");
}
break;
}

View File

@@ -85,7 +85,7 @@ public final class AdminPrimePoints implements IAdminCommandHandler
return false;
}
int primeCount = Math.min((target.getPrimePoints() + value), Integer.MAX_VALUE);
int primeCount = Math.min(target.getPrimePoints() + value, Integer.MAX_VALUE);
if (primeCount < 0)
{
primeCount = Integer.MAX_VALUE;
@@ -150,7 +150,7 @@ public final class AdminPrimePoints implements IAdminCommandHandler
continue;
}
int primeCount = Math.min((temp.getPrimePoints() + value), Integer.MAX_VALUE);
int primeCount = Math.min(temp.getPrimePoints() + value, Integer.MAX_VALUE);
if (primeCount < 0)
{
primeCount = Integer.MAX_VALUE;

View File

@@ -384,7 +384,7 @@ public class AdminPunishment implements IAdminCommandHandler
return true;
}
private static final String findCharId(String key)
private static String findCharId(String key)
{
final int charId = CharNameTable.getInstance().getIdByName(key);
return charId > 0 ? Integer.toString(charId) : key;

View File

@@ -151,7 +151,7 @@ public class AdminServerInfo implements IAdminCommandHandler
for (L2PcInstance onlinePlayer : L2World.getInstance().getPlayers())
{
if (((onlinePlayer != null) && (onlinePlayer.getClient() != null)) && !onlinePlayer.getClient().isDetached())
if ((onlinePlayer != null) && (onlinePlayer.getClient() != null) && !onlinePlayer.getClient().isDetached())
{
realPlayers.add(onlinePlayer.getIPAddress());
}

View File

@@ -309,7 +309,7 @@ public class AdminSkill implements IAdminCommandHandler
for (int x = 0; x < maxPages; x++)
{
StringUtil.append(replyMSG, "<td><a action=\"bypass -h admin_remove_skills ", String.valueOf(x), "\">Page ", String.valueOf((x + 1)), "</a></td>");
StringUtil.append(replyMSG, "<td><a action=\"bypass -h admin_remove_skills ", String.valueOf(x), "\">Page ", String.valueOf(x + 1), "</a></td>");
}
replyMSG.append("</tr></table></center><br><table width=270><tr><td width=80>Name:</td><td width=60>Level:</td><td width=40>Id:</td></tr>");

View File

@@ -345,16 +345,13 @@ public class AdminSpawn implements IAdminCommandHandler
}
}
}
else if (showposition && (npc != null))
{
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + npc.getX() + " " + npc.getY() + " " + npc.getZ());
}
else
{
if (showposition && (npc != null))
{
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + npc.getX() + " " + npc.getY() + " " + npc.getZ());
}
else
{
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + spawn.getX() + " " + spawn.getY() + " " + spawn.getZ());
}
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + spawn.getX() + " " + spawn.getY() + " " + spawn.getZ());
}
}

View File

@@ -113,23 +113,23 @@ public class AdminZone implements IAdminCommandHandler
final String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "html/admin/zone.htm");
final NpcHtmlMessage adminReply = new NpcHtmlMessage();
adminReply.setHtml(htmContent);
adminReply.replace("%PEACE%", (activeChar.isInsideZone(ZoneId.PEACE) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%PVP%", (activeChar.isInsideZone(ZoneId.PVP) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%SIEGE%", (activeChar.isInsideZone(ZoneId.SIEGE) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%TOWN%", (activeChar.isInsideZone(ZoneId.TOWN) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%CASTLE%", (activeChar.isInsideZone(ZoneId.CASTLE) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%FORT%", (activeChar.isInsideZone(ZoneId.FORT) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%HQ%", (activeChar.isInsideZone(ZoneId.HQ) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%CLANHALL%", (activeChar.isInsideZone(ZoneId.CLAN_HALL) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%LAND%", (activeChar.isInsideZone(ZoneId.LANDING) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%NOLAND%", (activeChar.isInsideZone(ZoneId.NO_LANDING) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%NOSUMMON%", (activeChar.isInsideZone(ZoneId.NO_SUMMON_FRIEND) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%WATER%", (activeChar.isInsideZone(ZoneId.WATER) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%FISHING%", (activeChar.isInsideZone(ZoneId.FISHING) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%SWAMP%", (activeChar.isInsideZone(ZoneId.SWAMP) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%DANGER%", (activeChar.isInsideZone(ZoneId.DANGER_AREA) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%NOSTORE%", (activeChar.isInsideZone(ZoneId.NO_STORE) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%SCRIPT%", (activeChar.isInsideZone(ZoneId.SCRIPT) ? "<font color=\"LEVEL\">YES</font>" : "NO"));
adminReply.replace("%PEACE%", activeChar.isInsideZone(ZoneId.PEACE) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%PVP%", activeChar.isInsideZone(ZoneId.PVP) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%SIEGE%", activeChar.isInsideZone(ZoneId.SIEGE) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%TOWN%", activeChar.isInsideZone(ZoneId.TOWN) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%CASTLE%", activeChar.isInsideZone(ZoneId.CASTLE) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%FORT%", activeChar.isInsideZone(ZoneId.FORT) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%HQ%", activeChar.isInsideZone(ZoneId.HQ) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%CLANHALL%", activeChar.isInsideZone(ZoneId.CLAN_HALL) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%LAND%", activeChar.isInsideZone(ZoneId.LANDING) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%NOLAND%", activeChar.isInsideZone(ZoneId.NO_LANDING) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%NOSUMMON%", activeChar.isInsideZone(ZoneId.NO_SUMMON_FRIEND) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%WATER%", activeChar.isInsideZone(ZoneId.WATER) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%FISHING%", activeChar.isInsideZone(ZoneId.FISHING) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%SWAMP%", activeChar.isInsideZone(ZoneId.SWAMP) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%DANGER%", activeChar.isInsideZone(ZoneId.DANGER_AREA) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%NOSTORE%", activeChar.isInsideZone(ZoneId.NO_STORE) ? "<font color=\"LEVEL\">YES</font>" : "NO");
adminReply.replace("%SCRIPT%", activeChar.isInsideZone(ZoneId.SCRIPT) ? "<font color=\"LEVEL\">YES</font>" : "NO");
final StringBuilder zones = new StringBuilder(100);
final L2WorldRegion region = L2World.getInstance().getRegion(activeChar.getX(), activeChar.getY());
for (L2ZoneType zone : region.getZones())
@@ -163,8 +163,8 @@ public class AdminZone implements IAdminCommandHandler
{
final int worldX = activeChar.getX();
final int worldY = activeChar.getY();
final int geoX = ((((worldX - (-327680)) >> 4) >> 11) + 10);
final int geoY = ((((worldY - (-262144)) >> 4) >> 11) + 10);
final int geoX = (((worldX - -327680) >> 4) >> 11) + 10;
final int geoY = (((worldY - -262144) >> 4) >> 11) + 10;
activeChar.sendMessage("GeoRegion: " + geoX + "_" + geoY + "");
}