Rename and clean up MapleMapObject
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user