Rename and clean up MapleMapObject

This commit is contained in:
P0nk
2021-09-09 22:29:01 +02:00
parent e917980a39
commit a979577e5d
33 changed files with 185 additions and 185 deletions

View File

@@ -26,7 +26,7 @@ package client.command.commands.gm2;
import client.Client;
import client.command.Command;
import server.maps.MapItem;
import server.maps.MapleMapObject;
import server.maps.MapObject;
import server.maps.MapleMapObjectType;
import java.util.Arrays;
@@ -40,8 +40,8 @@ public class LootCommand extends Command {
@Override
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) {
List<MapObject> items = c.getPlayer().getMap().getMapObjectsInRange(c.getPlayer().getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.ITEM));
for (MapObject item : items) {
MapItem mapItem = (MapItem) item;
if (mapItem.getOwnerId() == c.getPlayer().getId() || mapItem.getOwnerId() == c.getPlayer().getPartyId()) {
c.getPlayer().pickupItem(mapItem);

View File

@@ -29,7 +29,7 @@ import client.command.Command;
import server.life.Monster;
import server.life.NPC;
import server.life.PlayerNPC;
import server.maps.MapleMapObject;
import server.maps.MapObject;
import java.util.HashSet;
@@ -47,7 +47,7 @@ public class WhereaMiCommand extends Command {
HashSet<PlayerNPC> playernpcs = new HashSet<>();
HashSet<Monster> mobs = new HashSet<>();
for (MapleMapObject mmo : player.getMap().getMapObjects()) {
for (MapObject mmo : player.getMap().getMapObjects()) {
if (mmo instanceof NPC) {
NPC npc = (NPC) mmo;
npcs.add(npc);