• 0

    posted a message on Two questions I could do with a little help with
    Thanks a lot for the explanation and your time. That's a lot to think about! I think you almost exploded my brain :o
    Posted in: Need Help?
  • 0

    posted a message on Two questions I could do with a little help with
    Names={
    --Mage:
    "Missile Barrage",
    "Fireball!",
    "Hot Streak",
    --Paladin:
    "The Art of War",
    --Warrior:
    "Slam!",
    "Sword and Board",
    --Warlock:
    "Backdraft",
    --Druid:
    "Predatory Strikes",
    "Eclipse (Lunar)",
    "Eclipse (Solar)",
    --Shaman:
    "Maelstrom Weapon",
    --Trinkets:
    "Icy Rage",
    
    
    }
    Icons={
    "Interface\\Icons\\Ability_Mage_MissileBarrage",
    "Interface\\Icons\\Ability_Mage_BrainFreeze",
    "Interface\\Icons\\Ability_Mage_HotStreak",
    "Interface\\Icons\\Ability_Paladin_ArtofWar",
    "Interface\\Icons\\Ability_Warrior_Bloodsurge",
    "Interface\\Icons\\Ability_Warrior_SwordandBoard",
    "Interface\\Icons\\Ability_Warlock_Backdraft",
    "Interface\\Icons\\Ability_Hunter_Pet_Cat",
    "Interface\\Icons\\Ability_Druid_Eclipse",
    "Interface\\Icons\\ability_druid_eclipseorange",
    "Interface\\Icons\\Spell_Shaman_MaelstromWeapon",
    "Interface\\Icons\\spell_frost_frostarmor",
    
    }
    
    function ProxsieLoad()
    	this:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
    end
    
    function ProcIcon(name)
    	for i=1,#Names do
    		if Names[i]==name then
    			return Icons[i]
    		end
    	end
    end
    
    function iconframeinsert()
    				iconframe:SetFrameStrata("BACKGROUND")
    				iconframe:SetWidth(90)  
    				iconframe:SetHeight(90)
    				local t = iconframe:CreateTexture(nil,"BACKGROUND")
    				t:SetTexture(icon)
    				t:SetAllPoints(iconframe)
    				iconframe.texture = t
    				iconframe:SetPoint("CENTER",0,0)
    				iconframe:Show()
    end
    	
    function ProxsieEvent(event)
    	if arg2=="SPELL_AURA_APPLIED" and bit.band(arg5, COMBATLOG_OBJECT_AFFILIATION_MINE) > 0 then
    		for i=1,#Names do
    			if arg10==Names[i] then
    				ProxsieName=arg10
    				PlaySoundFile("Interface\\AddOns\\Proxsie\\Sounds\\Proxsie.mp3")
    				ZoneTextString:SetText("Proxsie: "..ProxsieName.." Procced!!")
    				ZoneTextFrame.startTime = GetTime()
    				ZoneTextString:SetTextColor(1.00, 0.50, 1.00);						
    				PVPInfoTextString:SetText("");
    				ZoneTextFrame:Show()
    				icon=ProcIcon(ProxsieName)
    				iconframe = CreateFrame("Frame",iconframe,UIParent)
    				iconframeinsert()
    			end
    		end
    		elseif arg2=="SPELL_AURA_REMOVED" and bit.band(arg5, COMBATLOG_OBJECT_AFFILIATION_MINE) > 0 then
    		for i=1,#Names do
    			if arg10==Names[i] then
    				iconframe:Hide()
    			end
    		end
    	end
    end
    
    Posted in: Need Help?
  • 0

    posted a message on Two questions I could do with a little help with
    yeah I didn't post that part, I'll post it here but it does work but for only one proc.

    elseif arg2=="SPELL_AURA_REMOVED" and bit.band(arg5, COMBATLOG_OBJECT_AFFILIATION_MINE) > 0 then
    		for i=1,#Names do
    			if arg10==Names[i] then
    				iconframe:Hide()
    			end
    		end
    


    so if the duration ends or it's used (slam for example) it triggers the hide, but if its not used or duration has not ended - while something else just procced, the new frame goes over the top of the old frame and the old one doesnt hide. Sorry I'm not explaining it very well I guess
    Posted in: Need Help?
  • 0

    posted a message on Two questions I could do with a little help with
    Thanks for the replies. I tried several things but just kept failing to succeed, how would I put that particular code into this

                    (PROC STUFF IS HERE - DIDN'T THINK YOU'D NEED THIS PART)
    
    
    				ProxsieName=arg10
    				icon=ProcIcon(ProxsieName)
    				iconframe = CreateFrame("Frame",iconframe,UIParent)
    				iconframeinsert()
     
                  (HERE IS THE ICONFRAMEINSERT FUNCTION)
    
                  function iconframeinsert()
    				iconframe:SetFrameStrata("BACKGROUND")
    				iconframe:SetWidth(90)  
    				iconframe:SetHeight(90)
    				local t = iconframe:CreateTexture(nil,"BACKGROUND")
    				t:SetTexture(icon)
    				t:SetAllPoints(iconframe)
    				iconframe.texture = t
    				iconframe:SetPoint("CENTER",0,0)
    				iconframe:Show()
                  end           
    


    The ProcIcon function grabs the icon from a table.
    Posted in: Need Help?
  • 0

    posted a message on Two questions I could do with a little help with
    First:

    I have a problem with hiding a frame if I have used the frame twice. For example, my addon is for procs, if a spell procs the frame shows up with an icon as background and when the aura is gone its set to hide() using "SPELL_AURA_REMOVED". This works well unless I add another proc and they both proc at the same time, the second icon gets removed but not the first, it just stays there. Is there a way I could remove all the open frames before a new one is created? I've tried using the hide() before the show() but no luck, maybe it's something to do with framelevel? I don't know.

    Second:

    I would like to update my other addon for auction cancels, it currently uses a /slash command which all works fine and all. What I would like to do is add a button to the auction house window in the auctions listed tab, is this possible? I managed to add a button to vendor windows just using the xml but had no luck with the auction window, is there some sort of uiparent for it?


    Any help is really appreciated, I am still pretty new (only been scripting a month or so). Thanks in advance.
    Posted in: Need Help?
  • To post a comment, please or register a new account.