Rename and clean up MapleClient

This commit is contained in:
P0nk
2021-09-09 21:13:48 +02:00
parent da8837710a
commit b07e6799dc
425 changed files with 1110 additions and 1109 deletions

View File

@@ -165,7 +165,7 @@ public class BuddyList {
return pendingRequests.pollLast();
}
public void addBuddyRequest(MapleClient c, int cidFrom, String nameFrom, int channelFrom) {
public void addBuddyRequest(Client c, int cidFrom, String nameFrom, int channelFrom) {
put(new BuddylistEntry(nameFrom, "Default Group", cidFrom, channelFrom, false));
if (pendingRequests.isEmpty()) {
c.sendPacket(PacketCreator.requestBuddylistAdd(cidFrom, c.getPlayer().getId(), nameFrom));

View File

@@ -152,7 +152,7 @@ public class Character extends AbstractCharacterObject {
private BuddyList buddylist;
private EventInstanceManager eventInstance = null;
private MapleHiredMerchant hiredMerchant = null;
private MapleClient client;
private Client client;
private MapleGuildCharacter mgc = null;
private MaplePartyCharacter mpc = null;
private Inventory[] inventory;
@@ -356,7 +356,7 @@ public class Character extends AbstractCharacterObject {
return getJobStyle((byte) ((this.getStr() > this.getDex()) ? 0x80 : 0x40));
}
public static Character getDefault(MapleClient c) {
public static Character getDefault(Client c) {
Character ret = new Character();
ret.client = c;
ret.setGMLevel(0);
@@ -793,11 +793,11 @@ public class Character extends AbstractCharacterObject {
allowExpGain = !allowExpGain;
}
public void setClient(MapleClient c) {
public void setClient(Client c) {
this.client = c;
}
public void newClient(MapleClient c) {
public void newClient(Client c) {
this.loggedIn = true;
c.setAccountName(this.client.getAccountName());//No null's for accountName
this.setClient(c);
@@ -1019,7 +1019,7 @@ public class Character extends AbstractCharacterObject {
private void broadcastChangeJob() {
for (Character chr : map.getAllPlayers()) {
MapleClient chrC = chr.getClient();
Client chrC = chr.getClient();
if (chrC != null) { // propagate new job 3rd-person effects (FJ, Aran 1st strike, etc)
this.sendDestroyData(chrC);
@@ -2108,14 +2108,14 @@ public class Character extends AbstractCharacterObject {
}
}
private void nextPendingRequest(MapleClient c) {
private void nextPendingRequest(Client c) {
CharacterNameAndId pendingBuddyRequest = c.getPlayer().getBuddylist().pollPendingRequest();
if (pendingBuddyRequest != null) {
c.sendPacket(PacketCreator.requestBuddylistAdd(pendingBuddyRequest.getId(), c.getPlayer().getId(), pendingBuddyRequest.getName()));
}
}
private void notifyRemoteChannel(MapleClient c, int remoteChannel, int otherCid, BuddyList.BuddyOperation operation) {
private void notifyRemoteChannel(Client c, int remoteChannel, int otherCid, BuddyList.BuddyOperation operation) {
Character player = c.getPlayer();
if (remoteChannel != -1) {
c.getWorldServer().buddyChanged(otherCid, player.getId(), player.getName(), c.getChannel(), operation);
@@ -4614,7 +4614,7 @@ public class Character extends AbstractCharacterObject {
return this.chalktext;
}
public MapleClient getClient() {
public Client getClient() {
return client;
}
@@ -4825,7 +4825,7 @@ public class Character extends AbstractCharacterObject {
}
}
public void exportExcludedItems(MapleClient c) {
public void exportExcludedItems(Client c) {
Map<Integer, Set<Integer>> petExcluded = this.getExcluded();
for (Map.Entry<Integer, Set<Integer>> pe : petExcluded.entrySet()) {
byte petIndex = this.getPetIndex(pe.getKey());
@@ -6951,7 +6951,7 @@ public class Character extends AbstractCharacterObject {
updateRemainingSp(remainingSp, GameConstants.getSkillBook(job.getId()));
}
public static Character loadCharFromDB(final int charid, MapleClient client, boolean channelserver) throws SQLException {
public static Character loadCharFromDB(final int charid, Client client, boolean channelserver) throws SQLException {
Character ret = new Character();
ret.client = client;
ret.id = charid;
@@ -7182,7 +7182,7 @@ public class Character extends AbstractCharacterObject {
try (ResultSet rs = ps.executeQuery()) {
if (rs.next()) {
MapleClient retClient = ret.getClient();
Client retClient = ret.getClient();
retClient.setAccountName(rs.getString("name"));
retClient.setCharacterSlots(rs.getByte("characterslots"));
@@ -9367,7 +9367,7 @@ public class Character extends AbstractCharacterObject {
return (mesoGain);
}
private int standaloneSell(MapleClient c, MapleItemInformationProvider ii, InventoryType type, short slot, short quantity) {
private int standaloneSell(Client c, MapleItemInformationProvider ii, InventoryType type, short slot, short quantity) {
if (quantity == 0xFFFF || quantity == 0) {
quantity = 1;
}
@@ -9534,7 +9534,7 @@ public class Character extends AbstractCharacterObject {
}
}
private void standaloneMerge(Map<StatUpgrade, Float> statups, MapleClient c, InventoryType type, short slot, Item item) {
private void standaloneMerge(Map<StatUpgrade, Float> statups, Client c, InventoryType type, short slot, Item item) {
short quantity;
if (item == null || (quantity = item.getQuantity()) < 1 || ii.isCash(item.getItemId()) || !ii.isUpgradeable(item.getItemId()) || hasMergeFlag(item)) {
return;
@@ -9885,7 +9885,7 @@ public class Character extends AbstractCharacterObject {
public void announceUpdateQuest(DelayedQuestUpdate questUpdateType, Object... params) {
Pair<DelayedQuestUpdate, Object[]> p = new Pair<>(questUpdateType, params);
MapleClient c = this.getClient();
Client c = this.getClient();
if (c.getQM() != null || c.getCM() != null) {
synchronized (npcUpdateQuests) {
npcUpdateQuests.add(p);
@@ -10070,12 +10070,12 @@ public class Character extends AbstractCharacterObject {
}
@Override
public void sendDestroyData(MapleClient client) {
public void sendDestroyData(Client client) {
client.sendPacket(PacketCreator.removePlayerFromMap(this.getObjectId()));
}
@Override
public void sendSpawnData(MapleClient client) {
public void sendSpawnData(Client client) {
if (!this.isHidden() || client.getPlayer().gmLevel() > 1) {
client.sendPacket(PacketCreator.spawnPlayerMapObject(client, this, false));

View File

@@ -78,8 +78,8 @@ import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
public class MapleClient extends ChannelInboundHandlerAdapter {
private static final Logger log = LoggerFactory.getLogger(MapleClient.class);
public class Client extends ChannelInboundHandlerAdapter {
private static final Logger log = LoggerFactory.getLogger(Client.class);
public static final int LOGIN_NOTLOGGEDIN = 0;
public static final int LOGIN_SERVER_TRANSITION = 1;
@@ -133,7 +133,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
CHANNEL
}
public MapleClient(Type type, long sessionId, String remoteAddress, PacketProcessor packetProcessor, int world, int channel) {
public Client(Type type, long sessionId, String remoteAddress, PacketProcessor packetProcessor, int world, int channel) {
this.type = type;
this.sessionId = sessionId;
this.remoteAddress = remoteAddress;
@@ -142,18 +142,18 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
this.channel = channel;
}
public static MapleClient createLoginClient(long sessionId, String remoteAddress, PacketProcessor packetProcessor,
int world, int channel) {
return new MapleClient(Type.LOGIN, sessionId, remoteAddress, packetProcessor, world, channel);
public static Client createLoginClient(long sessionId, String remoteAddress, PacketProcessor packetProcessor,
int world, int channel) {
return new Client(Type.LOGIN, sessionId, remoteAddress, packetProcessor, world, channel);
}
public static MapleClient createChannelClient(long sessionId, String remoteAddress, PacketProcessor packetProcessor,
int world, int channel) {
return new MapleClient(Type.CHANNEL, sessionId, remoteAddress, packetProcessor, world, channel);
public static Client createChannelClient(long sessionId, String remoteAddress, PacketProcessor packetProcessor,
int world, int channel) {
return new Client(Type.CHANNEL, sessionId, remoteAddress, packetProcessor, world, channel);
}
public static MapleClient createMock() {
return new MapleClient(null, -1,null, null, -123, -123);
public static Client createMock() {
return new Client(null, -1,null, null, -123, -123);
}
@Override
@@ -543,7 +543,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
loggedIn = false;
return 7;
}
updateLoginState(MapleClient.LOGIN_LOGGEDIN);
updateLoginState(Client.LOGIN_LOGGEDIN);
} finally {
encoderLock.unlock();
}
@@ -834,7 +834,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
try (ResultSet rs = ps.executeQuery()) {
if (!rs.next()) {
throw new RuntimeException("getLoginState - MapleClient AccID: " + getAccID());
throw new RuntimeException("getLoginState - Client AccID: " + getAccID());
}
birthday = Calendar.getInstance();
@@ -848,7 +848,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
if (rs.getTimestamp("lastlogin").getTime() + 30000 < Server.getInstance().getCurrentTime()) {
int accountId = accId;
state = LOGIN_NOTLOGGEDIN;
updateLoginState(MapleClient.LOGIN_NOTLOGGEDIN); // ACCID = 0, issue found thanks to Tochi & K u ssss o & Thora & Omo Oppa
updateLoginState(Client.LOGIN_NOTLOGGEDIN); // ACCID = 0, issue found thanks to Tochi & K u ssss o & Thora & Omo Oppa
this.setAccID(accountId);
}
}
@@ -960,7 +960,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
return true;
}
private void disconnectInternal(boolean shutdown, boolean cashshop) {//once per MapleClient instance
private void disconnectInternal(boolean shutdown, boolean cashshop) {//once per Client instance
if (player != null && player.isLoggedin() && player.getClient() != null) {
final int messengerid = player.getMessenger() == null ? 0 : player.getMessenger().getId();
//final int fid = player.getFamilyId();
@@ -1039,12 +1039,12 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
SessionCoordinator.getInstance().closeSession(this, false);
if (!serverTransition && isLoggedIn()) {
updateLoginState(MapleClient.LOGIN_NOTLOGGEDIN);
updateLoginState(Client.LOGIN_NOTLOGGEDIN);
clear();
} else {
if (!Server.getInstance().hasCharacteridInTransition(this)) {
updateLoginState(MapleClient.LOGIN_NOTLOGGEDIN);
updateLoginState(Client.LOGIN_NOTLOGGEDIN);
}
engines = null; // thanks Tochi for pointing out a NPE here
@@ -1068,7 +1068,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
}
public void setCharacterOnSessionTransitionState(int cid) {
this.updateLoginState(MapleClient.LOGIN_SERVER_TRANSITION);
this.updateLoginState(Client.LOGIN_SERVER_TRANSITION);
this.inTransition = true;
Server.getInstance().setCharacteridInTransition(this, cid);
}
@@ -1144,7 +1144,7 @@ public class MapleClient extends ChannelInboundHandlerAdapter {
if (lastPong < pingedAt) {
if (ioChannel.isActive()) {
log.info("Disconnected {} due to idling. Reason: {}", remoteAddress, event.state());
updateLoginState(MapleClient.LOGIN_NOTLOGGEDIN);
updateLoginState(Client.LOGIN_NOTLOGGEDIN);
disconnectSession();
}
}

View File

@@ -53,7 +53,7 @@ public final class MonsterBook {
}
}
public void addCard(final MapleClient c, final int cardid) {
public void addCard(final Client c, final int cardid) {
c.getPlayer().getMap().broadcastMessage(c.getPlayer(), PacketCreator.showForeignCardEffect(c.getPlayer().getId()), false);
Integer qty;

View File

@@ -23,14 +23,14 @@
*/
package client.command;
import client.MapleClient;
import client.Client;
public abstract class Command {
protected int rank;
protected String description;
public abstract void execute(MapleClient client, String[] params);
public abstract void execute(Client client, String[] params);
public String getDescription() {
return description;

View File

@@ -23,7 +23,7 @@
*/
package client.command;
import client.MapleClient;
import client.Client;
import client.command.commands.gm0.*;
import client.command.commands.gm1.*;
import client.command.commands.gm2.*;
@@ -48,7 +48,7 @@ public class CommandsExecutor {
private static final char USER_HEADING = '@';
private static final char GM_HEADING = '!';
public static boolean isCommand(MapleClient client, String content){
public static boolean isCommand(Client client, String content){
char heading = content.charAt(0);
if (client.getPlayer().isGM()){
return heading == USER_HEADING || heading == GM_HEADING;
@@ -74,7 +74,7 @@ public class CommandsExecutor {
return commandsNameDesc;
}
public void handle(MapleClient client, String message){
public void handle(Client client, String message){
if (client.tryacquireClient()) {
try {
handleInternal(client, message);
@@ -86,7 +86,7 @@ public class CommandsExecutor {
}
}
private void handleInternal(MapleClient client, String message){
private void handleInternal(Client client, String message){
if (client.getPlayer().getMapId() == 300000012) {
client.getPlayer().yellowMessage("You do not have permission to use commands while in jail.");
return;
@@ -121,7 +121,7 @@ public class CommandsExecutor {
writeLog(client, message);
}
private void writeLog(MapleClient client, String command){
private void writeLog(Client client, String command){
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH:mm");
FilePrinter.print(FilePrinter.USED_COMMANDS, client.getPlayer().getName() + " used: " + command + " on "
+ sdf.format(Calendar.getInstance().getTime()));

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
import client.processor.action.BuybackProcessor;
@@ -33,7 +33,7 @@ public class BuyBackCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
if (params.length < 1) {
c.getPlayer().yellowMessage("Syntax: @buyback <info|now>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class ChangeLanguageCommand extends Command {
@@ -32,7 +32,7 @@ public class ChangeLanguageCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
if (params.length < 1) {
c.getPlayer().yellowMessage("Syntax: !changel <0=ptb, 1=esp, 2=eng>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
import scripting.npc.NPCScriptManager;
import scripting.quest.QuestScriptManager;
@@ -35,7 +35,7 @@ public class DisposeCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
NPCScriptManager.getInstance().dispose(c);
QuestScriptManager.getInstance().dispose(c);
c.sendPacket(PacketCreator.enableActions());

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
@@ -33,7 +33,7 @@ public class DropLimitCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
int dropCount = c.getPlayer().getMap().getDroppedItemCount();
if(((float) dropCount) / YamlConfig.config.server.ITEM_LIMIT_ON_MAP < 0.75f) {
c.getPlayer().showHint("Current drop count: #b" + dropCount + "#k / #e" + YamlConfig.config.server.ITEM_LIMIT_ON_MAP + "#n", 300);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.coordinator.login.MapleLoginBypassCoordinator;
@@ -33,7 +33,7 @@ public class EnableAuthCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
if (c.tryacquireClient()) {
try {
MapleLoginBypassCoordinator.getInstance().unregisterLoginBypassEntry(c.getHwid(), c.getAccID());

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class EquipLvCommand extends Command {
@@ -32,7 +32,7 @@ public class EquipLvCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
c.getPlayer().showAllEquipFeatures();
}
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.MapleItemInformationProvider;
import server.gachapon.MapleGachapon;
@@ -34,7 +34,7 @@ public class GachaCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
MapleGachapon.Gachapon gacha = null;
String search = c.getPlayer().getLastCommandMessage();
String gachaName = "";

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
import tools.FilePrinter;
@@ -37,7 +37,7 @@ public class GmCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
String[] tips = {
"Please only use @gm in emergencies or to report somebody.",
"To report a bug or make a suggestion, use the forum.",

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class HelpCommand extends Command {
@@ -32,7 +32,7 @@ public class HelpCommand extends Command {
}
@Override
public void execute(MapleClient client, String[] params) {
public void execute(Client client, String[] params) {
client.getAbstractPlayerInteraction().openNpc(9201143, "commands");
}
}

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class LeaveEventCommand extends Command {
@@ -33,7 +33,7 @@ public class LeaveEventCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
int returnMap = player.getSavedLocation("EVENT");
if(returnMap != -1) {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
import server.maps.MapleMap;
@@ -35,7 +35,7 @@ public class MapOwnerClaimCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
if (c.tryacquireClient()) {
try {
Character chr = c.getPlayer();

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
import net.server.channel.Channel;
@@ -35,7 +35,7 @@ public class OnlineCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
for (Channel ch : Server.getInstance().getChannelsFromWorld(player.getWorld())) {
player.yellowMessage("Players in Channel " + ch.getId() + ":");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
import net.server.guild.GuildPackets;
@@ -38,7 +38,7 @@ public class RanksCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
List<Pair<String, Integer>> worldRanking = Server.getInstance().getWorldPlayerRanking(player.getWorld());

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
@@ -34,7 +34,7 @@ public class RatesCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
// travel rates not applicable since it's intrinsically a server/environment rate rather than a character rate

View File

@@ -1,7 +1,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class ReadPointsCommand extends Command {
@@ -10,7 +10,7 @@ public class ReadPointsCommand extends Command {
}
@Override
public void execute(MapleClient client, String[] params) {
public void execute(Client client, String[] params) {
Character player = client.getPlayer();
if (params.length > 2) {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
import tools.FilePrinter;
@@ -36,7 +36,7 @@ public class ReportBugCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {

View File

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

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class StaffCommand extends Command {
@@ -32,7 +32,7 @@ public class StaffCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
c.getAbstractPlayerInteraction().openNpc(2010007, "credits");
}
}

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
@@ -34,7 +34,7 @@ public class StatDexCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
int remainingAp = player.getRemainingAp();

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
@@ -34,7 +34,7 @@ public class StatIntCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
int remainingAp = player.getRemainingAp();

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
@@ -34,7 +34,7 @@ public class StatLukCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
int remainingAp = player.getRemainingAp();

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm0;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
@@ -34,7 +34,7 @@ public class StatStrCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
int remainingAp = player.getRemainingAp();
int amount;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
import java.text.DateFormat;
@@ -37,7 +37,7 @@ public class TimeCommand extends Command {
}
@Override
public void execute(MapleClient client, String[] params) {
public void execute(Client client, String[] params) {
DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
dateFormat.setTimeZone(TimeZone.getDefault());
client.getPlayer().yellowMessage("Cosmic Server Time: " + dateFormat.format(new Date()));

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class ToggleExpCommand extends Command {
@@ -32,7 +32,7 @@ public class ToggleExpCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
if (c.tryacquireClient()) {
try {
c.getPlayer().toggleExpGain(); // Vcoc's idea

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm0;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
@@ -33,7 +33,7 @@ public class UptimeCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
long milliseconds = System.currentTimeMillis() - Server.uptime;
int seconds = (int) (milliseconds / 1000) % 60 ;
int minutes = (int) ((milliseconds / (1000*60)) % 60);

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm1;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.life.MapleMonster;
@@ -34,7 +34,7 @@ public class BossHpCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
for(MapleMonster monster : player.getMap().getAllMonsters()) {
if(monster != null && monster.isBoss() && monster.getHp() > 0) {

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm1;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import constants.game.GameConstants;
import server.maps.*;
@@ -72,7 +72,7 @@ public class GotoCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
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;

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm1;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.life.MapleMonster;
@@ -34,7 +34,7 @@ public class MobHpCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
for(MapleMonster monster : player.getMap().getAllMonsters()) {
if (monster != null && monster.getHp() > 0) {

View File

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

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
@@ -34,7 +34,7 @@ public class ApCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !ap [<playername>] <newap>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
import server.life.MapleLifeFactory;
@@ -36,7 +36,7 @@ public class BombCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length > 0) {
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.SkillFactory;
import client.command.Command;
@@ -34,7 +34,7 @@ public class BuffMapCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
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);

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.maps.SavedLocationType;
@@ -34,7 +34,7 @@ public class ClearSavedLocationsCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer(), victim;
if (params.length > 0) {

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class DcCommand extends Command {
@@ -33,7 +33,7 @@ public class DcCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !dc <playername>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.SkillFactory;
import client.command.Command;
@@ -34,7 +34,7 @@ public class EmpowerMeCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
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) {

View File

@@ -19,7 +19,7 @@
*/
package client.command.commands.gm2;
import client.MapleClient;
import client.Client;
import client.command.Command;
/**
@@ -32,7 +32,7 @@ public class GachaListCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
c.getAbstractPlayerInteraction().openNpc(10000, "gachaponInfo");
}
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.MapleShopFactory;
@@ -33,7 +33,7 @@ public class GmShopCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
MapleShopFactory.getInstance().getShop(1337).sendShop(c);
}
}

View File

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

View File

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

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import client.inventory.Pet;
import client.inventory.manipulator.InventoryManipulator;
@@ -38,7 +38,7 @@ public class ItemCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import client.inventory.InventoryType;
import client.inventory.Item;
@@ -39,7 +39,7 @@ public class ItemDropCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.maps.MapleMap;
import server.maps.MaplePortal;
@@ -35,7 +35,7 @@ public class JailCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !jail <playername> [<minutes>]");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.MapleJob;
import client.command.Command;
@@ -34,7 +34,7 @@ public class JobCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length == 1) {
int jobid = Integer.parseInt(params[0]);

View File

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

View File

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

View File

@@ -23,14 +23,15 @@
*/
package client.command.commands.gm2;
import client.MapleClient;
import client.Client;
import client.command.Command;
import java.util.Arrays;
import java.util.List;
import server.maps.MapleMapItem;
import server.maps.MapleMapObject;
import server.maps.MapleMapObjectType;
import java.util.Arrays;
import java.util.List;
public class LootCommand extends Command {
{
@@ -38,7 +39,7 @@ public class LootCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
List<MapleMapObject> items = c.getPlayer().getMap().getMapObjectsInRange(c.getPlayer().getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.ITEM));
for (MapleMapObject item : items) {
MapleMapItem mapItem = (MapleMapItem) item;

View File

@@ -36,7 +36,7 @@ public class MaxSkillCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
for (MapleData skill_ : MapleDataProviderFactory.getDataProvider(WZFiles.STRING).getData("Skill.img").getChildren()) {
try {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.MapleStat;
import client.command.Command;
import config.YamlConfig;
@@ -35,7 +35,7 @@ public class MaxStatCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
player.loseExp(player.getExp(), false, false);
player.setLevel(255);

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.maps.MapleMap;
@@ -34,7 +34,7 @@ public class ReachCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !reach <playername>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import client.inventory.InventoryType;
import client.inventory.Item;
@@ -37,7 +37,7 @@ public class RechargeCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
for (Item torecharge : c.getPlayer().getInventory(InventoryType.USE).list()) {

View File

@@ -36,7 +36,7 @@ public class ResetSkillCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
for (MapleData skill_ : MapleDataProviderFactory.getDataProvider(WZFiles.STRING).getData("Skill.img").getChildren()) {
try {

View File

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

View File

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

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
@@ -34,7 +34,7 @@ public class SpCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !sp [<playername>] <newsp>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
import net.server.channel.Channel;
@@ -36,7 +36,7 @@ public class SummonCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !warphere <playername>");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleClient;
import client.Client;
import client.command.Command;
import tools.PacketCreator;
@@ -33,7 +33,7 @@ public class UnBugCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
c.getPlayer().getMap().broadcastMessage(PacketCreator.enableActions());
}
}

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class UnJailCommand extends Command {
@@ -33,7 +33,7 @@ public class UnJailCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !unjail <playername>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.maps.MapleMap;
@@ -37,7 +37,7 @@ public class WarpAreaCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !warparea <mapid>");

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.maps.MapleMap;
@@ -36,7 +36,7 @@ public class WarpMapCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !warpmap <mapid>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.life.MapleMonster;
import server.life.MapleNPC;
@@ -39,7 +39,7 @@ public class WhereaMiCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
HashSet<Character> chars = new HashSet<>();

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
import server.TimerManager;
@@ -41,7 +41,7 @@ public class BanCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !ban <IGN> <Reason> (Please be descriptive)");

View File

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

View File

@@ -25,7 +25,7 @@ package client.command.commands.gm3;
import client.BuffStat;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class CheckDmgCommand extends Command {
@@ -34,7 +34,7 @@ public class CheckDmgCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.MapleDisease;
import client.command.Command;
import server.life.MobSkill;
@@ -40,7 +40,7 @@ public class DebuffCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !debuff SLOW|SEDUCE|ZOMBIFY|CONFUSE|STUN|POISON|SEAL|DARKNESS|WEAKEN|CURSE");

View File

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

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.MapleStat;
import client.command.Command;
import constants.inventory.ItemConstants;
@@ -36,7 +36,7 @@ public class FaceCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !face [<playername>] <faceid>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.MapleStat;
import client.command.Command;
@@ -34,7 +34,7 @@ public class FameCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !fame <playername> <gainfame>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
@@ -34,7 +34,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
public void execute(Client c, String[] params) { // fly option will become available for any character of that account
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !fly <on/off>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class GiveMesosCommand extends Command {
@@ -33,7 +33,7 @@ public class GiveMesosCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !givems [<playername>] <gainmeso>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class GiveNxCommand extends Command {
@@ -33,7 +33,7 @@ public class GiveNxCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !givenx [nx, mp, np] [<playername>] <gainnx>");

View File

@@ -1,7 +1,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class GiveRpCommand extends Command {
@@ -10,7 +10,7 @@ public class GiveRpCommand extends Command {
}
@Override
public void execute(MapleClient client, String[] params) {
public void execute(Client client, String[] params) {
Character player = client.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !giverp <playername> <gainrewardpoint>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class GiveVpCommand extends Command {
@@ -33,7 +33,7 @@ public class GiveVpCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !givevp <playername> <gainvotepoint>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.MapleStat;
import client.command.Command;
import constants.inventory.ItemConstants;
@@ -36,7 +36,7 @@ public class HairCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !hair [<playername>] <hairid>");

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class HealPersonCommand extends Command {
@@ -33,7 +33,7 @@ public class HealPersonCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class HpMpCommand extends Command {
@@ -33,7 +33,7 @@ public class HpMpCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
Character victim = player;
int statUpdate = 1;

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class HurtCommand extends Command {
@@ -33,7 +33,7 @@ public class HurtCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
if (victim != null) {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.packet.logging.MapleLogger;
import net.server.Server;
@@ -36,7 +36,7 @@ public class IgnoreCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !ignore <ign>");

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class InMapCommand extends Command {
@@ -33,7 +33,7 @@ public class InMapCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
String st = "";
for (Character chr : player.getMap().getCharacters()) {

View File

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

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm3;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
import tools.PacketCreator;
@@ -35,7 +35,7 @@ public class KillCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 1) {
player.yellowMessage("Syntax: !kill <playername>");

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