Thread Tools Display Modes
Prev Previous Post   Next Post Next
02-03-12, 10:17 PM   #1
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
Adding new things to global functions?

lua Code:
  1. local thelist = {};
  2. thelist["am_i"] = true;
  3. thelist["in_the"] = true;
  4. thelist["list"] = true;
  5.  
  6. function IntheList(name)
  7.     return thelist[name];
  8. end

Let's say I have two addons. I would like to, from my addon, be able to add my words into "thelist", but it's a local variable. However, IntheList(name) is a global function, is there anyway override the global function from MY addon and make it return "thelist[name] AND theotherlist[name];"?, or manually (without editing the original addon) to add my words into thelist?

qts;dfr (question too stupid, didn't finish reading): Is there a way to make IntheList(name) return from anything OTHER than just thelist[name] without editing the original addon?
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **

Last edited by unlimit : 02-03-12 at 10:22 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Adding new things to global functions?


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