View Single Post
10-15-09, 07:03 PM   #4
Dgrimes
A Black Drake
 
Dgrimes's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 89
Originally Posted by Brainn View Post
this would be rather complex to implement autmaticaly, but can be done with a simple script.

create a symlink and use it as the bindings object (or aurafilter, should work the same)
then add this code to an autoexec script
Code:
function SetTalentedBindings()
   if ( GetActiveTalentGroup() == 2 ) then
      RDXDB.SetSymLinkTarget("folder:yoursymlink", "folder:yourbindings_secondary")
   else
      RDXDB.SetSymLinkTarget("folder:yoursymlink", "folder:yourbindings_main")
   end
end


WoWEvents:Bind("PLAYER_ENTERING_WORLD", nil, SetTalentedBindings, "RDX_TALENTBINDINGS");
WoWEvents:Bind("PLAYER_TALENT_UPDATE", nil, SetTalentedBindings, "RDX_TALENTBINDINGS");
Actually there is an easier way to do so. You just need to make a keybinding and actionbinding object for each spec. Note these objects are not editable and copy ALL keybinds/action binds when you create them.

Then all you would need to do is copy said desktop object you are using and rename it so say *_holy or *_disc and insert those into the desktop object and make sure that is the desktop RDX points to when you switch specs. The only thing that would require a script would be to change the weakened soul from your aura list.

Edit:

Here is a small piece of code that will add or remove the "Weakened Soul" from your aurafilter when you change specs.
Code:
local function UpdateAuraFilter()
    local talent = GetActiveTalentGroup();
    local od = RDXDB.GetObjectData("Package:Object");
    --This is code here will REMOVE "Weakened Soul" from the aurafilter object in question.
    --If you require the "Weakened Soul" to be removed after you changed to your second spec, change the "1" to a "2".
    if talent == 1 then
        for i=1, #(od.data) do if string.find(od.data[i], "6788") then table.remove(od.data, i); end end
    --This part of code here will ADD the "Weakened Soul" spellid to your aurafilter of choice when you change specs.
    --Again if you wish it to be added to your first spec and not your second, replace the "2" with a "1".
    elseif talent == 2 then
        for i=1, #(od.data) do if not string.find(od.data[i], "6788") then table.insert(od.data, "6788"); end end
    end
end

WoWEvents:Bind("PLAYER_ENTERING_WORLD", nil, UpdateAuraFilter, "aurafilter");
WoWEvents:Bind("PLAYER_TALENT_UPDATE", nil, UpdateAuraFilter, "aurafilter");
Replace the Package:Object with the package name where your filter is stored and the object name of your filter object itself. Keep the " : " between them.

Edit2: Forgot to mention, throw that into an autoexec.
__________________
What was is, what will be was.

Last edited by Dgrimes : 10-15-09 at 07:52 PM.
  Reply With Quote