From: SourceForge.net <no...@so...> - 2008-03-28 14:46:27
|
Bugs item #1737586, was opened at 2007-06-15 03:07 Message generated for change (Comment added) made by astridemma You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101111&aid=1737586&group_id=1111 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Code Group: None >Status: Closed >Resolution: Fixed Priority: 6 Private: No Submitted By: Seather (seather) >Assigned to: Astrid Sawatzky (astridemma) Summary: Stendhal: Problem when Persistent is later changed. Initial Comment: I discovered this a while back, forgot to report it. Wrong auto destroy behavior if i do either /alter #123 persistent set 1 /alter #123 persistent set 0 to an item on the ground, ------ If i set 1(was 0), pick the item up, and don't drop it, an unsuccessful attempt will be made at removing it eventually. ------ If i set 1(was 0), pick the item up, then drop it, the item will still eventually be automatically cleaned up. If i set 1(was 0), the item will still be eventually be automatically cleaned up.(not as critical as the other cases). If i set 0(was 1), the item will not be automatically cleaned up.(not as critical as the other cases). -- If i logout+login with a changed item, this will be fixed. ------------ For reference, from Item.java, the problem should be easy to spot. public void onPutOnGround(Player player) { // persistent items don't degrade if (!isPersistent()) { TurnNotifier.get().notifyInSeconds(DEGRADATION_TIMEOUT, this); } } public void onRemoveFromGround() { // persistent items don't degrade if (!isPersistent()) { // stop the timer so that the item won't degrade anymore TurnNotifier.get().dontNotify(this); } if (plantGrower != null) { plantGrower.onFruitPicked(this); } } public void onTurnReached(int currentTurn, String message) { // remove this object from the zone where it's lying on // the ground getZone().remove(getID()); } public boolean isPersistent() { if (has("persistent")) { return (getInt("persistent") == 1); } return false; } ---------------------------------------------------------------------- Comment By: Astrid Sawatzky (astridemma) Date: 2008-03-28 14:46 Message: Logged In: YES user_id=964999 Originator: NO OK, thanks for the error report. Problem is now fixed in CVS. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101111&aid=1737586&group_id=1111 |