From e1eda749a7e6343ee5657de709f6f1fede2336ec Mon Sep 17 00:00:00 2001 From: Chiss Date: Sun, 30 Mar 2014 09:05:29 +1100 Subject: [PATCH] Skill lore changes --- .../minecraft/game/classcombat/Skill/Skill.java | 15 ++++++--------- .../game/classcombat/shop/page/SkillPage.java | 6 ++---- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java index 6fa5f4d17..0ae6e255f 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Skill.java @@ -161,17 +161,9 @@ public abstract class Skill implements ISkill, Listener //Parse Level Token if (token.charAt(0) == '#') { - System.out.println("Parsing A: " + line); - System.out.println("Token: " + token); - token = token.substring(1, token.length()); String[] numberToks = token.split("\\#"); - for (String cur : numberToks) - { - System.out.println("Sub-Token: " + cur); - } - try { double base = Double.parseDouble(numberToks[0]); @@ -184,11 +176,16 @@ public abstract class Skill implements ISkill, Listener plusMinus = '-'; //Only display what you'd get with level 1 - if (level == 0) + if (level == 0 ) { levelValue = base + ((double)1 * bonus); token = C.cYellow + levelValue + C.cGray; } + //Maxed + else if (level == getMaxLevel()) + { + token = C.cYellow + levelValue + C.cGray; + } else { token = C.cYellow + levelValue + C.cGray + " (" + C.cGreen + plusMinus + bonus + C.cGray + ")"; diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java index d0c2e2864..d6b8bc1ac 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/page/SkillPage.java @@ -133,17 +133,15 @@ public class SkillPage extends ShopPageBase Material material = locked ? Material.EMERALD : (clientClass.GetSavingCustomBuild().hasSkill(skill) ? Material.WRITTEN_BOOK : Material.BOOK); boolean hasSkill = clientClass.GetSavingCustomBuild().hasSkill(skill); int level = hasSkill ? clientClass.GetSavingCustomBuild().getLevel(skill) : 1; - String name = (locked ? ChatColor.RED + skill.GetName() + " (Locked)" : skill.GetName() + " Lvl " + level); + String name = (locked ? ChatColor.RED + skill.GetName() + " (Locked)" : skill.GetName() + " Level " + level); - System.out.println(name); - if (locked) { skillLore.add(C.cYellow + skill.GetCost() + " Gems"); skillLore.add(C.cBlack); } - skillLore.addAll(java.util.Arrays.asList(skill.GetDesc(level))); + skillLore.addAll(java.util.Arrays.asList(skill.GetDesc(hasSkill ? level : 0))); for (int i = 0; i < skillLore.size(); i++) {