Examples of ZoneConfigurator


Examples of games.stendhal.server.core.config.ZoneConfigurator

   * Tests for configureZone.
   */
  @Test
  public void testConfigureZone() {
    StendhalRPZone zone = new StendhalRPZone("testzone"20, 20);
    ZoneConfigurator conf = new NoTeleportIn();
    conf.configureZone(zone, null);
    assertFalse(zone.isTeleportInAllowed(0, 0));
    assertFalse(zone.isTeleportInAllowed(19, 19));
    assertTrue(zone.isTeleportOutAllowed(0, 0));
    assertTrue(zone.isTeleportOutAllowed(19, 19));
  }
View Full Code Here

Examples of games.stendhal.server.core.config.ZoneConfigurator

    QuestHelper.setUpBeforeClass();
  }

  @Before
  public void setUp() {
    ZoneConfigurator zoneConf = new PrincessNPC();
    zoneConf.configureZone(new StendhalRPZone("admin_test"), null);
    npc = SingletonRepository.getNPCList().get("Tywysoga");
    en = npc.getEngine();

    final StendhalRPZone zone = new StendhalRPZone("int_semos_house");
    MockStendlRPWorld.get().addRPZone(zone);
    zoneConf = new FlowerSellerNPC();
    zoneConf.configureZone(zone, null);
    npcRose = SingletonRepository.getNPCList().get("Rose Leigh");
    enRose = npcRose.getEngine();

    final AbstractQuest quest = new ElfPrincess();
    quest.addToWorld();
View Full Code Here

Examples of games.stendhal.server.core.config.ZoneConfigurator

   * Tests for configuring only part of the zone
   */
  @Test
  public void testConfigureSubZone() {
    StendhalRPZone zone = new StendhalRPZone("testzone"20, 20);
    ZoneConfigurator conf = new NoTeleportIn();
    Map<String, String> attributes = new HashMap<String, String>();
    attributes.put("x", "1");
    attributes.put("y", "1");
    attributes.put("width", "5");
    attributes.put("height", "5");
    conf.configureZone(zone, attributes);
    assertTrue("Outside the blocked area", zone.isTeleportInAllowed(0, 0));
    assertFalse("Inside the blocked area", zone.isTeleportInAllowed(1, 1));
    assertFalse("Inside the blocked area", zone.isTeleportInAllowed(5, 5));
    assertTrue("Outside the blocked area", zone.isTeleportInAllowed(6, 6));
    assertTrue(zone.isTeleportOutAllowed(0, 0));
View Full Code Here

Examples of games.stendhal.server.core.config.ZoneConfigurator

   * Tests for configureZone.
   */
  @Test
  public void testConfigureZone() {
    StendhalRPZone zone = new StendhalRPZone("testzone"20, 20);
    ZoneConfigurator conf = new NoTeleport();
    conf.configureZone(zone, null);
    assertFalse(zone.isTeleportInAllowed(0, 0));
    assertFalse(zone.isTeleportInAllowed(19, 19));
    assertFalse(zone.isTeleportOutAllowed(0, 0));
    assertFalse(zone.isTeleportOutAllowed(19, 19));
  }
View Full Code Here

Examples of games.stendhal.server.core.config.ZoneConfigurator

   * Tests for configuring only part of the zone
   */
  @Test
  public void testConfigureSubZone() {
    StendhalRPZone zone = new StendhalRPZone("testzone"20, 20);
    ZoneConfigurator conf = new NoTeleport();
    Map<String, String> attributes = new HashMap<String, String>();
    attributes.put("x", "1");
    attributes.put("y", "1");
    attributes.put("width", "5");
    attributes.put("height", "5");
    conf.configureZone(zone, attributes);
   
    assertTrue("Outside the blocked area", zone.isTeleportOutAllowed(0, 0));
    assertFalse("Inside the blocked area", zone.isTeleportOutAllowed(1, 1));
    assertFalse("Inside the blocked area", zone.isTeleportOutAllowed(5, 5));
    assertTrue("Outside the blocked area", zone.isTeleportOutAllowed(6, 6));
View Full Code Here

Examples of games.stendhal.server.core.config.ZoneConfigurator

   * Tests for configureZone.
   */
  @Test
  public void testConfigureZone() {
    StendhalRPZone zone = new StendhalRPZone("testzone"20, 20);
    ZoneConfigurator conf = new NoTeleportOut();
    conf.configureZone(zone, null);
    assertTrue(zone.isTeleportInAllowed(0, 0));
    assertTrue(zone.isTeleportInAllowed(20, 20));
    assertFalse(zone.isTeleportOutAllowed(0, 0));
    assertFalse(zone.isTeleportOutAllowed(19, 19));
  }
View Full Code Here

Examples of games.stendhal.server.core.config.ZoneConfigurator

   * Tests for configuring only part of the zone
   */
  @Test
  public void testConfigureSubZone() {
    StendhalRPZone zone = new StendhalRPZone("testzone"20, 20);
    ZoneConfigurator conf = new NoTeleportOut();
    Map<String, String> attributes = new HashMap<String, String>();
    attributes.put("x", "1");
    attributes.put("y", "1");
    attributes.put("width", "5");
    attributes.put("height", "5");
    conf.configureZone(zone, attributes);
    assertTrue("Outside the blocked area", zone.isTeleportOutAllowed(0, 0));
    assertFalse("Inside the blocked area", zone.isTeleportOutAllowed(1, 1));
    assertFalse("Inside the blocked area", zone.isTeleportOutAllowed(5, 5));
    assertTrue("Outside the blocked area", zone.isTeleportOutAllowed(6, 6));
    assertTrue(zone.isTeleportInAllowed(0, 0));
View Full Code Here

Examples of games.stendhal.server.core.config.ZoneConfigurator

    QuestHelper.setUpBeforeClass();
  }

  @Before
  public void setUp() {
    final ZoneConfigurator zoneConf = new CloaksCollectorNPC();
    zoneConf.configureZone(new StendhalRPZone("admin_test"), null);
    npc = SingletonRepository.getNPCList().get("Bario");

    final AbstractQuest quest = new CloaksForBario();
    quest.addToWorld();
    en = npc.getEngine();
View Full Code Here

Examples of games.stendhal.server.core.config.ZoneConfigurator

    QuestHelper.setUpBeforeClass();
  }

  @Before
  public void setUp() {
    final ZoneConfigurator zoneConf = new SmithNPC();
    zoneConf.configureZone(new StendhalRPZone("admin_test"), null);
    npc = SingletonRepository.getNPCList().get("Vulcanus");

    final AbstractQuest quest = new StuffForVulcanus();
    quest.addToWorld();
    en = npc.getEngine();
View Full Code Here

Examples of games.stendhal.server.core.config.ZoneConfigurator

    QuestHelper.setUpBeforeClass();
  }

  @Before
  public void setUp() {
    final ZoneConfigurator zoneConf = new PrincessNPC();
    zoneConf.configureZone(new StendhalRPZone("admin_test"), null);
    npc = SingletonRepository.getNPCList().get("Princess Esclara");
    en = npc.getEngine();

    final AbstractQuest quest = new AmazonPrincess();
    quest.addToWorld();
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.