From: Hendrik B. <nh...@us...> - 2010-01-03 20:17:31
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/entity In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv7382/src/games/stendhal/server/entity Modified Files: RPEntity.java Log Message: check reachability of slot on equiping which will prevent npcs to put items into the broken keyslot (fixes #1858861) Index: RPEntity.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/RPEntity.java,v retrieving revision 1.321 retrieving revision 1.322 diff -C2 -d -r1.321 -r1.322 *** RPEntity.java 13 Nov 2009 22:22:47 -0000 1.321 --- RPEntity.java 3 Jan 2010 20:17:18 -0000 1.322 *************** *** 32,35 **** --- 32,36 ---- import games.stendhal.server.entity.npc.parser.WordList; import games.stendhal.server.entity.player.Player; + import games.stendhal.server.entity.slot.EntitySlot; import java.awt.geom.Rectangle2D; *************** *** 1347,1350 **** --- 1348,1360 ---- if (hasSlot(slot)) { final RPSlot rpslot = getSlot(slot); + + // check that this slot is reachable (e. g. fixed keyring) + if (rpslot instanceof EntitySlot) { + EntitySlot entitySlot = (EntitySlot) rpslot; + if (!entitySlot.isReachableForThrowingThingsIntoBy(this)) { + continue; + } + } + if (!rpslot.isFull()) { return slot; |