Thread Tools Display Modes
03-07-07, 12:40 PM   #1
charlweed
A Murloc Raider
Join Date: Mar 2007
Posts: 4
Howto add functionality to standard bags? (secure use of BAG_UPDATE)

Hi!
For now, I just want to auto-stack and sort everything. I used to use "restack" but it broke long ago.
I'm trying to write my first mod, based on restack, but I'm stuck on the security model. After my mod is loaded, items are no longer usable directly from the bag. As soon as I add my event handlers, all actions are blocked or forbidden.

What's the correct way to add my own code to BAG_UPDATE?

Thanks!

Last edited by charlweed : 03-07-07 at 05:53 PM.
  Reply With Quote
03-14-07, 08:56 PM   #2
charlweed
A Murloc Raider
Join Date: Mar 2007
Posts: 4
Answer: Don't use a frame at all!

The problem came from defining a frame at all. If you just want to respond to the event, no frame is needed. Start with only a .lua file, and hook your events from :OnEnable.
Every tutorial I have seen starts with a frame, and none inherit the secure templates, so lots of noob modders are going to have security issues for protected functions.

Bad choice for first mod I guess
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Howto add functionality to standard bags?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off