• 0

    posted a message on Garbage after loading the interface
    That was my first thought, too. But I never realy used the librarys. So I removed them from my addon, nothing changed.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Garbage after loading the interface
    I just saw that my addon loses about 300kb of memory a few seconds after logging in/ reloading the interface. I can't realy explain where that amount of memory could come from. Is this just garbage from the lua compiler or something? Or do I have a more or less serious bug in my code?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SecureGroupHeaderTemplate: How can I change the button size?
    I believe there is a bug in the SecureGroupPetHeaderTemplate. When you neither chose useOwnerUnit nor filterOnPet it will add "pet" to the unitid a second time. But this has nothing to do with creating frames in combat.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SecureGroupHeaderTemplate: How can I change the button size?
    I'm not setting the width and height of the header. I'm just setting the attributes in the header so that the Initial Config Function can access them.

    If I do this with the InitializeFrame function it wont work in combat. Why does it work in grid?
    Posted in: Lua Code Discussion
  • 0

    posted a message on SecureGroupHeaderTemplate: How can I change the button size?
    I don't want to set the scale. I want to set the width and height of every unitbutton controlled by the header.

    Something like this would work:
    local setSize = [[
    	local parent = self:GetParent()
    	local width = parent:GetAttribute("width")
    	local height = parent:GetAttribute("height")
    	self:SetWidth(width)
    	self:SetHeight(height)
    ]]
    
    local function SetSize(header,width,height)
    	for k,v in ipairs(header) do
    		v:SetSize(width,height)
    	end
    	header:SetAttribute("width",width)
    	header:SetAttribute("height",height)
    	local func = header:GetAttribute("initialConfigFunction")
    	if not func then
    		func = setSize
    	elseif not strfind(func,setSize) then
    		func = func..setSize
    	end
    	header:SetAttribute("initialConfigFunction",func)
    end

    But maybe there is a better solution.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SecureGroupHeaderTemplate: How can I change the button size?
    How can I change the size of the Unit Buttons at runtime?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Magic Debuff on unit?
    Ok, you convinced me. Now my healthbars are reacting to UNIT_HEALTH, UNIT_MAXHEALTH and some combatlog events, wich is in most cases as quick as updating the health every frame.
    There is no event for UnitInRange, is there?
    Posted in: Need Help?
  • 0

    posted a message on Frame Alpha
    I want transparent frames. But I don't want that the hidden parts of the frames are shining through. Is this possible?
    Posted in: Need Help?
  • 0

    posted a message on Magic Debuff on unit?
    0.2s delay for the HealthBar is unaccaptable. I can remember some situations where I watched the combat log to react fast enough, e.g. Patchwerk classic. Most of the time it probably doesn't really matter, but I think it is more fun without the delay.
    Posted in: Need Help?
  • 0

    posted a message on Magic Debuff on unit?
    But it seems that the events are delayed. At least the UNIT_HEALTH event fires 0.2s after the value of UnitHealth(unit) changes.
    Posted in: Need Help?
  • 0

    posted a message on Magic Debuff on unit?
    I know what the "RAID" filter does. It would reduce the iterations in the for-loop if the player can cure magic. But I don't know how the filters internaly work.

    I'm using the OnUpdate script because I want to keep it as simple as possible for now. Eventually I will use events.
    Posted in: Need Help?
  • 0

    posted a message on Magic Debuff on unit?
    I was afraid I had to do something like that. Let's see how this will effect my framerate if I use this function in the OnUpdate-Scripts of every Unit frame in a 40 player raid.

    Would it be faster to pass the "RAID"-Filter to UnitDebuff?
    Posted in: Need Help?
  • 0

    posted a message on Magic Debuff on unit?
    I'm writing my own Raidframes. I want to add an indicator for Magic Debuffs. Is there a simple query with wich I can find out if there is a Magic Debuff on a unit?
    Posted in: Need Help?
  • To post a comment, please or register a new account.