From: SourceForge.net <no...@so...> - 2007-07-29 14:52:37
|
Bugs item #1763133, was opened at 2007-07-29 16:48 Message generated for change (Comment added) made by dlade You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101111&aid=1763133&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: Open Resolution: None Priority: 5 Private: No Submitted By: Danny Lade (dlade) Assigned to: Nobody/Anonymous (nobody) Summary: Calling some constructors of a Creature results in Exception Initial Comment: If you try to clone a creature (with copy constructor) Creature creature = new Creature(rpobject); or Creature creature = new Creature(creature); the following exception occurs: Exception in thread "main" java.lang.IllegalArgumentException: 'id' not found at marauroa.common.game.Attributes.getInt(Attributes.java:300) at marauroa.common.game.RPObject$ID.<init>(RPObject.java:986) at marauroa.common.game.RPObject.getID(RPObject.java:190) at games.stendhal.server.entity.creature.Creature.getIDforDebug(Creature.java:273) at games.stendhal.server.entity.creature.Creature.<init>(Creature.java:178) at games.stendhal.server.pathfinder.PathfinderTest.createCreature(PathfinderTest.java:232) at games.stendhal.server.pathfinder.PathfinderTest.testAll(PathfinderTest.java:78) at games.stendhal.server.pathfinder.PathfinderTest.main(PathfinderTest.java:133) This is because the "id" is not copied or recreated but used for a debug message in these constructors. workaround: 1. switch off DEBUG logging 2. use your own creature objects (don't clone other) ---------------------------------------------------------------------- >Comment By: Danny Lade (dlade) Date: 2007-07-29 16:52 Message: Logged In: YES user_id=888158 Originator: YES The simpliest way to fix this problem is to remove the messages. (see attached fix) File Added: CreatureFix.diff ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101111&aid=1763133&group_id=1111 |