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

@@ -19,7 +19,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import tools.PacketCreator;
@@ -35,7 +35,7 @@ public class BossDropRateCommand 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: !bossdroprate <newrate>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MapleLifeFactory;
@@ -36,7 +36,7 @@ public class CakeCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
MapleMonster monster = MapleLifeFactory.getMonster(9400606);
if (params.length == 1) {
double mobHp = Double.parseDouble(params[0]);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import tools.PacketCreator;
@@ -35,7 +35,7 @@ public class DropRateCommand 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: !droprate <newrate>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import tools.PacketCreator;
@@ -35,7 +35,7 @@ public class ExpRateCommand 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: !exprate <newrate>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import tools.PacketCreator;
@@ -35,7 +35,7 @@ public class FishingRateCommand 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: !fishrate <newrate>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import client.inventory.Pet;
@@ -43,7 +43,7 @@ public class ForceVacCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
List<MapleMapObject> items = player.getMap().getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.ITEM));
for (MapleMapObject item : items) {
MapleMapItem mapItem = (MapleMapItem) item;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.maps.MapleMap;
@@ -37,7 +37,7 @@ public class HorntailCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
final Point targetPoint = player.getPosition();
final MapleMap targetMap = player.getMap();

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.maps.MapleMapObject;
@@ -39,7 +39,7 @@ public class ItemVacCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
List<MapleMapObject> list = player.getMap().getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.ITEM));
for (MapleMapObject item : list) {
player.pickupItem(item);

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import tools.PacketCreator;
@@ -35,7 +35,7 @@ public class MesoRateCommand 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: !mesorate <newrate>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MapleLifeFactory;
@@ -35,7 +35,7 @@ public class PapCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
// thanks Conrad for noticing mobid typo here
player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8500001), player.getPosition());

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MapleLifeFactory;
@@ -35,7 +35,7 @@ public class PianusCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8510000), player.getPosition());
}
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MapleLifeFactory;
@@ -35,7 +35,7 @@ public class PinkbeanCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(8820001), player.getPosition());
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MaplePlayerNPC;
@@ -35,7 +35,7 @@ public class PlayerNpcCommand 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: !playernpc <playername>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MaplePlayerNPC;
@@ -35,7 +35,7 @@ public class PlayerNpcRemoveCommand 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: !playernpcremove <playername>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.channel.Channel;
@@ -44,7 +44,7 @@ public class PmobCommand 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: !pmob <mobid> [<mobtime>]");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.channel.Channel;
@@ -46,7 +46,7 @@ public class PmobRemoveCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
int mapId = player.getMapId();
int mobId = params.length > 0 ? Integer.parseInt(params[0]) : -1;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.channel.Channel;
@@ -45,7 +45,7 @@ public class PnpcCommand 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: !pnpc <npcid>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import net.server.channel.Channel;
@@ -46,7 +46,7 @@ public class PnpcRemoveCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
int mapId = player.getMapId();
int npcId = params.length > 0 ? Integer.parseInt(params[0]) : -1;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import client.inventory.Equip;
@@ -40,7 +40,7 @@ public class ProItemCommand 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: !proitem <itemid> <stat value> [<spdjmp value>]");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import tools.PacketCreator;
@@ -35,7 +35,7 @@ public class QuestRateCommand 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: !questrate <newrate>");
return;

View File

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

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import client.inventory.Equip;
@@ -38,7 +38,7 @@ public class SetEqStatCommand 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: !seteqstat <stat value> [<spdjmp value>]");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import tools.PacketCreator;
@@ -35,7 +35,7 @@ public class TravelRateCommand 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: !travelrate <newrate>");
return;

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm4;
import client.MapleCharacter;
import client.Character;
import client.MapleClient;
import client.command.Command;
import server.life.MapleLifeFactory;
@@ -35,7 +35,7 @@ public class ZakumCommand extends Command {
@Override
public void execute(MapleClient c, String[] params) {
MapleCharacter player = c.getPlayer();
Character player = c.getPlayer();
player.getMap().spawnFakeMonsterOnGroundBelow(MapleLifeFactory.getMonster(8800000), player.getPosition());
for (int x = 8800003; x < 8800011; x++) {
player.getMap().spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(x), player.getPosition());