WoWInterface SVN DirtyGear

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 13 to Rev 14
    Reverse comparison

Rev 13 → Rev 14

trunk/DirtyGear/DirtyGear.toc
2,7 → 2,7
 
## Title: DirtyGear
## Author: Dirtygurl
## Version: 1.0-a3
## Version: 1.1-a4
## Notes: Shows suggested enchants and gems for current class/spec.
 
libs\LibStub\LibStub.lua
trunk/DirtyGear/DirtyGear.lua
5,8 → 5,25
local DirtyGear = {}
DirtyGear.Version = GetAddOnMetadata("DirtyGear", "Version")
 
DirtyGear.Player =
{
Class = UnitClass("player"),
Level = UnitLevel("player"),
Name = UnitName("player"),
Realm = GetRealmName(),
New = false
}
 
DirtyGear.Global = {}
DirtyGear.PerPlayer =
{
Locked = false,
Position = { 0, 0 }
}
 
DirtyGear.Enchantable =
{
INVTYPE_WAIST = true,
INVTYPE_CLOAK = true,
INVTYPE_CHEST = true,
INVTYPE_FEET = true,
43,16 → 60,13
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = { 60663, 44500 },
INVTYPE_CHEST = { 44465, 38989 },
INVTYPE_CLOAK = { 60663, 47898 },
INVTYPE_CHEST = { 60692 },
INVTYPE_FEET = { 60763, 47901, 60606 },
INVTYPE_HAND = { 60668, 44488, 44513, 44484 },
INVTYPE_HAND = { 44488, 60668 },
INVTYPE_HEAD = { 59954, 59777 },
INVTYPE_LEGS = { 50902, 50901 },
INVTYPE_WEAPONMAINHAND = { 53341, 53331, 53343, 53344 },
INVTYPE_WEAPONOFFHAND = { 53341, 53331, 53343, 53344 },
INVTYPE_WEAPON = { 53341, 53331, 53343, 53344 },
INVTYPE_2HWEAPON = { 53341, 53331, 53343, 53344 },
INVTYPE_LEGS = { 60582, 50902 },
INVTYPE_2HWEAPON = { 53344 },
INVTYPE_SHOULDER = { 59934, 59929, 35417 },
INVTYPE_WRIST = { 44575, 44598, 60616 }
},
66,10 → 80,40
Green = { 40086, 40088 },
Prismatic = {},
Meta = { 41398, 41285 },
RedYellowBlue = {},
JewelCraft = {}
}
},
["Death Knight-Blood-Tank"] =
{
Class = "Death Knight",
Spec = "Blood",
Type = "Tank",
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = { 44591, 60663 },
INVTYPE_CHEST = { 47766, 47900, 60692 },
INVTYPE_FEET = { 44528 },
INVTYPE_HAND = { 44488, 44529, 44625 },
INVTYPE_HEAD = { 59955 },
INVTYPE_LEGS = { 60581 },
INVTYPE_2HWEAPON = { 62158, 53323 },
INVTYPE_SHOULDER = { 59941, 59932 },
INVTYPE_WRIST = { 44598, 62256 }
},
Gems =
{
Red = { 40001, 39996, 40003 },
Yellow = { 40015, 40014 },
Blue = { 37430, },
Orange = { 40057, 40058 },
Purple = { 40031, 40034 },
Green = { 40089, 40088 },
Prismatic = {},
Meta = { 41380, 41377 },
JewelCraft = {}
}
},
["Death Knight-Frost"] =
{
Class = "Death Knight",
84,10 → 128,7
INVTYPE_HAND = { 60668, 44488, 44513, 44484 },
INVTYPE_HEAD = { 59954, 59777 },
INVTYPE_LEGS = { 50902, 50901 },
INVTYPE_WEAPONMAINHAND = { 53341, 53331, 53343, 53344 },
INVTYPE_WEAPONOFFHAND = { 53341, 53331, 53343, 53344 },
INVTYPE_WEAPON = { 53341, 53331, 53343, 53344 },
INVTYPE_2HWEAPON = { 53341, 53331, 53343, 53344 },
INVTYPE_2HWEAPON = { 53344 },
INVTYPE_SHOULDER = { 59934, 59929, 35417 },
INVTYPE_WRIST = { 44575, 44598, 60616 }
},
101,7 → 142,6
Green = { 40086, 40088 },
Prismatic = {},
Meta = { 41398, 41285 },
RedYellowBlue = {},
JewelCraft = {}
}
},
113,18 → 153,15
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = { 44591, 47672, 60663, 44500 },
INVTYPE_CHEST = { 47766, 47900, 44492 },
INVTYPE_FEET = { 47901, 44528 },
INVTYPE_HAND = { 44625, 44488 },
INVTYPE_CLOAK = { 60663, 44591 },
INVTYPE_CHEST = { 47766, 47900, 60692 },
INVTYPE_FEET = { 44528 },
INVTYPE_HAND = { 44488, 44529, 44625 },
INVTYPE_HEAD = { 59955 },
INVTYPE_LEGS = { 60581, 50901 },
INVTYPE_WEAPONMAINHAND = { 53323, 62158 },
INVTYPE_WEAPONOFFHAND = { 53323, 62158 },
INVTYPE_WEAPON = { 53323, 62158 },
INVTYPE_2HWEAPON = { 53323, 62158 },
INVTYPE_LEGS = { 60581 },
INVTYPE_2HWEAPON = { 62158, 53323 },
INVTYPE_SHOULDER = { 59941, 59932 },
INVTYPE_WRIST = { 44616, 44598 }
INVTYPE_WRIST = { 44598, 62256 }
},
Gems =
{
136,7 → 173,6
Green = { 40089, 40088 },
Prismatic = {},
Meta = { 41380, 41377 },
RedYellowBlue = {},
JewelCraft = {}
}
},
148,18 → 184,15
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = { 60663, 44500 },
INVTYPE_CHEST = { 44465, 38989 },
INVTYPE_FEET = { 60763, 47901, 60606 },
INVTYPE_HAND = { 60668, 44488, 44513, 44484 },
INVTYPE_CLOAK = { 60663, 47898 },
INVTYPE_CHEST = { 60692 },
INVTYPE_FEET = { 60623, 44589, 60763, },
INVTYPE_HAND = { 44488, 60668 },
INVTYPE_HEAD = { 59954, 59777 },
INVTYPE_LEGS = { 50902, 50901 },
INVTYPE_WEAPONMAINHAND = { 53341, 53331, 53343, 53344 },
INVTYPE_WEAPONOFFHAND = { 53341, 53331, 53343, 53344 },
INVTYPE_WEAPON = { 53341, 53331, 53343, 53344 },
INVTYPE_2HWEAPON = { 53341, 53331, 53343, 53344 },
INVTYPE_LEGS = { 60582 },
INVTYPE_2HWEAPON = { 53344 },
INVTYPE_SHOULDER = { 59934, 59929, 35417 },
INVTYPE_WRIST = { 44575, 44598, 60616 }
INVTYPE_WRIST = { 44575 }
},
Gems =
{
171,10 → 204,40
Green = { 40086, 40088 },
Prismatic = {},
Meta = { 41398, 41285 },
RedYellowBlue = {},
JewelCraft = {}
}
},
["Death Knight-Unholy-Tank"] =
{
Class = "Death Knight",
Spec = "Unholy",
Type = "Tank",
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = { 44591, 60663 },
INVTYPE_CHEST = { 47766, 47900, 60692 },
INVTYPE_FEET = { 44528 },
INVTYPE_HAND = { 44488, 44529, 44625 },
INVTYPE_HEAD = { 59955 },
INVTYPE_LEGS = { 60581 },
INVTYPE_2HWEAPON = { 62158, 53323 },
INVTYPE_SHOULDER = { 59941, 59932 },
INVTYPE_WRIST = { 44598, 62256 }
},
Gems =
{
Red = { 40001, 39996, 40003 },
Yellow = { 40015, 40014 },
Blue = { 37430, },
Orange = { 40057, 40058 },
Purple = { 40031, 40034 },
Green = { 40089, 40088 },
Prismatic = {},
Meta = { 41380, 41377 },
JewelCraft = {}
}
},
["Druid-Balance"] =
{
Class = "Druid",
183,21 → 246,19
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_CLOAK = { 47898 },
INVTYPE_CHEST = { 60692, 44509 },
INVTYPE_FEET = { 60623, 44508 },
INVTYPE_HAND = { 44592, 44488 },
INVTYPE_HEAD = { 59970 },
INVTYPE_LEGS = { 55631, 55634 },
INVTYPE_WEAPONMAINHAND = { 60714 },
INVTYPE_RANGED = { 60714 },
INVTYPE_WEAPONOFFHAND = { 60714 },
INVTYPE_WEAPON = { 60714 },
INVTYPE_2HWEAPON = { 62948 },
INVTYPE_SHOULDER = { 59937, 59927 },
INVTYPE_WRIST = { 60767 }
},
Gems =
{
209,7 → 270,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
244,7 → 304,6
Green = { 40088 },
Prismatic = {},
Meta = { 41398 },
RedYellowBlue = {},
JewelCraft = {}
}
},
282,7 → 341,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
317,7 → 375,6
Green = {},
Prismatic = {},
Meta = { 25901, 25897 },
RedYellowBlue = {},
JewelCraft = {}
}
},
329,21 → 386,20
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_CLOAK = { 60663, 47898 },
INVTYPE_CHEST = { 60692 },
INVTYPE_FEET = { 60623, 44589, 60763 },
INVTYPE_HAND = { 44488, 44529, 60668 },
INVTYPE_HEAD = { 59954 },
INVTYPE_LEGS = { 60582 },
INVTYPE_WEAPONMAINHAND = { 60707, 59619 },
INVTYPE_RANGED = { 41146, 41167 },
INVTYPE_WEAPONOFFHAND = { 60707, 59619 },
INVTYPE_WEAPON = { 60707, 59619 },
INVTYPE_2HWEAPON = { 60691 },
INVTYPE_RANGEDRIGHT = { 41146, 41167 },
INVTYPE_SHOULDER = { 59934, 59929 },
INVTYPE_WRIST = { 44575 }
},
Gems =
{
355,7 → 411,6
Green = { 40029 },
Prismatic = {},
Meta = { 41398 },
RedYellowBlue = { 42702 },
JewelCraft = { 36766, 42156 }
}
},
367,21 → 422,20
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_CLOAK = { 60663, 47898 },
INVTYPE_CHEST = { 60692 },
INVTYPE_FEET = { 60623, 44589, 60763 },
INVTYPE_HAND = { 44488, 44529, 60668 },
INVTYPE_HEAD = { 59954 },
INVTYPE_LEGS = { 60582 },
INVTYPE_WEAPONMAINHAND = { 60707, 59619 },
INVTYPE_RANGED = { 41146, 41167 },
INVTYPE_WEAPONOFFHAND = { 60707, 59619 },
INVTYPE_WEAPON = { 60707, 59619 },
INVTYPE_2HWEAPON = { 60691 },
INVTYPE_RANGEDRIGHT = { 41146, 41167 },
INVTYPE_SHOULDER = { 59934, 59929 },
INVTYPE_WRIST = { 44575 }
},
Gems =
{
393,7 → 447,6
Green = { 40100, 40088, 40096, 40086 },
Prismatic = {},
Meta = { 41398 },
RedYellowBlue = { 42702 },
JewelCraft = { 36766, 42156 }
}
},
406,17 → 459,17
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = { 60663 },
INVTYPE_CHEST = { 60692, 44623 },
INVTYPE_CHEST = { 60692 },
INVTYPE_FEET = { 60763, 44589, 60623 },
INVTYPE_HAND = { 60668, 44488, 44529 },
INVTYPE_HEAD = { 59954, 35452 },
INVTYPE_LEGS = { 60581, 60582 },
INVTYPE_WEAPONMAINHAND = { 59619, 60707, 44633, 27968 },
INVTYPE_RANGED = { 61468, 55076, 55135 }, -- bows
INVTYPE_WEAPONOFFHAND = { 59619, 60707, 44633, 27968 },
INVTYPE_WEAPON = { 59619, 60707, 44633, 27968 },
INVTYPE_HAND = { 44488, 44529, 60668 },
INVTYPE_HEAD = { 59954 },
INVTYPE_LEGS = { 60582 },
INVTYPE_WEAPONMAINHAND = { 60707, 59619 },
INVTYPE_RANGED = { 55076, 55135 }, -- bows
INVTYPE_WEAPONOFFHAND = { 60707, 59619 },
INVTYPE_WEAPON = { 60707, 59619 },
INVTYPE_2HWEAPON = { 60691 },
INVTYPE_RANGEDRIGHT = { 61468, 55076, 55135 }, -- wands, guns, crossbows
INVTYPE_RANGEDRIGHT = { 55076, 55135 }, -- wands, guns, crossbows
INVTYPE_SHOULDER = { 59934, 59929 },
INVTYPE_WRIST = { 44575 }
},
430,7 → 483,6
Green = { 40088, 40086 },
Prismatic = {},
Meta = { 41398 },
RedYellowBlue = { 42702 },
JewelCraft = { 42143, 42156 }
}
},
464,7 → 516,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
498,7 → 549,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
532,7 → 582,6
Green = {},
Prismatic = {},
Meta = { 41398, 41285 },
RedYellowBlue = { 42702 },
JewelCraft = { 42142, 42156 }
}
},
560,15 → 609,14
},
Gems =
{
Red = {},
Red = { 24029, 32195 },
Yellow = {},
Blue = {},
Orange = {},
Purple = {},
Orange = { 24060, 32219 },
Purple = { 32836, 37503 },
Green = {},
Prismatic = {},
Meta = { 41401, 41376, 41333, 41389 },
RedYellowBlue = {},
Meta = { 25901, 25897 },
JewelCraft = {}
}
},
588,7 → 636,7
INVTYPE_LEGS = { 60581 },
INVTYPE_WEAPONMAINHAND = { 55836, 27984, 44633, 60707, 59619, 44576, 64441 },
INVTYPE_WEAPON = { 55836, 27984, 44633, 60707, 59619, 44576, 64441 },
INVTYPE_SHIELD = { 44936, 34009, 27946 },
INVTYPE_SHIELD = { 62201, 34009, 27946 },
INVTYPE_SHOULDER = { 59941, 59932 },
INVTYPE_WRIST = { 44575, 62256 }
},
600,9 → 648,8
Orange = {},
Purple = {},
Green = {},
Prismatic = {},
Prismatic = { 42702 },
Meta = { 41380, 41396, 41377 },
RedYellowBlue = { 42702 },
JewelCraft = {}
}
},
637,7 → 684,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
649,33 → 695,29
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_CLOAK = { 47898, 47899, },
INVTYPE_CHEST = { 44509, 60692 },
INVTYPE_FEET = { 44508 },
INVTYPE_HAND = { 44592 },
INVTYPE_HEAD = { 59960, 59970 },
INVTYPE_LEGS = { 55631, 55634 },
INVTYPE_WEAPONMAINHAND = { 60714, 44510 },
INVTYPE_WEAPONOFFHAND = { 60714, 44510 },
INVTYPE_WEAPON = { 60714, 44510 },
INVTYPE_2HWEAPON = { 62948 },
INVTYPE_SHOULDER = { 59936, 59928, 59937, 59927 },
INVTYPE_WRIST = { 60767 }
},
Gems =
{
Red = {},
Red = { 24029, 32195 },
Yellow = {},
Blue = {},
Orange = {},
Purple = {},
Orange = { 24060, 32219 },
Purple = { 32836, 37503 },
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
Meta = { 25901, 25897 },
JewelCraft = {}
}
},
687,33 → 729,29
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_CLOAK = { 47898, 47899, },
INVTYPE_CHEST = { 44509, 60692 },
INVTYPE_FEET = { 44508 },
INVTYPE_HAND = { 44592 },
INVTYPE_HEAD = { 59960, 59970 },
INVTYPE_LEGS = { 55631, 55634 },
INVTYPE_WEAPONMAINHAND = { 60714, 44510 },
INVTYPE_WEAPONOFFHAND = { 60714, 44510 },
INVTYPE_WEAPON = { 60714, 44510 },
INVTYPE_2HWEAPON = { 62948 },
INVTYPE_SHOULDER = { 59936, 59928, 59937, 59927 },
INVTYPE_WRIST = { 60767 }
},
Gems =
{
Red = {},
Red = { 24029, 32195 },
Yellow = {},
Blue = {},
Orange = {},
Purple = {},
Orange = { 24060, 32219 },
Purple = { 32836, 37503 },
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
Meta = { 25901, 25897 },
JewelCraft = {}
}
},
725,21 → 763,18
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_CLOAK = { 47898, 55642 },
INVTYPE_CHEST = { 44509, 60692 },
INVTYPE_FEET = { 60623, 44584, 44508 },
INVTYPE_HAND = { 44592, 44488 },
INVTYPE_HEAD = { 59970 },
INVTYPE_LEGS = { 55634, 55631 },
INVTYPE_WEAPONMAINHAND = { 60714 },
INVTYPE_WEAPONOFFHAND = { 60714 },
INVTYPE_WEAPON = { 60714 },
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_SHOULDER = { 59937, 59927 },
INVTYPE_WRIST = { 60767 }
},
Gems =
{
751,7 → 786,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
763,21 → 797,17
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_CLOAK = { 60663, 47898 },
INVTYPE_CHEST = { 60692 },
INVTYPE_FEET = { 60623, 44589, 60763 },
INVTYPE_HAND = { 44488, 44529, 60668 },
INVTYPE_HEAD = { 59954 },
INVTYPE_LEGS = { 60582 },
INVTYPE_WEAPONMAINHAND = { 55836, 27984, 44633, 60707, 59619, 59621 },
INVTYPE_WEAPONOFFHAND = { 55836, 27984, 44633, 60707, 59619, 59621 },
INVTYPE_WEAPON = { 55836, 27984, 44633, 60707, 59619, 59621 },
INVTYPE_SHOULDER = { 59934, 59929 },
INVTYPE_WRIST = { 44575 }
},
Gems =
{
789,7 → 819,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
801,21 → 830,17
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_CLOAK = { 60663, 47898 },
INVTYPE_CHEST = { 60692 },
INVTYPE_FEET = { 60623, 44589, 60763 },
INVTYPE_HAND = { 44488, 44529, 60668 },
INVTYPE_HEAD = { 59954 },
INVTYPE_LEGS = { 60582 },
INVTYPE_WEAPONMAINHAND = { 55836, 27984, 44633, 60707, 59619, 59621 },
INVTYPE_WEAPONOFFHAND = { 55836, 27984, 44633, 60707, 59619, 59621 },
INVTYPE_WEAPON = { 55836, 27984, 44633, 60707, 59619, 59621 },
INVTYPE_SHOULDER = { 59934, 59929 },
INVTYPE_WRIST = { 44575 }
},
Gems =
{
827,7 → 852,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
839,21 → 863,17
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_CLOAK = { 60663, 47898 },
INVTYPE_CHEST = { 60692 },
INVTYPE_FEET = { 60623, 44589, 60763 },
INVTYPE_HAND = { 44488, 44529, 60668 },
INVTYPE_HEAD = { 59954 },
INVTYPE_LEGS = { 60582 },
INVTYPE_WEAPONMAINHAND = { 55836, 27984, 44633, 60707, 59619, 59621 },
INVTYPE_WEAPONOFFHAND = { 55836, 27984, 44633, 60707, 59619, 59621 },
INVTYPE_WEAPON = { 55836, 27984, 44633, 60707, 59619, 59621 },
INVTYPE_SHOULDER = { 59934, 59929 },
INVTYPE_WRIST = { 44575 }
},
Gems =
{
865,7 → 885,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
877,21 → 896,19
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_CLOAK = { 47898 },
INVTYPE_CHEST = { 60692, 27958 },
INVTYPE_FEET = { 60623 },
INVTYPE_HAND = { 44592, 44488 },
INVTYPE_HEAD = { 59970 },
INVTYPE_LEGS = { 55634 },
INVTYPE_WEAPONMAINHAND = { 60714 },
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_WEAPON = { 60714 },
INVTYPE_SHIELD = { 60653 },
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_SHOULDER = { 59937, 59927 },
INVTYPE_WRIST = { 60767 }
},
Gems =
{
903,7 → 920,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
915,21 → 931,19
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_CLOAK = { 60663, 47898 },
INVTYPE_CHEST = { 60692 },
INVTYPE_FEET = { 60623, 44589, 60763 },
INVTYPE_HAND = { 44592, 44488, 44529 },
INVTYPE_HEAD = { 59954, 59970 },
INVTYPE_LEGS = { 60582, 55634 },
INVTYPE_WEAPONMAINHAND = { 60714, 59621 },
INVTYPE_WEAPONOFFHAND = { 60714, 59621 },
INVTYPE_WEAPON = { 60714, 59621 },
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_SHOULDER = { 59934, 59929 },
INVTYPE_WRIST = { 44575, 60767 }
},
Gems =
{
941,7 → 955,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
953,21 → 966,19
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_CLOAK = { 47898 },
INVTYPE_CHEST = { 60692, 44509, 27958 },
INVTYPE_FEET = { 44584 },
INVTYPE_HAND = { 44592 },
INVTYPE_HEAD = { 59960, 59970 },
INVTYPE_LEGS = { 55634 },
INVTYPE_WEAPONMAINHAND = { 60714 },
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_WEAPON = { 60714 },
INVTYPE_SHIELD = { 60653 },
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_SHOULDER = { 59936, 44130, 59937, 59927 },
INVTYPE_WRIST = { 60767 }
},
Gems =
{
979,7 → 990,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
991,21 → 1001,18
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_CLOAK = { 47898 },
INVTYPE_CHEST = { 47900, 60692 },
INVTYPE_FEET = { 44508, 60623 },
INVTYPE_HAND = { 44592, 44488 },
INVTYPE_HEAD = { 59970 },
INVTYPE_LEGS = { 55631, 55634 },
INVTYPE_WEAPONMAINHAND = { 60714, 44510 },
INVTYPE_WEAPONOFFHAND = { 60714, 44510 },
INVTYPE_WEAPON = { 60714, 44510 },
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_SHOULDER = { 59937, 59927 },
INVTYPE_WRIST = { 60767 }
},
Gems =
{
1017,7 → 1024,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
1029,21 → 1035,18
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_CLOAK = { 47898 },
INVTYPE_CHEST = { 47900, 60692 },
INVTYPE_FEET = { 44508, 60623 },
INVTYPE_HAND = { 44592, 44488 },
INVTYPE_HEAD = { 59970 },
INVTYPE_LEGS = { 55631, 55634 },
INVTYPE_WEAPONMAINHAND = { 60714, 44510 },
INVTYPE_WEAPONOFFHAND = { 60714, 44510 },
INVTYPE_WEAPON = { 60714, 44510 },
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_SHOULDER = { 59937, 59927 },
INVTYPE_WRIST = { 60767 }
},
Gems =
{
1055,7 → 1058,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
1067,21 → 1069,18
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_CLOAK = { 47898 },
INVTYPE_CHEST = { 47900, 60692 },
INVTYPE_FEET = { 44508, 60623 },
INVTYPE_HAND = { 44592, 44488 },
INVTYPE_HEAD = { 59970 },
INVTYPE_LEGS = { 55631, 55634 },
INVTYPE_WEAPONMAINHAND = { 60714, 44510 },
INVTYPE_WEAPONOFFHAND = { 60714, 44510 },
INVTYPE_WEAPON = { 60714, 44510 },
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_SHOULDER = { 59937, 59927 },
INVTYPE_WRIST = { 60767 }
},
Gems =
{
1093,7 → 1092,6
Green = {},
Prismatic = {},
Meta = {},
RedYellowBlue = {},
JewelCraft = {}
}
},
1105,33 → 1103,31
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_CLOAK = { 60663, 47898 },
INVTYPE_CHEST = { 60692 },
INVTYPE_FEET = { 60623, 44589, 60763 },
INVTYPE_HAND = { 44488, 44529, 60668 },
INVTYPE_HEAD = { 59954 },
INVTYPE_LEGS = { 60582 },
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_2HWEAPON = { 60691, 59621},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_SHOULDER = { 59934, 59929 },
INVTYPE_WRIST = { 44575 }
},
Gems =
{
Red = {},
Yellow = {},
Red = { 39996, 40003, },
Yellow = { 40014, 40013 },
Blue = {},
Orange = {},
Purple = {},
Green = {},
Orange = { 40058, 40038, 40037 },
Purple = { 40022 },
Green = { 40086, 40088 },
Prismatic = {},
Meta = {},
RedYellowBlue = {},
Meta = { 41398, 41285 },
JewelCraft = {}
}
},
1143,33 → 1139,31
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_CLOAK = { 60663, 47898 },
INVTYPE_CHEST = { 60692 },
INVTYPE_FEET = { 60623, 44589, 60763 },
INVTYPE_HAND = { 44488, 44529, 60668 },
INVTYPE_HEAD = { 59954 },
INVTYPE_LEGS = { 60582 },
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_2HWEAPON = { 60691, 59621 },
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_SHOULDER = { 59934, 59929 },
INVTYPE_WRIST = { 44575 }
},
Gems =
{
Red = {},
Yellow = {},
Red = { 39996, 40003, },
Yellow = { 40014, 40013 },
Blue = {},
Orange = {},
Purple = {},
Green = {},
Orange = { 40058, 40038, 40037 },
Purple = { 40022 },
Green = { 40086, 40088 },
Prismatic = {},
Meta = {},
RedYellowBlue = {},
Meta = { 41398, 41285 },
JewelCraft = {}
}
},
1181,33 → 1175,28
Enchants =
{
INVTYPE_WAIST = { 55655 },
INVTYPE_CLOAK = {},
INVTYPE_CHEST = {},
INVTYPE_FEET = {},
INVTYPE_HAND = {},
INVTYPE_HEAD = {},
INVTYPE_LEGS = {},
INVTYPE_WEAPONMAINHAND = {},
INVTYPE_RANGED = {},
INVTYPE_WEAPONOFFHAND = {},
INVTYPE_WEAPON = {},
INVTYPE_SHIELD = {},
INVTYPE_2HWEAPON = {},
INVTYPE_RANGEDRIGHT = {},
INVTYPE_SHOULDER = {},
INVTYPE_WRIST = {}
INVTYPE_CLOAK = { 44591, 60663 },
INVTYPE_CHEST = { 47766, 47900, 60692 },
INVTYPE_FEET = { 44528, 60623, 44589, 60763 },
INVTYPE_HAND = { 44625, 44488, 60668 },
INVTYPE_HEAD = { 59955 },
INVTYPE_LEGS = { 60581 },
INVTYPE_WEAPONMAINHAND = { 27984, 60707, 59619, 44576, 64441, 64579 },
INVTYPE_WEAPON = { 27984, 60707, 59619, 44576, 64441, 64579 },
INVTYPE_SHIELD = { 62201, 34009, 27946, 44489 },
INVTYPE_SHOULDER = { 59941, 59932 },
INVTYPE_WRIST = { 62256 }
},
Gems =
{
Red = {},
Yellow = {},
Blue = {},
Orange = {},
Purple = {},
Green = {},
Red = { 40001, 39996, 40003 },
Yellow = { 40015, 40014 },
Blue = { 37430, },
Orange = { 40057, 40058 },
Purple = { 40031, 40034 },
Green = { 40089, 40088 },
Prismatic = {},
Meta = {},
RedYellowBlue = {},
Meta = { 41380, 41377 },
JewelCraft = {}
}
}
1216,9 → 1205,9
DirtyGear.LibQTip = LibStub("LibQTip-1.0")
 
