From: Miguel A. B. L. <ari...@us...> - 2007-07-06 20:02:29
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/client/gui/wt In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv3812/src/games/stendhal/client/gui/wt Modified Files: Character.java Log Message: Add XP left to level up. Index: Character.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/client/gui/wt/Character.java,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** Character.java 23 Jun 2007 21:20:23 -0000 1.54 --- Character.java 6 Jul 2007 20:02:28 -0000 1.55 *************** *** 25,28 **** --- 25,29 ---- import games.stendhal.client.gui.wt.core.WtTextPanel; import games.stendhal.client.sprite.SpriteStore; + import games.stendhal.common.Level; import java.awt.Graphics; *************** *** 44,48 **** /** Panel height */ ! private static final int PANEL_HEIGHT = 265; /** Height/width of slots */ --- 45,49 ---- /** Panel height */ ! private static final int PANEL_HEIGHT = 285; /** Height/width of slots */ *************** *** 120,124 **** 170, 100, ! "HP: ${hp}/${maxhp}\nATK: ${atk}+${atkitem} (${atkxp})\nDEF: ${def}+${defitem} (${defxp})\nXP:${xp}\nMoney: $${money}"); statsPanel.setFrame(false); statsPanel.setTitleBar(false); --- 121,125 ---- 170, 100, ! "HP: ${hp}/${maxhp}\nATK: ${atk}+${atkitem} (${atkxp})\nDEF: ${def}+${defitem} (${defxp})\nXP:${xp}\nNext Level: ${xptonextlevel}\nMoney: $${money}"); statsPanel.setFrame(false); statsPanel.setTitleBar(false); *************** *** 192,195 **** --- 193,198 ---- statsPanel.set("defxp", playerEntity.getDefXp()); statsPanel.set("xp", playerEntity.getXp()); + int level=Level.getLevel(playerEntity.getXp()); + statsPanel.set("xptonextlevel", Level.getXP(level+1)-playerEntity.getXp()); statsPanel.set("money", money); |