Rename and clean up MapleCharacter

This commit is contained in:
P0nk
2021-09-09 21:09:45 +02:00
parent 46bd0570d7
commit 7dc3a2159a
379 changed files with 3418 additions and 3373 deletions

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -45,15 +45,15 @@ public class GmCommand extends Command {
"Do not ask if you can receive help, just state your issue.",
"Do not say 'I have a bug to report', just state it.",
};
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1 || params[0].length() < 3) { // #goodbye 'hi'
player.dropMessage(5, "Your message was too short. Please provide as much detail as possible.");
return;
}
String message = player.getLastCommandMessage();
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.sendYellowTip("[GM Message]:" + MapleCharacter.makeMapleReadable(player.getName()) + ": " + message));
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.sendYellowTip("[GM Message]:" + Character.makeMapleReadable(player.getName()) + ": " + message));
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(1, message));
FilePrinter.printError(FilePrinter.COMMAND_GM, MapleCharacter.makeMapleReadable(player.getName()) + ": " + message);
FilePrinter.printError(FilePrinter.COMMAND_GM, Character.makeMapleReadable(player.getName()) + ": " + message);
player.dropMessage(5, "Your message '" + message + "' was sent to GMs.");
player.dropMessage(5, tips[Randomizer.nextInt(tips.length)]);
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.events.gm.MapleEvent;
@@ -36,7 +36,7 @@ public class JoinEventCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if(!FieldLimit.CANNOTMIGRATE.check(player.getMap().getFieldLimit())) {
MapleEvent event = c.getChannelServer().getEvent();
if(event != null) {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class LeaveEventCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
int returnMap = player.getSavedLocation("EVENT");
if(returnMap != -1) {
if(player.getOla() != null) {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import config.YamlConfig;
@@ -38,7 +38,7 @@ public class MapOwnerClaimCommand extends Command {
public void execute(MapleClient c, String[] params) {
if (c.tryacquireClient()) {
try {
MapleCharacter chr = c.getPlayer();
Character chr = c.getPlayer();
if (YamlConfig.config.server.USE_MAP_OWNERSHIP_SYSTEM) {
if (chr.getEventInstance() == null) {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -36,12 +36,12 @@ public class OnlineCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
for (Channel ch : Server.getInstance().getChannelsFromWorld(player.getWorld())) {
player.yellowMessage("Players in Channel " + ch.getId() + ":");
for (MapleCharacter chr : ch.getPlayerStorage().getAllCharacters()) {
for (Character chr : ch.getPlayerStorage().getAllCharacters()) {
if (!chr.isGM()) {
player.message(" >> " + MapleCharacter.makeMapleReadable(chr.getName()) + " is at " + chr.getMap().getMapName() + ".");
player.message(" >> " + Character.makeMapleReadable(chr.getName()) + " is at " + chr.getMap().getMapName() + ".");
}
}
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -39,7 +39,7 @@ public class RanksCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
List<Pair<String, Integer>> worldRanking = Server.getInstance().getWorldPlayerRanking(player.getWorld());
player.sendPacket(GuildPackets.showPlayerRanks(9010000, worldRanking));

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import config.YamlConfig;
@@ -35,7 +35,7 @@ public class RatesCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
// travel rates not applicable since it's intrinsically a server/environment rate rather than a character rate
String showMsg_ = "#eCHARACTER RATES#n" + "\r\n\r\n";

View File

@@ -1,6 +1,6 @@
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -12,7 +12,7 @@ public class ReadPointsCommand extends Command {
@Override
public void execute(MapleClient client, String[] params) {
MapleCharacter player = client.getPlayer();
Character player = client.getPlayer();
if (params.length > 2) {
player.yellowMessage("Syntax: @points (rp|vp|all)");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -37,16 +37,16 @@ public class ReportBugCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.dropMessage(5, "Message too short and not sent. Please do @bug <bug>");
return;
}
String message = player.getLastCommandMessage();
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.sendYellowTip("[Bug]:" + MapleCharacter.makeMapleReadable(player.getName()) + ": " + message));
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.sendYellowTip("[Bug]:" + Character.makeMapleReadable(player.getName()) + ": " + message));
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(1, message));
FilePrinter.printError(FilePrinter.COMMAND_BUG, MapleCharacter.makeMapleReadable(player.getName()) + ": " + message);
FilePrinter.printError(FilePrinter.COMMAND_BUG, Character.makeMapleReadable(player.getName()) + ": " + message);
player.dropMessage(5, "Your bug '" + message + "' was submitted successfully to our developers. Thank you!");
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import config.YamlConfig;
@@ -35,7 +35,7 @@ public class ShowRatesCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
String showMsg = "#eEXP RATE#n" + "\r\n";
showMsg += "World EXP Rate: #k" + c.getWorldServer().getExpRate() + "x#k" + "\r\n";
showMsg += "Player EXP Rate: #k" + player.getRawExpRate() + "x#k" + "\r\n";

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import config.YamlConfig;
@@ -35,7 +35,7 @@ public class StatDexCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
int remainingAp = player.getRemainingAp();
int amount;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import config.YamlConfig;
@@ -35,7 +35,7 @@ public class StatIntCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
int remainingAp = player.getRemainingAp();
int amount;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import config.YamlConfig;
@@ -35,7 +35,7 @@ public class StatLukCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
int remainingAp = player.getRemainingAp();
int amount;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import config.YamlConfig;
@@ -35,7 +35,7 @@ public class StatStrCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
int remainingAp = player.getRemainingAp();
int amount;
if (params.length > 0) {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm1;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MapleMonster;
@@ -35,7 +35,7 @@ public class BossHpCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
for(MapleMonster monster : player.getMap().getAllMonsters()) {
if(monster != null && monster.isBoss() && monster.getHp() > 0) {
long percent = monster.getHp() * 100L / monster.getMaxHp();

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm1;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.SkillFactory;
import client.command.Command;
@@ -35,7 +35,7 @@ public class BuffMeCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
SkillFactory.getSkill(4101004).getEffect(SkillFactory.getSkill(4101004).getMaxLevel()).applyTo(player);
SkillFactory.getSkill(2311003).getEffect(SkillFactory.getSkill(2311003).getMaxLevel()).applyTo(player);
SkillFactory.getSkill(1301007).getEffect(SkillFactory.getSkill(1301007).getMaxLevel()).applyTo(player);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm1;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import constants.game.GameConstants;
@@ -73,7 +73,7 @@ public class GotoCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1){
String sendStr = "Syntax: #b@goto <map name>#k. Available areas:\r\n\r\n#rTowns:#k\r\n" + GOTO_TOWNS_INFO;
if (player.isGM()) {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm1;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MapleMonster;
@@ -35,7 +35,7 @@ public class MobHpCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
for(MapleMonster monster : player.getMap().getAllMonsters()) {
if (monster != null && monster.getHp() > 0) {
player.yellowMessage(monster.getName() + " (" + monster.getId() + ") has " + monster.getHp() + " / " + monster.getMaxHp() + " HP.");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm1;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.MapleItemInformationProvider;
@@ -40,7 +40,7 @@ public class WhatDropsFromCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.dropMessage(5, "Please do @whatdropsfrom <monster name>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm1;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.MapleItemInformationProvider;
@@ -43,7 +43,7 @@ public class WhoDropsCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.dropMessage(5, "Please do @whodrops <item name>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import config.YamlConfig;
@@ -35,7 +35,7 @@ public class ApCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !ap [<playername>] <newap>");
return;
@@ -48,7 +48,7 @@ public class ApCommand extends Command {
player.changeRemainingAp(newAp, false);
} else {
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
int newAp = Integer.parseInt(params[1]);
if (newAp < 0) newAp = 0;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -37,9 +37,9 @@ public class BombCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length > 0) {
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
victim.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(9300166), victim.getPosition());
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, player.getName() + " used !bomb on " + victim.getName()));

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.Skill;
import client.SkillFactory;
@@ -36,7 +36,7 @@ public class BuffCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !buff <buffid>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.SkillFactory;
import client.command.Command;
@@ -35,7 +35,7 @@ public class BuffMapCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
SkillFactory.getSkill(9101001).getEffect(SkillFactory.getSkill(9101001).getMaxLevel()).applyTo(player, true);
SkillFactory.getSkill(9101002).getEffect(SkillFactory.getSkill(9101002).getMaxLevel()).applyTo(player, true);
SkillFactory.getSkill(9101003).getEffect(SkillFactory.getSkill(9101003).getMaxLevel()).applyTo(player, true);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class ClearDropsCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
player.getMap().clearDrops(player);
player.dropMessage(5, "Cleared dropped items");
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.maps.SavedLocationType;
@@ -35,7 +35,7 @@ public class ClearSavedLocationsCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer(), victim;
Character player = c.getPlayer(), victim;
if (params.length > 0) {
victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import client.inventory.InventoryType;
@@ -37,7 +37,7 @@ public class ClearSlotCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !clearslot <all, equip, use, setup, etc or cash.>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,13 +34,13 @@ public class DcCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !dc <playername>");
return;
}
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim == null) {
victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim == null) {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.SkillFactory;
import client.command.Command;
@@ -35,7 +35,7 @@ public class EmpowerMeCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
final int[] array = {2311003, 2301004, 1301007, 4101004, 2001002, 1101007, 1005, 2301003, 5121009, 1111002, 4111001, 4111002, 4211003, 4211005, 1321000, 2321004, 3121002};
for (int i : array) {
SkillFactory.getSkill(i).getEffect(SkillFactory.getSkill(i).getMaxLevel()).applyTo(player);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class HealCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
player.healHpMp();
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.SkillFactory;
import client.command.Command;
@@ -35,7 +35,7 @@ public class HideCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
SkillFactory.getSkill(9101004).getEffect(SkillFactory.getSkill(9101004).getMaxLevel()).applyTo(player);
}

View File

@@ -1,6 +1,6 @@
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.ThreadManager;
@@ -31,7 +31,7 @@ public class IdCommand extends Command {
@Override
public void execute(MapleClient client, final String[] params) {
final MapleCharacter player = client.getPlayer();
final Character player = client.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !id <type> <query>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import client.inventory.Pet;
@@ -39,7 +39,7 @@ public class ItemCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !item <itemid> <quantity>");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import client.inventory.InventoryType;
@@ -40,7 +40,7 @@ public class ItemDropCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !drop <itemid> <quantity>");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.maps.MapleMap;
@@ -36,7 +36,7 @@ public class JailCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !jail <playername> [<minutes>]");
return;
@@ -51,7 +51,7 @@ public class JailCommand extends Command {
}
}
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
victim.addJailExpirationTime(minutesJailed * 60 * 1000);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.MapleJob;
import client.command.Command;
@@ -35,7 +35,7 @@ public class JobCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length == 1) {
int jobid = Integer.parseInt(params[0]);
if (jobid < 0 || jobid >= 2200) {
@@ -46,7 +46,7 @@ public class JobCommand extends Command {
player.changeJob(MapleJob.getById(jobid));
player.equipChanged();
} else if (params.length == 2) {
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
int jobid = Integer.parseInt(params[1]);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import config.YamlConfig;
@@ -35,7 +35,7 @@ public class LevelCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !level <newlevel>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class LevelProCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !levelpro <newlevel>");
return;

View File

@@ -23,6 +23,7 @@
*/
package client.command.commands.gm2;
import client.Character;
import client.*;
import client.command.Command;
import provider.MapleData;
@@ -36,7 +37,7 @@ public class MaxSkillCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
for (MapleData skill_ : MapleDataProviderFactory.getDataProvider(WZFiles.STRING).getData("Skill.img").getChildren()) {
try {
Skill skill = SkillFactory.getSkill(Integer.parseInt(skill_.getName()));

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.MapleStat;
import client.command.Command;
@@ -36,7 +36,7 @@ public class MaxStatCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
player.loseExp(player.getExp(), false, false);
player.setLevel(255);
player.resetPlayerRates();

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.maps.MapleMap;
@@ -35,13 +35,13 @@ public class ReachCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !reach <playername>");
return;
}
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null && victim.isLoggedin()) {
if (player.getClient().getChannel() != victim.getClient().getChannel()) {
player.dropMessage(5, "Player '" + victim.getName() + "' is at channel " + victim.getClient().getChannel() + ".");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import client.inventory.InventoryType;
@@ -38,7 +38,7 @@ public class RechargeCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
for (Item torecharge : c.getPlayer().getInventory(InventoryType.USE).list()) {
if (ItemConstants.isThrowingStar(torecharge.getItemId())){

View File

@@ -23,6 +23,7 @@
*/
package client.command.commands.gm2;
import client.Character;
import client.*;
import client.command.Command;
import provider.MapleData;
@@ -36,7 +37,7 @@ public class ResetSkillCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
for (MapleData skill_ : MapleDataProviderFactory.getDataProvider(WZFiles.STRING).getData("Skill.img").getChildren()) {
try {
Skill skill = SkillFactory.getSkill(Integer.parseInt(skill_.getName()));

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import provider.MapleData;
@@ -53,7 +53,7 @@ public class SearchCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !search <type> <name>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class SetSlotCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !setslot <newlevel>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class SetStatCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !setstat <newstat>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import config.YamlConfig;
@@ -35,7 +35,7 @@ public class SpCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !sp [<playername>] <newsp>");
return;
@@ -48,7 +48,7 @@ public class SpCommand extends Command {
player.updateRemainingSp(newSp);
} else {
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
int newSp = Integer.parseInt(params[1]);
if (newSp < 0) newSp = 0;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -37,13 +37,13 @@ public class SummonCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !warphere <playername>");
return;
}
MapleCharacter victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim == null) {
//If victim isn't on current channel, loop all channels on current world.

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.SkillFactory;
import client.command.Command;
@@ -35,7 +35,7 @@ public class UnHideCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
SkillFactory.getSkill(9101004).getEffect(SkillFactory.getSkill(9101004).getMaxLevel()).applyTo(player);
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,13 +34,13 @@ public class UnJailCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !unjail <playername>");
return;
}
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
if (victim.getJailExpirationTimeLeft() <= 0) {
player.message("This player is already free.");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.maps.MapleMap;
@@ -38,7 +38,7 @@ public class WarpAreaCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !warparea <mapid>");
return;
@@ -53,9 +53,9 @@ public class WarpAreaCommand extends Command {
Point pos = player.getPosition();
Collection<MapleCharacter> characters = player.getMap().getAllPlayers();
Collection<Character> characters = player.getMap().getAllPlayers();
for (MapleCharacter victim : characters) {
for (Character victim : characters) {
if (victim.getPosition().distanceSq(pos) <= 50000) {
victim.saveLocationOnWarp();
victim.changeMap(target, target.getRandomPlayerSpawnpoint());

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.maps.FieldLimit;
@@ -37,7 +37,7 @@ public class WarpCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !warp <mapid>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.maps.MapleMap;
@@ -37,7 +37,7 @@ public class WarpMapCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !warpmap <mapid>");
return;
@@ -50,9 +50,9 @@ public class WarpMapCommand extends Command {
return;
}
Collection<MapleCharacter> characters = player.getMap().getAllPlayers();
Collection<Character> characters = player.getMap().getAllPlayers();
for (MapleCharacter victim : characters) {
for (Character victim : characters) {
victim.saveLocationOnWarp();
victim.changeMap(target, target.getRandomPlayerSpawnpoint());
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MapleMonster;
@@ -40,9 +40,9 @@ public class WhereaMiCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
HashSet<MapleCharacter> chars = new HashSet<>();
HashSet<Character> chars = new HashSet<>();
HashSet<MapleNPC> npcs = new HashSet<>();
HashSet<MaplePlayerNPC> playernpcs = new HashSet<>();
HashSet<MapleMonster> mobs = new HashSet<>();
@@ -51,8 +51,8 @@ public class WhereaMiCommand extends Command {
if (mmo instanceof MapleNPC) {
MapleNPC npc = (MapleNPC) mmo;
npcs.add(npc);
} else if (mmo instanceof MapleCharacter) {
MapleCharacter mc = (MapleCharacter) mmo;
} else if (mmo instanceof Character) {
Character mc = (Character) mmo;
chars.add(mc);
} else if (mmo instanceof MapleMonster) {
MapleMonster mob = (MapleMonster) mmo;
@@ -68,7 +68,7 @@ public class WhereaMiCommand extends Command {
player.yellowMessage("Map ID: " + player.getMap().getId());
player.yellowMessage("Players on this map:");
for (MapleCharacter chr : chars) {
for (Character chr : chars) {
player.dropMessage(5, ">> " + chr.getName() + " - " + chr.getId() + " - Oid: " + chr.getObjectId());
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -42,16 +42,16 @@ public class BanCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !ban <IGN> <Reason> (Please be descriptive)");
return;
}
String ign = params[0];
String reason = joinStringFrom(params, 1);
MapleCharacter target = c.getChannelServer().getPlayerStorage().getCharacterByName(ign);
Character target = c.getChannelServer().getPlayerStorage().getCharacterByName(ign);
if (target != null) {
String readableTargetName = MapleCharacter.makeMapleReadable(target.getName());
String readableTargetName = Character.makeMapleReadable(target.getName());
String ip = target.getClient().getRemoteAddress();
//Ban ip
try (Connection con = DatabaseConnection.getConnection()) {
@@ -74,10 +74,10 @@ public class BanCommand extends Command {
target.yellowMessage("You have been banned by #b" + c.getPlayer().getName() + " #k.");
target.yellowMessage("Reason: " + reason);
c.sendPacket(PacketCreator.getGMEffect(4, (byte) 0));
final MapleCharacter rip = target;
final Character rip = target;
TimerManager.getInstance().schedule(() -> rip.getClient().disconnect(false, false), 5000); //5 Seconds
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
} else if (MapleCharacter.ban(ign, reason, false)) {
} else if (Character.ban(ign, reason, false)) {
c.sendPacket(PacketCreator.getGMEffect(4, (byte) 0));
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
} else {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class ChatCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
player.toggleWhiteChat();
player.message("Your chat is now " + (player.getWhiteChat() ? " white" : "normal") + ".");
}

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.BuffStat;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -35,8 +35,8 @@ public class CheckDmgCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character player = c.getPlayer();
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
int maxBase = victim.calculateMaxBaseDamage(victim.getTotalWatk());
Integer watkBuff = victim.getBuffedValue(BuffStat.WATK);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class ClosePortalCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !closeportal <portalid>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.MapleDisease;
import client.command.Command;
@@ -41,7 +41,7 @@ public class DebuffCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !debuff SLOW|SEDUCE|ZOMBIFY|CONFUSE|STUN|POISON|SEAL|DARKNESS|WEAKEN|CURSE");
return;
@@ -108,7 +108,7 @@ public class DebuffCommand extends Command {
}
for (MapleMapObject mmo : player.getMap().getMapObjectsInRange(player.getPosition(), 777777.7, Arrays.asList(MapleMapObjectType.PLAYER))) {
MapleCharacter chr = (MapleCharacter) mmo;
Character chr = (Character) mmo;
if (chr.getId() != player.getId()) {
chr.giveDebuff(disease, skill);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class EndEventCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
c.getChannelServer().setEvent(null);
player.dropMessage(5, "You have ended the event. No more players may join.");
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -40,7 +40,7 @@ public class ExpedsCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
for (Channel ch : Server.getInstance().getChannelsFromWorld(c.getWorld())) {
List<MapleExpedition> expeds = ch.getExpeditions();
if (expeds.isEmpty()) {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.MapleStat;
import client.command.Command;
@@ -37,7 +37,7 @@ public class FaceCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !face [<playername>] <faceid>");
return;
@@ -60,7 +60,7 @@ public class FaceCommand extends Command {
player.yellowMessage("Face id '" + params[1] + "' does not exist.");
}
MapleCharacter victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim == null) {
victim.setFace(itemId);
victim.updateSingleStat(MapleStat.FACE, itemId);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.MapleStat;
import client.command.Command;
@@ -35,13 +35,13 @@ public class FameCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !fame <playername> <gainfame>");
return;
}
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
victim.setFame(Integer.parseInt(params[1]));
victim.updateSingleStat(MapleStat.FAME, victim.getFame());

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -35,7 +35,7 @@ public class FlyCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) { // fly option will become available for any character of that account
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !fly <on/off>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class GiveMesosCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !givems [<playername>] <gainmeso>");
return;
@@ -66,7 +66,7 @@ public class GiveMesosCommand extends Command {
}
}
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(recv_);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(recv_);
if (victim != null) {
victim.gainMeso((int) mesos_, true);
player.message("MESO given.");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class GiveNxCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !givenx [nx, mp, np] [<playername>] <gainnx>");
return;
@@ -72,7 +72,7 @@ public class GiveNxCommand extends Command {
value = Integer.parseInt(params[0]);
}
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(recv);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(recv);
if (victim != null) {
victim.getCashShop().gainCash(type, value);
player.message(typeStr.toUpperCase() + " given.");

View File

@@ -1,6 +1,6 @@
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -11,13 +11,13 @@ public class GiveRpCommand extends Command {
@Override
public void execute(MapleClient client, String[] params) {
MapleCharacter player = client.getPlayer();
Character player = client.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !giverp <playername> <gainrewardpoint>");
return;
}
MapleCharacter victim = client.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = client.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
victim.setRewardPoints(victim.getRewardPoints() + Integer.parseInt(params[1]));
player.message("RP given. Player " + params[0] + " now has " + victim.getRewardPoints()

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,13 +34,13 @@ public class GiveVpCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !givevp <playername> <gainvotepoint>");
return;
}
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
victim.getClient().addVotePoints(Integer.parseInt(params[1]));
player.message("VP given.");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.MapleStat;
import client.command.Command;
@@ -37,7 +37,7 @@ public class HairCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !hair [<playername>] <hairid>");
return;
@@ -61,7 +61,7 @@ public class HairCommand extends Command {
return;
}
MapleCharacter victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
victim.setHair(itemId);
victim.updateSingleStat(MapleStat.HAIR, itemId);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,8 +34,8 @@ public class HealMapCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
for (MapleCharacter mch : player.getMap().getCharacters()) {
Character player = c.getPlayer();
for (Character mch : player.getMap().getCharacters()) {
if (mch != null) {
mch.healHpMp();
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,8 +34,8 @@ public class HealPersonCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character player = c.getPlayer();
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
victim.healHpMp();
} else {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,8 +34,8 @@ public class HpMpCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
MapleCharacter victim = player;
Character player = c.getPlayer();
Character victim = player;
int statUpdate = 1;
if (params.length == 2) {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,8 +34,8 @@ public class HurtCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character player = c.getPlayer();
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
victim.updateHp(1);
} else {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.packet.logging.MapleLogger;
@@ -37,12 +37,12 @@ public class IgnoreCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !ignore <ign>");
return;
}
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim == null) {
player.message("Player '" + params[0] + "' could not be found on this world.");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.packet.logging.MapleLogger;
@@ -35,9 +35,9 @@ public class IgnoredCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
for (Integer cid : MapleLogger.ignored) {
player.yellowMessage(MapleCharacter.getNameById(cid) + " is being ignored.");
player.yellowMessage(Character.getNameById(cid) + " is being ignored.");
}
}
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,9 +34,9 @@ public class InMapCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
String st = "";
for (MapleCharacter chr : player.getMap().getCharacters()) {
for (Character chr : player.getMap().getCharacters()) {
st += chr.getName() + " ";
}
player.message(st);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MapleMonster;
@@ -41,7 +41,7 @@ public class KillAllCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
MapleMap map = player.getMap();
List<MapleMapObject> monsters = map.getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.MONSTER));
int count = 0;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -36,13 +36,13 @@ public class KillCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !kill <playername>");
return;
}
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {
victim.updateHpMp(0);
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, player.getName() + " used !kill on " + victim.getName()));

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,8 +34,8 @@ public class KillMapCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
for (MapleCharacter mch : player.getMap().getCharacters()) {
Character player = c.getPlayer();
for (Character mch : player.getMap().getCharacters()) {
mch.updateHp(0);
}
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import tools.PacketCreator;
@@ -35,7 +35,7 @@ public class MaxEnergyCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
c.getPlayer().setDojoEnergy(10000);
c.sendPacket(PacketCreator.getEnergy("energy", 10000));
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,8 +34,8 @@ public class MaxHpMpCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
MapleCharacter victim = player;
Character player = c.getPlayer();
Character victim = player;
int statUpdate = 1;
if (params.length >= 2) {

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.packet.logging.MapleLogger;
@@ -37,12 +37,12 @@ public class MonitorCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !monitor <ign>");
return;
}
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim == null) {
player.message("Player '" + params[0] + "' could not be found on this world.");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.packet.logging.MapleLogger;
@@ -35,9 +35,9 @@ public class MonitorsCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
for (Integer cid : MapleLogger.monitored) {
player.yellowMessage(MapleCharacter.getNameById(cid) + " is being monitored.");
player.yellowMessage(Character.getNameById(cid) + " is being monitored.");
}
}
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import constants.game.GameConstants;
@@ -46,7 +46,7 @@ public class MusicCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
String sendMsg = "";

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class MuteMapCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (player.getMap().isMuted()) {
player.getMap().setMuted(false);
player.dropMessage(5, "The map you are in has been un-muted.");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class NightCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
player.getMap().broadcastNightEffect();
player.yellowMessage("Done.");
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -36,7 +36,7 @@ public class NoticeCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[Notice] " + player.getLastCommandMessage()));
}
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MapleLifeFactory;
@@ -37,7 +37,7 @@ public class NpcCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !npc <npcid>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -36,15 +36,15 @@ public class OnlineTwoCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
int total = 0;
for (Channel ch : Server.getInstance().getChannelsFromWorld(player.getWorld())) {
int size = ch.getPlayerStorage().getAllCharacters().size();
total += size;
String s = "(Channel " + ch.getId() + " Online: " + size + ") : ";
if (ch.getPlayerStorage().getAllCharacters().size() < 50) {
for (MapleCharacter chr : ch.getPlayerStorage().getAllCharacters()) {
s += MapleCharacter.makeMapleReadable(chr.getName()) + ", ";
for (Character chr : ch.getPlayerStorage().getAllCharacters()) {
s += Character.makeMapleReadable(chr.getName()) + ", ";
}
player.dropMessage(6, s.substring(0, s.length() - 2));
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class OpenPortalCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !openportal <portalid>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import io.netty.buffer.Unpooled;
@@ -46,7 +46,7 @@ public class PeCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
String packet = "";
try {
InputStreamReader is = new FileReader("pe.txt");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
@@ -34,7 +34,7 @@ public class PosCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
float xpos = player.getPosition().x;
float ypos = player.getPosition().y;
float fh = player.getMap().getFootholds().findBelow(player.getPosition()).getId();

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.quest.MapleQuest;
@@ -35,7 +35,7 @@ public class QuestCompleteCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1){
player.yellowMessage("Syntax: !completequest <questid>");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.quest.MapleQuest;
@@ -35,7 +35,7 @@ public class QuestResetCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1){
player.yellowMessage("Syntax: !resetquest <questid>");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.quest.MapleQuest;
@@ -35,7 +35,7 @@ public class QuestStartCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
if (params.length < 1){
player.yellowMessage("Syntax: !startquest <questid>");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MapleMonsterInformationProvider;
@@ -35,7 +35,7 @@ public class ReloadDropsCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
MapleMonsterInformationProvider.getInstance().clearDrops();
player.dropMessage(5, "Reloaded Drops");
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -36,7 +36,7 @@ public class ReloadEventsCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
for (Channel ch : Server.getInstance().getAllChannels()) {
ch.reloadEventScriptManager();
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.maps.MapleMap;
@@ -37,13 +37,13 @@ public class ReloadMapCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
MapleMap newMap = c.getChannelServer().getMapFactory().resetMap(player.getMapId());
int callerid = c.getPlayer().getId();
Collection<MapleCharacter> characters = player.getMap().getAllPlayers();
Collection<Character> characters = player.getMap().getAllPlayers();
for (MapleCharacter chr : characters) {
for (Character chr : characters) {
chr.saveLocationOnWarp();
chr.changeMap(newMap);
if (chr.getId() != callerid)

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import scripting.portal.PortalScriptManager;
@@ -35,7 +35,7 @@ public class ReloadPortalsCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
PortalScriptManager.getInstance().reloadPortalScripts();
player.dropMessage(5, "Reloaded Portals");
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm3;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.Server;
@@ -36,7 +36,7 @@ public class RipCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + joinStringFrom(params, 1)));
}
}

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