Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-09-21, 07:18 PM   #1
Krainz
A Wyrmkin Dreamwalker
Join Date: Oct 2016
Posts: 57
Using one AddOn to change another AddOn's variables?

Hello again,

The GW2UI addon has the following variables

Lua Code:
  1. local TRACKER_TYPE_COLOR = {}
  2. GW.TRACKER_TYPE_COLOR = TRACKER_TYPE_COLOR
  3. TRACKER_TYPE_COLOR["QUEST"] = {r = 221 / 255, g = 198 / 255, b = 68 / 255}
  4. TRACKER_TYPE_COLOR["CAMPAIGN"] = {r = 121 / 255, g = 222 / 255, b = 47 / 255}
  5. TRACKER_TYPE_COLOR["EVENT"] = {r = 240 / 255, g = 121 / 255, b = 37 / 255}
  6. TRACKER_TYPE_COLOR["BONUS"] = {r = 240 / 255, g = 121 / 255, b = 37 / 255}
  7. TRACKER_TYPE_COLOR["SCENARIO"] = {r = 171 / 255, g = 37 / 255, b = 240 / 255}
  8. TRACKER_TYPE_COLOR["BOSS"] = {r = 240 / 255, g = 37 / 255, b = 37 / 255}
  9. TRACKER_TYPE_COLOR["ARENA"] = {r = 240 / 255, g = 37 / 255, b = 37 / 255}
  10. TRACKER_TYPE_COLOR["ACHIEVEMENT"] = {r = 37 / 255, g = 240 / 255, b = 172 / 255}
  11. TRACKER_TYPE_COLOR["DAILY"] = {r = 68 / 255, g = 192 / 255, b = 250 / 255}
  12.  
  13. local TARGET_FRAME_ART = {
  14.     ["minus"] = "Interface/AddOns/GW2_UI/textures/targetshadow",
  15.     ["normal"] = "Interface/AddOns/GW2_UI/textures/targetshadow",
  16.     ["rare"] = "Interface/AddOns/GW2_UI/textures/targetShadowRare",
  17.     ["rareelite"] = "Interface/AddOns/GW2_UI/textures/targetShadowRare",
  18.     ["worldboss"] = "Interface/AddOns/GW2_UI/textures/targetshadow_boss",
  19.     ["boss"] = "Interface/AddOns/GW2_UI/textures/targetshadow_boss",
  20.     ["prestige1"] = "Interface/AddOns/GW2_UI/textures/targetshadow_p1",
  21.     ["prestige2"] = "Interface/AddOns/GW2_UI/textures/targetshadow_p2",
  22.     ["prestige3"] = "Interface/AddOns/GW2_UI/textures/targetshadow_p3",
  23.     ["prestige4"] = "Interface/AddOns/GW2_UI/textures/targetshadow_p4",
  24.     ["realboss"] = "Interface/AddOns/GW2_UI/textures/targetshadow-raidboss"
  25. }
  26. GW.TARGET_FRAME_ART = TARGET_FRAME_ART

Is it possible to use my own addon to change those variables without having to edit the GW2_UI code?


If so, what are the steps I should take?

I imagine it's something along the lines of handling the player_login event, and then...? just re-defining the variable?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Using one AddOn to change another AddOn's variables?


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