function DirtyGear.GetDBIndex()
if UnitLevel("player") < 60 then
return "default"
end
--if DirtyGear.Player.Level < 60 then
-- return "default"
--end
local j = 0
local points = {}
for i = 1, 3 do
1231,21 → 1220,18
if points[j] == 0 then
return "default"
end
local class = UnitClass("player")
local spec = GetTalentTabInfo(j)
if class == "Druid" and GetSpellInfo(GetSpellInfo(16931)) then
return class.."-"..spec.."-Tank"
elseif class == "Death Knight" and GetSpellInfo(GetSpellInfo(55129)) then
return class.."-"..spec.."-Tank"
if DirtyGear.Player.Class == "Druid" and GetSpellInfo(GetSpellInfo(16931)) then
return DirtyGear.Player.Class.."-"..spec.."-Tank"
elseif DirtyGear.Player.Class == "Death Knight" and GetSpellInfo(GetSpellInfo(55129)) then
return DirtyGear.Player.Class.."-"..spec.."-Tank"
end
return class.."-"..spec
return DirtyGear.Player.Class.."-"..spec
end
 
function DirtyGear.Print(msg)
if DEFAULT_CHAT_FRAME then
DEFAULT_CHAT_FRAME:AddMessage("|cFF00FF00[DirtyGear]|r "..msg, 1, 1, 1)
else
print(msg)
end
end
 
