Package games.stendhal.server.entity.slot

Examples of games.stendhal.server.entity.slot.GroundSlot


                    && Character.isDigit(target.charAt(1))) {
                final int objectId = Integer.parseInt(target.substring(1));

                Entity entity = entityFromZoneByID(objectId, zone);
                if ((entity != null) && (entity instanceof Item)) {
                    return new GroundSlot(zone, (Item) entity);
                } else {
                    return null;
                }
            }
        }
View Full Code Here


    int itemid = action.getInt(EquipActionConsts.BASE_ITEM);
    Entity entity = (Entity) zone.get(new RPObject.ID(itemid, zone.getID()));
    if (entity instanceof Item) {
      item = (Item) entity;
    }
    slot = new GroundSlot(zone, item);
  }
View Full Code Here

   * @param action RPAction
   */
  private void fillByGroundTarget(RPAction action) {
    int x = action.getInt(EquipActionConsts.GROUND_X);
    int y = action.getInt(EquipActionConsts.GROUND_Y);
    slot = new GroundSlot(zone, x, y);
  }
View Full Code Here

    final Entity object = EntityHelper.entityFromZoneByID(objectid, zone);
    if (!(object instanceof PassiveEntity)) {
      return;
    }
    data.addSourceItem(object);
    data.addSourceSlot(new GroundSlot(zone, object));
  }
View Full Code Here

    }

    // if the item is not contained, the item is on the ground
    if (parent == entity) {
      data.addSourceItem(entity);
      data.addSourceSlot(new GroundSlot(player.getZone(), entity));
    } else {
      data.addSourceItem(entity);
      data.setSourceRoot(root);
      data.addSourceSlot((EntitySlot) entity.getContainerSlot());
    }
View Full Code Here

class BuildTargetFromGround implements PartialBuilder {

  public void build(EquipmentActionData data, Player player, RPAction action) {
    final int x = action.getInt(X);
    final int y = action.getInt(Y);
    data.setTargetSlot(new GroundSlot(player.getZone(), x, y));
  }
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.slot.GroundSlot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.