Package games.stendhal.server.entity.item

Source Code of games.stendhal.server.entity.item.ItemInformation

/* $Id: ItemInformation.java,v 1.2 2010/09/19 02:23:49 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.entity.item;

import marauroa.common.game.Definition;
import marauroa.common.game.RPClass;
import marauroa.common.game.Definition.Type;

public class ItemInformation extends Item {


  /**
   * copy constructor.
   *
   * @param item
   *            item to copy
   */
  public ItemInformation(final Item item) {
    super(item);
    setRPClass("item_information");
  }


  public static void generateRPClass() {
    final RPClass entity = new RPClass("item_information");
    entity.isA("item");

    // Some things may have a textual description
    entity.addAttribute("description_info", Type.LONG_STRING);

    // used for show_item_list events used as shop signs.
    entity.addAttribute("price", Type.INT, Definition.VOLATILE);
  }
}
TOP

Related Classes of games.stendhal.server.entity.item.ItemInformation

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.