1267,7 → 1253,6
Green = false,
Prismatic = false,
Meta = false,
RedYellowBlue = false,
JewelCraft = false
}
if not DirtyGear.Tip then
1292,17 → 1277,14
if color == "Red" or color == "Prismatic" then
colors.Orange = true
colors.Purple = true
colors.RedYellowBlue = true
end
if color == "Blue" or color == "Prismatic" then
colors.Purple = true
colors.Green = true
colors.RedYellowBlue = true
end
if color == "Yellow" or color == "Prismatic" then
colors.Orange = true
colors.Green = true
colors.RedYellowBlue = true
end
colors.JewelCraft = GetSpellInfo(GetSpellInfo(28897))
colors[color] = true
1310,7 → 1292,6
total = total + 1
end
end
DirtyGear.Tip:ClearLines()
DirtyGear.Tip:Hide()
DirtyGear.Tip = nil
end
1322,13 → 1303,15
local _, igtLink = GameTooltip:GetItem()
local _, iLink, _, _, _, iType, iSubType, _, iEquipLoc = GetItemInfo(igtLink)
DirtyGear.EquipmentTip = DirtyGear.LibQTip:Acquire("DirtyGearEquipmentTip", 3, "LEFT", "CENTER", "RIGHT")
DirtyGear.EquipmentTip:SetFrameStrata("TOOLTIP")
DirtyGear.EquipmentTip:EnableMouse(true)
--[[
-- Enchants
--]]
DirtyGear.Enchantable.INVTYPE_FINGER = GetSpellInfo(GetSpellInfo(28029))
DirtyGear.Enchantable.INVTYPE_RANGEDRIGHT = iType ~= "Wands" and iType ~= "Thrown"
if DirtyGear.Enchantable[iEquipLoc] and iLink:match("item:%d+:0") then
DirtyGear.EquipmentTip:AddHeader("Missing Enchant")
DirtyGear.EquipmentTip:AddHeader("|cffab82ffMissing Enchant!|r")
end
local DirtyGearDB = DirtyGear.DB[DirtyGear.DBIndex]
if DirtyGear.Enchantable[iEquipLoc] and DirtyGearDB.Enchants and DirtyGearDB.Enchants[iEquipLoc] then
1343,7 → 1326,7
--[[
-- Gems
--]]
if UnitLevel("player") >= 70 then
if DirtyGear.Player.Level >= 70 then
DirtyGear.ExtraSocket.INVTYPE_WAIST = true
end
if GetSpellInfo(GetSpellInfo(29844)) then
1357,11 → 1340,11
if DirtyGear.ExtraSocket[iEquipLoc] then
iSocketsRawColors.Prismatic = true
if iSocketsRawNum == iSocketsNum then
DirtyGear.EquipmentTip:AddLine("Missing Extra Socket")
DirtyGear.EquipmentTip:AddLine("|cffab82ffMissing Extra Socket!|r")
end
end
if iSocketsRawNum > 0 and iSocketsFilled < iSocketsNum then
DirtyGear.EquipmentTip:AddLine("Empty Socket")
DirtyGear.EquipmentTip:AddLine("|cffab82ffEmpty Socket!|r")
end
if iSocketsRawNum > 0 then
DirtyGear.EquipmentTip:AddHeader("Available Gems")
1376,8 → 1359,19
end
end
end
if DirtyGear.EquipmentTip:GetNumChildren() > 1 then
DirtyGear.EquipmentTip:SmartAnchorTo(GameTooltip)
if DirtyGear.EquipmentTip:GetLineCount() > 1 then
if not DirtyGear.EquipmentTipButton then
DirtyGear.EquipmentTipButton = CreateFrame("Button", "DirtyGearEquipmentTipButton", DirtyGear.EquipmentTip, "UIPanelCloseButton")
DirtyGear.EquipmentTipButton:SetFrameStrata("TOOLTIP")
DirtyGear.EquipmentTipButton:SetPoint("TOPRIGHT", DirtyGear.EquipmentTip, "TOPRIGHT")
DirtyGear.EquipmentTipButton:SetScript("OnClick", function()
DirtyGear.LibQTip:Release(DirtyGear.EquipmentTipButton)
DirtyGear.EquipmentTipButton = nil
DirtyGear.LibQTip:Release(DirtyGear.EquipmentTip)
DirtyGear.EquipmentTip = nil
end)
end
DirtyGear.EquipmentTip:SmartAnchorTo(DirtyGear.MainFrame)
DirtyGear.EquipmentTip:Show()
end
end
1385,23 → 1379,29
 
