• 0

    posted a message on Recount
    Quote from Farmbuyer
    As an example, I like linking this:

    http://forums.wowace.com/showthread.php?p=214892#post214892


    I consider option A the correct definition.
    Posted in: General AddOns
  • 0

    posted a message on Inline Aura - display aura information inside action buttons
    Quote from Nathanyel
    Uhm, Flame Shock is a DoT, it should display that DoT and nothing else. Unleash Elements itself should be used to display Unleash Flame.
    Thought this was already a default, but I probably added it myself - I could probably crosscheck my SavedVar with the current Defaults, posting results in the next days, raid now.


    Flame Shock stopped having a DoT countdown since this change.

    Is there a way to assign 2 different settings to the same spell?
    For example have the Searing Totem icon show a colored border when that totem is active, but have it dimmed if there's a Fire Elemental Totem active.
    Posted in: General AddOns
  • 0

    posted a message on Recount
    It appears in SPELL_MISSED events as well.

    SWING_MISSED false 0xF130005E0019A814 NPC 68168 0 0x0480000002222222 Player 1297 0 ABSORB nil 2
    SPELL_MISSED false 0xF13001DA0019A683 NPC 68168 0 0x0480000002222222 Player 1297 0 13322 Frostbolt 16 ABSORB nil 12
    Posted in: General AddOns
  • 0

    posted a message on Getting Variables from SpellDescription
    Try the following:
    local gsub = string.gsub;
    local GetSpellVarsTooltip = CreateFrame("GameTooltip", "GetSpellVarsTooltip", UIParent, "GameTooltipTemplate");
    local switchCaseTable = {
        [589] = function(spellDescription, pattern)        -- Shadow Word: Pain
                pattern = gsub(gsub(pattern, "%$o1", "(.+)"), "%$d", "(.+)")
                local _, _, totalDmg, tickTime = string.find(spellDescription, pattern)
                return pattern, totalDmg, tickTime
        end,
        [2944] = function(spellDescription, pattern)        -- Devouring Plague
                pattern = gsub(gsub(gsub(pattern, "%$o1", "(.+)"), "%$d", "(.+)"), "%%", "%%%%")
                local _, _, totalDmg, tickTime = string.find(spellDescription, pattern)
                return pattern, totalDmg, tickTime
        end,
        [34914] = function(spellDescription, pattern)        -- Vampiric Touch
                pattern = gsub(gsub(gsub(pattern, "%$34914o2", "(.+)"), "%$d", "(.+)"), "%%", "%%%%")
                local _, _, totalDmg, tickTime = string.find(spellDescription, pattern)
                return pattern, totalDmg, tickTime
        end,
    }
    function GetSpellVars(spellId)
        GetSpellVarsTooltip:SetOwner(UIParent, "ANCHOR_NONE")
        GetSpellVarsTooltip:SetSpellByID(spellId);
        local spellDescription = GetSpellVarsTooltipTextLeft4:GetText();
        local pattern, totalDmg, tickTime
        
        if (switchCaseTable[spellId]) then
            local spellDescriptionPattern = GetSpellDescription(spellId)
            pattern, totalDmg, tickTime = switchCaseTable[spellId](spellDescription, spellDescriptionPattern)    
    
            print("Search in Text: "..spellDescription)
            print("With Pattern: "..pattern)
            print("Returns Matches: ")
            print(totalDmg)
            print(tickTime)
        end
    end
    
    Posted in: Lua Code Discussion
  • 0

    posted a message on PitBull 4.0
    Quote from Shark5060
    Well I have finally found a fix for the Worgen Male 3D Picture issue.
    okay, to be fair - I have "stolen" most of the code from the X-Perl Addon, to be exact from PlayerLin, who had fixed it there.

    Pitbull4_Portrait/Portrait.lua - Line 111++ (just add the new funtion and replace the old one)


    Actually, the issue is with the models themselves, not the NPCs that use them.
    The way I fixed it ensures it for all NPCs (and characters) that use those models.

    local PORTRAIT_EXCEPTIONS = {
    	["character\\worgen\\male\\worgenmale.m2"] = 1,
    	["character\\felorc\\male\\felorcmale.m2"] = 1,
    	["creature\\woolyrhino\\woolyrhino.m2"] = 1,
    	["creature\\woolyrhino\\woolyrhinomount.m2"] = 1,
    	["creature\\northrendbearmount\\northrendbearmountarmored.m2"] = 1,
    	["creature\\dragonman\\dragonman.m2"] = 1,
    	["creature\\dragonman\\dragonman_var1.m2"] = 1,
    	["creature\\facelessone\\facelessone.m2"] = 1,
    	["creature\\facelessonecaster\\facelessonecaster.m2"] = 1,
    	["creature\\facelessoneaquatic\\facelessoneaquatic.m2"] = 1,
    	["creature\\pygmy\\pygmybase.m2"] = 1,
    	["creature\\pygmy\\pygmyhunter.m2"] = 1,
    	["creature\\pygmy\\pygmyroadie.m2"] = 1,
    	["creature\\pygmy\\pygmyshaman.m2"] = 1,
    	["creature\\pygmy\\pygmywarrior.m2"] = 1,
    	["creature\\pygmy\\sandpygmy.m2"] = 1,
    	["creature\\felbat\\felbat.m2"] = 1,
    	["creature\\gnoll\\gnoll.m2"] = 1,
    	["creature\\malygos\\malygos.m2"] = 1,
    	["creature\\dragonhawk\\dragonhawkmount.m2"] = 1,
    	["creature\\undeaddrake\\northrendundeaddrake.m2"] = 1,
    	["creature\\netherdrake\\northrendnetherdrake.m2"] = 1,
    	["creature\\shaman_thrall\\shaman_thrall.m2"] = 1,
    	["creature\\bloodqueen\\bloodqueen.m2"] = 1,
    	["creature\\ragnaros2\\ragnaros2.m2"] = 1,
    }
    
    local function model_OnUpdate(self, elapsed)
    	local frame = self:GetParent()
    	local style = frame.Portrait.style
    	local full_body = PitBull4_Portrait:GetLayoutDB(frame).full_body
    
    	if style == "pirate" then
    		self:SetUnit(frame.unit)
    		self:Undress()
    		self:TryOn(9636)
    		self:TryOn(6795)
    		self:TryOn(6835)
    		self:TryOn(6836)
    		self:TryOn(2955)
    		self:TryOn(3935)
    		local model = self:GetModel()
    		if not full_body then
    			if model and PORTRAIT_EXCEPTIONS[model] then
    				self:SetCamera(1)
    			else
    				self:SetCamera(0)
    			end
    		else
    			if model and PORTRAIT_EXCEPTIONS[model] then
    				self:SetCamera(0)
    			end
    		end
    	elseif style == "three_dimensional" then
    		if not frame.Portrait.falling_back then
    			self:SetUnit(frame.unit)
    			local model = self:GetModel()
    			if not full_body then
    				if model and PORTRAIT_EXCEPTIONS[model] then
    					self:SetCamera(1)
    				else
    					self:SetCamera(0)
    				end
    			else
    				if model and PORTRAIT_EXCEPTIONS[model] then
    					self:SetCamera(0)
    				end
    			end
    		else
    			self:SetModelScale(4.25)
    			self:SetPosition(0, 0, -1.5)
    			self:SetModel([[Interface\Buttons\talktomequestionmark.mdx]])
    		end
    
    		-- work around a Blizzard bug that causes model frames not to
    		-- adjust their alpha realtive to their parent frames alpha after
    		-- the model is updated. So we nudge the alpha down a bit and
    		-- then back up to get it to update.
    		self:SetAlpha(0.9999999)
    		self:SetAlpha(1)
    	end
    
    	if type(self:GetModel()) == "string" then
    		-- the portrait was set properly, we can stop trying to set the portrait
    		self:SetScript("OnUpdate", nil)
    	end
    end
    
    Posted in: Unit Frames
  • To post a comment, please or register a new account.