From: SourceForge.net <no...@so...> - 2005-09-11 09:12:50
|
Bugs item #1254490, was opened at 2005-08-08 22:51 Message generated for change (Settings changed) made by arianne_rpg You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101111&aid=1254490&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: 9 Submitted By: Matthias Totz (mtotz) Assigned to: Miguel Angel Blanch Lardin (arianne_rpg) Summary: Stendhal: NPE in RPWorld.remove():138 Initial Comment: see stacktrace @ https://sourceforge.net/forum/forum.php?thread_id=1331207&forum_id=3191 Either the Object ID is <null> or the zone the object is in is unknown so zones.get(<stuff>) returns <null>. ---------------------------------------------------------------------- >Comment By: Miguel Angel Blanch Lardin (arianne_rpg) Date: 2005-09-11 11:12 Message: Logged In: YES user_id=3949 public static boolean attack(RPEntity source,RPEntity target) throws AttributeNotFoundException, NoRPZoneException, RPObjectNotFoundException { Log4J.startMethod(logger, "attack"); try { StendhalRPZone zone=(StendhalRPZone)world. getRPZone(source.getID()); if(!zone.has(target.getID()) || target.getHP()==0) { target.onAttack(source, false); world.modify(source); return false; } Just add to 0.30 source code the append || target.getHP()==0) on the first if. ---------------------------------------------------------------------- Comment By: Miguel Angel Blanch Lardin (arianne_rpg) Date: 2005-09-11 00:48 Message: Logged In: YES user_id=3949 Here is a stacktrace for the new code. The bug happens with two or more players attacking the same creature... I will investigate more. 146078 [RPServerManager] ERROR games.stendhal.server. StendhalRPRuleProcessor - error in beginTurn marauroa.server.game.NoRPZoneException at marauroa.server.game.RPWorld.remove(RPWorld. java:147) at games.stendhal.server.entity.RPEntity. onDead(RPEntity.java:420) at games.stendhal.server.entity.RPEntity. onDead(RPEntity.java:371) at games.stendhal.server.entity.npc.NPC.onDead(NPC. java:170) at games.stendhal.server.entity.creature.Creature. onDead(Creature.java:202) at games.stendhal.server.StendhalRPRuleProcessor. beginTurn(StendhalRPRuleProcessor.java:1014) at marauroa.server.game.RPServerManager. run(RPServerManager.java:499) ---------------------------------------------------------------------- Comment By: Miguel Angel Blanch Lardin (arianne_rpg) Date: 2005-09-02 11:27 Message: Logged In: YES user_id=3949 I go for it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101111&aid=1254490&group_id=1111 |