Package games.stendhal.server.entity

Examples of games.stendhal.server.entity.Outfit


          @Override
          public void putOnOutfit(final Player player, final String outfitType) {
           
            final Pair<Outfit, Boolean> outfitPair = outfitTypes.get(outfitType);
            final Outfit outfit = outfitPair.first();
            final boolean type = outfitPair.second();
            if (type) {
              player.setOutfit(outfit.putOver(player.getOutfit()), true);
            } else {
              player.setOutfit(outfit, true);
            }
            if (endurance != NEVER_WEARS_OFF) {
              // restart the wear-off timer if the player was still wearing
View Full Code Here


         
          // These outfits are not on the usual OutfitChangerBehaviour's
          // list, so they need special care when looking for them
          @Override
          public boolean wearsOutfitFromHere(final Player player) {
            final Outfit currentOutfit = player.getOutfit();

            for (final Pair<Outfit, Boolean> possiblePair : outfitTypes.values()) {
              if (possiblePair.first().isPartOf(currentOutfit)) {
                return true;
              }
View Full Code Here

    player.put("def_xp", 0);
    player.put("level", 0);
    player.setXP(0);

    // define outfit
    Outfit outfit = null;
    if ((template != null) && template.has("outfit")) {
      outfit = new Outfit(template.getInt("outfit"));
    }
    if ((outfit == null) || !outfit.isChoosableByPlayers()) {
      outfit = Outfit.getRandomOutfit();
    }
    player.setOutfit(outfit);

    for (final String slot : Constants.CARRYING_SLOTS) {
View Full Code Here

      remove("outfit_org");
    }

    // combine the old outfit with the new one, as the new one might
    // contain null parts.
    final Outfit newOutfit = outfit.putOver(getOutfit());
    put("outfit", newOutfit.getCode());
    notifyWorldAboutChanges();
  }
View Full Code Here

    notifyWorldAboutChanges();
  }

  public Outfit getOriginalOutfit() {
    if (has("outfit_org")) {
      return new Outfit(getInt("outfit_org"));
    }
    return null;
  }
View Full Code Here

   * been stored.
   *
   * @return true iff returning was successful.
   */
  public boolean returnToOriginalOutfit() {
    final Outfit originalOutfit = getOriginalOutfit();
    if (originalOutfit != null) {
      remove("outfit_org");
      setOutfit(originalOutfit, false);
      return true;
    }
View Full Code Here

        new SellerAdder().addSeller(this, new SellerBehaviour(shops.get("fadoscrolls")));
        addGoodbye("Bye.");
      }
    };

    greeterNPC.setOutfit(new Outfit(0, 05, 01, 06, 01));
    greeterNPC.setPosition(39, 29);
    greeterNPC.initHP(1000);
    greeterNPC.setDescription("You see Xhiphin Zohos. He is a helpful citizen of Fado.");
    zone.add(greeterNPC);
  }
View Full Code Here

        setDirection(Direction.RIGHT);
      }
     
    };

    boynpc.setOutfit(new Outfit(0,33,18,03,0));
    boynpc.setPosition(42, 30);
    boynpc.setDirection(Direction.RIGHT);
    boynpc.initHP(100);
    boynpc.setDescription("You see Bobby. He is looking at the sky and seems to be daydreaming.");
    zone.add(boynpc);
View Full Code Here

  @Test
  public void testQuest() {
   
    npc = SingletonRepository.getNPCList().get("Bobby");
    en = npc.getEngine();
    Outfit outfitNoBalloon = new Outfit(0,1,2,3,4);
    Outfit outfitWithBalloon = new Outfit(1,2,3,4,5);

    // -----------------------------------------------
   
    //Not really necessary
    //assertEquals(player.getOutfit().getCode(), outfitNoBalloon.getCode());
View Full Code Here

        setDirection(Direction.DOWN);
      }
     
    };

    npc.setOutfit(new Outfit(0, 27, 07, 34, 01));
    npc.setPosition(12, 7);
    npc.setDirection(Direction.DOWN);
    npc.initHP(100);
    npc.setDescription("You see Susi's dad Mr. Ross. He calmed a bit down after the adventures of his daughter.");
    zone.add(npc);
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.Outfit

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.