Thread Tools Display Modes
02-13-11, 01:35 PM   #1
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2010
Posts: 200
Predicting repair costs

I'm currently working on calculating repair costs of armor with durability to repair, iLevel, and quality level. I'm using these formulas I found on WoWPedia.org
Code:
Durability points to be repaired * (ilevel - 32.5) * 0.02 silver
Durability points to be repaired * (ilevel - 32.5) * 0.025 silver
Durability points to be repaired * (ilevel - 32.5) * 0.05 silver
These formulas work perfectly for predicting armor, but not for weapons or shield (as told.) I cannot seem to find a formula on the site that predicts the repair cost for weapons or shields, is there such a formula that anyone knows of?

Thanks!
  Reply With Quote
02-13-11, 05:00 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I'm assuming that you need this info when away from a vendor that can repair?

Because when at the vendor, you can use GetRepairAllCost() for repairing all items.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
02-13-11, 05:26 PM   #3
lilsparky
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 117
i would think it shouldn't take too much to figure out the basic formula if it fits the format of the armor formula above.
  Reply With Quote
02-13-11, 06:06 PM   #4
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2010
Posts: 200
Originally Posted by Seerah View Post
I'm assuming that you need this info when away from a vendor that can repair?

Because when at the vendor, you can use GetRepairAllCost() for repairing all items.
That is correct.

Originally Posted by lilsparky View Post
i would think it shouldn't take too much to figure out the basic formula if it fits the format of the armor formula above.
I'm not the best at predicting formulas lol.
  Reply With Quote
02-13-11, 07:10 PM   #5
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2010
Posts: 200
I actually figured out another method that doesn't require a formula to figure this out.

For anyone else in the future looking to do this:
Code:
local scanTool = CreateFrame("GameTooltip")
scanTool:ClearLines()
local repairCost = select(3, scanTool:SetInventoryItem("player", slot))
print(repairCost)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Predicting repair costs


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off