Skillet

236 - Suggestion: Show the chance to get a skillpoint for that receipt.

Hey,
as already sent you in a pm,i found the algorithm, which calculates the chance to get a profession skill point, on wow head (http://www.wowhead.com/spell=83949#comments)

It would be awesome to have it in skillet. I already added it by my self to the Rankframe by editing MainFrame.lua Many of my friends already using this hack and really like it as its the first addon which offers this stat. The numbers seems to fit very well so i guess the algorithm is right.

You can use my code if you want to as long as u give me credit for this :)

Row  2737 - MainFrame.lua (unfortunately BBC doesn't like my comments so i have to paste it as text)

function Skillet:getGuildPerk()
-- icy: calculate working overtime bonus
   local wot1 = 14
   local wot2 = 22
   
   local gLevel = GetGuildLevel()
   if (gLevel  < wot1 ) then
      return 0
   elseif ((gLevel >= wot1) and (gLevel < wot2)) then
      return 1.10
   else
      return 1.20
   end
end

function Skillet:getLvlUpChance()
-- icy: 03.03.2012:
--    according to pope (http://www.wowhead.com/spell=83949#comments)
--    % to level up with this receipt is calculated by: (greySkill - yourSkill) / (greySkill - yellowSkill
-- Lets add this information to skillet :)
    local currentLevelString, maxlevel = string.split(" ", self:GetSkillRanks(self.currentPlayer self.currentTrade or "0 0")
    local currentLevel = tonumber(currentLevelString)
    local gray = tonumber(SkilletRankFrame.subRanks.green:GetValue())
    local yellow = tonumber(SkilletRankFrame.subRanks.orange:GetValue())
    local chance
    local guildperk = Skillet:getGuildPerk()
    if (currentLevel > gray) then
        return 0
    end
    chance = ((gray - currentLevel) / ( gray - yellow ))
    chance = chance * guildperk
    chance = chance * 100
    return chance
end

-- Called when then mouse enters the rank status bar
function Skillet:RankFrame_OnEnter(button)

--    if button ~= SkilletRankFrame then
        GameTooltip:SetOwner(button, "ANCHOR_BOTTOMLEFT")
        local r,g,b = SkilletSkillName:GetTextColor()
        GameTooltip:AddLine(SkilletSkillName:GetText(),r,g,b)

        local gray = SkilletRankFrame.subRanks.green:GetValue()
        local green = SkilletRankFrame.subRanks.yellow:GetValue()
        local yellow = SkilletRankFrame.subRanks.orange:GetValue()
        local orange = SkilletRankFrame.subRanks.red:GetValue()
        
        -- lets add the chance to level up that skill with that receipt
        local chance = Skillet:getLvlUpChance()
        GameTooltip:AddLine(COLORORANGE..orange.."|r/"..COLORYELLOW..yellow.."|r/"..COLORGREEN..green.."|r/"..COLORGRAY..gray.."|r/ Chance:"..chance.."|r%")
        
        GameTooltip:Show()
--    end
end

cheers,
icy

User When Change
yossa Mar 20, 2013 at 11:25 UTC
ice0rl Mar 06, 2013 at 17:38 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

Facts

Last updated
Jun 30, 2013
Reported
Mar 06, 2013
Status
Accepted - Problem reproduced / Need acknowledged.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.
Votes
2

Reported by

Possible assignees