Examples of equipToInventoryOnly()


Examples of games.stendhal.server.entity.player.Player.equipToInventoryOnly()

    final Player bob = PlayerTestHelper.createPlayer("bob");
    final StendhalRPZone zone = new StendhalRPZone("dropzone");
    final Item dropitem = SingletonRepository.getEntityManager().getItem("money");
    assertNotNull(dropitem);
    zone.add(bob);
    assertTrue(bob.equipToInventoryOnly(dropitem));
    assertNotNull(dropitem.getID().getObjectID());
    final RPAction action = new RPAction();
    action.put(EquipActionConsts.BASE_ITEM, dropitem.getID().getObjectID());

    action.put(EquipActionConsts.BASE_OBJECT , bob.getID().getObjectID());
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.equipToInventoryOnly()

    final Player bob = PlayerTestHelper.createPlayer("bob");
    final StendhalRPZone zone = new StendhalRPZone("dropzone");
    final Item dropitem = SingletonRepository.getEntityManager().getItem("money");
    assertNotNull(dropitem);
    zone.add(bob);
    assertTrue(bob.equipToInventoryOnly(dropitem));
    assertNotNull(dropitem.getID().getObjectID());
    final RPAction action = new RPAction();
    action.put(EquipActionConsts.BASE_ITEM, dropitem.getID().getObjectID());

    action.put(EquipActionConsts.BASE_OBJECT , bob.getID().getObjectID());
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.equipToInventoryOnly()

      final Engine en = vs.npcs.get(DWARF_NPC).getEngine();
   
      en.setCurrentState(ConversationStates.IDLE);
      player.setQuest(questSlot, "start");
      Item item = SingletonRepository.getEntityManager().getItem("goblet");
      player.equipToInventoryOnly(item);
     
      en.step(player, hello);
      assertEquals("Hm, that goblet is not filled with vampire blood; it can't be, you have not killed the vampire lord. You must slay him.", getReply(npc));
      assertEquals(en.getCurrentState(), ConversationStates.IDLE);
    }
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.equipToInventoryOnly()

      final Engine en = vs.npcs.get(DWARF_NPC).getEngine();
   
      en.setCurrentState(ConversationStates.IDLE);
      player.setQuest(questSlot, "start");
      Item item = SingletonRepository.getEntityManager().getItem("goblet");
      player.equipToInventoryOnly(item);
      player.setSharedKill("vampire lord");
     
      en.step(player, hello);
      assertEquals("You have battled hard to bring that goblet. I will use it to #forge the vampire sword", getReply(npc));
      assertEquals(en.getCurrentState(), ConversationStates.QUEST_ITEM_BROUGHT);
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.equipToInventoryOnly()

   
      en.setCurrentState(ConversationStates.IDLE);
      player.setQuest(questSlot, "start");
     
      Item item = SingletonRepository.getEntityManager().getItem("goblet");
      player.equipToInventoryOnly(item);
     
      PlayerTestHelper.equipWithStackableItem(player, "iron", 10);
     
      player.setSharedKill("vampire lord");
     
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.equipToInventoryOnly()

    player.setQuest("beer_hayunn", "start");
    history.remove("I do not want to make Hayunn drunk.");
    history.add("I promised to buy him a bear from Margaret in Semos Tavern.");
    assertEquals(history, bfh.getHistory(player));

    player.equipToInventoryOnly(SingletonRepository.getEntityManager().getItem("beer"));
    history.add("I have a bottle of beer.");
    assertEquals(history, bfh.getHistory(player));
    player.setQuest("beer_hayunn", "done");
    history.add("I gave the beer to Hayunn. He paid me 20 gold coins and I got some experience.");
    assertEquals(history, bfh.getHistory(player));
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.equipToInventoryOnly()

      //assertEquals(null, loaded.getSlot("bag").getFirst());
     
      EntityManager em = SingletonRepository.getEntityManager();
      Item item = (Item) em.getItem("leather armor");
      item.put("name", "leather_armor_+1");
      loaded.equipToInventoryOnly(item);
      assertTrue(loaded.getSlot("bag").has(item.getID()));
 
      assertTrue(pm.savePlayer(transaction, loaded));
      UpdatePlayerEntities updatePlayerEntities = new UpdatePlayerEntities();
      Player changing = updatePlayerEntities.createPlayerFromRPO(loaded);
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.equipToInventoryOnly()

      assertFalse(player.hasQuest(questSlot));
      en.setCurrentState(ConversationStates.IDLE);
      player.setQuest(questSlot, "start");
     
      final Item goblet = SingletonRepository.getEntityManager().getItem("empty goblet");
      player.equipToInventoryOnly(goblet);
     
      en.step(player, hello);
      assertEquals(hello, "Did you lose your way? The Catacombs are in North Semos. Don't come back without a full goblet! Bye!", getReply(npc));
      assertEquals(en.getCurrentState(), ConversationStates.IDLE);
    }
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.equipToInventoryOnly()

    final Player player = PlayerTestHelper.createPlayer("me");     
    final SpeakerNPC npc = vs.npcs.get(VAMPIRE_NPC);
    final Engine en = vs.npcs.get(VAMPIRE_NPC).getEngine();
   
    Item item = SingletonRepository.getEntityManager().getItem("empty goblet");
    player.equipToInventoryOnly(item);
    item = SingletonRepository.getEntityManager().getItem("skull ring");
    player.equipToInventoryOnly(item);
    item = SingletonRepository.getEntityManager().getItem("bat entrails");
    player.equipToInventoryOnly(item);
    item = SingletonRepository.getEntityManager().getItem("vampirette entrails");
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.equipToInventoryOnly()

    final Engine en = vs.npcs.get(VAMPIRE_NPC).getEngine();
   
    Item item = SingletonRepository.getEntityManager().getItem("empty goblet");
    player.equipToInventoryOnly(item);
    item = SingletonRepository.getEntityManager().getItem("skull ring");
    player.equipToInventoryOnly(item);
    item = SingletonRepository.getEntityManager().getItem("bat entrails");
    player.equipToInventoryOnly(item);
    item = SingletonRepository.getEntityManager().getItem("vampirette entrails");
    player.equipToInventoryOnly(item);
   
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.