Package games.stendhal.server.entity.slot

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



  public static void addEmptySlots(final Player player) {
//    "bag", "rhand", "lhand", "head", "armor",
//    "legs", "feet", "finger", "cloak", "keyring"
    player.addSlot(new PlayerSlot("bag"));
    player.addSlot(new PlayerSlot("lhand"));
    player.addSlot(new PlayerSlot("rhand"));
    player.addSlot(new PlayerSlot("armor"));
    player.addSlot(new PlayerSlot("head"));
    player.addSlot(new PlayerSlot("legs"));
    player.addSlot(new PlayerSlot("feet"));
    player.addSlot(new PlayerSlot("finger"));
    player.addSlot(new PlayerSlot("cloak"));
    player.addSlot(new PlayerSlot("keyring"));
    player.addSlot(new RPSlot("!quests"));
    player.getSlot("!quests").add(new RPObject());
    player.addSlot(new RPSlot("!kills"));
    player.getSlot("!kills").add(new RPObject());
    player.addSlot(new RPSlot("!tutorial"));
View Full Code Here


        "legs", "feet", "finger", "cloak", "keyring", "trade" };

    try {
      for (final String slotName : slotsItems) {
        final RPSlot slot = player.getSlot(slotName);
        final PlayerSlot newSlot;
        if (slotName.equals("keyring")) {
          newSlot = new PlayerKeyringSlot(slotName);
        } else if (slotName.equals("trade")) {
          newSlot = new PlayerTradeSlot(slotName);
        } else {
          newSlot = new PlayerSlot(slotName);
        }
        loadSlotContent(player, slot, newSlot);
      }

      for (final Banks bank : Banks.values()) {
        final RPSlot slot = player.getSlot(bank.getSlotName());
        final PlayerSlot newSlot = new BankSlot(bank);
        loadSlotContent(player, slot, newSlot);
      }
    } catch (final RuntimeException e) {
      logger.error("cannot create player", e);
    }
View Full Code Here

      // Port from 0.44 to 0.50: cloak, bank
      // Port from 0.57 to 0.58: bank_ados, bank_fado
      // Port from 0.58 to ?: bank_nalwor, keyring, finger
      for (final String slotName : slotsNormal) {
        if (!object.hasSlot(slotName)) {
          object.addSlot(new PlayerSlot(slotName));
        }
      }

      // Port from 0.44 to 0.50: !buddy
      // Port from 0.56 to 0.56.1: !ignore
View Full Code Here

      public void logic() {
        // do nothing

      }
    };
    entity.addSlot(new PlayerSlot("lhand"));
    entity.addSlot(new PlayerSlot("rhand"));

    assertThat(entity.getItemAtk(), is(0f));
    final Item item = SingletonRepository.getEntityManager().getItem(
        "dagger");
    entity.getSlot("lhand").add(item);
View Full Code Here

      public void logic() {
        // do nothing

      }
    };
    entity.addSlot(new PlayerSlot("lhand"));
    entity.addSlot(new PlayerSlot("rhand"));

    assertThat(entity.getItemAtk(), is(0f));
    final Item item = SingletonRepository.getEntityManager().getItem(
        "cheese");
    entity.getSlot("lhand").add(item);
View Full Code Here

      public void logic() {
        // do nothing

      }
    };
    entity.addSlot(new PlayerSlot("lhand"));
    entity.addSlot(new PlayerSlot("rhand"));

    assertThat(entity.getItemAtk(), is(0f));
    final Item lefthanditem = SingletonRepository.getEntityManager()
        .getItem("l hand sword");
    entity.getSlot("lhand").add(lefthanditem);
View Full Code Here

      public void logic() {
        // do nothing

      }
    };
    entity.addSlot(new PlayerSlot("lhand"));
    entity.addSlot(new PlayerSlot("rhand"));

    assertThat(entity.getItemAtk(), is(0f));

    final Item lefthanditem = SingletonRepository.getEntityManager()
        .getItem("l hand sword");
View Full Code Here

TOP

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

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.