Package marauroa.common.game.RPObject

Examples of marauroa.common.game.RPObject.ID


    if (panel == null) {
      // Not a slot we are interested in
      return;
    }
    for (RPObject obj : removed) {
      ID id = obj.getID();
      IEntity entity = panel.getEntity();
      if (entity != null && id.equals(entity.getRPObject().getID())) {
        if (obj.size() == 1) {
          // The object was removed
          panel.setEntity(null);
          continue;
        }
View Full Code Here


   * Handle an added or modified item.
   *
   * @param obj changed or added object
   */
  private void handleAdded(RPObject obj) {
    ID id = obj.getID();
    for (ItemPanel panel : panels) {
      IEntity entity = panel.getEntity();
      if (entity != null && id.equals(entity.getRPObject().getID())) {
        // Changed rather than added.
        return;
      }
    }
    // Actually added. Get the corresponding entity
View Full Code Here

  public void contentRemoved(RPSlot removed) {
    // We are interested only in one slot
    if (slotName.equals(removed.getName())) {
      for (RPObject obj : removed) {
        ID id = obj.getID();
        for (ItemPanel panel : panels) {
          IEntity entity = panel.getEntity();
          if (entity != null && id.equals(entity.getRPObject().getID())) {
            if (obj.size() == 1) {
              // The object was removed
              panel.setEntity(null);
              continue;
            }
View Full Code Here

        getReply(npc));
    assertTrue(en.step(player, "bye"));
    assertEquals("Bye.", getReply(npc));
    final StackableItem wood = new StackableItem("wood", "", "", null);
    wood.setQuantity(10);
    wood.setID(new ID(2, ZONE_NAME));
    player.getSlot("bag").add(wood);
    assertEquals(10, player.getNumberOfEquipped("wood"));
    assertTrue(en.step(player, "hi"));
    assertEquals(
        "Hi again! You've got wood, I see; do you have those 10 pieces of wood I asked about earlier?",
View Full Code Here

    EntityManager em = SingletonRepository.getEntityManager();
    Spell spell = em.getSpell(args.get(1));
    String name = args.get(0);
    Player player = SingletonRepository.getRuleProcessor().getPlayer(name);
    RPSlot slot = player.getSlot("spells");
    ID id = null;
    for(RPObject o : slot) {
      if(spell.getName().equalsIgnoreCase(o.get("name"))) {
        id = o.getID();
      }
    }
View Full Code Here

TOP

Related Classes of marauroa.common.game.RPObject.ID

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.