Examples of Pet


Examples of games.stendhal.server.entity.creature.Pet

                 final EventRaiser npc) {
          if(!player.hasPet()){
            npc.say("That's a cute sheep you have there, but I need a baby dragon for Mr Yeti. Try Morgrin at the magic school.");
            return;
          }
          Pet pet = player.getPet();
          String petType = pet.get("type");
          if("baby_dragon".equals(petType)) {
            player.removePet(pet);
            npc.say("Ah you brought the baby dragon! It will make such a wonderful stew. Baby dragon stew is my speciality and Mr Yeti loves it! You've made us both very happy! Come back in a day to see me for a #reward.");
            player.addKarma(5.0);
            player.addXP(500);
            pet.delayedDamage(pet.getHP(), "Mrs. Yeti");
            player.setQuest(QUEST_SLOT,"reward;"+System.currentTimeMillis());
            player.notifyWorldAboutChanges();
          } else {
            npc.say("That's a cute pet you have there, but I need a baby dragon for Mr Yeti. Try Morgrin at the magic school.")
          }
View Full Code Here

Examples of models.Pet

    @ApiOperation(value = "Add a new pet to the store", httpMethod = "POST")
    @ApiResponses(value = {@ApiResponse(code = 405, message = "Invalid input")})
    public static Result addPet() {
        Object o = request().body().asJson();
        try {
            Pet pet = (Pet) BaseApiController.mapper.readValue(o.toString(), Pet.class);
            petData.addPet(pet);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return JsonResponse("SUCCESS");
View Full Code Here

Examples of org.activejpa.examples.petclinic.model.Pet

  @Test
  @Transactional
  public void insertPet() {
      Owner owner6 = this.clinicService.findOwnerById(6);
      int found = owner6.getPets().size();
      Pet pet = new Pet();
      pet.setName("bowser");
      Collection<PetType> types = this.clinicService.findPetTypes();
      pet.setType(EntityUtils.getById(types, PetType.class, 2));
      pet.setBirthDate(new DateTime());
      owner6.addPet(pet);
      assertEquals(found + 1, owner6.getPets().size());
      // both storePet and storeOwner are necessary to cover all ORM tools
      this.clinicService.savePet(pet);
      this.clinicService.saveOwner(owner6);
      owner6 = this.clinicService.findOwnerById(6);
      assertEquals(found + 1, owner6.getPets().size());
      assertNotNull(pet.getId(), "Pet Id should have been generated");
  }
View Full Code Here

Examples of org.apache.tapestry5.integration.app1.data.Pet

    }

    @Override
    List<Pet> initInheritedLoop() {
        final ArrayList<Pet> list = new ArrayList<Pet>();
        Pet pet = new Pet();
        pet.setAge(6);
        pet.setName("Dakota");
        pet.setType(PetType.DOG);
        list.add(pet);

        pet = new Pet();
        pet.setAge(3);
        pet.setName("Jill");
        pet.setType(PetType.CAT);
        list.add(pet);

        pet = new Pet();
        pet.setAge(3);
        pet.setName("Jack");
        pet.setType(PetType.CAT);
        list.add(pet);
        return list;
    }
View Full Code Here

Examples of org.dozer.vo.deepindex.Pet

  @Test
  public void testDeepMapIndexed() throws Exception {
    Pet[] myPets = new Pet[2];
    Family source = new Family("john", "jane", "doe", new Integer(22000), new Integer(20000));
    Pet firstPet = new Pet("molly", 2, null);
    myPets[0] = firstPet;

    Pet[] offSprings = new Pet[4];
    offSprings[0] = new Pet("Rocky1", 1, null);
    offSprings[1] = new Pet("Rocky2", 1, null);
    offSprings[2] = new Pet("Rocky3", 1, null);
    offSprings[3] = new Pet("Rocky4", 1, null);

    Pet secondPet = new Pet("Rocky", 3, offSprings);
    myPets[1] = secondPet;

    // Save the pet details into the source object
    source.setPets(myPets);
View Full Code Here

Examples of org.dozer.vo.generics.deepindex.Pet

  @Test
  public void testDeepMapIndexed() throws Exception {
    Mapper mapper = getMapper(new String[] { "genericCollectionMapping.xml" });
    Pet[] myPets = new Pet[2];
    Family source = newInstance(Family.class, new Object[] {"john", "jane", "doe", new Integer(22000), new Integer(20000)});
    Pet firstPet = newInstance(Pet.class, new Object[] {"molly", 2});
    myPets[0] = firstPet;

    Pet[] offSprings = new Pet[4];
    offSprings[0] = newInstance(Pet.class, new Object[] {"Rocky1", 1});
    offSprings[1] = newInstance(Pet.class, new Object[] {"Rocky2", 1});
    offSprings[2] = newInstance(Pet.class, new Object[] {"Rocky3", 1});
    offSprings[3] = newInstance(Pet.class, new Object[] {"Rocky4", 1});

    Pet secondPet = newInstance(Pet.class, new Object[] {"Rocky", 3, offSprings});
    myPets[1] = secondPet;

    // Save the pet details into the source object
    source.setPets(myPets);
View Full Code Here

Examples of org.drools.Pet

        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
        StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

        ksession.insert( new Person( "Toni" ) );
        ksession.insert( new Pet( "Toni" ) );
    }
View Full Code Here

Examples of org.drools.Pet

        ruleBase.addPackage( pkg );
        StatefulSession session = ruleBase.newStatefulSession();

        Person toni = new Person( "Toni",
                                  12 );
        toni.setPet( new Pet( "Mittens" ) );

        session.insert( new ArrayList() );
        session.insert( toni );

        session.fireAllRules();
View Full Code Here

Examples of org.drools.Pet

        ruleBase.addPackage( pkg );
        StatefulSession session = ruleBase.newStatefulSession();

        Person toni = new Person( "Toni",
                                  12 );
        toni.setPet( new Pet( "Mittens" ) );

        session.insert( new ArrayList() );
        session.insert( toni );

        session.fireAllRules();
View Full Code Here

Examples of org.drools.Pet

        final RuleBase ruleBase = getRuleBase();
        ruleBase.addPackage( pkg );
        StatefulSession session = ruleBase.newStatefulSession();
        assertNotNull( session );

        Pet pet1 = new Pet( "Toni" );
        pet1.getAttributes().put( "key",
                                  "value" );
        Pet pet2 = new Pet( "Toni" );

        session.insert( pet1 );
        session.insert( pet2 );

        session.fireAllRules();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.