function DirtyGear.GameTooltip_OnTooltipSetItem(self, ...)
local _, iLink = GameTooltip:GetItem()
-- we'll have to cache it until a fix can be found
DirtyGear.CacheDBIndex()
if DirtyGear.DBIndex ~= "default" and iLink and IsEquippableItem(iLink) and IsEquippedItem(iLink) then
--if DirtyGear.Player.Level >= 60 and DirtyGear.DBIndex == "default" then
if DirtyGear.DBIndex == "default" then
DirtyGear.CacheDBIndex()
end
if IsShiftKeyDown() and DirtyGear.DBIndex ~= "default" and iLink and IsEquippableItem(iLink) and IsEquippedItem(iLink) then
DirtyGear.Equipment(self, ...)
end
GameTooltip:Show()
--GameTooltip:Show()
if DirtyGear.GameTooltip_OnTooltipSetItem_Orig then
return DirtyGear.GameTooltip_OnTooltipSetItem_Orig(self, ...)
end
end
 
function DirtyGear.GameTooltip_OnTooltipCleared(self, ...)
if DirtyGear.EquipmentTip then
if IsShiftKeyDown() and DirtyGear.EquipmentTipButton then
DirtyGear.LibQTip:Release(DirtyGear.EquipmentTipButton)
DirtyGear.EquipmentTipButton = nil
end
if IsShiftKeyDown() and DirtyGear.EquipmentTip then
DirtyGear.LibQTip:Release(DirtyGear.EquipmentTip)
DirtyGear.EquipmentTip = nil
end
GameTooltip:Hide()
--GameTooltip:Hide()
if DirtyGear.GameTooltip_OnTooltipCleared_Orig then
return DirtyGear.GameTooltip_OnTooltipCleared_Orig(self, ...)
end
1432,10 → 1432,80
DirtyGear.CacheDBIndex()
end
 
