Package games.stendhal.server.maps.kalavan.house

Source Code of games.stendhal.server.maps.kalavan.house.CommonChest

/* $Id: CommonChest.java,v 1.9 2010/09/19 02:31:09 nhnb Exp $ */
/***************************************************************************
*                   (C) Copyright 2003-2010 - Stendhal                    *
***************************************************************************
***************************************************************************
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
*                                                                         *
***************************************************************************/
package games.stendhal.server.maps.kalavan.house;

import games.stendhal.server.core.config.ZoneConfigurator;
import games.stendhal.server.core.engine.SingletonRepository;
import games.stendhal.server.core.engine.StendhalRPZone;
import games.stendhal.server.entity.mapstuff.chest.Chest;

import java.util.Map;

public class CommonChest implements ZoneConfigurator {

  /**
   * Configure a zone.
   *
   * @param  zone    The zone to be configured.
   * @param  attributes  Configuration attributes.
   */
  public void configureZone(final StendhalRPZone zone, final Map<String, String> attributes) {
    buildKalavanHouseAreaChest(zone);
  }

  private void buildKalavanHouseAreaChest(final StendhalRPZone zone) {
      // load the stuff in the house with presents
    final Chest chest = new Chest();
    chest.setPosition(22, 2);
    chest.add(SingletonRepository.getEntityManager().getItem("wine"));
    chest.add(SingletonRepository.getEntityManager().getItem("easter egg"));
    chest.add(SingletonRepository.getEntityManager().getItem("mega potion"));
    chest.add(SingletonRepository.getEntityManager().getItem("present"));
    chest.add(SingletonRepository.getEntityManager().getItem("pie"));
    zone.add(chest);
  }
}
TOP

Related Classes of games.stendhal.server.maps.kalavan.house.CommonChest

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.