local Name = tonumber(string.sub(self:GetName(), 9))
local count = 0
GameTooltip:SetOwner(self, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine(GS_InstanceOrder[Name]);
--local StatString = GS_Data[GetRealmName()].Players[GS_DisplayPlayer].StatString
local StatString = GS_Data[GetRealmName()]["CurrentPlayer"]["EXP"]
if not StatString then return; end
local TempTable = {}
--for i,v in pairs(GS_AchInfo[GS_InstanceOrder[Name]]) do
-- local InsertionValue = { ["i"] = i, ["v"] = v }
-- table.insert(TempTable, InsertionValue )
--end
--table.sort(TempTable, function(a, b) return a["i"] < b["i"] end )
for i,v in pairs(GS_AchInfo[GS_InstanceOrder[Name]]) do
--if not (GS_BackString[i]) then print(i,v) end
count = tonumber(string.sub(StatString, GS_BackString[i],GS_BackString[i]))
if not count then count = 0; end
GameTooltip:AddDoubleLine(count.." kills ("..(count/0.05).."%)",v,1 - (count/5),0 + (count/5),0,1,1,1)
end
GameTooltip:AddLine(" ")
GameTooltip:AddLine("Remember, this player could be an alt and still know the fights.", 1, 1, 1, 1, true)
GameTooltip:AddLine("*Note: '5' means 5 or more kills")
GameTooltip:Show()
GameTooltip:Hide()
local id = tonumber(self:GetID()); local positive = ""
local red, green, blue = 0, 0, 0
GameTooltip:SetOwner(self, "ANCHOR_Right")
GameTooltip:ClearLines();
if not UnitName("target") then
GameTooltip:AddLine("This information is NOT ACCURATE unless ", 1,0,0);
GameTooltip:AddLine("you target the player while in inspection range.", 1, 0, 0);
GameTooltip:AddLine(" ")
end
GameTooltip:AddLine("Affecting Stats");
table.sort(GS_WeightsTips[id], function(a, b) return a[2] > b[2] end)
for i,v in pairs(GS_WeightsTips[id]) do
red, green, blue = 0,0,0; positive = ""
if ( v[2] ) then
if not ( v[2] > 0 ) then
red = 1
else
blue = 1
positive = "+"
end
GameTooltip:AddDoubleLine(v[1], positive..floor(v[2] * 100).."%", red, blue, green, red, blue, green)
end
end
if GS_MissingGemWeightsTips then
GameTooltip:AddDoubleLine(" "," ")
for a,b in ipairs(GS_MissingGemWeightsTips) do
GameTooltip:AddDoubleLine(b[1], b[2])
end
end
if GS_MissingEnchantWeightsTips then
for a,b in ipairs(GS_MissingEnchantWeightsTips) do
GameTooltip:AddDoubleLine(b[1], b[2])
end
end
GameTooltip:AddLine(" ")
if GS_SpecialWeightsTips[id] then
for a, b in ipairs(GS_SpecialWeightsTips[id]) do
for c, d in pairs(b) do
if a == 1 then GameTooltip:AddDoubleLine(c, d); else GameTooltip:AddDoubleLine(c, d, 1, 1, 1, 1, 1, 1, 1, 1); end
end
if a == 2 then
if GS_SpecialWeightsTips[id][1] == 140 then
GameTooltip:AddLine(" "); GameTooltip:AddLine("Possible Defense Modifiers:");
else
GameTooltip:AddLine(" "); GameTooltip:AddLine("Possible Hit Modifiers:")
end
end
end
GameTooltip:AddLine(" ")
end
GameTooltip:AddLine("These values only represent if the player's stats are valuable to this spec. Not if they are in the correct ratio or if a player is missing any stat.", 1, 1, 1, 1, true)
GameTooltip:Show()
GameTooltip:Hide()
tinsert(UISpecialFrames, this:GetName());
self:EnableMouse(true)
self:SetMovable(true)
GS_DisplayFrame:RegisterForDrag("LeftButton")
GS_DisplayFrame:SetScript("OnDragStart", function() GS_DisplayFrame:StartMoving() end)
GS_DisplayFrame:SetScript("OnDragStop", function() GS_DisplayFrame:StopMovingOrSizing() end)
if ( GS_DatabaseFrame.tooltip ) then GS_DatabaseFrame.tooltip:Hide(); end
self:ClearFocus()
GearScore_DisplayUnit(strupper(string.sub(GS_EditBox1:GetText(), 1, 1))..strlower(string.sub(GS_EditBox1:GetText(), 2)))
GS_ExPFrameUpdateCounter = ( GS_ExPFrameUpdateCounter or 0 ) + elapsed
if GS_ExPFrameUpdateCounter > 2 then
if UnitName("target") and GS_DisplayPlayer == ( UnitName("target") or " " ) then
NotifyInspect("target");
--ClearAchievementComparisonUnit(); --SetAchievementComparisonUnit("target")
GearScore_HideDatabase(); GearScoreClassScan(UnitName("target"))
--print("Updating")
end
GS_ExPFrameUpdateCounter = 0
end
self:Hide()
self:ClearFocus()
--InspectPVPFrame:SetParent(GS_PVPFrame)
--InspectPVPFrame:SetPoint("TOPLEFT", 0)
--if ( UnitName("target") ) then if ( CanInspect("target") ) then NotifyInspect("target"); InspectFrame:Show(); InspectPVPFrame:Show(); InspectFrame:SetAlpha(0); end; end
--InspectTalentFrame:SetParent(GS_TalentsFrame)
--InspectTalentFrame:SetPoint("TOPLEFT", 0)
--InspectFrame:SetAlpha(0)
--if ( UnitName("target") ) then if ( CanInspect("target") ) then NotifyInspect("target"); InspectFrame:Show(); InspectTalentFrame:Show(); InspectFrame:SetAlpha(0); end; end
self:Hide()
if UnitName("target") == ( GS_DisplayPlayer or " " ) then
SetAchievementComparisonUnit("target")
GearScore_HideDatabase()
end
self:Hide()
GameTooltip:SetOwner(GS_ShowPlayerCheck, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Show Player Tooltips",1,1,1);
GameTooltip:AddLine("Shows GearScore information in tooltips");
GameTooltip:AddLine("while mousing over players");
GameTooltip:Show()
GameTooltip:Hide()
GS_Light:SetChecked(Flase)
GS_None:SetChecked(Flase)
if not ( GS_Heavy:GetChecked() ) then GS_Heavy:SetChecked(true); end
GameTooltip:SetOwner(GS_Heavy, "ANCHOR_BottomRight")
GameTooltip:ClearLines();
GameTooltip:AddLine("Heavy Masterlooting Restrictions", 1, 1, 1)
GameTooltip:AddLine("Restricts Masterlooting information to")
GameTooltip:AddLine("only list classes intended to wear that")
GameTooltip:AddLine("particular armor class. Example: A")
GameTooltip:AddLine("warrior will be listed ONLY for plate")
GameTooltip:AddLine("gear, even though the warrior could")
GameTooltip:AddLine("wear cloth, leather, or mail.")
GameTooltip:Show()
GameTooltip:Hide()
GS_Light:SetChecked(Flase)
GS_Heavy:SetChecked(Flase)
if not ( GS_None:GetChecked() ) then GS_None:SetChecked(true); end
GameTooltip:SetOwner(GS_None, "ANCHOR_BottomRight")
GameTooltip:ClearLines();
GameTooltip:AddLine("No Masterlooting Restrictions",1,1,1);
GameTooltip:AddLine("Removes Masterlooting restrictions.")
GameTooltip:AddLine("For each armorclass every class that")
GameTooltip:AddLine("can equip that item will be listed.")
GameTooltip:AddLine("For Example: A paladin WILL be listed")
GameTooltip:AddLine("for cloth, leather, and mail in addition")
GameTooltip:AddLine("to plate armor.")
GameTooltip:Show()
GameTooltip:Hide()
GS_Heavy:SetChecked(Flase)
GS_None:SetChecked(Flase)
if not ( GS_Light:GetChecked() ) then GS_Light:SetChecked(true); end
GameTooltip:SetOwner(GS_Light, "ANCHOR_BottomRight")
GameTooltip:ClearLines();
GameTooltip:AddLine("Light Masterlooting Restrictions",1,1,1)
GameTooltip:AddLine("Removes Masterlooting restrictions for")
GameTooltip:AddLine("particular classes. Changes are: a")
GameTooltip:AddLine("Hunter will be listed for both leather")
GameTooltip:AddLine("and mail gear; a Druid will be listed")
GameTooltip:AddLine("for both leather and cloth; a Shaman")
GameTooltip:AddLine("will be listed for mail, leather and")
GameTooltip:AddLine("cloth; and a Paladin will be listed for")
GameTooltip:AddLine("plate, mail, leather, and cloth.")
GameTooltip:Show()
GameTooltip:Hide()
GameTooltip:SetOwner(GS_ShowItemCheck, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Show Item Tooltips",1,1,1)
GameTooltip:AddLine("Shows GearScore information in tooltips");
GameTooltip:AddLine("while mousing over items.");
GameTooltip:Show()
GameTooltip:Hide()
GameTooltip:SetOwner(GS_DetailCheck, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Show Item Levels",1,1,1)
GameTooltip:AddLine("Adds iLevel information to tooltips")
GameTooltip:AddLine("for both players and items.")
GameTooltip:Show()
GameTooltip:Hide()
GameTooltip:SetOwner(self, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Show "..self:GetText().." SpecScores",1,1,1)
GameTooltip:AddLine("Shows "..self:GetText().." SpecScores")
GameTooltip:AddLine("in item tooltips.")
GameTooltip:Show()
GameTooltip:Hide()
GameTooltip:SetOwner(self, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Show "..self:GetText().." SpecScores",1,1,1)
GameTooltip:AddLine("Shows "..self:GetText().." SpecScores")
GameTooltip:AddLine("in item tooltips.")
GameTooltip:Show()
GameTooltip:Hide()
GameTooltip:SetOwner(self, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Show "..self:GetText().." SpecScores",1,1,1)
GameTooltip:AddLine("Shows "..self:GetText().." SpecScores")
GameTooltip:AddLine("in item tooltips.")
GameTooltip:Show()
GameTooltip:Hide()
GameTooltip:SetOwner(self, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Show "..self:GetText().." SpecScores",1,1,1)
GameTooltip:AddLine("Shows "..self:GetText().." SpecScores")
GameTooltip:AddLine("in item tooltips.")
GameTooltip:Show()
GameTooltip:Hide()
GameTooltip:SetOwner(GS_DetailCheck, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Show Detail Item List",1,1,1)
GameTooltip:AddLine("Adds a list of each item and its")
GameTooltip:AddLine("GearScore a player has equiped to")
GameTooltip:AddLine("that player's tooltip.")
GameTooltip:Show()
GameTooltip:Hide()
GameTooltip:SetOwner(GS_ChatCheck, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Show GearScores in Chat",1,1,1)
GameTooltip:AddLine("Adds GearScores next to player names")
GameTooltip:AddLine("in your chat log. You can click")
GameTooltip:AddLine("these scores to open the GearScore")
GameTooltip:AddLine("profile for that player.")
GameTooltip:Show()
GameTooltip:Hide()
GS_LevelEditBox:SetAutoFocus(0); self:SetNumeric(true)
GS_LevelEditBox:ClearFocus()
GameTooltip:SetOwner(GS_PruneCheck, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Auto Prune Database",1,1,1);
GameTooltip:AddLine("Automatically removes outdated and");
GameTooltip:AddLine("low level entries from the database");
GameTooltip:AddLine("each time you log off.");
GameTooltip:Show()
GameTooltip:Hide()
GameTooltip:SetOwner(GS_FactionCheck, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Save Opposite Faction Data",1,1,1);
GameTooltip:AddLine("Stores information about players");
GameTooltip:AddLine("not in your faction in the database.");
GameTooltip:AddLine("Best for PVE Servers.");
GameTooltip:Show()
GameTooltip:Hide()
local EnglishFaction, Faction = UnitFactionGroup("player")
if ( EnglishFaction == "Horde" ) then GS_OppFactionText:SetText("Record Alliance Players"); end
if ( EnglishFaction == "Alliance" ) then GS_OppFactionText:SetText("Record Horde Players"); end
getglobal(this:GetName().."High"):SetText("30");
getglobal(this:GetName().."Low"):SetText("1");
this:SetMinMaxValues(1,30);
this:SetValueStep(1);
getglobal(this:GetName().."Text"):SetText("Keep data for: 30 days.")
getglobal(this:GetName().."Text"):SetText("Keep data for: "..GS_DatabaseAgeSlider:GetValue().." days.")
--if ( GS_Settings ) then GS_Settings["DatabaseAgeSlider"] = GS_DatabaseAgeSlider:GetValue(); end
GameTooltip:SetOwner(GS_MasterlootCheck, "ANCHOR_Right")
GameTooltip:ClearLines();
GameTooltip:AddLine("Masterloot Mode",1,1,1);
GameTooltip:AddLine("Activates Masterloot Mode. This mode");
GameTooltip:AddLine("shows how much of an upgrade an item");
GameTooltip:AddLine("would be to each member of your group.");
GameTooltip:Show()
GameTooltip:Hide()
/f
if ( GS_DatabaseFrame.tooltip ) then GS_DatabaseFrame.tooltip:Hide(); end
GearScore_DisplayDatabase(GS_DisplayedGroup, GS_SortedType, 1, (GS_StartPage - (25 * delta)))
--print(self, delta)
self:Hide()
tinsert(UISpecialFrames, this:GetName());
self:Hide()
self:EnableMouse(true)
self:SetMovable(true)
self:RegisterForDrag("LeftButton")
self:SetScript("OnDragStart", function() self:StartMoving(); end)
self:SetScript("OnDragStop", function() self:StopMovingOrSizing(); end)
this:SetOwner(GS_DatabaseFrame, "ANCHOR_BOTTOMLEFT");
if not ( GS_SBT ) then GS_SBT = ""; end
if ( self:GetText() ~= GS_SBT ) then
GS_SBT = self:GetText()
local currenttext = GS_SBT
GearScore_HideDatabase(); GearScore_DisplayDatabase("Search"); self:SetFocus(); self:SetText(currenttext); self:SetCursorPosition(self:GetNumLetters())
end
self:ClearFocus()
GearScore_HideDatabase(); GearScore_DisplayDatabase("Search")self:SetAutoFocus(0);
self:Hide()
getglobal(this:GetName().."High"):SetText("25");
getglobal(this:GetName().."Low"):SetText("1");
this:SetMinMaxValues(1,25);
this:SetValueStep(1);
getglobal(this:GetName().."Text"):SetText("Top: "..GS_Slider:GetValue())
if ( GS_Settings ) then GS_Settings["Slider"] = GS_Slider:GetValue(); end
self:ClearFocus()self:SetAutoFocus(0)
GSXSayCheck:SetChecked(nil); GSXPartyCheck:SetChecked(nil); GSXRaidCheck:SetChecked(nil); GSXGuildCheck:SetChecked(nil); GSXOfficerCheck:SetChecked(nil);
GSXWhisperCheck:SetChecked(1); GSXWhisperTargetCheck:SetChecked(nil); GSXChannelCheck:SetChecked(nil); GearScore_SendReport()
self:ClearFocus()self:SetAutoFocus(0)
GSXSayCheck:SetChecked(nil); GSXPartyCheck:SetChecked(nil); GSXRaidCheck:SetChecked(nil); GSXGuildCheck:SetChecked(nil); GSXOfficerCheck:SetChecked(nil);
GSXWhisperCheck:SetChecked(nil); GSXWhisperTargetCheck:SetChecked(nil); GSXChannelCheck:SetChecked(1); GearScore_SendReport()
if ( self:GetChecked() ) then
GSXSayCheck:SetChecked(1); GSXPartyCheck:SetChecked(nil); GSXRaidCheck:SetChecked(nil); GSXGuildCheck:SetChecked(nil); GSXOfficerCheck:SetChecked(nil);
GSXWhisperCheck:SetChecked(nil); GSXWhisperTargetCheck:SetChecked(nil); GSXChannelCheck:SetChecked(nil);
else
self:SetChecked(1)
end
if ( self:GetChecked() ) then
GSXSayCheck:SetChecked(nil); GSXPartyCheck:SetChecked(1); GSXRaidCheck:SetChecked(nil); GSXGuildCheck:SetChecked(nil); GSXOfficerCheck:SetChecked(nil);
GSXWhisperCheck:SetChecked(nil); GSXWhisperTargetCheck:SetChecked(nil); GSXChannelCheck:SetChecked(nil);
else
self:SetChecked(1)
end
if ( self:GetChecked() ) then
GSXSayCheck:SetChecked(nil); GSXPartyCheck:SetChecked(nil); GSXRaidCheck:SetChecked(1); GSXGuildCheck:SetChecked(nil); GSXOfficerCheck:SetChecked(nil);
GSXWhisperCheck:SetChecked(nil); GSXWhisperTargetCheck:SetChecked(nil); GSXChannelCheck:SetChecked(nil);
else
self:SetChecked(1)
end
if ( self:GetChecked() ) then
GSXSayCheck:SetChecked(nil); GSXPartyCheck:SetChecked(nil); GSXRaidCheck:SetChecked(nil); GSXGuildCheck:SetChecked(1); GSXOfficerCheck:SetChecked(nil);
GSXWhisperCheck:SetChecked(nil); GSXWhisperTargetCheck:SetChecked(nil); GSXChannelCheck:SetChecked(nil);
else
self:SetChecked(1)
end
if ( self:GetChecked() ) then
GSXSayCheck:SetChecked(nil); GSXPartyCheck:SetChecked(nil); GSXRaidCheck:SetChecked(nil); GSXGuildCheck:SetChecked(nil); GSXOfficerCheck:SetChecked(1);
GSXWhisperCheck:SetChecked(nil); GSXWhisperTargetCheck:SetChecked(nil); GSXChannelCheck:SetChecked(nil);
else
self:SetChecked(1)
end
if ( self:GetChecked() ) then
GSXSayCheck:SetChecked(nil); GSXPartyCheck:SetChecked(nil); GSXRaidCheck:SetChecked(nil); GSXGuildCheck:SetChecked(nil); GSXOfficerCheck:SetChecked(nil);
GSXWhisperCheck:SetChecked(nil); GSXWhisperTargetCheck:SetChecked(1); GSXChannelCheck:SetChecked(nil);
else
self:SetChecked(1)
end
if ( self:GetChecked() ) then
GSXSayCheck:SetChecked(nil); GSXPartyCheck:SetChecked(nil); GSXRaidCheck:SetChecked(nil); GSXGuildCheck:SetChecked(nil); GSXOfficerCheck:SetChecked(nil);
GSXWhisperCheck:SetChecked(1); GSXWhisperTargetCheck:SetChecked(nil); GSXChannelCheck:SetChecked(nil);
else
self:SetChecked(1)
end
if ( self:GetChecked() ) then
GSXSayCheck:SetChecked(nil); GSXPartyCheck:SetChecked(nil); GSXRaidCheck:SetChecked(nil); GSXGuildCheck:SetChecked(nil); GSXOfficerCheck:SetChecked(nil);
GSXWhisperCheck:SetChecked(nil); GSXWhisperTargetCheck:SetChecked(nil); GSXChannelCheck:SetChecked(1);
else
self:SetChecked(1)
end
self:Hide()
PanelTemplates_SetNumTabs(GS_DisplayFrame, 3)
PanelTemplates_SetTab(GS_DisplayFrame, 1)
PanelTemplates_SetNumTabs(GS_DatabaseFrame, 4)
PanelTemplates_SetTab(GS_DatabaseFrame, 1)