function DirtyGear.UpdatePosition()
local _, _, _, pX, pY = DirtyGear.MainFrame:GetPoint()
DirtyGear.PerPlayer.Position = { pX, pY }
DirtyGear.UpdateSettings()
end
 
function DirtyGear.Skywall()
DirtyGear.MainFrame = CreateFrame("Frame", "DirtyGearMainFrame", UIParent, "GametooltipTemplate")
if DirtyGear.Player.New then
DirtyGear.MainFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
else
DirtyGear.MainFrame:SetPoint("CENTER", UIParent, "CENTER", DirtyGear.PerPlayer.Position[1], DirtyGear.PerPlayer.Position[2])
end
DirtyGear.MainFrame:SetWidth(110)
DirtyGear.MainFrame:SetHeight(30)
 
DirtyGear.MainFrameButton = CreateFrame("BUTTON", "DirtyGearTestFrameButton", DirtyGear.MainFrame, "UIPanelCloseButton")
DirtyGear.MainFrameButton:SetPoint("TOPLEFT", DirtyGear.MainFrame, "TOPLEFT")
DirtyGear.MainFrameButton:SetAlpha(1)
DirtyGear.MainFrameButton:SetScript("OnClick", function()
DirtyGear.SlashHandler("lock")
end)
 
DirtyGear.MainFrameText = DirtyGear.MainFrame:CreateFontString("DirtyGearMainFrameText", "OVERLAY")
DirtyGear.MainFrameText:SetFontObject(GameFontNormalSmall)
DirtyGear.MainFrameText:SetJustifyH("CENTER")
DirtyGear.MainFrameText:SetPoint("LEFT", DirtyGear.MainFrameButton, "RIGHT")
DirtyGear.MainFrameText:SetText("Close Anchor")
 
