Mercurial > wow > buffalo2
comparison Modules/ArtifactPower.lua @ 120:5f1ba488c395
ArtifactPower:
- prediction text shows the correct rank when AP cost is currently met
author | Nenue |
---|---|
date | Sun, 04 Jun 2017 18:20:40 -0400 |
parents | 0f47780a83c4 |
children | 1f68c46bc4de |
comparison
equal
deleted
inserted
replaced
119:0f47780a83c4 | 120:5f1ba488c395 |
---|---|
965 print('* ', actualLevel, actualXP, actualCost, totalCost) | 965 print('* ', actualLevel, actualXP, actualCost, totalCost) |
966 end | 966 end |
967 print('actual:', actualLevel, actualXP, '/', actualCost) | 967 print('actual:', actualLevel, actualXP, '/', actualCost) |
968 | 968 |
969 | 969 |
970 if unusedXP > 0 then | 970 local remaining = totalXP + unusedXP |
971 local remaining = totalXP + unusedXP | 971 local nextCost = artifact.currentCost |
972 local nextCost = artifact.currentCost | 972 if remaining > nextCost then |
973 totalCost = nextCost | 973 totalCost = nextCost |
974 while remaining > nextCost do | 974 while remaining >= nextCost do |
975 totalLevel = totalLevel + 1 | 975 totalLevel = totalLevel + 1 |
976 remaining = remaining - nextCost | 976 remaining = remaining - nextCost |
977 nextCost = C_ArtifactUI.GetCostForPointAtRank(totalLevel, artifact.tier) | 977 nextCost = C_ArtifactUI.GetCostForPointAtRank(totalLevel, artifact.tier) |
978 print('|cFFFFFF00+ ', totalLevel, remaining, '/', totalCost) | 978 print('|cFFFFFF00+ ', totalLevel, remaining, '/', totalCost) |
979 end | 979 end |