Fixes for Skill level desc.
Fix for level staying same across skill changes. Removed logging statements in ClientClass
This commit is contained in:
parent
f4e8879d55
commit
b7857ef20c
@ -135,8 +135,6 @@ public class ClientClass
|
||||
{
|
||||
_savingCustomBuild.PlayerName = _client.GetPlayerName();
|
||||
|
||||
System.out.println("Custom build saving: ");
|
||||
_savingCustomBuild.printInfo();
|
||||
_classFactory.GetRepository().SaveCustomBuild(_savingCustomBuild);
|
||||
_savingCustomBuild = null;
|
||||
}
|
||||
@ -331,21 +329,8 @@ public class ClientClass
|
||||
AddSkill(cur, _gameClass.GetDefaultSkills().get(cur));
|
||||
}
|
||||
|
||||
System.out.println("Adding back skills");
|
||||
for (Entry<ISkill, Integer> skill : _lastSkillMap.values())
|
||||
{
|
||||
if (skill == null)
|
||||
System.out.println("Skill is null in ClientClass.ClearSkills()");
|
||||
|
||||
if (skill.getKey() == null)
|
||||
System.out.println("Skill key is null in ClientClass.ClearSkills()");
|
||||
|
||||
if (skill.getValue() == null)
|
||||
System.out.println("Skill value is null in ClientClass.ClearSkills()");
|
||||
|
||||
System.out.println("Key : " + skill.getKey());
|
||||
System.out.println("Value : " + skill.getValue());
|
||||
|
||||
AddSkill(skill.getKey(), skill.getValue());
|
||||
}
|
||||
}
|
||||
@ -356,18 +341,7 @@ public class ClientClass
|
||||
{
|
||||
for (ISkill skill : _skillMap.values())
|
||||
{
|
||||
if (skill == null)
|
||||
{
|
||||
System.out.println("Skill is null in ClientClass.ClearSkills()");
|
||||
}
|
||||
else if (_client == null)
|
||||
{
|
||||
System.out.println("Client is null in ClientClass.ClearSkills()");
|
||||
}
|
||||
else
|
||||
{
|
||||
skill.RemoveUser(_client.GetPlayer());
|
||||
}
|
||||
skill.RemoveUser(_client.GetPlayer());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,9 +136,6 @@ public class CustomBuildPage extends ShopPageBase<ClassShopManager, ClassCombatS
|
||||
clientClass.EquipCustomBuild(customBuild, false);
|
||||
clientClass.SetSavingCustomBuild(_pvpClass, customBuild);
|
||||
|
||||
System.out.println("Custom build editing: ");
|
||||
customBuild.printInfo();
|
||||
|
||||
Shop.OpenPageForPlayer(Player, new SkillPage(Plugin, Shop, ClientManager, DonationManager, Player, _pvpClass));
|
||||
}
|
||||
|
||||
|
@ -130,30 +130,32 @@ public class SkillPage extends ShopPageBase<ClassShopManager, ClassCombatShop>
|
||||
List<String> skillLore = new ArrayList<String>();
|
||||
|
||||
boolean locked = isSkillLocked(skill.GetSalesPackageId(), skill);
|
||||
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);
|
||||
|
||||
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(0)));
|
||||
skillLore.addAll(java.util.Arrays.asList(skill.GetDesc(level)));
|
||||
|
||||
for (int i = 0; i < skillLore.size(); i++)
|
||||
{
|
||||
skillLore.set(i, C.cGray + skillLore.get(i));
|
||||
}
|
||||
|
||||
Material material = locked ? Material.EMERALD : (clientClass.GetSavingCustomBuild().hasSkill(skill) ? Material.WRITTEN_BOOK : Material.BOOK);
|
||||
int level = clientClass.GetSavingCustomBuild().hasSkill(skill) ? clientClass.GetSavingCustomBuild().getLevel(skill) : 1;
|
||||
String name = (locked ? ChatColor.RED + skill.GetName() + " (Locked)" : skill.GetName() + " Lvl " + level);
|
||||
|
||||
ShopItem skillItem = new ShopItem(material, name, skillLore.toArray(new String[skillLore.size()]), level, locked, true);
|
||||
|
||||
if (locked)
|
||||
AddButton(slotNumber, skillItem, new PurchaseSkillButton(this, skill));
|
||||
else
|
||||
AddButton(slotNumber, skillItem, new SelectSkillButton(this, skill, Math.min(clientClass.GetSavingCustomBuild().getLevel(skill) + 1, skill.getMaxLevel())));
|
||||
AddButton(slotNumber, skillItem, new SelectSkillButton(this, skill, Math.min((hasSkill ? level + 1 : level), skill.getMaxLevel())));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user