DirtyGear.MainFrame:SetMovable(true)
DirtyGear.MainFrame:EnableMouse(true)
DirtyGear.MainFrame:SetScript("OnMouseDown", function()
if not DirtyGear.PerPlayer.Locked and DirtyGear.MainFrame:IsMovable() then
DirtyGear.MainFrame:StartMoving()
end
end)
DirtyGear.MainFrame:SetScript("OnMouseUp", function()
if not DirtyGear.PerPlayer.Locked and DirtyGear.MainFrame:IsMovable() then
DirtyGear.MainFrame:StopMovingOrSizing()
end
DirtyGear.UpdatePosition()
end)
DirtyGear.MainFrame:SetScript("OnDragStop", function()
if not DirtyGear.PerPlayer.Locked and DirtyGear.MainFrame:IsMovable() then
DirtyGear.MainFrame:StopMovingOrSizing()
end
DirtyGear.UpdatePosition()
end)
end
 
function DirtyGear.OnVariablesLoaded()
--DirtyGear.Print("OnEvent:VARIABLES_LOADED")
if not DirtyGearGlobal then
DirtyGearGlobal = DirtyGear.Global
end
if not DirtyGearPerPlayer then
DirtyGearPerPlayer = DirtyGear.PerPlayer
end
DirtyGear.Global = DirtyGearGlobal
DirtyGear.PerPlayer = DirtyGearPerPlayer
if not DirtyGear.PerPlayer.Locked then
DirtyGear.MainFrameButton:Show()
DirtyGear.MainFrame:Show()
end
DirtyGear.CacheDBIndex()
end
 
