From: Hendrik B. <nh...@us...> - 2011-01-12 21:51:25
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/item In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv5867/src/games/stendhal/server/entity/item Modified Files: Item.java Log Message: fixed comment in canBeEquippedIn adding that "content" can be corpse, too Index: Item.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/item/Item.java,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** Item.java 28 Dec 2010 17:55:51 -0000 1.131 --- Item.java 12 Jan 2011 21:51:16 -0000 1.132 *************** *** 31,38 **** import marauroa.common.game.Definition; import marauroa.common.game.RPClass; import marauroa.common.game.RPObject; import marauroa.common.game.RPSlot; - import marauroa.common.game.Definition.Type; /** --- 31,38 ---- import marauroa.common.game.Definition; + import marauroa.common.game.Definition.Type; import marauroa.common.game.RPClass; import marauroa.common.game.RPObject; import marauroa.common.game.RPSlot; /** *************** *** 45,51 **** // 10 minutes ! public static final int DEGRADATION_TIMEOUT = 10 * MathHelper.SECONDS_IN_ONE_MINUTE; - /** list of possible slots for this item. */ private List<String> possibleSlots; --- 45,51 ---- // 10 minutes ! public static final int DEGRADATION_TIMEOUT = 10 * MathHelper.SECONDS_IN_ONE_MINUTE; ! /** list of possible slots for this item. */ private List<String> possibleSlots; *************** *** 60,72 **** /** The damage type of weapons */ private Nature damageType = Nature.CUT; ! private Map<Nature, Double> susceptibilities; ! private boolean fromCorpse = false; ! /** ! * * Creates a new Item. ! * * @param name * name of item --- 60,72 ---- /** The damage type of weapons */ private Nature damageType = Nature.CUT; ! private Map<Nature, Double> susceptibilities; ! private boolean fromCorpse = false; ! /** ! * * Creates a new Item. ! * * @param name * name of item *************** *** 107,111 **** /** * copy constructor. ! * * @param item * item to copy --- 107,111 ---- /** * copy constructor. ! * * @param item * item to copy *************** *** 185,192 **** } ! /** * on which slots may this item be equipped. ! * * @param slots * list of allowed slots --- 185,192 ---- } ! /** * on which slots may this item be equipped. ! * * @param slots * list of allowed slots *************** *** 200,204 **** * If this item is created by a PlantGrower, the item will notify it when * picked from the ground. ! * * @param plantGrower * a plant grower --- 200,204 ---- * If this item is created by a PlantGrower, the item will notify it when * picked from the ground. ! * * @param plantGrower * a plant grower *************** *** 211,215 **** * returns the PlantGrower which created this item or null if no plantgrower * was involved. ! * * @return PlantGrower or null */ --- 211,215 ---- * returns the PlantGrower which created this item or null if no plantgrower * was involved. ! * * @return PlantGrower or null */ *************** *** 221,225 **** * Returns the attack points of this item. Positive and negative values are * allowed. If this item doesn't modify the attack it should return '0'. ! * * @return attack points */ --- 221,225 ---- * Returns the attack points of this item. Positive and negative values are * allowed. If this item doesn't modify the attack it should return '0'. ! * * @return attack points */ *************** *** 235,239 **** * Returns the defense points of this item. Positive and negative values are * allowed. If this item doesn't modify the defense it should return '0'. ! * * @return defense points */ --- 235,239 ---- * Returns the defense points of this item. Positive and negative values are * allowed. If this item doesn't modify the defense it should return '0'. ! * * @return defense points */ *************** *** 248,252 **** /** * Returns each how many turns this item can attack. ! * * @return each how many turns this item can attack. */ --- 248,252 ---- /** * Returns each how many turns this item can attack. ! * * @return each how many turns this item can attack. */ *************** *** 262,266 **** * Returns if the item is persistent. Persistent items do not update their * stats from the item database and thus can have individual stats ! * * @return true if item is persistent */ --- 262,266 ---- * Returns if the item is persistent. Persistent items do not update their * stats from the item database and thus can have individual stats ! * * @return true if item is persistent */ *************** *** 275,279 **** /** * Set the item's persistence. ! * * @param persistent * If the item's stats are persistent. --- 275,279 ---- /** * Set the item's persistence. ! * * @param persistent * If the item's stats are persistent. *************** *** 289,293 **** /** * Checks if the item is of type <i>type</i> . ! * * @param clazz * the class to check --- 289,293 ---- /** * Checks if the item is of type <i>type</i> . ! * * @param clazz * the class to check *************** *** 320,324 **** /** * Gets the name of the item. ! * * @return The programmatic item name. */ --- 320,324 ---- /** * Gets the name of the item. ! * * @return The programmatic item name. */ *************** *** 329,333 **** /** * Get item count. ! * * @return 1. */ --- 329,333 ---- /** * Get item count. ! * * @return 1. */ *************** *** 344,348 **** * Get the player this is bound to. A bound item can only be used by that * player. ! * * @return The player name, or <code>null</code>. */ --- 344,348 ---- * Get the player this is bound to. A bound item can only be used by that * player. ! * * @return The player name, or <code>null</code>. */ *************** *** 350,354 **** return get("bound"); } ! public boolean isBound() { return has("bound"); --- 350,354 ---- return get("bound"); } ! public boolean isBound() { return has("bound"); *************** *** 358,362 **** * Get the item's infoString. The infoString contains context specific * information that is used by the implementation. ! * * @return The infoString. */ --- 358,362 ---- * Get the item's infoString. The infoString contains context specific * information that is used by the implementation. ! * * @return The infoString. */ *************** *** 371,375 **** /** * Bind this item to a player. A bound item can only be used by that player. ! * * @param name * The player name, or <code>null</code>. --- 371,375 ---- /** * Bind this item to a player. A bound item can only be used by that player. ! * * @param name * The player name, or <code>null</code>. *************** *** 384,393 **** /** ! * Is the item undroppable. ! * * On player death items carried may be dropped into the players corpse. * unless this method returns true. ! * ! * * @return true if item may not be dropped on death of players. */ --- 384,393 ---- /** ! * Is the item undroppable. ! * * On player death items carried may be dropped into the players corpse. * unless this method returns true. ! * ! * * @return true if item may not be dropped on death of players. */ *************** *** 402,406 **** /** * Set is the item undroppable when player dies. ! * * @param unDroppableOnDeath * If true, the item won't be dropped if the player dies. --- 402,406 ---- /** * Set is the item undroppable when player dies. ! * * @param unDroppableOnDeath * If true, the item won't be dropped if the player dies. *************** *** 417,421 **** * Set the item's infostring. The infostring contains context specific * information that is used by the implementation. ! * * @param infostring * The item's infostring. --- 417,421 ---- * Set the item's infostring. The infostring contains context specific * information that is used by the implementation. ! * * @param infostring * The item's infostring. *************** *** 431,435 **** /** * Get the type of damage inflicted by this item. ! * * @return type of damage */ --- 431,435 ---- /** * Get the type of damage inflicted by this item. ! * * @return type of damage */ *************** *** 437,444 **** return damageType; } ! /** * Set the type of damage inflicted by this item ! * * @param type type of damage */ --- 437,444 ---- return damageType; } ! /** * Set the type of damage inflicted by this item ! * * @param type type of damage */ *************** *** 446,454 **** damageType = type; } ! /** * Get this item's contribution to susceptibility to a * type of damage. ! * * @param type type of damage to be checked * @return susceptibility to damage of type <code>type</code> --- 446,454 ---- damageType = type; } ! /** * Get this item's contribution to susceptibility to a * type of damage. ! * * @param type type of damage to be checked * @return susceptibility to damage of type <code>type</code> *************** *** 459,472 **** Double sus = susceptibilities.get(type); if (sus != null) { ! value = sus.doubleValue(); } } ! return value; } ! /** * Set the susceptibility data of this item. ! * * @param susceptibilities susceptibilities to be used */ --- 459,472 ---- Double sus = susceptibilities.get(type); if (sus != null) { ! value = sus.doubleValue(); } } ! return value; } ! /** * Set the susceptibility data of this item. ! * * @param susceptibilities susceptibilities to be used */ *************** *** 479,488 **** return "Item, " + super.toString(); } ! /** * Is called when the item is moved to the ground. ! * * @param player the player who drops the Item. ! * */ public void onPutOnGround(final Player player) { --- 479,488 ---- return "Item, " + super.toString(); } ! /** * Is called when the item is moved to the ground. ! * * @param player the player who drops the Item. ! * */ public void onPutOnGround(final Player player) { *************** *** 492,499 **** /** * Is called when the item is created. ! * * @param expire * Set true if the item should expire normally, false otherwise. ! * Persistent attribute can override this. */ public void onPutOnGround(final boolean expire) { --- 492,499 ---- /** * Is called when the item is created. ! * * @param expire * Set true if the item should expire normally, false otherwise. ! * Persistent attribute can override this. */ public void onPutOnGround(final boolean expire) { *************** *** 580,584 **** String statString = ""; if (stats.length() > 0) { ! statString = " Stats are (" + stats.toString().trim() + ")."; } return (text + levelwarning + statString); --- 580,584 ---- String statString = ""; if (stats.length() > 0) { ! statString = " Stats are (" + stats.toString().trim() + ")."; } return (text + levelwarning + statString); *************** *** 595,606 **** if (slot == null) { // ground ! return true; } ! // when the slot is called "content", it's a personal chest. return possibleSlots.contains(slot) || slot.equals("content"); } ! public void removeFromWorld() { if (isContained()) { --- 595,607 ---- if (slot == null) { // ground ! return true; } ! // when the slot is called "content", it's a personal chest or corpse ! // TODO: this should be made explicit in the xml files return possibleSlots.contains(slot) || slot.equals("content"); } ! public void removeFromWorld() { if (isContained()) { *************** *** 628,636 **** * Returns the name or something that can be used to identify the entity for * the player. ! * * @param definite * <code>true</code> for "the", and <code>false</code> for * "a/an" in case the entity has no name. ! * * @return The description name. */ --- 629,637 ---- * Returns the name or something that can be used to identify the entity for * the player. ! * * @param definite * <code>true</code> for "the", and <code>false</code> for * "a/an" in case the entity has no name. ! * * @return The description name. */ *************** *** 648,652 **** /** * Get the nicely formatted entity title/name. ! * * @return The title, or <code>null</code> if unknown. */ --- 649,653 ---- /** * Get the nicely formatted entity title/name. ! * * @return The title, or <code>null</code> if unknown. */ |