• 0

    posted a message on Mod to move blizz target cast frame without the target frame itself...
    Oh man that is SO WORKING! Thanks a lot and I'll bump this topic on the next expansion I guess :D
    Posted in: General Chat
  • 0

    posted a message on Mod to move blizz target cast frame without the target frame itself...
    Thanks for reply!
    With this code, the error on selecting target disappears, only on every spellcast stays:
    1x Interface\FrameXML\TargetFrame.lua:940: attempt to compare number with nil:
    <in C code>: in function `Show'
    Interface\FrameXML\CastingBarFrame.lua:116: in function `CastingBarFrame_OnEvent':
    Interface\FrameXML\TargetFrame.lua:921: in function <Interface\FrameXML\TargetFrame.lua:883>:
    
    Locals:
    (*temporary) = TargetFrameSpellBar {
     0 = <userdata>
     updateEvent = "PLAYER_TARGET_CHANGED"
     holdTime = 0
     castID = 1
     unit = "target"
     maxValue = 1.5
     showCastbar = true
     value = 1.1368683772162e-013
     showShield = true
     casting = 1
     flash = 1
     showTradeSkills = false
    }
    (*temporary) = <function> defined =[C]:-1
    
    Posted in: General Chat
  • 0

    posted a message on Mod to move blizz target cast frame without the target frame itself...
    Hey guys, thanks for the response. I don't anymore hide the target frame, it is there sitting nice and shiny, but the spellbar seems attached to it and refuses to move at all unless I set its parent to UIParent. Anyway I tried different combinations like:

    Doesn't move:
    TargetFrameSpellBar.GetParent = function() return TargetFrame end
    TargetFrameSpellBar:SetParent(UIParent)
    TargetFrameSpellBar:ClearAllPoints()
    TargetFrameSpellBar:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
    


    Target_Spellbar_AdjustPosition = function() end
    TargetFrameSpellBar.GetParent = function() return TargetFrame end
    TargetFrameSpellBar:SetParent(UIParent)
    TargetFrameSpellBar:ClearAllPoints()
    TargetFrameSpellBar:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
    


    With and without the "SetParent" line, it just wont move. The only combination that makes it move is:

    TargetFrameSpellBar:SetParent(UIParent)
    TargetFrameSpellBar:ClearAllPoints()
    TargetFrameSpellBar:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
    


    But spits out error on change target:
    1x Interface\FrameXML\TargetFrame.lua:940: attempt to compare number with nil:
    Interface\FrameXML\TargetFrame.lua:511: in function `TargetFrame_UpdateAuras':
    Interface\FrameXML\TargetFrame.lua:131: in function `TargetFrame_Update':
    Interface\FrameXML\TargetFrame.lua:146: in function `OnEvent':
    Interface\FrameXML\UnitFrame.lua:416: in function <Interface\FrameXML\UnitFrame.lua:414>:
    <in C code>: in function `TargetUnit'
    Interface\FrameXML\SecureTemplates.lua:423: in function `handler':
    Interface\FrameXML\SecureTemplates.lua:541: in function `SecureActionButton_OnClick':
    Interface\FrameXML\SecureTemplates.lua:581: in function <Interface\FrameXML\SecureTemplates.lua:573>:
    
    Locals:
    self = TargetFrame {
     0 = <userdata>
     debuffs = TargetFrameDebuffs {}
     portrait = TargetFramePortrait {}
     showThreat = true
     raidTargetIcon = TargetFrameTextureFrameRaidTargetIcon {}
     highLevelTexture = TargetFrameTextureFrameHighLevelTexture {}
     showAuraCount = true
     showLeader = true
     healthbar = TargetFrameHealthBar {}
     pvpIcon = TargetFrameTextureFramePVPIcon {}
     questIcon = TargetFrameTextureFrameQuestIcon {}
     deadText = TargetFrameTextureFrameDeadText {}
     noTextPrefix = true
     buffs = TargetFrameBuffs {}
     nameBackground = TargetFrameNameBackground {}
     showLevel = true
     levelText = TargetFrameTextureFrameLevelText {}
     leaderIcon = TargetFrameTextureFrameLeaderIcon {}
     statusSign = -1
     unit = "target"
     showPVP = true
     borderTexture = TargetFrameTextureFrameTexture {}
     showPortrait = true
     TOT_AURA_ROW_WIDTH = 101
     statusCounter = 0
     manabar = TargetFrameManaBar {}
     totFrame = TargetFrameToT {}
     unitHPPercent = 1
     OnEvent = <function> @ Interface\FrameXML\TargetFrame.lua:138:
     auraRows = 0
     spellbar = TargetFrameSpellBar {}
     menu = <function> @ Interface\FrameXML\TargetFrame.lua:88:
     powerBarAlt = TargetFramePowerBarAlt {}
     threatNumericIndicator = TargetFrameNumericalThreat {}
     showClassification = true
     threatIndicator = TargetFrameFlash {}
     name = TargetFrameTextureFrameName {}
    }
    frame = nil
    frameName = "TargetFrameDebuff1"
    frameIcon = nil
    frameCount = nil
    frameCooldown = nil
    name = nil
    rank = nil
    icon = nil
    count = nil
    debuffType = nil
    duration = nil
    expirationTime = nil
    caster = nil
    isStealable = nil
    frameStealable = nil
    numBuffs = 0
    playerIsTarget = 1
    selfName = "TargetFrame"
    canAssist = 1
    filter = nil
    color = nil
    frameBorder = nil
    numDebuffs = 0
    isEnemy = nil
    haveTargetofTarget = nil
    maxRowWidth = 122
    largeBuffList = <table> {
    }
    PLAYER_UNITS = <table> {
     player = true
     pet = true
     vehicle = true
    }
    largeDebuffList = <table> {
    }
    AURA_ROW_WIDTH = 122
    NUM_TOT_AURA_ROWS = 2
    


    And on every spellcast...

    1x Interface\FrameXML\TargetFrame.lua:940: attempt to compare number with nil:
    <in C code>: in function `Show'
    Interface\FrameXML\CastingBarFrame.lua:116: in function `CastingBarFrame_OnEvent':
    Interface\FrameXML\TargetFrame.lua:921: in function <Interface\FrameXML\TargetFrame.lua:883>:
    
    Locals:
    (*temporary) = TargetFrameSpellBar {
     0 = <userdata>
     updateEvent = "PLAYER_TARGET_CHANGED"
     holdTime = 0
     castID = 15
     unit = "target"
     maxValue = 1.5
     showCastbar = true
     value = 0
     showShield = true
     casting = 1
     flash = 1
     showTradeSkills = false
    }
    (*temporary) = <function> defined =[C]:-1
    
    Posted in: General Chat
  • 0

    posted a message on Mod to move blizz target cast frame without the target frame itself...
    Hey guys, bumping archaic topic, but patch 4 kinda ruined it... TargetFrameSpellBar:SetParent(UIParent) makes constant errors to spit from the blizzard interface, although it still works. Anyone found a way to around that short of writing a full-scale addon to handle the job?

    Thanks
    Posted in: General Chat
  • 0

    posted a message on Table with keys and sorting
    Aww, my poor topic became sorta huge :D
    I did it very close to the way Phanx suggested and it works wonders. It is also worth noting that # does not seems to work on dictionary stuff too, poor dictionaries are left in dark it seems.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Table with keys and sorting
    Thanks guys, great workaround, it surely do fit right in, even with the additional array for the sort. Also, I didn't know about that #arrayname stuff, looks it gets the number of elements, cute ;)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Table with keys and sorting
    Hey guys, scratching my head over this issue for quite some time. I have a (quite complex) table with key-values, similar to:

    test=
    {
    	["key1"]=1,
    	["key2"]=1,
    	["key3"]=0,
    }
    


    If I just do
    for i, v in pairs(test) do
        print(i, v)
    end

    Then I just get them in random order:
    key1 1
    key3 0
    key2 1
    


    I'm trying to get stuff to show in either the order I defined in the first place, or as last resort - alphabetical, but both fails. Few other tries:

    for i, v in ipairs(test) do
        print(i, v)
    end

    prints nothing at all...

    table.sort(test)
    does not alter the places...

    table.sort(test, function(a,b)
    			print("sort",a,b)
    			return true
    			end)

    gives no message from the sort function at all...

    I'm obviously missing something basic here... this should work :(
    Posted in: Lua Code Discussion
  • 0

    posted a message on SecureGroupHeaderTemplate usage
    Yeah, seems quite a work for not much gain ;)
    Thanks for the explaination, thing is, I have never had problems with PhanxChat(besides it never colors the names :p) - I wrote several other addons that are giving on startup info what their commandline options are, only this was not working. I guess I was lucky with the rest loading after PhanxChat. But man, I was on the edge to just go crazy with this :p
    Posted in: Lua Code Discussion
  • 0

    posted a message on SecureGroupHeaderTemplate usage
    Thanks Adirelle, I made these changes, but it was still not working, then had to log out on another character to see it working there... turned out it was PanxChat addon, disabled and finally saw it running :p
    Posted in: Lua Code Discussion
  • 0

    posted a message on SecureGroupHeaderTemplate usage
    Hey guys,

    I'm trying to do something grid-ish, very simple tho, a mele char does not need much. I have done it partially, using secureactionbar buttons, but wanted to have it done better, with the ability to mouseover the frames and that actually counts as target=mouseover, so after googling and looking in various addons I went with the SecureGroupHeaderTemplate idea. The problem: I can't get the frame to show, can't get it to call the init function no matter what I have done past 4 hours, I think I tried every combination :(

    Slimmed down, the test code in question is this:
    function initialConfigFunction(child)
    	print("plox")
    end
    
    local header = CreateFrame("Frame","Header",UIParent,"SecureGroupHeaderTemplate")
    header:SetAttribute("template","SecureUnitButtonTemplate")
    header.initialConfigFunction = initialConfigFunction
    header:SetAttribute("point", "TOP")
    header:SetAttribute("groupFilter", "")
    header:SetAttribute("templateType", "Button")
    header:SetAttribute("yOffset", -1)
    header:SetAttribute("sortMethod", "INDEX")
    header:SetAttribute("strictFiltering", false)
    header:SetAttribute("groupBy", "GROUP")
    header:SetAttribute("groupingOrder", "1,2,3,4,5,6,7,8")
    header:SetAttribute("maxColumns", 8)
    header:SetAttribute("unitsPerColumn", 5)
    header:SetAttribute("columnSpacing", 4)
    header:SetAttribute("columnAnchorPoint", "TOP")
    header:SetAttribute("showParty", true)
    header:SetAttribute("showRaid", true)
    header:SetAttribute("showPlayer", true)
    header:SetAttribute("showSolo", true)
    
    header:SetWidth(200)
    header:SetHeight(200)
    header:SetPoint("CENTER", 0,0)
    header.texture=header:CreateTexture()
    header.texture:SetAllPoints(header)
    header.texture:SetTexture(1,0,0,1)
    header:ClearAllPoints()
    
    header:Show()


    ... and "plox" never gets outputted... I'm out of ideas already... if you can give a hand, I'll be thankful.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Range from player to player?
    Hehe I though it is impossible after turned upside down several range addons and checked the api, but there was always chance ;)
    It is badly designed spell then in my book, but oh well, I have to live with that... or... others have to live with that :D
    Posted in: Lua Code Discussion
  • 0

    posted a message on Range from player to player?
    Hey guys, as a just grown tree I want to make my life a bit easier and what I can't decide is if Wild Growth is worth casting or not. It heals 5 targets that are in 15 yard range of the *target* it is casted on. I.e. is there a way to check the range from target to other players? Bandages work for 15 yards checking, but only from me to other players... it looks like every tree out there is just casting Wild Growth blindly hoping there will be enough around
    Posted in: Lua Code Discussion
  • 0

    posted a message on Skada: a damage meter
    Don't use that option. Every time you wipe it will reset ;)
    Posted in: General AddOns
  • 0

    posted a message on GetSpellInfo's Icon not available at start?
    Thanks all, everything works, so my second addon is about to get ready :p
    Posted in: Lua Code Discussion
  • 0

    posted a message on GetSpellInfo's Icon not available at start?
    Thanks Xinhuan, but... I could not understand the suggestion. I already patched the addon to use spell IDs, but I still can't get if the player have the spell in the book or not upon logon, do I have to create sort of a timer that fires 10 seconds after the addon is loaded in order to check the stuff with reasonably high chance of loading? I believe there should be better way...
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.