Exemplo n.º 1
0
 private void ResetTree(SkillUpgradeTreeSlot treeSlot)
 {
     treeSlot.CurrentSkill.ResetSkill();
     for (int i = 0; i < treeSlot.Upgrades.Count; i++)
     {
         treeSlot.Upgrades[i].Reset();
     }
 }
Exemplo n.º 2
0
 void UpdateTree(SkillUpgradeTreeSlot treeSlot, Hero hero, int index)
 {
     float discountSkill = 1 - DarkestDungeonManager.Campaign.Estate.Guild.Discount;
     var skillTree = DarkestDungeonManager.Data.UpgradeTrees[hero.ClassStringId + "." + hero.HeroClass.CombatSkills[index].Id];
     treeSlot.currentSkill.UpdatePurchaseSlot(hero, skillTree, skillTree.Upgrades[0] as HeroUpgrade, index);
     int lastWepIndex = -1;
     for (int i = 0; i < treeSlot.upgrades.Count; i++)
     {
         var status = DarkestDungeonManager.Campaign.Estate.GetUpgradeStatus(skillTree.Id, hero, treeSlot.upgrades[i].Upgrade);
         TownManager.UpdateUpgradeSlot(status, treeSlot.upgrades[i], discountSkill);
         if (status == UpgradeStatus.Purchased)
             lastWepIndex = i;
     }
     treeSlot.UpdateConnector(lastWepIndex);
 }
Exemplo n.º 3
0
 void ResetTree(SkillUpgradeTreeSlot treeSlot)
 {
     treeSlot.currentSkill.ResetSkill();
     for (int i = 0; i < treeSlot.upgrades.Count; i++)
         treeSlot.upgrades[i].Reset();
 }