This commit is contained in:
MobiusDev 2018-09-23 18:38:41 +00:00
parent 4ead57d130
commit 94887eab04
511 changed files with 1076 additions and 9224 deletions

View File

@ -422,9 +422,6 @@ public class GameServer
DoorTable doorTable = DoorTable.getInstance();
// Opened by players like L2OFF
// doorTable.getDoor(19160010).openMe();
// doorTable.getDoor(19160011).openMe();
doorTable.getDoor(19160012).openMe();
doorTable.getDoor(19160013).openMe();
doorTable.getDoor(19160014).openMe();

View File

@ -139,7 +139,6 @@ public class ExtractableItemsData
}
catch (Exception e)
{
// if(Config.ENABLE_ALL_EXCEPTIONS)
e.printStackTrace();
LOGGER.info("Extractable items data: Can not find './data/csv/extractable_items.csv'");

View File

@ -197,8 +197,7 @@ public class FishTable
}
if (_Fishs == null)
{
// the fish list is empty
LOGGER.warning("Fish are not defined !");
LOGGER.warning("Fish are not defined!");
return null;
}
for (FishData f : _Fishs)

View File

@ -131,7 +131,6 @@ public class RecipeTable extends RecipeController
}
}
// TODO XMLize the recipe list
private void parseList(String line)
{
try

View File

@ -34,36 +34,12 @@ import com.l2jmobius.gameserver.datatables.AccessLevel;
public class AccessLevels
{
private static final Logger LOGGER = Logger.getLogger(AccessLevels.class.getName());
/**
* The one and only instance of this class, retriveable by getInstance()<br>
*/
private static AccessLevels _instance = null;
/**
* Reserved master access level<br>
*/
// public static final int _masterAccessLevelNum = Config.MASTERACCESS_LEVEL;
/**
* The master access level which can use everything<br>
*/
// L2EMU_EDIT - Rayan -
public AccessLevel _masterAccessLevel;/*
* = new AccessLevel(_masterAccessLevelNum, "Master Access", Config.MASTERACCESS_NAME_COLOR, Config.MASTERACCESS_TITLE_COLOR, true, true, true, true, true, true, true, true, true, true, true); //L2EMU_EDIT /** Reserved user access level<br>
*/
// public static final int _userAccessLevelNum = 0;
/**
* The user access level which can do no administrative tasks<br>
*/
// L2EMU_EDIT - Rayan -
public AccessLevel _userAccessLevel;/*
* = new AccessLevel(_userAccessLevelNum, "User", Integer.decode("0xFFFFFF"), Integer.decode("0xFFFFFF"), false, false, false, true, false, true, true, true, true, true, false); //L2EMU_EDIT /** Map of access levels defined in database<br>
*/
public AccessLevel _masterAccessLevel;
public AccessLevel _userAccessLevel;
private final Map<Integer, AccessLevel> _accessLevels = new HashMap<>();
/**
* Loads the access levels from database<br>
*/
private AccessLevels()
{
_masterAccessLevel = new AccessLevel(Config.MASTERACCESS_LEVEL, "Master Access", Config.MASTERACCESS_NAME_COLOR, Config.MASTERACCESS_TITLE_COLOR, true, true, true, true, true, true, true, true, true, true, true);
@ -86,11 +62,9 @@ public class AccessLevels
boolean takeAggro = false;
boolean gainExp = false;
// L2EMU_ADD
boolean useNameColor = true;
boolean useTitleColor = false;
boolean canDisableGmStatus = true;
// L2EMU_ADD
while (rset.next())
{
@ -158,14 +132,11 @@ public class AccessLevels
takeAggro = rset.getBoolean("takeAggro");
gainExp = rset.getBoolean("gainExp");
// L2EMU_ADD - Rayan for temp access
useNameColor = rset.getBoolean("useNameColor");
useTitleColor = rset.getBoolean("useTitleColor");
canDisableGmStatus = rset.getBoolean("canDisableGmStatus");
// L2EMU_EDIT - Rayan for temp access
_accessLevels.put(accessLevel, new AccessLevel(accessLevel, name, nameColor, titleColor, isGm, allowPeaceAttack, allowFixedRes, allowTransaction, allowAltG, giveDamage, takeAggro, gainExp, useNameColor, useTitleColor, canDisableGmStatus));
// L2EMU_EDIT
}
rset.close();
@ -175,7 +146,6 @@ public class AccessLevels
{
LOGGER.warning("AccessLevels: Error loading from database " + e);
}
// LOGGER.info("AccessLevels: Loaded " + _accessLevels.size() + " Access Levels from database.");
LOGGER.info("AccessLevels: Master Access Level is " + Config.MASTERACCESS_LEVEL);
LOGGER.info("AccessLevels: User Access Level is " + Config.USERACCESS_LEVEL);
if (Config.DEBUG)
@ -225,9 +195,7 @@ public class AccessLevels
return;
}
// L2EMU_ADD - Rayan -
_accessLevels.put(accessLevel, new AccessLevel(accessLevel, "Banned", Integer.decode("0x000000"), Integer.decode("0x000000"), false, false, false, false, false, false, false, false, false, false, false));
// L2EMU_ADD
}
}

View File

@ -33,24 +33,11 @@ import com.l2jmobius.gameserver.datatables.AccessLevel;
*/
public class AdminCommandAccessRights
{
/**
* The logger<br>
*/
protected static final Logger LOGGER = Logger.getLogger(AdminCommandAccessRights.class.getName());
/**
* The one and only instance of this class, retriveable by getInstance()<br>
*/
private static AdminCommandAccessRights _instance = null;
/**
* The access rights<br>
*/
private final Map<String, Integer> adminCommandAccessRights = new HashMap<>();
/**
* Loads admin command access rights from database<br>
*/
private AdminCommandAccessRights()
{
try (Connection con = DatabaseFactory.getConnection())
@ -122,13 +109,11 @@ public class AdminCommandAccessRights
return true;
}
// L2EMU_ADD - Visor123 need parse command before check
String command = adminCommand;
if (adminCommand.indexOf(" ") != -1)
{
command = adminCommand.substring(0, adminCommand.indexOf(" "));
}
// L2EMU_ADD
int acar = 0;
if (adminCommandAccessRights.get(command) != null)

View File

@ -184,7 +184,6 @@ public class CharTemplateTable
while (rset.next())
{
StatsSet set = new StatsSet();
// ClassId classId = ClassId.values()[rset.getInt("id")];
set.set("classId", rset.getInt("id"));
set.set("className", rset.getString("className"));
set.set("raceId", rset.getInt("raceId"));
@ -228,7 +227,7 @@ public class CharTemplateTable
set.set("collision_radius", rset.getDouble("m_col_r"));
set.set("collision_height", rset.getDouble("m_col_h"));
ct = new L2PcTemplate(set);
// 5items must go here
// 5 items must go here
for (int x = 1; x < 6; x++)
{
if (rset.getInt("items" + x) != 0)
@ -283,9 +282,4 @@ public class CharTemplateTable
return currId;
}
// public L2CharTemplate[] getAllTemplates()
// {
// return _templates.values().toArray(new L2CharTemplate[_templates.size()]);
// }
}

View File

@ -477,17 +477,10 @@ public class ClanTable
LOGGER.warning("Could not store clans wars data " + e);
}
// SystemMessage msg = SystemMessageId.WAR_WITH_THE_S1_CLAN_HAS_BEGUN);
SystemMessage msg = new SystemMessage(SystemMessageId.CLAN_WAR_DECLARED_AGAINST_S1_IF_KILLED_LOSE_LOW_EXP);
msg.addString(clan2.getName());
clan1.broadcastToOnlineMembers(msg);
// msg = SystemMessageId.WAR_WITH_THE_S1_CLAN_HAS_BEGUN);
// msg.addString(clan1.getName());
// clan2.broadcastToOnlineMembers(msg);
// clan1 declared clan war.
msg = new SystemMessage(SystemMessageId.CLAN_S1_DECLARED_WAR);
msg.addString(clan1.getName());
clan2.broadcastToOnlineMembers(msg);
@ -503,29 +496,12 @@ public class ClanTable
clan1.broadcastClanStatus();
clan2.broadcastClanStatus();
// for(L2ClanMember player: clan1.getMembers())
// {
// if(player.getPlayerInstance()!=null)
// player.getPlayerInstance().setWantsPeace(0);
// }
// for(L2ClanMember player: clan2.getMembers())
// {
// if(player.getPlayerInstance()!=null)
// player.getPlayerInstance().setWantsPeace(0);
// }
try (Connection con = DatabaseFactory.getConnection())
{
final PreparedStatement statement = con.prepareStatement("DELETE FROM clan_wars WHERE clan1=? AND clan2=?");
statement.setInt(1, clanId1);
statement.setInt(2, clanId2);
statement.execute();
// statement = con.prepareStatement("DELETE FROM clan_wars WHERE clan1=? AND clan2=?");
// statement.setInt(1,clanId2);
// statement.setInt(2,clanId1);
// statement.execute();
statement.close();
}
catch (Exception e)
@ -533,8 +509,6 @@ public class ClanTable
LOGGER.warning("Could not restore clans wars data " + e);
}
// SystemMessage msg = SystemMessageId.WAR_WITH_THE_S1_CLAN_HAS_ENDED);
SystemMessage msg = new SystemMessage(SystemMessageId.WAR_AGAINST_S1_HAS_STOPPED);
msg.addString(clan2.getName());
clan1.broadcastToOnlineMembers(msg);
@ -542,10 +516,6 @@ public class ClanTable
msg = new SystemMessage(SystemMessageId.CLAN_S1_HAS_DECIDED_TO_STOP);
msg.addString(clan1.getName());
clan2.broadcastToOnlineMembers(msg);
// msg = SystemMessageId.WAR_WITH_THE_S1_CLAN_HAS_ENDED);
// msg.addString(clan1.getName());
// clan2.broadcastToOnlineMembers(msg);
}
public void checkSurrender(L2Clan clan1, L2Clan clan2)

View File

@ -36,23 +36,10 @@ public class HelperBuffTable
private static final Logger LOGGER = Logger.getLogger(HennaTable.class.getName());
private static HelperBuffTable _instance;
/** The table containing all Buff of the Newbie Helper */
public List<L2HelperBuff> helperBuff;
private final boolean _initialized = true;
/**
* The player level since Newbie Helper can give the fisrt buff <BR>
* Used to generate message : "Come back here when you have reached level ...")
*/
private int _magicClassLowestLevel = 100;
private int _physicClassLowestLevel = 100;
/**
* The player level above which Newbie Helper won't give any buff <BR>
* Used to generate message : "Only novice character of level ... or less can receive my support magic.")
*/
private int _magicClassHighestLevel = 1;
private int _physicClassHighestLevel = 1;
@ -235,5 +222,4 @@ public class HelperBuffTable
{
_physicClassLowestLevel = physicClassLowestLevel;
}
}

View File

