Help for a new addon creator
Hey Guys quick run down.
For my first addon I wanted to write a very simple addon that has a few buttons that do a few simple tasks that I was always typing to do (i.e. /invite, /love, etc...)
After creating my addon I have a nice frame of 4 buttons. invite, guild invite, love, and a button that moves the frame around. Everything works fine.
So then I wanted to add a button that would cast my Hearthstone.
So I put my hearthstone in slot 1 of my back pack and tried running UseContainerItem(0,1);
when the button is pushed. I get a Blizzard UI has blocked this operation error.
Is there a way around this or a better way to do it?
I have researched and researched and can't seem to find anything
I tried casting by spell but got nothing and now i'm stuck.
Any help would be much appreciated.
My code:
XML code for button:
<Button name="$parent_Hearth_Button" parent="SimpleButtons_MainFrame">
<Size>
<AbsDimension x="27" y="25" />
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-5" />
</Offset>
</Anchor>
</Anchors>
<NormalTexture file="Interface\Addons\SimpleButtons\SB_UI\SB_H" />
<HighlightTexture file="Interface\Addons\SimpleButtons\SB_UI\SB_H_HL" />
<Scripts>
<OnClick>
SB_Hearth_OnClick();
</OnClick>
</Scripts>
</Button>
LUA code:
function SB_Hearth_OnClick()
UseContainerItem(0,1);--is blocked by Blizzard UI
end
PS i know I could just use an action bar but I don't want to use up my bars as I seem to use them all for different stuff.
|