function DirtyGear.OnAddOnLoaded()
--DirtyGear.Print("OnEvent:ADDON_LOADED")
DirtyGear.CacheDBIndex()
SlashCmdList["DIRTYGEAR"] = DirtyGear.SlashHandler
SLASH_DIRTYGEAR1 = "/dirtygear"
DirtyGear.Hookers()
DirtyGear.Skywall()
DirtyGear.Print("DirtyGear Loaded. Type /dirtygear for more information.")
end
 
function DirtyGear.OnEvent()
1443,13 → 1513,48
DirtyGear.OnPlayerLevelUp()
elseif event == "ACTIVE_TALENT_GROUP_CHANGED" then
DirtyGear.OnActiveTalentGroupChanged()
elseif event == "VARIABLES_LOADED" then
DirtyGear.OnVariablesLoaded()
elseif event == "ADDON_LOADED" and arg1 == "DirtyGear" then
DirtyGear.OnAddOnLoaded()
end
end
 
function DirtyGear.UpdateSettings()
DirtyGearGlobal = DirtyGear.Global
DirtyGearPerPlayer = DirtyGear.PerPlayer
end
 
function DirtyGear.SlashHandler(cmd)
cmd = strlower(cmd)
if cmd == "version" or cmd == "v" then
DirtyGear.Print("Version: "..DirtyGear.Version)
elseif cmd == "lock" then
DirtyGear.Print("lock")
DirtyGear.PerPlayer.Locked = true
DirtyGear.UpdatePosition()
DirtyGear.MainFrameButton:Hide()
DirtyGear.MainFrame:Hide()
elseif cmd == "unlock" then
DirtyGear.Print("unlock")
DirtyGear.PerPlayer.Locked = false
DirtyGear.UpdatePosition()
DirtyGear.MainFrameButton:Show()
DirtyGear.MainFrame:Show()
elseif cmd == "help" then
DirtyGear.Print("Hold down Shift and hover over an item in your Character Info tab.")
else
DirtyGear.Print("DirtyGear v"..DirtyGear.Version)
DirtyGear.Print("Syntax: |cffffff7f/dirtygear <command> <args>|r")
DirtyGear.Print(" [v|version] - Shows addon version.")
DirtyGear.Print(" [lock|unlock] - Locks/unlocks addon position.")
DirtyGear.Print(" [help] - Shows addon help.")
end
end
 
DirtyGear.Frame = DirtyGear.LibQTip:Acquire("DirtyGearFrame")
DirtyGear.Frame:RegisterEvent("PLAYER_LEVEL_UP")
DirtyGear.Frame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
DirtyGear.Frame:RegisterEvent("VARIABLES_LOADED")
DirtyGear.Frame:RegisterEvent("ADDON_LOADED")
DirtyGear.Frame:SetScript("OnEvent", DirtyGear.OnEvent)
\ No newline at end of file