• 0

    posted a message on Protected ReplaceEnchant() and workaround
    I thought a macro like
    /script CancelTemporaryWeaponEnchant(1)
    /use Master Spellstone
    /use 16
    

    would do the trick, but the client is waiting for a response from the server before actually removing it, and I still end with a confirmation dialog.

    /cry
    Posted in: Lua Code Discussion
  • 0

    posted a message on Protected ReplaceEnchant() and workaround
    2 clicks for 1 spellcast is over protecting and damn annoying >:(
    Posted in: Lua Code Discussion
  • 0

    posted a message on Hide Dual Spec Skill learned/unlearned spam
    Here is the code for just this feature:

    [PHP]local f = CreateFrame"Frame"

    local orgSetActiveTalentGroup = _G.SetActiveTalentGroup

    local spam1 = gsub(ERR_LEARN_ABILITY_S:gsub("%.", "%."), "%%s", "(.*)")
    local spam2 = gsub(ERR_LEARN_SPELL_S:gsub("%.", "%."), "%%s", "(.*)")
    local spam3 = gsub(ERR_SPELL_UNLEARNED_S:gsub("%.", "%."), "%%s", "(.*)")

    local function SpamFilter(self, event, msg)
    if strfind(msg, spam1) or strfind(msg, spam2) or strfind(msg, spam3) then return true end
    end

    function SetActiveTalentGroup(...)
    f:RegisterEvent"UNIT_SPELLCAST_SUCCEEDED"
    f:RegisterEvent"UNIT_SPELLCAST_STOP"
    ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", SpamFilter)
    return orgSetActiveTalentGroup(...)
    end

    f:SetScript("OnEvent", function(self, event, unit)
    if unit ~= "player" then return end
    self:UnregisterEvent"UNIT_SPELLCAST_SUCCEEDED"
    self:UnregisterEvent"UNIT_SPELLCAST_STOP"
    ChatFrame_RemoveMessageEventFilter("CHAT_MSG_SYSTEM", SpamFilter)
    end)
    [/PHP]
    Posted in: Addon Ideas
  • 0

    posted a message on Protected ReplaceEnchant() and workaround
    I was trying ReplaceEnchant() and found it was protected.

    While I was looking for a solution on the web, I discovered a topic where Zootfizzle said it's fixed for 3.0.8. But I suppose he meant the StaticPopup1Button1:Click() workaround, not the protected function because as of now, none work :(
    Any info regarding this issue ?

    Source: http://www.worldofraids.com/wow-blue-tracker/us-forums/14287249343-cirvumventing-protected-functions-with-click.html
    Posted in: Lua Code Discussion
  • 0

    posted a message on Why use ace3?
    Quote from Kaelten
    Ace has always tried to remove the tedium from addon development and instead let the author concentrate on the actual creative process.

    Some people say you should do one the normal way first, I disagree. I think it's up to the individual.

    For some ppl, creativity is reduced if you live in a confined environment, not exposed to the somewhat complex reality. But not being exposed to conformism also helps to think out of the box, providing innovative solutions.

    Anyway, knowledge is power. (And power is always abused, but that's politic ;)).

    Just trolling around :p
    Posted in: Ace3
  • 0

    posted a message on String gsub help
    You can save many gsub if you simply change the strings Blizzard use to format chat messages. For example, try to execute this line in game, then chat with your guildmates:
    /run CHAT_GUILD_GET = "(g) %s: "
    

    Other pre-formatted string variables to toy with:
    CHAT_SAY_GET
    CHAT_YELL_GET
    CHAT_WHISPER_GET
    CHAT_WHISPER_INFORM_GET
    CHAT_GUILD_GET
    CHAT_OFFICER_GET
    CHAT_PARTY_GET
    CHAT_RAID_GET
    CHAT_RAID_LEADER_GET
    CHAT_RAID_WARNING_GET
    CHAT_BATTLEGROUND_GET
    CHAT_BATTLEGROUND_LEADER_GET
    
    Posted in: Lua Code Discussion
  • 0

    posted a message on Broker_WeaponBuffer (well... it's actual name isnt even close :P)
    So far, I only use it for myself (mostly warlock & rogue) and don't plan to release it to the crowd. Here is a copy: http://perso.orange.fr/aranarth/wow/addons/Ara_Broker_Poisons-b1.zip

    It uses secure stuff that very few display addons handle. I use SBC and it works fine. Maybe Fortress works too, not tested. But if you use another display, it won't work at all.

    Also, this plugin uses a trick to count doses on items. It requires the action bar slot 120 to work. That may not work properly for some ppl.
    Posted in: Data Broker AddOns
  • 0

    posted a message on Blizzard Code Snips
    I wonder if setting the __call metamethod of _G and "getglobal = _G" would speed things up or if it's useless. (I don't know about the C implementation of metatables, and Im not home to test anything, just throwing thoughts against walls :p).
    Posted in: Lua Code Discussion
  • 0

    posted a message on 3.0.8 Alchemy Research cooldown change.
    I have read that Alchemy Research cooldown will be reduced from 7 days (in fact: 6 days and 20 hours) to 3 days. Can someone please confirm if it's in fact 2 days and 20 hours ?
    Posted in: General Chat
  • 0

    posted a message on Blizzard menu on unit frames replacement
    For player/target/focus it's SecureUnitButtonTemplate and for party/raid it's SecurePartyHeaderTemplate/SecureRaidGroupHeaderTemplate. Use RegisterUnitWatch for state changes. Look into SecureTemplates.lua and SecureHeaderTemplate.lua for documentation.

    Once your stuff is secure, you may have to set the menu attribute (I don't remember if it's included in the template or not :p).

    Then set something like that:
    btnPlayer.unit = "Player"
    btnTarget.unit = "Target"
    
    local function menu(self)
    	ToggleDropDownMenu(1, nil, _G[self.unit.."FrameDropDown"], "cursor", 0, 0)
    end
    
    btnPlayer.menu = menu
    btnTarget.menu = menu
    


    If you don't want to go too deep into the secure world, there's a great framework to make unit frame: oUF (wowinterface).
    Posted in: Lua Code Discussion
  • 0

    posted a message on [XML] 3.0 "Font not set" error
    Bleh I hate coding options :p
    Posted in: Lua Code Discussion
  • 0

    posted a message on [XML] 3.0 "Font not set" error
    Hmm what's left... button:SetNormalFontObject(SystemFont_Tiny) ? :p
    Posted in: Lua Code Discussion
  • 0

    posted a message on Tracking tradeskill CDs
    This works great: http://www.pastey.net/104847

    About the index, while crafting (20 sec), I closed categories, typed a search, closed the tradeskill window, and such... And surprisingly, once the crafting finished, GetTradeSkillCooldown(watchedIndex) returned the right value.

    Anyway, as I have to maintain a table of tradeskill CDs for various reasons, that second alternative may be somewhat better: http://www.pastey.net/104846

    Both tested with tailoring and inscription CDs.
    Posted in: Lua Code Discussion
  • 0

    posted a message on [XML] 3.0 "Font not set" error
    Thank you, that may help in case there's more old addons to restore.

    Back then, I solved this with the following <OnLoad> code on the template button:
    local font, _, flags = GameFontNormalSmall:GetFont()
    _G[this:GetName().."Text"]:SetFont(font, 9, flags)
    

    That may not be for the best, but SWS wasnt a model of efficiency in the first place :p


    For the little story, our guild leader was giving 15k gold to whoever could make SWS (SWL included) works with WotLK, and... Im rich now :D

    For those interested, here is a working SWS (and SWL): http://perso.orange.fr/aranarth/wow/addons/SWS-3.0.3.zip
    Posted in: Lua Code Discussion
  • 0

    posted a message on omni cc - own buffs only
    OmniCC hooks the SetCooldown method from the template of cooldown frames.

    Unfortunately, this template has access neither to the entity that is cooling down, nor to the owner of that entity.

    EDIT: owned by Phanx :p
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.