From: ChadF <ch...@us...> - 2007-09-13 20:37:00
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/client/gui/wt In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv31433/src/games/stendhal/client/gui/wt Modified Files: Character.java Log Message: Mapped all [relevant] rpobject's to entity's, including contained ones. Skip recreation of entity objects in character window via lookup. Index: Character.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/client/gui/wt/Character.java,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** Character.java 9 Sep 2007 11:20:20 -0000 1.59 --- Character.java 13 Sep 2007 20:37:01 -0000 1.60 *************** *** 19,24 **** --- 19,26 ---- package games.stendhal.client.gui.wt; + import games.stendhal.client.GameObjects; import games.stendhal.client.StendhalClient; import games.stendhal.client.StendhalUI; + import games.stendhal.client.entity.Entity; import games.stendhal.client.entity.EntityFactory; import games.stendhal.client.entity.User; *************** *** 166,169 **** --- 168,173 ---- money = 0; + GameObjects gameObjects = GameObjects.getInstance(); + // taverse all carrying slots String[] slotsCarrying = { "bag", "rhand", "lhand", "head", "armor", *************** *** 187,191 **** RPObject object = iter.next(); ! entitySlot.setEntity(EntityFactory.createEntity(object)); } else { entitySlot.setEntity(null); --- 191,205 ---- RPObject object = iter.next(); ! Entity entity = gameObjects.get(object); ! ! /* ! * TODO: Remove once object mapping ! * verified to work in all cases. ! */ ! if(entity == null) { ! entity = EntityFactory.createEntity(object); ! } ! ! entitySlot.setEntity(entity); } else { entitySlot.setEntity(null); |