@ -32,11 +32,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2HennaInstance;
import com.l2jmobius.gameserver.model.base.ClassId;
import com.l2jmobius.gameserver.templates.item.L2Henna;
/**
* This class ...
* @version $Revision$ $Date$
*/
public class HennaTreeTable
{
private static Logger LOGGER = Logger.getLogger(HennaTreeTable.class.getName());
@ -61,9 +56,6 @@ public class HennaTreeTable
final ResultSet classlist = statement.executeQuery();
List<L2HennaInstance> list;
// int parentClassId;
// L2Henna henna;
classlist: while (classlist.next())
{
list = new ArrayList<>();
@ -141,5 +133,4 @@ public class HennaTreeTable
{
return _initialized;
}
}

View File

@ -31,8 +31,6 @@ public class L2PetDataTable
{
private static final Logger LOGGER = Logger.getLogger(L2PetInstance.class.getName());
private static L2PetDataTable _instance;
// private static final int[] PET_LIST = { 12077, 12312, 12313, 12311, 12527, 12528, 12526 };
private static Map<Integer, Map<Integer, L2PetData>> _petTable;
public static L2PetDataTable getInstance()
@ -135,7 +133,6 @@ public class L2PetDataTable
public L2PetData getPetData(int petID, int petLevel)
{
// LOGGER.info("Getting id "+petID+" level "+ petLevel);
return _petTable.get(petID).get(petLevel);
}
@ -378,23 +375,23 @@ public class L2PetDataTable
{
switch (npcId)
{
case 12077:// wolf pet a
case 12077: // wolf pet a
{
return new int[]
{
2375
};
}
case 12564:// Sin Eater
case 12564: // Sin Eater
{
return new int[]
{
4425
};
}
case 12311:// hatchling of wind
case 12312:// hatchling of star
case 12313:// hatchling of twilight
case 12311: // hatchling of wind
case 12312: // hatchling of star
case 12313: // hatchling of twilight
{
return new int[]
{
@ -403,9 +400,9 @@ public class L2PetDataTable
3502
};
}
case 12526:// wind strider
case 12527:// Star strider
case 12528:// Twilight strider
case 12526: // wind strider
case 12527: // Star strider
case 12528: // Twilight strider
{
return new int[]
{
@ -414,16 +411,16 @@ public class L2PetDataTable
4424
};
}
case 12621:// Wyvern
case 12621: // Wyvern
{
return new int[]
{
8663
};
}
case 12780:// Baby Buffalo
case 12782:// Baby Cougar
case 12781:// Baby Kookaburra
case 12780: // Baby Buffalo
case 12782: // Baby Cougar
case 12781: // Baby Kookaburra
{
return new int[]
{
@ -445,9 +442,9 @@ public class L2PetDataTable
public static boolean isMountable(int npcId)
{
return (npcId == 12526 // wind strider
) || (npcId == 12527 // star strider
) || (npcId == 12528 // twilight strider
) || (npcId == 12621); // wyvern
return (npcId == 12526) // wind strider
|| (npcId == 12527) // star strider
|| (npcId == 12528) // twilight strider
|| (npcId == 12621); // wyvern
}
}

View File

@ -318,7 +318,7 @@ public class NpcTable
{
minion = true;
}
case 29001:// queenAnt
case 29001: // queenAnt
{
if (Config.QA_LEVEL > 0)
{
@ -329,10 +329,10 @@ public class NpcTable
{
level = NpcData.getInt("level");
}
}
break;
case 29022:
{ // zaken
}
case 29022: // zaken
{
if (Config.ZAKEN_LEVEL > 0)
{
diff = Config.ZAKEN_LEVEL - NpcData.getInt("level");
@ -342,8 +342,8 @@ public class NpcTable
{
level = NpcData.getInt("level");
}
}
break;
}
case 29015: // and minions
case 29016:
case 29017:
@ -351,7 +351,7 @@ public class NpcTable
{
minion = true;
}
case 29014:// orfen
case 29014: // orfen
{
if (Config.ORFEN_LEVEL > 0)
{
@ -362,8 +362,8 @@ public class NpcTable
{
level = NpcData.getInt("level");
}
}
break;
}
case 29007: // and minions
case 29008:
case 290011:
@ -381,8 +381,8 @@ public class NpcTable
{
level = NpcData.getInt("level");
}
}
break;
}
default:
{
level = NpcData.getInt("level");
@ -398,7 +398,6 @@ public class NpcTable
npcDat.set("name", NpcData.getString("name"));
npcDat.set("serverSideName", NpcData.getBoolean("serverSideName"));
// npcDat.set("name", "");
npcDat.set("title", NpcData.getString("title"));
npcDat.set("serverSideTitle", NpcData.getBoolean("serverSideTitle"));
npcDat.set("collision_radius", NpcData.getDouble("collision_radius"));
@ -410,8 +409,8 @@ public class NpcTable
// BOSS POWER CHANGES
double multi_value = 1;
if (diff >= 15)
{ // means that there is level customization
if (diff >= 15) // means that there is level customization
{
multi_value = multi_value * (diff / 10);
}
else if ((diff > 0) && (diff < 15))
@ -421,81 +420,75 @@ public class NpcTable
if (minion)
{
multi_value = multi_value * Config.LEVEL_DIFF_MULTIPLIER_MINION; // allow to increase the power of a value
// that for example, at 40 diff levels is
// equal to
// value = ((40/10)*0.8) = 3,2 --> 220 % more
multi_value = multi_value * Config.LEVEL_DIFF_MULTIPLIER_MINION;
}
else
{
switch (id)
{
case 29001:
{// queenAnt
case 29001: // queenAnt
{
if (Config.QA_POWER_MULTIPLIER > 0)
{
multi_value = multi_value * Config.QA_POWER_MULTIPLIER;
}
}
break;
case 29022:
{ // zaken
}
case 29022: // zaken
{
if (Config.ZAKEN_POWER_MULTIPLIER > 0)
{
multi_value = multi_value * Config.ZAKEN_POWER_MULTIPLIER;
}
}
break;
case 29014:
{// orfen
}
case 29014: // orfen
{
if (Config.ORFEN_POWER_MULTIPLIER > 0)
{
multi_value = multi_value * Config.ORFEN_POWER_MULTIPLIER;
}
}
break;
case 29006:
{ // core
}
case 29006: // core
{
if (Config.CORE_POWER_MULTIPLIER > 0)
{
multi_value = multi_value * Config.CORE_POWER_MULTIPLIER;
}
}
break;
case 29019:
{ // antharas
}
case 29019: // antharas
{
if (Config.ANTHARAS_POWER_MULTIPLIER > 0)
{
multi_value = multi_value * Config.ANTHARAS_POWER_MULTIPLIER;
}
}
break;
case 29028:
{ // valakas
}
case 29028: // valakas
{
if (Config.VALAKAS_POWER_MULTIPLIER > 0)
{
multi_value = multi_value * Config.VALAKAS_POWER_MULTIPLIER;
}
}
break;
case 29020:
{ // baium
}
case 29020: // baium
{
if (Config.BAIUM_POWER_MULTIPLIER > 0)
{
multi_value = multi_value * Config.BAIUM_POWER_MULTIPLIER;
}
}
break;
case 29045:
{ // frintezza
}
case 29045: // frintezza
{
if (Config.FRINTEZZA_POWER_MULTIPLIER > 0)
{
multi_value = multi_value * Config.FRINTEZZA_POWER_MULTIPLIER;
}
}
break;
default:
{
}
}
}
@ -520,7 +513,6 @@ public class NpcTable
npcDat.set("baseWalkSpd", NpcData.getInt("walkspd"));
npcDat.set("baseRunSpd", NpcData.getInt("runspd"));
// constants, until we have stats in DB
// constants, until we have stats in DB
npcDat.safeSet("baseSTR", NpcData.getInt("str"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + NpcData.getInt("idTemplate"));
npcDat.safeSet("baseCON", NpcData.getInt("con"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + NpcData.getInt("idTemplate"));
@ -528,9 +520,7 @@ public class NpcTable
npcDat.safeSet("baseINT", NpcData.getInt("int"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + NpcData.getInt("idTemplate"));
npcDat.safeSet("baseWIT", NpcData.getInt("wit"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + NpcData.getInt("idTemplate"));
npcDat.safeSet("baseMEN", NpcData.getInt("men"), 0, BaseStats.MAX_STAT_VALUE, "Loading npc template id: " + NpcData.getInt("idTemplate"));
/*
* npcDat.set("baseSTR", NpcData.getInt("str")); npcDat.set("baseCON", NpcData.getInt("con")); npcDat.set("baseDEX", NpcData.getInt("dex")); npcDat.set("baseINT", NpcData.getInt("int")); npcDat.set("baseWIT", NpcData.getInt("wit")); npcDat.set("baseMEN", NpcData.getInt("men"));
*/
npcDat.set("baseCpMax", 0);
npcDat.set("factionId", NpcData.getString("faction_id"));
@ -620,7 +610,6 @@ public class NpcTable
}
}
// just wrapper
public void reloadAllNpc()
{
restoreNpcData();

View File

@ -186,7 +186,6 @@ public class SpawnTable
statement = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, loc_id, periodOfDay FROM custom_spawnlist ORDER BY id");
}
// PreparedStatement statement = con.prepareStatement("SELECT id, count, npc_templateid, locx, locy, locz, heading, respawn_delay, loc_id, periodOfDay FROM custom_spawnlist ORDER BY id");
final ResultSet rset = statement.executeQuery();
L2Spawn spawnDat;

View File

@ -40,7 +40,6 @@ public class TerritoryTable
public TerritoryTable()
{
_territory.clear();
// load all data at server start
reload_data();
}
@ -64,7 +63,6 @@ public class TerritoryTable
while (rset.next())
{
// final String terr = "sql_terr_" + rset.getString("loc_id");
final int terr = rset.getInt("loc_id");
if (_territory.get(terr) == null)

View File

@ -169,9 +169,7 @@ public class TradeListTable
statement1.close();
LOGGER.info("TradeListTable: Loaded " + _lists.size() + " Buylists.");
/*
* Restore Task for reinitialize count of buy item
*/
try
{
int time = 0;

View File

@ -46,7 +46,6 @@ public class AugmentationData
{
private static final Logger LOGGER = Logger.getLogger(AugmentationData.class.getName());
// =========================================================
private static AugmentationData _instance;
public static final AugmentationData getInstance()
@ -59,21 +58,14 @@ public class AugmentationData
return _instance;
}
// =========================================================
// Data Field
// stats
private static final int STAT_START = 1;
private static final int STAT_END = 14560;
private static final int STAT_BLOCKSIZE = 3640;
// private static final int STAT_NUMBEROF_BLOCKS = 4;
private static final int STAT_SUBBLOCKSIZE = 91;
// private static final int STAT_NUMBEROF_SUBBLOCKS = 40;
// skills
private static final int BLUE_START = 14561;
// private static final int PURPLE_START = 14578;
// private static final int RED_START = 14685;
private static final int SKILLS_BLOCKSIZE = 178;
// basestats
@ -87,8 +79,6 @@ public class AugmentationData
private final Map<Integer, ArrayList<augmentationSkill>> _purpleSkills;
private final Map<Integer, ArrayList<augmentationSkill>> _redSkills;
// =========================================================
// Constructor
@SuppressWarnings("unchecked")
private AugmentationData()
{
@ -131,9 +121,6 @@ public class AugmentationData
getInstance();
}
// =========================================================
// Nested Class
public class augmentationSkill
{
private final int _skillId;
@ -216,15 +203,10 @@ public class AugmentationData
}
}
// =========================================================
// Method - Private
private final void load()
{
// Load the skillmap
// Note: the skillmap data is only used when generating new augmentations
// the client expects a different id in order to display the skill in the
// items description...
// Note: the skillmap data is only used when generating new augmentations the client expects a different id in order to display the skill in the items description.
try
{
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
@ -421,9 +403,6 @@ public class AugmentationData
}
}
// =========================================================
// Properties - Public
/**
* Generate a new random augmentation
* @param item
@ -433,11 +412,7 @@ public class AugmentationData
*/
public L2Augmentation generateRandomAugmentation(L2ItemInstance item, int lifeStoneLevel, int lifeStoneGrade)
{
// Note that stat12 stands for stat 1 AND 2 (same for stat34 ;p )
// this is because a value can contain up to 2 stat modifications
// (there are two short values packed in one integer value, meaning 4 stat modifications at max)
// for more info take a look at getAugStatsById(...)
// Note: stat12 stands for stat 1 AND 2 (same for stat34 ;p ) this is because a value can contain up to 2 stat modifications (there are two short values packed in one integer value, meaning 4 stat modifications at max) for more info take a look at getAugStatsById(...)
// Note: lifeStoneGrade: (0 means low grade, 3 top grade)
// First: determine whether we will add a skill/baseStatModifier or not because this determine which color could be the result
int skill_Chance = 0;
@ -496,15 +471,10 @@ public class AugmentationData
// Second: decide which grade the augmentation result is going to have:
// 0:yellow, 1:blue, 2:purple, 3:red
// The chances used here are most likely custom,
// whats known is: u can also get a red result from a normal grade lifeStone
// however I will make it so that a higher grade lifeStone will more likely result in a
// higher grade augmentation... and the augmentation result will at least have the grade
// of the life stone
// Second: Calculate the subblock offset for the choosen color,
// and the level of the lifeStone
// whats known is: you cant have yellow with skill(or baseStatModifier)
// noGrade stone can not have glow, mid only with skill, high has a chance(custom), top allways glow
// The chances used here are most likely custom, whats known is: u can also get a red result from a normal grade lifeStone however I will make it so that a higher grade lifeStone will more likely result in a higher grade augmentation...
// and the augmentation result will at least have the grade of the life stone
// Second: Calculate the subblock offset for the choosen color, and the level of the lifeStone
// Whats is known: you cant have yellow with skill(or baseStatModifier) noGrade stone can not have glow, mid only with skill, high has a chance(custom), top allways glow
if ((stat34 == 0) && !generateSkill)
{
resultColor = Rnd.get(0, 100);
@ -679,8 +649,7 @@ public class AugmentationData
final augmentationStat as = _augmentationStats[block].get((stats[i] - 1));
temp.add(new AugStat(as.getStat(), as.getSingleStatValue(subblock)));
}
else
// twin stat
else // twin stat
{
stats[i] -= 13; // rescale to 0 (if first of first combined block)

View File

@ -75,7 +75,6 @@ public class ZoneData
{
private static final Logger LOGGER = Logger.getLogger(ZoneData.class.getName());
// =========================================================
private static ZoneData _instance;
public static final ZoneData getInstance()
@ -88,11 +87,6 @@ public class ZoneData
return _instance;
}
// =========================================================
// Data Field
// =========================================================
// Constructor
public ZoneData()
{
LOGGER.info("Loading zones...");
@ -100,7 +94,6 @@ public class ZoneData
load();
}
// reload
public void reload()
{
synchronized (_instance)
@ -110,9 +103,6 @@ public class ZoneData
}
}
// =========================================================
// Method - Private
private final void load()
{
int zoneCount = 0;
@ -269,9 +259,6 @@ public class ZoneData
temp = new L2BossZone(zoneId, boss_id);
break;
}
/*
* else if(zoneType.equals("SkillZone")) { temp = new L2SkillZone(zoneId); }
*/
case "EffectZone":
{
zoneId = effect_zone_id;
@ -309,7 +296,6 @@ public class ZoneData
}
// get the zone shape from file if any
int[][] coords = null;
int[] point;
final List<int[]> rs = new ArrayList<>();
@ -436,11 +422,7 @@ public class ZoneData
}
}
else // Create this zone. Parsing for cuboids is a
// bit different than for other polygons
// cuboids need exactly 2 points to be defined.
// Other polygons need at least 3 (one per
// vertex)
else // Create this zone. Parsing for cuboids is a bit different than for other polygons cuboids need exactly 2 points to be defined. Other polygons need at least 3 (one per vertex)
if (zoneShape.equalsIgnoreCase("Cuboid"))
{
if (coords.length == 2)
@ -475,8 +457,7 @@ public class ZoneData
}
else if (zoneShape.equalsIgnoreCase("Cylinder"))
{
// A Cylinder zone requires a center point
// at x,y and a radius
// A cylinder zone requires a center point at x,y and a radius
attrs = d.getAttributes();
final int zoneRad = Integer.parseInt(attrs.getNamedItem("rad").getNodeValue());
if ((coords.length == 1) && (zoneRad > 0))
@ -524,8 +505,7 @@ public class ZoneData
FishingZoneManager.getInstance().addWaterZone((L2WaterZone) temp);
}
// Register the zone into any world region it intersects with...
// currently 11136 test for each zone :>
// Register the zone into any world region it intersects with currently 11136 test for each zone :>
int ax;
int ay;
int bx;

View File

@ -164,16 +164,6 @@ final class DocumentItem extends DocumentBase
Node first = n.getFirstChild();
for (n = first; n != null; n = n.getNextSibling())
{
// No tables in item xmls.
// if ("table".equals(n.getNodeName()))
// {
// if (_currentItem.item != null)
// {
// throw new IllegalStateException("Item created but table node found! Item " + itemId);
// }
// parseTable(n);
// }
// else
if ("set".equals(n.getNodeName()))
{
if (_currentItem.item != null)
@ -182,12 +172,6 @@ final class DocumentItem extends DocumentBase
}
parseBeanSet(n, _currentItem.set, 1);
}
// Handled bellow, after item type is set.
// else if ("for".equals(n.getNodeName()))
// {
// makeItem();
// parseTemplate(n, _currentItem.item);
// }
}
if (className.equals("Weapon"))

View File

@ -188,10 +188,8 @@ final class DocumentSkill extends DocumentBase
{
_currentSkill.enchsets1[i] = new StatsSet();
_currentSkill.enchsets1[i].set("skill_id", _currentSkill.id);
// currentSkill.enchsets1[i] = currentSkill.sets[currentSkill.sets.length-1];
_currentSkill.enchsets1[i].set("level", i + 101);
_currentSkill.enchsets1[i].set("name", _currentSkill.name);
// currentSkill.enchsets1[i].set("skillType", "NOTDONE");
for (n = first; n != null; n = n.getNextSibling())
{
@ -218,11 +216,9 @@ final class DocumentSkill extends DocumentBase
for (int i = 0; i < enchantLevels2; i++)
{
_currentSkill.enchsets2[i] = new StatsSet();
// currentSkill.enchsets2[i] = currentSkill.sets[currentSkill.sets.length-1];
_currentSkill.enchsets2[i].set("skill_id", _currentSkill.id);
_currentSkill.enchsets2[i].set("level", i + 141);
_currentSkill.enchsets2[i].set("name", _currentSkill.name);
// currentSkill.enchsets2[i].set("skillType", "NOTDONE");
for (n = first; n != null; n = n.getNextSibling())
{

View File

@ -34,8 +34,7 @@ public class GeoEditorThread extends Thread
private int _mode = 0; // 0 - don't send coords, 1 - send each
// validateposition from client, 2 - send in
// intervals of _sendDelay ms.
// validateposition from client, 2 - send in intervals of _sendDelay ms.
private int _sendDelay = 1000; // default - once in second
private final Socket _geSocket;

View File

@ -43,111 +43,6 @@ public abstract class PathFinding
public abstract List<AbstractNodeLoc> findPath(int x, int y, int z, int tx, int ty, int tz, boolean playable);
// @formatter:off
/*
public List<AbstractNodeLoc> search(AbstractNode start, AbstractNode end, int instanceId)
{
// The simplest grid-based pathfinding.
// Drawback is not having higher cost for diagonal movement (means funny routes)
// Could be optimized e.g. not to calculate backwards as far as forwards.
// List of Visited Nodes
LinkedList<AbstractNode> visited = new LinkedList<AbstractNode>();
// List of Nodes to Visit
LinkedList<AbstractNode> to_visit = new LinkedList<AbstractNode>();
to_visit.add(start);
int i = 0;
while (i < 800)
{
AbstractNode node;
try
{
node = to_visit.removeFirst();
}
catch (Exception e)
{
// No Path found
return null;
}
if (node.equals(end)) //path found!
return constructPath(node, instanceId);
else
{
i++;
visited.add(node);
node.attachNeighbors();
Node[] neighbors = node.getNeighbors();
if (neighbors == null)
continue;
for (Node n : neighbors)
{
if (!visited.contains(n) && !to_visit.contains(n))
{
n.setParent(node);
to_visit.add(n);
}
}
}
}
//No Path found
return null;
}
*/
/*
public List<AbstractNodeLoc> searchAStar(Node start, Node end, int instanceId)
{
// Not operational yet?
int start_x = start.getLoc().getX();
int start_y = start.getLoc().getY();
int end_x = end.getLoc().getX();
int end_y = end.getLoc().getY();
//List of Visited Nodes
FastNodeList visited = new FastNodeList(800);//TODO! Add limit to cfg
// List of Nodes to Visit
BinaryNodeHeap to_visit = new BinaryNodeHeap(800);
to_visit.add(start);
int i = 0;
while (i < 800)//TODO! Add limit to cfg
{
AbstractNode node;
try
{
node = to_visit.removeFirst();
}
catch (Exception e)
{
// No Path found
return null;
}
if (node.equals(end)) //path found!
return constructPath(node, instanceId);
else
{
visited.add(node);
node.attachNeighbors();
for (Node n : node.getNeighbors())
{
if (!visited.contains(n) && !to_visit.contains(n))
{
i++;
n.setParent(node);
n.setCost(Math.abs(start_x - n.getLoc().getNodeX()) + Math.abs(start_y - n.getLoc().getNodeY())
+ Math.abs(end_x - n.getLoc().getNodeX()) + Math.abs(end_y - n.getLoc().getNodeY()));
to_visit.add(n);
}
}
}
}
//No Path found
return null;
}
*/
// @formatter:on
/**
* Convert geodata position to pathnode position
* @param geo_pos

View File

@ -344,7 +344,6 @@ public class CellNodeBuffer
final int dX = x - _targetX;
final int dY = y - _targetY;
final int dZ = z - _targetZ;
// Math.abs(dx) + Math.abs(dy) + Math.abs(dz) / 16
double result = Math.sqrt((dX * dX) + (dY * dY) + ((dZ * dZ) / 256.0));
if (result > weight)
{

View File

@ -334,7 +334,6 @@ public class CellPathFinding extends PathFinding
if (playable)
{
i.playableOverflows++;
// System.err.println("Overflow, size requested: " + size + " playable:"+playable);
}
}
}

View File

@ -132,7 +132,6 @@ public class NodeLoc extends AbstractNodeLoc
result = (prime * result) + (((_geoHeight & 0xFFFF) << 1) | nswe);
return result;
// return super.hashCode();
}
@Override

View File

@ -149,7 +149,6 @@ public class AdminCommandHandler
registerAdminCommandHandler(new AdminChristmas());
registerAdminCommandHandler(new AdminBan());
registerAdminCommandHandler(new AdminPolymorph());
// registerAdminCommandHandler(new AdminBanChat());
registerAdminCommandHandler(new AdminReload());
registerAdminCommandHandler(new AdminKick());
registerAdminCommandHandler(new AdminMonsterRace());
@ -186,9 +185,7 @@ public class AdminCommandHandler
registerAdminCommandHandler(new AdminNoble());
registerAdminCommandHandler(new AdminBuffs());
registerAdminCommandHandler(new AdminAio());
registerAdminCommandHandler(new AdminWho()); // L2OFF command
// ATTENTION: adding new command handlers, you have to change the
// sql file containing the access levels rights
registerAdminCommandHandler(new AdminWho());
LOGGER.info("AdminCommandHandler: Loaded " + _datatable.size() + " handlers.");

View File

@ -74,7 +74,6 @@ public class AutoAnnouncementHandler
catch (Exception e)
{
e.printStackTrace();
// ignore
}
}

View File

@ -599,18 +599,13 @@ public class AutoChatHandler implements SpawnListener
LOGGER.info("AutoChatHandler: Chat definition added for NPC ID " + _npcInstance.getNpcId() + " (Object ID = " + _npcInstance.getObjectId() + ").");
}
// If global chat isn't enabled for the parent instance,
// then handle the chat task locally.
// If global chat isn't enabled for the parent instance, then handle the chat task locally.
if (!chatInst.isGlobal())
{
setActive(true);
}
}
/*
* protected AutoChatDefinition(AutoChatInstance chatInst, L2NpcInstance npcInst) { this(chatInst, npcInst, null, -1); }
*/
protected String[] getChatTexts()
{
if (_chatTexts != null)
@ -667,8 +662,7 @@ public class AutoChatHandler implements SpawnListener
if (getChatDelay() == 0)
{
// Schedule it set to 5Ms, isn't error, if use 0 sometine
// chatDefinition return null in AutoChatRunner
// Schedule it set to 5Ms, isn't error, if use 0 sometimes chatDefinition return null in AutoChatRunner
_chatTask = ThreadPool.schedule(acr, 5);
}
else

View File

@ -23,9 +23,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
*/
public interface ICustomByPassHandler
{
/**
* @return as String -
*/
String[] getByPassCommands();
void handleCommand(String command, L2PcInstance player, String parameters);

View File

@ -19,13 +19,6 @@ package com.l2jmobius.gameserver.handler;
import com.l2jmobius.gameserver.model.actor.L2Playable;
import com.l2jmobius.gameserver.model.actor.instance.L2ItemInstance;
/**
* Mother class of all itemHandlers.<BR>
* <BR>
* an IItemHandler implementation has to be stateless
* @version $Revision: 1.1.4.3 $ $Date: 2005/03/27 15:30:09 $
*/
public interface IItemHandler
{
/**

View File

@ -23,11 +23,6 @@ import com.l2jmobius.gameserver.model.L2Skill;
import com.l2jmobius.gameserver.model.L2Skill.SkillType;
import com.l2jmobius.gameserver.model.actor.L2Character;
/**
* an IItemHandler implementation has to be stateless
* @version $Revision: 1.2.2.2.2.3 $ $Date: 2005/04/03 15:55:06 $
*/
public interface ISkillHandler
{
/**

View File

@ -18,10 +18,6 @@ package com.l2jmobius.gameserver.handler;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
/**
* This class ...
* @version $Revision: 1.1.2.1.2.2 $ $Date: 2005/03/27 15:30:10 $
*/
public interface IUserCommandHandler
{
/**

View File

@ -18,10 +18,6 @@ package com.l2jmobius.gameserver.handler;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
/**
* This class ...
* @version $Revision: 1.1.4.2 $ $Date: 2005/03/27 15:30:09 $
*/
public interface IVoicedCommandHandler
{
/**

View File

@ -64,10 +64,6 @@ import com.l2jmobius.gameserver.handler.itemhandlers.SpecialXMas;
import com.l2jmobius.gameserver.handler.itemhandlers.SpiritShot;
import com.l2jmobius.gameserver.handler.itemhandlers.SummonItems;
/**
* This class manages handlers of items
* @version $Revision: 1.1.4.3 $ $Date: 2005/03/27 15:30:09 $
*/
public class ItemHandler
{
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());

View File

@ -57,10 +57,6 @@ import com.l2jmobius.gameserver.handler.skillhandlers.ZakenPlayer;
import com.l2jmobius.gameserver.handler.skillhandlers.ZakenSelf;
import com.l2jmobius.gameserver.model.L2Skill.SkillType;
/**
* This class ...
* @version $Revision: 1.1.4.4 $ $Date: 2005/04/03 15:55:06 $
*/
public class SkillHandler
{
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
@ -134,9 +130,6 @@ public class SkillHandler
return _datatable.get(skillType);
}
/**
* @return
*/
public int size()
{
return _datatable.size();

View File

@ -37,10 +37,6 @@ import com.l2jmobius.gameserver.handler.usercommandhandlers.PartyInfo;
import com.l2jmobius.gameserver.handler.usercommandhandlers.SiegeStatus;
import com.l2jmobius.gameserver.handler.usercommandhandlers.Time;
/**
* This class ...
* @version $Revision: 1.1.2.1.2.5 $ $Date: 2005/03/27 15:30:09 $
*/
public class UserCommandHandler
{
private static final Logger LOGGER = Logger.getLogger(GameServer.class.getName());
@ -106,9 +102,6 @@ public class UserCommandHandler
return _datatable.get(new Integer(userCommand));
}
/**
* @return
*/
public int size()
{
return _datatable.size();

View File

@ -34,10 +34,6 @@ import com.l2jmobius.gameserver.handler.voicedcommandhandlers.TvTCmd;
import com.l2jmobius.gameserver.handler.voicedcommandhandlers.Voting;
import com.l2jmobius.gameserver.handler.voicedcommandhandlers.Wedding;
/**
* This class ...
* @version $Revision: 1.1.4.6 $ $Date: 2009/05/12 19:44:09 $
*/
public class VoicedCommandHandler
{
private static Logger LOGGER = Logger.getLogger(GameServer.class.getName());
@ -144,9 +140,6 @@ public class VoicedCommandHandler
return _datatable.get(command);
}
/**
* @return
*/
public int size()
{
return _datatable.size();

View File

@ -77,11 +77,6 @@ public class AdminAdmin implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
StringTokenizer st = new StringTokenizer(command);
final CommandEnum comm = CommandEnum.valueOf(st.nextToken());

View File

@ -53,11 +53,6 @@ public class AdminAio implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
final StringTokenizer st = new StringTokenizer(command);
final CommandEnum comm = CommandEnum.valueOf(st.nextToken());

View File

@ -71,11 +71,6 @@ public class AdminAnnouncements implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
final StringTokenizer st = new StringTokenizer(command);
final String comm_s = st.nextToken();
@ -91,18 +86,18 @@ public class AdminAnnouncements implements IAdminCommandHandler
switch (comm)
{
case admin_list_announcements:
case admin_list_announcements:
{
Announcements.getInstance().listAnnouncements(activeChar);
return true;
return true;
}
case admin_reload_announcements:
case admin_reload_announcements:
{
Announcements.getInstance().loadAnnouncements();
Announcements.getInstance().listAnnouncements(activeChar);
return true;
return true;
}
case admin_announce_menu:
case admin_announce_menu:
{
if (st.hasMoreTokens())
{
@ -114,25 +109,22 @@ public class AdminAnnouncements implements IAdminCommandHandler
Announcements.getInstance().announceToAll(text);
}
Announcements.getInstance().listAnnouncements(activeChar);
return true;
return true;
}
/*
*/
case admin_announce_announcements:
case admin_announce_announcements:
{
for (L2PcInstance player : L2World.getInstance().getAllPlayers())
{
Announcements.getInstance().showAnnouncements(player);
}
Announcements.getInstance().listAnnouncements(activeChar);
return true;
return true;
}
case admin_add_announcement:
case admin_add_announcement:
{
if (st.hasMoreTokens())
{
text = command.replace(comm_s + " ", "");
// text = st.nextToken();
}
if (!text.equals(""))
{
@ -141,9 +133,9 @@ public class AdminAnnouncements implements IAdminCommandHandler
return true;
}
BuilderUtil.sendSysMessage(activeChar, "You cannot announce Empty message");
return false;
return false;
}
case admin_del_announcement:
case admin_del_announcement:
{
if (st.hasMoreTokens())
{
@ -164,9 +156,9 @@ public class AdminAnnouncements implements IAdminCommandHandler
return true;
}
BuilderUtil.sendSysMessage(activeChar, "Usage: //del_announcement <index> (number >=0)");
return false;
return false;
}
case admin_announce:
case admin_announce:
{
// Call method from another class
if (Config.GM_ANNOUNCER_NAME)
@ -174,9 +166,9 @@ public class AdminAnnouncements implements IAdminCommandHandler
command = command + " [ " + activeChar.getName() + " ]";
}
Announcements.getInstance().handleAnnounce(command, 15);
return true;
return true;
}
case admin_critannounce:
case admin_critannounce:
{
String text1 = command.substring(19);
if (Config.GM_CRITANNOUNCER_NAME && (text1.length() > 0))
@ -185,14 +177,14 @@ public class AdminAnnouncements implements IAdminCommandHandler
}
final CreatureSay cs = new CreatureSay(activeChar.getObjectId(), Say2.CRITICAL_ANNOUNCE, "", text1);
Broadcast.toAllOnlinePlayers(cs);
return true;
return true;
}
case admin_list_autoannouncements:
case admin_list_autoannouncements:
{
AutoAnnouncementHandler.getInstance().listAutoAnnouncements(activeChar);
return true;
return true;
}
case admin_add_autoannouncement:
case admin_add_autoannouncement:
{
if (st.hasMoreTokens())
{
@ -226,9 +218,9 @@ public class AdminAnnouncements implements IAdminCommandHandler
return false;
}
BuilderUtil.sendSysMessage(activeChar, "Usage: //add_autoannouncement <delay> (Seconds > 30) <Announcements>");
return false;
return false;
}
case admin_del_autoannouncement:
case admin_del_autoannouncement:
{
if (st.hasMoreTokens())
{
@ -256,12 +248,12 @@ public class AdminAnnouncements implements IAdminCommandHandler
{
BuilderUtil.sendSysMessage(activeChar, "Usage: //del_autoannouncement <index> (number >= 0)");
return false;
}
}
}
case admin_autoannounce:
case admin_autoannounce:
{
AutoAnnouncementHandler.getInstance().listAutoAnnouncements(activeChar);
return true;
return true;
}
}

View File

@ -51,11 +51,6 @@ public class AdminBuffs implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
StringTokenizer st = new StringTokenizer(command, " ");
CommandEnum comm = CommandEnum.valueOf(st.nextToken());
@ -249,5 +244,4 @@ public class AdminBuffs implements IAdminCommandHandler
remover.sendMessage("Can not remove effects from " + playername + ". Player appears offline.");
}
}
}

View File

@ -112,11 +112,6 @@ public class AdminCTFEngine implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
final StringTokenizer st = new StringTokenizer(command);
final CommandEnum comm = CommandEnum.valueOf(st.nextToken());
@ -743,7 +738,6 @@ public class AdminCTFEngine implements IAdminCommandHandler
replyMSG.append("<center><font color=\"LEVEL\">[CTF Engine]</font></center><br><br><br>");
replyMSG.append("<table><tr>");
// if(!CTF._joining && !CTF._started && !CTF._teleport)
if (!CTF.is_inProgress())
{
replyMSG.append("<td width=\"100\"><button value=\"Edit\" action=\"bypass -h admin_ctf_edit\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td>");
@ -816,7 +810,6 @@ public class AdminCTFEngine implements IAdminCommandHandler
replyMSG.append("<button value=\"Tele->Flag\" action=\"bypass -h admin_ctf_tele_flag " + team + "\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\">");
replyMSG.append("</td></tr><tr><td>");
replyMSG.append(CTF._flagsX.get(CTF._teams.indexOf(team)) + ", " + CTF._flagsY.get(CTF._teams.indexOf(team)) + ", " + CTF._flagsZ.get(CTF._teams.indexOf(team)) + "</td></tr>");
// if(!CTF._joining && !CTF._started && !CTF._teleport)
if (!CTF.is_inProgress())
{
replyMSG.append("<tr><td width=\"60\"><button value=\"Remove\" action=\"bypass -h admin_ctf_team_remove " + team + "\" width=50 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr><tr></tr>");
@ -825,7 +818,6 @@ public class AdminCTFEngine implements IAdminCommandHandler
replyMSG.append("</table></center>");
// if(!CTF._joining && !CTF._started && !CTF._teleport)
if (!CTF.is_inProgress())
{
if (CTF.checkStartJoinOk())

View File

@ -56,11 +56,6 @@ public class AdminCache implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
final StringTokenizer st = new StringTokenizer(command, " ");
final CommandEnum comm = CommandEnum.valueOf(st.nextToken());
@ -73,13 +68,13 @@ public class AdminCache implements IAdminCommandHandler
switch (comm)
{
case admin_cache_htm_reload:
case admin_cache_htm_rebuild:
case admin_cache_htm_rebuild:
{
HtmCache.getInstance().reload(Config.DATAPACK_ROOT);
BuilderUtil.sendSysMessage(activeChar, "Cache[HTML]: " + HtmCache.getInstance().getMemoryUsage() + " MB on " + HtmCache.getInstance().getLoadedFiles() + " file(s) loaded.");
return true;
return true;
}
case admin_cache_reload_path:
case admin_cache_reload_path:
{
if (st.hasMoreTokens())
{
@ -89,9 +84,9 @@ public class AdminCache implements IAdminCommandHandler
return true;
}
BuilderUtil.sendSysMessage(activeChar, "Usage: //cache_reload_path <path>");
return false;
return false;
}
case admin_cache_reload_file:
case admin_cache_reload_file:
{
if (st.hasMoreTokens())
{
@ -107,20 +102,20 @@ public class AdminCache implements IAdminCommandHandler
return true;
}
BuilderUtil.sendSysMessage(activeChar, "Usage: //cache_reload_file <relative_path/file>");
return false;
return false;
}
case admin_cache_crest_rebuild:
case admin_cache_crest_reload:
case admin_cache_crest_reload:
{
CrestCache.getInstance().reload();
BuilderUtil.sendSysMessage(activeChar, "Cache[Crest]: " + String.format("%.3f", CrestCache.getInstance().getMemoryUsage()) + " megabytes on " + CrestCache.getInstance().getLoadedFiles() + " files loaded");
return true;
return true;
}
case admin_cache_crest_fix:
case admin_cache_crest_fix:
{
CrestCache.getInstance().convertOldPedgeFiles();
BuilderUtil.sendSysMessage(activeChar, "Cache[Crest]: crests fixed");
return true;
return true;
}
default:
{

View File

@ -35,13 +35,7 @@ public class AdminChangeAccessLevel implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
handleChangeLevel(command, activeChar);
return true;
}

View File

@ -25,8 +25,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
*/
public class AdminChristmas implements IAdminCommandHandler
{
// private final static Logger LOGGER = LogFactory.getLog(AdminChristmas.class);
private static final String[] ADMIN_COMMANDS =
{
"admin_christmas_start",
@ -36,11 +34,6 @@ public class AdminChristmas implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_christmas_start"))
{
startChristmas(activeChar);

View File

@ -19,7 +19,6 @@ package com.l2jmobius.gameserver.handler.admincommandhandlers;
import java.util.StringTokenizer;
import java.util.logging.Logger;
import com.l2jmobius.gameserver.datatables.SkillTable;
import com.l2jmobius.gameserver.datatables.xml.ItemTable;
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
import com.l2jmobius.gameserver.model.L2World;
@ -50,22 +49,15 @@ public class AdminCreateItem implements IAdminCommandHandler
private enum CommandEnum
{
admin_l2jmobius,
admin_itemcreate,
admin_create_item,
admin_mass_create,
admin_clear_inventory
}
@SuppressWarnings("null")
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
final StringTokenizer st = new StringTokenizer(command);
final CommandEnum comm = CommandEnum.valueOf(st.nextToken());
@ -77,83 +69,6 @@ public class AdminCreateItem implements IAdminCommandHandler
switch (comm)
{
/*
* Command //l2jmobius, it gives useful items to Gm character Crystals, Gemstones, Bss-ss, scrolls, elixirs, etc To be complete...
*/
case admin_l2jmobius:
{
// Command usable only by Administrator
if ((activeChar.getAccessLevel().getLevel() != 1) || !activeChar.isGM())
{
BuilderUtil.sendSysMessage(activeChar, "Only Administrators can use this command!");
return false;
}
L2PcInstance Player = null;
// Items can be added only to self Gm
if (Player == null)
{
activeChar.setTarget(activeChar);
Player = activeChar;
}
Player.getInventory().addItem("Admin", 1458, 5000, Player, activeChar); // Cry d
Player.getInventory().addItem("Admin", 1459, 5000, Player, activeChar); // Cry c
Player.getInventory().addItem("Admin", 1460, 5000, Player, activeChar); // Cry b
Player.getInventory().addItem("Admin", 1461, 5000, Player, activeChar); // Cry a
Player.getInventory().addItem("Admin", 1462, 5000, Player, activeChar); // Cry s
Player.getInventory().addItem("Admin", 2130, 200, Player, activeChar); // Gem d
Player.getInventory().addItem("Admin", 2131, 200, Player, activeChar); // Gem c
Player.getInventory().addItem("Admin", 2132, 200, Player, activeChar); // Gem b
Player.getInventory().addItem("Admin", 2133, 200, Player, activeChar); // Gem a
Player.getInventory().addItem("Admin", 2134, 200, Player, activeChar); // Gem s
Player.getInventory().addItem("Admin", 736, 10, Player, activeChar); // Scroll of Escape
Player.getInventory().addItem("Admin", 737, 10, Player, activeChar); // Scroll of Resurrection
Player.getInventory().addItem("Admin", 1538, 10, Player, activeChar); // Blessed Scroll of Escape
Player.getInventory().addItem("Admin", 1829, 10, Player, activeChar); // Scroll of Escape: Clan Hall
Player.getInventory().addItem("Admin", 1830, 10, Player, activeChar); // Scroll of Escape: Castle
Player.getInventory().addItem("Admin", 3936, 10, Player, activeChar); // Blessed Scroll of Resurrection
Player.getInventory().addItem("Admin", 5858, 10, Player, activeChar); // Blessed Scroll of Escape: Clan Hall
Player.getInventory().addItem("Admin", 5859, 10, Player, activeChar); // Blessed Scroll of Escape: Castle
Player.getInventory().addItem("Admin", 1467, 1000, Player, activeChar); // Soulshot: S-grade
Player.getInventory().addItem("Admin", 2514, 1000, Player, activeChar); // Spiritshot: S-grade
Player.getInventory().addItem("Admin", 3952, 1000, Player, activeChar); // Blessed Spiritshot: S Grade
Player.getInventory().addItem("Admin", 8627, 10, Player, activeChar); // Elixir of Life (S-Grade)
Player.getInventory().addItem("Admin", 8633, 10, Player, activeChar); // Elixir of Mental Strength (S-Grade)
Player.getInventory().addItem("Admin", 8639, 10, Player, activeChar); // Elixir of CP (S-Grade)
Player.getInventory().addItem("Admin", 8874, 10, Player, activeChar); // Einhasad's Holy Water
final ItemList il = new ItemList(Player, true);
Player.sendPacket(il);
BuilderUtil.sendSysMessage(activeChar, "Items added successfully!");
activeChar.addSkill(SkillTable.getInstance().getInfo(7029, 4), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7041, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7042, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7043, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7044, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7045, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7046, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7047, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7048, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7049, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7050, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7051, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7052, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7053, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7054, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7055, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7056, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7057, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7058, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7059, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7058, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7059, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7060, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7061, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7062, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7063, 1), true);
activeChar.addSkill(SkillTable.getInstance().getInfo(7064, 1), true);
activeChar.sendSkillList();
BuilderUtil.sendSysMessage(activeChar, "Gm skills added successfully!");
return true;
}
case admin_itemcreate:
{
AdminHelpPage.showHelpPage(activeChar, "itemcreation.htm");
@ -212,7 +127,6 @@ public class AdminCreateItem implements IAdminCommandHandler
else
{
AdminHelpPage.showHelpPage(activeChar, "itemcreation.htm");
// BuilderUtil.sendSysMessage(activeChar, "Usage: //itemcreate <itemId> [amount]");
return true;
}
return false;

View File

@ -54,11 +54,6 @@ public class AdminDMEngine implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_dmevent"))
{
showMainPage(activeChar);
@ -73,9 +68,7 @@ public class AdminDMEngine implements IAdminCommandHandler
{
BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress");
}
}
else if (command.startsWith("admin_dmevent_desc "))
{
if (DM.set_eventDesc(command.substring(19)))
@ -88,7 +81,6 @@ public class AdminDMEngine implements IAdminCommandHandler
}
}
else if (command.startsWith("admin_dmevent_minlvl "))
{
if (!DM.checkMinLevel(Integer.valueOf(command.substring(21))))
@ -104,9 +96,7 @@ public class AdminDMEngine implements IAdminCommandHandler
{
BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress");
}
}
else if (command.startsWith("admin_dmevent_maxlvl "))
{
if (!DM.checkMaxLevel(Integer.valueOf(command.substring(21))))
@ -122,9 +112,7 @@ public class AdminDMEngine implements IAdminCommandHandler
{
BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress");
}
}
else if (command.startsWith("admin_dmevent_join_loc "))
{
if (DM.set_joiningLocationName(command.substring(23)))
@ -135,9 +123,7 @@ public class AdminDMEngine implements IAdminCommandHandler
{
BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress");
}
}
else if (command.startsWith("admin_dmevent_npc "))
{
if (DM.set_npcId(Integer.valueOf(command.substring(18))))
@ -148,15 +134,12 @@ public class AdminDMEngine implements IAdminCommandHandler
{
BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress");
}
}
else if (command.equals("admin_dmevent_npc_pos"))
{
DM.setNpcPos(activeChar);
showMainPage(activeChar);
}
else if (command.startsWith("admin_dmevent_reward "))
{
if (DM.set_rewardId(Integer.valueOf(command.substring(21))))
@ -167,9 +150,7 @@ public class AdminDMEngine implements IAdminCommandHandler
{
BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress");
}
}
else if (command.startsWith("admin_dmevent_reward_amount "))
{
if (DM.set_rewardAmount(Integer.valueOf(command.substring(28))))
@ -180,15 +161,12 @@ public class AdminDMEngine implements IAdminCommandHandler
{
BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress");
}
}
else if (command.equals("admin_dmevent_spawnpos"))
{
DM.setPlayersPos(activeChar);
showMainPage(activeChar);
}
else if (command.startsWith("admin_dmevent_color "))
{
if (DM.set_playerColors(Integer.decode("0x" + command.substring(20))))
@ -199,9 +177,7 @@ public class AdminDMEngine implements IAdminCommandHandler
{
BuilderUtil.sendSysMessage(activeChar, "Cannot perform requested operation, event in progress");
}
}
else if (command.equals("admin_dmevent_join"))
{
if (DM.startJoin())
@ -213,13 +189,11 @@ public class AdminDMEngine implements IAdminCommandHandler
BuilderUtil.sendSysMessage(activeChar, "Cannot startJoin, check LOGGER for info..");
}
}
else if (command.equals("admin_dmevent_teleport"))
{
DM.startTeleport();
showMainPage(activeChar);
}
else if (command.equals("admin_dmevent_start"))
{
if (DM.startEvent())
@ -230,47 +204,39 @@ public class AdminDMEngine implements IAdminCommandHandler
{
BuilderUtil.sendSysMessage(activeChar, "Cannot startEvent, check LOGGER for info..");
}
}
else if (command.equals("admin_dmevent_startevent"))
{
DM.startEvent();
showMainPage(activeChar);
}
else if (command.equals("admin_dmevent_abort"))
{
BuilderUtil.sendSysMessage(activeChar, "Aborting event");
DM.abortEvent();
showMainPage(activeChar);
}
else if (command.equals("admin_dmevent_finish"))
{
DM.finishEvent();
showMainPage(activeChar);
}
else if (command.equals("admin_dmevent_sit"))
{
DM.sit();
showMainPage(activeChar);
}
else if (command.equals("admin_dmevent_load"))
{
DM.loadData();
showMainPage(activeChar);
}
else if (command.equals("admin_dmevent_save"))
{
DM.saveData();
showMainPage(activeChar);
}
else if (command.equals("admin_dmevent_dump"))
{
DM.dumpData();
@ -351,7 +317,6 @@ public class AdminDMEngine implements IAdminCommandHandler
replyMSG.append(DM._players.size() + " players participating.");
replyMSG.append("<br><br>");
}
else if (DM.is_started())
{
replyMSG.append("<br1>");

View File

@ -33,8 +33,6 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
*/
public class AdminDelete implements IAdminCommandHandler
{
// private static Logger LOGGER = Logger.getLogger(AdminDelete.class);
private static final String[] ADMIN_COMMANDS =
{
"admin_delete"
@ -43,11 +41,6 @@ public class AdminDelete implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_delete"))
{
handleDelete(activeChar);

View File

@ -37,11 +37,6 @@ public class AdminDisconnect implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_character_disconnect"))
{
disconnectCharacter(activeChar);

View File

@ -41,11 +41,6 @@ public class AdminDonator implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (activeChar == null)
{
return false;
@ -129,8 +124,6 @@ public class AdminDonator implements IAdminCommandHandler
*/
private void updateDatabase(L2PcInstance player, boolean newDonator)
{
// prevents any NPE.
// ----------------
if (player == null)
{
return;
@ -141,7 +134,6 @@ public class AdminDonator implements IAdminCommandHandler
PreparedStatement stmt = con.prepareStatement(newDonator ? INSERT_DATA : DEL_DATA);
// if it is a new donator insert proper data
// --------------------------------------------
if (newDonator)
{
stmt.setInt(1, player.getObjectId());
@ -165,14 +157,9 @@ public class AdminDonator implements IAdminCommandHandler
}
}
// Updates That Will be Executed by MySQL
// ----------------------------------------
String INSERT_DATA = "REPLACE INTO characters_custom_data (obj_Id, char_name, hero, noble, donator) VALUES (?,?,?,?,?)";
String DEL_DATA = "UPDATE characters_custom_data SET donator = 0 WHERE obj_Id=?";
/**
* @return
*/
@Override
public String[] getAdminCommandList()
{

View File

@ -44,7 +44,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil;
*/
public class AdminDoorControl implements IAdminCommandHandler
{
// private static Logger LOGGER = Logger.getLogger(AdminDoorControl.class);
private static DoorTable _doorTable;
private static final String[] ADMIN_COMMANDS =
{
@ -54,21 +53,14 @@ public class AdminDoorControl implements IAdminCommandHandler
"admin_closeall"
};
// private static final Map<String, Integer> doorMap = new HashMap<String, Integer>(); //FIXME: should we jute remove this?
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
_doorTable = DoorTable.getInstance();
L2Object target2 = null;
if (command.startsWith("admin_close ")) // id
if (command.startsWith("admin_close "))
{
try
{
@ -96,7 +88,7 @@ public class AdminDoorControl implements IAdminCommandHandler
return false;
}
}
else if (command.equals("admin_close")) // target
else if (command.equals("admin_close"))
{
target2 = activeChar.getTarget();
@ -109,7 +101,7 @@ public class AdminDoorControl implements IAdminCommandHandler
BuilderUtil.sendSysMessage(activeChar, "Incorrect target.");
}
}
else if (command.startsWith("admin_open ")) // id
else if (command.startsWith("admin_open "))
{
try
{
@ -137,7 +129,7 @@ public class AdminDoorControl implements IAdminCommandHandler
return false;
}
}
else if (command.equals("admin_open")) // target
else if (command.equals("admin_open"))
{
target2 = activeChar.getTarget();
@ -150,7 +142,6 @@ public class AdminDoorControl implements IAdminCommandHandler
BuilderUtil.sendSysMessage(activeChar, "Incorrect target.");
}
}
// need optimize cycle
// set limits on the ID doors that do not cycle to close doors
else if (command.equals("admin_closeall"))

View File

@ -276,7 +276,7 @@ public class AdminEditChar implements IAdminCommandHandler
}
activeChar.sendPacket(SystemMessageId.CHARACTER_DOES_NOT_EXIST);
return false;
} // given a player name:{} displays an information window
}
case admin_show_characters:
{
String val = "";
@ -371,7 +371,7 @@ public class AdminEditChar implements IAdminCommandHandler
return false;
}
return true;
} // find all the player connections from a given IPv4 number
}
case admin_find_account:
{
String val = "";
@ -387,7 +387,7 @@ public class AdminEditChar implements IAdminCommandHandler
}
findCharactersPerAccount(activeChar, val);
return true;
} // list all the characters from an account (useful for GMs w/o DB access)
}
case admin_save_modifications:
{
String val = "";
@ -413,7 +413,7 @@ public class AdminEditChar implements IAdminCommandHandler
}
adminModifyCharacter(activeChar, val);
return true;
} // consider it deprecated...
}
case admin_rec:
{
String val = "";
@ -501,9 +501,6 @@ public class AdminEditChar implements IAdminCommandHandler
final ClassId classId = ClassId.getClassIdByOrdinal(classidval);
if (!player.isSubClassActive())
{
// while(classId.level() != 0){ //go to root
// classId = classId.getParent();
// }
player.setBaseClass(classId);
}
String newclass = player.getTemplate().className;
@ -871,11 +868,11 @@ public class AdminEditChar implements IAdminCommandHandler
L2PcInstance target;
if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance))
{
target = (L2PcInstance) activeChar.getTarget();// Target - player
target = (L2PcInstance) activeChar.getTarget(); // Target - player
}
else
{
target = activeChar;// No target
target = activeChar; // No target
}
if (target != null)
{
@ -997,7 +994,7 @@ public class AdminEditChar implements IAdminCommandHandler
replyMSG = new StringBuilder();
for (int i = CharactersStart; i < CharactersEnd; i++)
{ // Add player info into new Table row
{
replyMSG.append("<tr><td width=80><a action=\"bypass -h admin_character_info " + players[i].getName() + "\">" + players[i].getName() + "</a></td><td width=110>" + players[i].getTemplate().className + "</td><td width=40>" + players[i].getLevel() + "</td></tr>");
}
@ -1219,7 +1216,7 @@ public class AdminEditChar implements IAdminCommandHandler
StringBuilder replyMSG = new StringBuilder();
for (L2PcInstance player : players)
{ // Add player info into new Table row
{
name = player.getName();
if (name.toLowerCase().contains(CharacterToFind.toLowerCase()))

View File

@ -83,11 +83,6 @@ public class AdminEditNpc implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_showShop "))
{
String[] args = command.split(" ");

View File

@ -125,7 +125,6 @@ public class AdminEffects implements IAdminCommandHandler
BuilderUtil.sendSysMessage(activeChar, "Now, you can be seen.");
}
}
else if (command.startsWith("admin_invis"))
{
activeChar.getAppearance().setInvisible();
@ -140,7 +139,6 @@ public class AdminEffects implements IAdminCommandHandler
activeChar.broadcastUserInfo();
BuilderUtil.sendSysMessage(activeChar, "Now, you can be seen.");
}
else if (command.startsWith("admin_earthquake"))
{
try
@ -157,7 +155,6 @@ public class AdminEffects implements IAdminCommandHandler
BuilderUtil.sendSysMessage(activeChar, "Use: //earthquake <intensity> <duration>");
}
}
else if (command.startsWith("admin_atmosphere"))
{
try
@ -170,7 +167,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("admin_npc_say"))
{
try
@ -190,7 +186,6 @@ public class AdminEffects implements IAdminCommandHandler
else
{
activeChar.sendPacket(SystemMessageId.TARGET_IS_INCORRECT);
return false;
}
}
@ -199,7 +194,6 @@ public class AdminEffects implements IAdminCommandHandler
BuilderUtil.sendSysMessage(activeChar, "Target Npc before. Use: //npc_say");
}
}
else if (command.equals("admin_play_sounds"))
{
AdminHelpPage.showHelpPage(activeChar, "songs/songs.htm");
@ -224,7 +218,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.equals("admin_para") || command.equals("admin_para_menu"))
{
String type = "1";
@ -260,7 +253,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.equals("admin_unpara") || command.equals("admin_unpara_menu"))
{
try
@ -278,7 +270,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("admin_para_all"))
{
try
@ -299,7 +290,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("admin_unpara_all"))
{
try
@ -314,7 +304,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("admin_bighead"))
{
try
@ -332,7 +321,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("admin_shrinkhead"))
{
try
@ -350,7 +338,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("admin_polyself"))
{
try
@ -369,7 +356,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("admin_unpolyself"))
{
try
@ -387,7 +373,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.equals("admin_clear_teams"))
{
try
@ -402,7 +387,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("admin_setteam_close"))
{
try
@ -432,7 +416,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("admin_setteam"))
{
String val = command.substring(14);
@ -462,7 +445,6 @@ public class AdminEffects implements IAdminCommandHandler
player.broadcastUserInfo();
}
else if (command.startsWith("admin_social"))
{
try
@ -537,7 +519,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("debuff"))
{
try
@ -556,7 +537,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("admin_abnormal"))
{
try
@ -637,7 +617,6 @@ public class AdminEffects implements IAdminCommandHandler
{
}
}
else if (command.startsWith("admin_effect"))
{
try

View File

@ -36,7 +36,6 @@ import com.l2jmobius.gameserver.util.Util;
*/
public class AdminEnchant implements IAdminCommandHandler
{
// private static Logger LOGGER = Logger.getLogger(AdminEnchant.class);
private static final String[] ADMIN_COMMANDS =
{
"admin_seteh", // 6
@ -59,11 +58,6 @@ public class AdminEnchant implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_enchant"))
{
showMainPage(activeChar);
@ -251,5 +245,4 @@ public class AdminEnchant implements IAdminCommandHandler
{
return ADMIN_COMMANDS;
}
}

View File

@ -194,13 +194,11 @@ public class AdminEventEngine implements IAdminCommandHandler
file.delete();
showMainPage(activeChar);
}
else if (command.startsWith("admin_event_name"))
{
tempName += command.substring(17);
showNewEventPage(activeChar);
}
else if (command.equalsIgnoreCase("admin_delete_buffer"))
{
try
@ -213,7 +211,6 @@ public class AdminEventEngine implements IAdminCommandHandler
tempBuffer = "";
}
}
else if (command.startsWith("admin_event_store"))
{
FileOutputStream file = null;
@ -314,7 +311,6 @@ public class AdminEventEngine implements IAdminCommandHandler
showEventControl(activeChar);
}
else if (command.startsWith("admin_event_control_sit"))
{
StringTokenizer st = new StringTokenizer(command.substring(24), "-");

View File

@ -48,11 +48,6 @@ public class AdminExpSp implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_add_exp_sp"))
{
try

View File

@ -36,8 +36,6 @@ import com.l2jmobius.gameserver.templates.chars.L2NpcTemplate;
*/
public class AdminFightCalculator implements IAdminCommandHandler
{
// private static Logger LOGGER = Logger.getLogger(AdminFightCalculator.class);
private static final String[] ADMIN_COMMANDS =
{
"admin_fight_calculator",
@ -45,15 +43,9 @@ public class AdminFightCalculator implements IAdminCommandHandler
"admin_fcs",
};
// TODO: remove from gm list etc etc
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
try
{
if (command.startsWith("admin_fight_calculator_show"))
@ -252,8 +244,6 @@ public class AdminFightCalculator implements IAdminCommandHandler
sAtk1 = 100000 / sAtk1;
sAtk2 = 100000 / sAtk2;
// Formulas f = Formulas.getInstance();
for (int i = 0; i < 10000; i++)
{
final boolean _miss1 = Formulas.calcHitMiss(npc1, npc2);

View File

@ -35,8 +35,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil;
*/
public class AdminFortSiege implements IAdminCommandHandler
{
// private static Logger LOGGER = Logger.getLogger(AdminFortSiege.class);
private static final String[] ADMIN_COMMANDS =
{
"admin_fortsiege",
@ -56,11 +54,6 @@ public class AdminFortSiege implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
final StringTokenizer st = new StringTokenizer(command, " ");
command = st.nextToken(); // Get actual command
@ -72,14 +65,6 @@ public class AdminFortSiege implements IAdminCommandHandler
fort = FortManager.getInstance().getFort(st.nextToken());
}
// Get fort
// String val = "";
//
// if(st.hasMoreTokens())
// {
// val = st.nextToken();
// }
// No fort specified
if ((fort == null) || (fort.getFortId() < 0))
{
@ -117,19 +102,6 @@ public class AdminFortSiege implements IAdminCommandHandler
fort.getSiege().registerDefender(player, true);
}
}
// FIXME
// else if (command.equalsIgnoreCase("admin_add_guard"))
// {
// try
// {
// int npcId = Integer.parseInt(val);
// fort.getSiege().getFortSiegeGuardManager().addFortSiegeGuard(activeChar, npcId);
// }
// catch (Exception e)
// {
// BuilderUtil.sendSysMessage(activeChar, "Usage: //add_guard npcId");
// }
// }
else if (command.equalsIgnoreCase("admin_clear_fortsiege_list"))
{
fort.getSiege().clearSiegeClan();

View File

@ -39,19 +39,9 @@ public class AdminGeodata implements IAdminCommandHandler
"admin_geomap"
};
// private static final int REQUIRED_LEVEL = Config.GM_MIN;
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
// if (!Config.ALT_PRIVILEGES_ADMIN)
// {
// if (!(checkLevel(activeChar.getAccessLevel()) && activeChar.isGM()))
// {
// return false;
// }
// }
if (command.equals("admin_geo_pos"))
{
final int worldX = activeChar.getX();
@ -147,9 +137,4 @@ public class AdminGeodata implements IAdminCommandHandler
{
return _adminCommands;
}
// private boolean checkLevel(int level)
// {
// return (level >= REQUIRED_LEVEL);
// }
}

View File

@ -39,11 +39,6 @@ public class AdminGm implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_gm"))
{
handleGm(activeChar);
@ -63,8 +58,6 @@ public class AdminGm implements IAdminCommandHandler
if (activeChar.isGM())
{
GmListTable.getInstance().deleteGm(activeChar);
// activeChar.setIsGM(false);
BuilderUtil.sendSysMessage(activeChar, "You no longer have GM status.");
if (Config.DEBUG)
@ -75,8 +68,6 @@ public class AdminGm implements IAdminCommandHandler
else
{
GmListTable.getInstance().addGm(activeChar, false);
// activeChar.setIsGM(true);
BuilderUtil.sendSysMessage(activeChar, "You now have GM status.");
if (Config.DEBUG)

View File

@ -40,11 +40,6 @@ public class AdminGmChat implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_gmchat"))
{
handleGmChat(command, activeChar);

View File

@ -111,7 +111,6 @@ public class AdminHeal implements IAdminCommandHandler
}
catch (NumberFormatException nbe)
{
// ignore
}
}
}

View File

@ -35,11 +35,6 @@ public class AdminKick implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_kick"))
{
StringTokenizer st = new StringTokenizer(command);
@ -93,5 +88,4 @@ public class AdminKick implements IAdminCommandHandler
{
return ADMIN_COMMANDS;
}
}

View File

@ -47,11 +47,6 @@ public class AdminKill implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_kill"))
{
StringTokenizer st = new StringTokenizer(command, " ");

View File

@ -38,11 +38,6 @@ public class AdminLevel implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
final L2Object targetChar = activeChar.getTarget();
final StringTokenizer st = new StringTokenizer(command, " ");
final String actualCommand = st.nextToken(); // Get actual command

View File

@ -32,8 +32,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil;
*/
public class AdminLogin implements IAdminCommandHandler
{
// private static Logger LOGGER = Logger.getLogger(AdminDelete.class);
private static final String[] ADMIN_COMMANDS =
{
"admin_server_gm_only",
@ -43,18 +41,9 @@ public class AdminLogin implements IAdminCommandHandler
"admin_server_login"
};
/*
* (non-Javadoc)
* @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#useAdminCommand(java.lang.String, com.l2jmobius.gameserver.model.L2PcInstance)
*/
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_server_gm_only"))
{
gmOnly();
@ -163,14 +152,9 @@ public class AdminLogin implements IAdminCommandHandler
Config.SERVER_GMONLY = true;
}
/*
* (non-Javadoc)
* @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#getAdminCommandList()
*/
@Override
public String[] getAdminCommandList()
{
return ADMIN_COMMANDS;
}
}

View File

@ -50,11 +50,6 @@ public class AdminMammon implements IAdminCommandHandler
@SuppressWarnings("deprecation")
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
int npcId = 0;
int teleportIndex = -1;

View File

@ -134,10 +134,6 @@ public class AdminManor implements IAdminCommandHandler
return _adminCommands;
}
/*
* private String formatTime(long millis) { String s = ""; int secs = (int) millis/1000; int mins = secs/60; secs -= mins*60; int hours = mins/60; mins -= hours*60; if (hours>0) s += hours + ":"; s += mins + ":"; s += secs; return s; }
*/
private void showMainPage(L2PcInstance activeChar)
{
NpcHtmlMessage adminReply = new NpcHtmlMessage(5);

View File

@ -39,11 +39,6 @@ public class AdminMassControl implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_mass"))
{
try

View File

@ -41,11 +41,6 @@ public class AdminMassRecall implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_recallclan"))
{
try

View File

@ -60,11 +60,6 @@ public class AdminMenu implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_char_manage"))
{
showMainPage(activeChar);
@ -334,9 +329,6 @@ public class AdminMenu implements IAdminCommandHandler
showMainPage(activeChar);
}
/**
* @param activeChar
*/
private void showMainPage(L2PcInstance activeChar)
{
AdminHelpPage.showHelpPage(activeChar, "charmanage.htm");

View File

@ -60,11 +60,6 @@ public class AdminMobGroup implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_mobmenu"))
{
showMainPage(activeChar, command);
@ -149,10 +144,6 @@ public class AdminMobGroup implements IAdminCommandHandler
return true;
}
/**
* @param activeChar
* @param command
*/
private void showMainPage(L2PcInstance activeChar, String command)
{
String filename = "mobgroup.htm";

View File

@ -32,8 +32,6 @@ import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
*/
public class AdminMonsterRace implements IAdminCommandHandler
{
// private static Logger LOGGER = Logger.getLogger(AdminMonsterRace.class);
private static final String[] ADMIN_COMMANDS =
{
"admin_mons"
@ -44,11 +42,6 @@ public class AdminMonsterRace implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equalsIgnoreCase("admin_mons"))
{
handleSendPacket(activeChar);
@ -68,7 +61,6 @@ public class AdminMonsterRace implements IAdminCommandHandler
/*
* -1 0 to initialize the race 0 15322 to start race 13765 -1 in middle of race -1 0 to end the race 8003 to 8027
*/
final int[][] codes =
{
{
@ -137,13 +129,6 @@ public class AdminMonsterRace implements IAdminCommandHandler
@Override
public void run()
{
// int[][] speeds1 = MonsterRace.getInstance().getSpeeds();
// MonsterRace.getInstance().newSpeeds();
// int[][] speeds2 = MonsterRace.getInstance().getSpeeds();
/*
* int[] speed = new int[8]; for (int i=0; i<8; i++) { for (int j=0; j<20; j++) { //LOGGER.info("Adding "+speeds1[i][j] +" and "+ speeds2[i][j]); speed[i] += (speeds1[i][j]*1);// + (speeds2[i][j]*1); } LOGGER.info("Total speed for "+(i+1)+" = "+speed[i]); }
*/
MonRaceInfo spk = new MonRaceInfo(codes[2][0], codes[2][1], MonsterRace.getInstance().getMonsters(), MonsterRace.getInstance().getSpeeds());
activeChar.sendPacket(spk);
activeChar.broadcastPacket(spk);

View File

@ -40,11 +40,6 @@ public class AdminNoble implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (activeChar == null)
{
return false;
@ -112,14 +107,8 @@ public class AdminNoble implements IAdminCommandHandler
}
}
/**
* @param player
* @param newNoble
*/
private void updateDatabase(L2PcInstance player, boolean newNoble)
{
// prevents any NPE.
// ----------------
if (player == null)
{
return;
@ -128,9 +117,6 @@ public class AdminNoble implements IAdminCommandHandler
try (Connection con = DatabaseFactory.getConnection())
{
PreparedStatement stmt = con.prepareStatement(newNoble ? INSERT_DATA : DEL_DATA);
// if it is a new donator insert proper data
// --------------------------------------------
if (newNoble)
{
stmt.setInt(1, player.getObjectId());
@ -141,8 +127,7 @@ public class AdminNoble implements IAdminCommandHandler
stmt.execute();
stmt.close();
}
else
// deletes from database
else // deletes from database
{
stmt.setInt(1, player.getObjectId());
stmt.execute();
@ -155,14 +140,9 @@ public class AdminNoble implements IAdminCommandHandler
}
}
// Updates That Will be Executed by MySQL
// ----------------------------------------
String INSERT_DATA = "REPLACE INTO characters_custom_data (obj_Id, char_name, hero, noble, donator) VALUES (?,?,?,?,?)";
String DEL_DATA = "UPDATE characters_custom_data SET noble = 0 WHERE obj_Id=?";
/**
* @return
*/
@Override
public String[] getAdminCommandList()
{

View File

@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil;
*/
public class AdminPForge implements IAdminCommandHandler
{
// private static Logger LOGGER = Logger.getLogger(AdminKick.class);
private static final String[] ADMIN_COMMANDS =
{
"admin_forge",
@ -41,11 +40,6 @@ public class AdminPForge implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_forge"))
{
showMainPage(activeChar);
@ -214,5 +208,4 @@ public class AdminPForge implements IAdminCommandHandler
{
return ADMIN_COMMANDS;
}
}

View File

@ -158,5 +158,4 @@ public class AdminPetition implements IAdminCommandHandler
{
return ADMIN_COMMANDS;
}
}

View File

@ -66,11 +66,6 @@ public class AdminPledge implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
final StringTokenizer st = new StringTokenizer(command);
final CommandEnum comm = CommandEnum.valueOf(st.nextToken());
@ -256,5 +251,4 @@ public class AdminPledge implements IAdminCommandHandler
{
AdminHelpPage.showHelpPage(activeChar, "game_menu.htm");
}
}

View File

@ -45,11 +45,6 @@ public class AdminPolymorph implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_polymorph"))
{
StringTokenizer st = new StringTokenizer(command);
@ -94,12 +89,6 @@ public class AdminPolymorph implements IAdminCommandHandler
return ADMIN_COMMANDS;
}
/**
* @param activeChar
* @param obj
* @param id
* @param type
*/
private void doPolymorph(L2PcInstance activeChar, L2Object obj, String id, String type)
{
if (obj != null)
@ -127,10 +116,6 @@ public class AdminPolymorph implements IAdminCommandHandler
}
}
/**
* @param activeChar
* @param target
*/
private void doUnpoly(L2PcInstance activeChar, L2Object target)
{
if (target != null)

View File

@ -28,18 +28,9 @@ public class AdminQuest implements IAdminCommandHandler
"admin_quest_reload"
};
/*
* (non-Javadoc)
* @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#useAdminCommand(java.lang.String, com.l2jmobius.gameserver.model.L2PcInstance)
*/
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
// syntax will either be:
// quest_reload <id>
// quest_reload <questName>
@ -90,14 +81,9 @@ public class AdminQuest implements IAdminCommandHandler
return true;
}
/*
* (non-Javadoc)
* @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#getAdminCommandList()
*/
@Override
public String[] getAdminCommandList()
{
return ADMIN_COMMANDS;
}
}

View File

@ -43,13 +43,7 @@ public class AdminRepairChar implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
handleRepair(command);
return true;
}

View File

@ -45,11 +45,6 @@ public class AdminRes implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_res "))
{
handleRes(activeChar, command.split(" ")[1]);

View File

@ -38,11 +38,6 @@ public class AdminRideWyvern implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_ride"))
{
if (activeChar.isMounted() || (activeChar.getPet() != null))
@ -97,5 +92,4 @@ public class AdminRideWyvern implements IAdminCommandHandler
{
return ADMIN_COMMANDS;
}
}

View File

@ -44,11 +44,6 @@ public class AdminScript implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_load_script"))
{
File file;

View File

@ -44,11 +44,6 @@ public class AdminShop implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_buy"))
{
try

View File

@ -35,7 +35,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil;
*/
public class AdminShutdown implements IAdminCommandHandler
{
// private static Logger LOGGER = Logger.getLogger(AdminShutdown.class);
private static final String[] ADMIN_COMMANDS =
{
"admin_server_shutdown",
@ -161,5 +160,4 @@ public class AdminShutdown implements IAdminCommandHandler
{
Shutdown.getInstance().abort(activeChar);
}
}

View File

@ -40,7 +40,6 @@ import com.l2jmobius.gameserver.util.BuilderUtil;
*/
public class AdminSiege implements IAdminCommandHandler
{
// private static Logger LOGGER = Logger.getLogger(AdminSiege.class);
private static final String[] ADMIN_COMMANDS =
{
"admin_siege",
@ -67,11 +66,6 @@ public class AdminSiege implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
StringTokenizer st = new StringTokenizer(command, " ");
command = st.nextToken(); // Get actual command

View File

@ -61,11 +61,6 @@ public class AdminSkill implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_show_skills"))
{
showMainPage(activeChar);

View File

@ -263,8 +263,7 @@ public class AdminSpawn implements IAdminCommandHandler
permanent = false;
spawn.set_customBossInstance(true); // for raids, this value is used in order to segnalate to not save respawn time - status for custom instance
}
// else
// {
if (RaidBossSpawnManager.getInstance().getValidTemplate(spawn.getNpcId()) != null)
{
RaidBossSpawnManager.getInstance().addNewSpawn(spawn, 0, template1.getStatsSet().getDouble("baseHpMax"), template1.getStatsSet().getDouble("baseMpMax"), permanent);
@ -282,7 +281,6 @@ public class AdminSpawn implements IAdminCommandHandler
}
BuilderUtil.sendSysMessage(activeChar, "Created " + template1.name + " on " + target.getObjectId());
// }
}
catch (Exception e)
{

View File

@ -37,11 +37,6 @@ public class AdminTarget implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_target"))
{
handleTarget(command, activeChar);

View File

@ -386,8 +386,8 @@ public class AdminTeleport implements IAdminCommandHandler
case admin_recall_npc:
{
recallNPC(activeChar);
}
break;
}
case admin_gonorth:
case admin_gosouth:
case admin_goeast:
@ -456,8 +456,8 @@ public class AdminTeleport implements IAdminCommandHandler
case admin_tele:
{
showTeleportWindow(activeChar);
}
break;
}
case admin_teleto:
{
String val = "";
@ -504,7 +504,6 @@ public class AdminTeleport implements IAdminCommandHandler
}
private void teleportTo(L2PcInstance activeChar, int x, int y, int z)
// private void teleportTo(L2PcInstance activeChar, String Cords)
{
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
activeChar.teleToLocation(x, y, z, false);
@ -562,9 +561,7 @@ public class AdminTeleport implements IAdminCommandHandler
if ((target != null) && (target instanceof L2PcInstance))
{
player = (L2PcInstance) target;
} /*
* else if(target != null && target instanceof L2NpcInstance){ npc = (L2NpcInstance) target; }
*/
}
else
{
activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET);
@ -585,9 +582,7 @@ public class AdminTeleport implements IAdminCommandHandler
activeChar.teleToLocation(x, y, z, true);
BuilderUtil.sendSysMessage(activeChar, "You have teleported to character " + player.getName() + ".");
} /*
* else if(npc!=null) { int x = npc.getX(); int y = npc.getY(); int z = npc.getZ(); activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); activeChar.teleToLocation(x, y, z, true); BuilderUtil.sendSysMessage(activeChar, "You have teleported to npc " + npc.getName() + "."); }
*/
}
}
private void recallNPC(L2PcInstance activeChar)
@ -629,8 +624,6 @@ public class AdminTeleport implements IAdminCommandHandler
try
{
// L2MonsterInstance mob = new L2MonsterInstance(monsterTemplate, template1);
spawn = new L2Spawn(template1);
spawn.setX(activeChar.getX());
spawn.setY(activeChar.getY());

View File

@ -187,10 +187,6 @@ public class AdminTest implements IAdminCommandHandler
return true;
}
/**
* @param activeChar
* @param id
*/
private void adminTestSkill(L2PcInstance activeChar, int id)
{
L2Character player;
@ -209,10 +205,6 @@ public class AdminTest implements IAdminCommandHandler
}
/*
* (non-Javadoc)
* @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#getAdminCommandList()
*/
@Override
public String[] getAdminCommandList()
{

View File

@ -67,11 +67,6 @@ public class AdminTvTEngine implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_tvt"))
{
showMainPage(activeChar);

View File

@ -39,18 +39,9 @@ public class AdminUnblockIp implements IAdminCommandHandler
"admin_unblockip"
};
/*
* (non-Javadoc)
* @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#useAdminCommand(java.lang.String, com.l2jmobius.gameserver.model.L2PcInstance)
*/
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.startsWith("admin_unblockip "))
{
try
@ -66,7 +57,6 @@ public class AdminUnblockIp implements IAdminCommandHandler
}
catch (StringIndexOutOfBoundsException e)
{
// Send syntax to the user
SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
sm.addString("Usage mode: //unblockip <ip>");
activeChar.sendPacket(sm);
@ -84,10 +74,7 @@ public class AdminUnblockIp implements IAdminCommandHandler
private boolean unblockIp(String ipAddress, L2PcInstance activeChar)
{
// LoginServerThread.getInstance().unBlockip(ipAddress);
LOGGER.warning("IP removed by GM " + activeChar.getName());
return true;
}
}

View File

@ -47,18 +47,12 @@ public class AdminVIPEngine implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
if (command.equals("admin_vip"))
{
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_setteam "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -77,7 +71,6 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP.setTeam(params[1], activeChar);
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_randomteam"))
{
if (VIP._started || VIP._joining)
@ -89,10 +82,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP.setRandomTeam(activeChar);
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_settime "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -111,10 +102,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP._time = Integer.valueOf(params[1]) * 60 * 1000;
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_endnpc "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -133,10 +122,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP.endNPC(Integer.valueOf(params[1]), activeChar);
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_joinnpc "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -155,10 +142,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP.joinNPC(Integer.valueOf(params[1]), activeChar);
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_setdelay "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -177,15 +162,12 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP._delay = Integer.valueOf(params[1]) * 60 * 1000;
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_joininit"))
{
VIP.startJoin(activeChar);
}
else if (command.startsWith("admin_vip_joinlocxyz "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -204,10 +186,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP.setJoinLOC(params[1], params[2], params[3]);
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_joinnpc "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -226,10 +206,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP.joinNPC(Integer.valueOf(params[1]), activeChar);
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_setarea "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -247,10 +225,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP._joinArea = params[1];
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_vipreward "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -269,10 +245,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP._vipReward = Integer.valueOf(params[1]);
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_viprewardamount "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -291,10 +265,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP._vipRewardAmount = Integer.valueOf(params[1]);
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_notvipreward "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -313,10 +285,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP._notVipReward = Integer.valueOf(params[1]);
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_notviprewardamount "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -335,10 +305,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP._notVipRewardAmount = Integer.valueOf(params[1]);
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_thevipreward "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");
@ -357,10 +325,8 @@ public class AdminVIPEngine implements IAdminCommandHandler
VIP._theVipReward = Integer.valueOf(params[1]);
showMainPage(activeChar);
}
else if (command.startsWith("admin_vip_theviprewardamount "))
{
// if(VIP._started == true || VIP._joining == true)
if (VIP._inProgress)
{
BuilderUtil.sendSysMessage(activeChar, "Cannot change variables when event has already started");

View File

@ -50,11 +50,6 @@ public class AdminWalker implements IAdminCommandHandler
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
/*
* if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel())){ return false; } if(Config.GMAUDIT) { Logger _logAudit = Logger.getLogger("gmaudit"); LogRecord record = new LogRecord(Level.INFO, command); record.setParameters(new Object[] { "GM: " +
* activeChar.getName(), " to target [" + activeChar.getTarget() + "] " }); _logAudit.LOGGER(record); }
*/
try
{
String[] parts = command.split(" ");
@ -188,9 +183,6 @@ public class AdminWalker implements IAdminCommandHandler
}
}
/**
* @param activeChar
*/
private void mainMenu(L2PcInstance activeChar)
{
final NpcHtmlMessage html = new NpcHtmlMessage(activeChar.getObjectId());
@ -207,9 +199,6 @@ public class AdminWalker implements IAdminCommandHandler
activeChar.sendPacket(html);
}
/**
* @param activeChar
*/
private void addMenu(L2PcInstance activeChar)
{
final NpcHtmlMessage html = new NpcHtmlMessage(activeChar.getObjectId());

View File

@ -37,19 +37,12 @@ public class AdminZone implements IAdminCommandHandler
"admin_zone_reload"
};
/*
* (non-Javadoc)
* @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#useAdminCommand(java.lang.String, com.l2jmobius.gameserver.model.L2PcInstance)
*/
@Override
public boolean useAdminCommand(String command, L2PcInstance activeChar)
{
StringTokenizer st = new StringTokenizer(command, " ");
String actualCommand = st.nextToken(); // Get actual command
// String val = "";
// if (st.countTokens() >= 1) {val = st.nextToken();}
if (actualCommand.equalsIgnoreCase("admin_zone_check"))
{
if (activeChar.isInsideZone(ZoneId.PVP))
@ -106,14 +99,9 @@ public class AdminZone implements IAdminCommandHandler
return true;
}
/*
* (non-Javadoc)
* @see com.l2jmobius.gameserver.handler.IAdminCommandHandler#getAdminCommandList()
*/
@Override
public String[] getAdminCommandList()
{
return ADMIN_COMMANDS;
}
}

View File

@ -43,7 +43,6 @@ public class ExtractableByPassHandler implements ICustomByPassHandler
return _IDS;
}
// custom_extractOne <objectID> custom_extractAll <objectID>
@Override
public void handleCommand(String command, L2PcInstance player, String parameters)
{

View File

@ -137,7 +137,6 @@ public class BeastSoulShot implements IItemHandler
}
// If the player doesn't have enough beast soulshot remaining, remove any auto soulshot task.
// TODO: test ss
if (!Config.DONT_DESTROY_SS)
{
if (!activeOwner.destroyItemWithoutTrace("Consume", item.getObjectId(), shotConsumption, null, false))

View File

@ -149,7 +149,6 @@ public class BeastSpiritShot implements IItemHandler
}
}
// TODO: test ss
if (!Config.DONT_DESTROY_SS)
{
if (!activeOwner.destroyItemWithoutTrace("Consume", item.getObjectId(), shotConsumption, null, false))

View File

@ -35,7 +35,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
*/
public class BlessedSpiritShot implements IItemHandler
{
// all the items ids that this handler knowns
// All the items ids that this handler knows
private static final int[] ITEM_IDS =
{
3947,
@ -55,10 +55,6 @@ public class BlessedSpiritShot implements IItemHandler
2164
};
/*
* (non-Javadoc)
* @see com.l2jmobius.gameserver.handler.IItemHandler#useItem(com.l2jmobius.gameserver.model.L2PcInstance, com.l2jmobius.gameserver.model.L2ItemInstance)
*/
@Override
public void useItem(L2Playable playable, L2ItemInstance item)
{
@ -111,7 +107,6 @@ public class BlessedSpiritShot implements IItemHandler
}
// Consume Blessed Spiritshot if player has enough of them
// TODO: test ss
if (!Config.DONT_DESTROY_SS)
{
if (!activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false))

Some files were not shown because too many files have changed in this diff Show More