vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --[[ |
2 | Last Modified |
||
3 | 12/26/2004 Initial version |
||
4 | 08/12/2005 FB_DebugFlag, FBGroupMoveOffset, FBButtonTextSave - Sherkhan |
||
5 | --]] |
||
6 | |||
7 | local value |
||
8 | -------------------------------------------------------------------------------------------------- |
||
9 | local util = Utility_Class:New() |
||
10 | -- Config variables - Saved |
||
11 | FBSavedProfile = {} |
||
12 | FBToggles = {} |
||
13 | FBScripts = {}; |
||
14 | FBTextChunks = {}; |
||
15 | FBFirstUse = 0; |
||
16 | FBBuffs = {} |
||
17 | FBBuffs["buffs"] = {} |
||
18 | FBBuffs["debuffs"] = {} |
||
19 | FBBuffs["itembuffs"] = {} |
||
20 | FBBuffs["auras"] = {} |
||
21 | FBBuffs["debufftypes"] = {} |
||
22 | FBCombatTypes = {} |
||
23 | FBPetTypes = {} |
||
24 | ------------------------------------------------------------------------------------------------- |
||
25 | -- Local variables |
||
26 | FB_DebugFlag = 0; -- Added to support being able to turn on/off some debugging messages |
||
27 | |||
28 | -- This is the last known cursor location (so we can see if it entered/left a group bounding box |
||
29 | FBCursorLoc = {}; |
||
30 | FBCursorLoc.x=0; |
||
31 | FBCursorLoc.y=0; |
||
32 | -- id - Button map - must be global to be accessed in XML file |
||
33 | -- FBIDToButton = {} |
||
34 | -- Group data - global. Used to speed up bounds checking |
||
35 | FBGroupData = {} |
||
36 | -- Constant for number of buttons - must be global |
||
37 | FBNumButtons = 120; |
||
38 | -- Current button state, move storage, and text field save |
||
39 | FBState = {} |
||
40 | FBGroupMoveOffset = {} |
||
41 | FBButtonTextSave = {} |
||
42 | local tempindex |
||
43 | for tempindex = 1,FBNumButtons do |
||
44 | FBState[tempindex] = {} |
||
45 | FBGroupMoveOffset[tempindex] = {} |
||
46 | FBButtonTextSave[tempindex] = {} |
||
47 | end |
||
48 | -- Command object and /command setup - must be global |
||
49 | FBcmd = Command_Class:New("FlexBar", "/flexbar") |
||
50 | FBCastcmd = Command_Class:New("FBCast", "/fbcast") |
||
51 | FBDoIncmd = Command_Class:New("FBDoIn", "/fbdoin") |
||
52 | FBUsecmd = Command_Class:New("FBUse", "/fbuse") |
||
53 | FBEchocmd = Command_Class:New("FBEcho", "/echo") |
||
54 | FBPrintcmd = Command_Class:New("FBPrint", "/print") |
||
55 | -- Timers |
||
56 | FBTimers = {} |
||
57 | -- Getting the mouse button pressed in OnClick is flaky - store the last mousebutton down here |
||
58 | FBLastButtonDown = ""; |
||
59 | -- Last hp percents for various units |
||
60 | FBLastHealth = {} |
||
61 | FBLastMana = {} |
||
62 | FBLastRage = {} |
||
63 | FBLastEnergy = {} |
||
64 | FBLastBuffs = {} |
||
65 | FBLastBuffs["buffs"] = {} |
||
66 | FBLastBuffs["debuffs"] = {} |
||
67 | FBLastBuffs["itembuffs"] = {} |
||
68 | FBLastBuffs["debufftypes"] = {} |
||
69 | -- Current events list copied from FBSavedProfile |
||
70 | FBEvents = {} |
||
71 | FBEvents.n = 0 |
||
72 | -- Current Profile Name and character name |
||
73 | FBProfileName = "" |
||
74 | FBCharName = "" |
||
75 | -- State for conditionals |
||
76 | FBConditionalState = {} |
||
77 | -- Saved Profile for restore |
||
78 | FBProfileBackup = nil |
||
79 | -- Temporary Config file for scripts editor |
||
80 | FBTestConfig = nil |
||
81 | -------------------------------------------------------------------------------------------------- |
||
82 | -- Var to hold last targettarget and last target target name |
||
83 | FBLastTargetTarget = nil |
||
84 | FBLastTargetTargetName = nil |
||
85 | -- var to hold last form for shape/stance/aura/stealth etc changes |
||
86 | FBLastform = "none" |
||
87 | -- var to hold last pet name for pet existence check. |
||
88 | FBPetname = nil |
||
89 | -- var to hold group member existence info for existence check |
||
90 | FBGroupmates = {} |
||
91 | -- var to hold last key state |
||
92 | FBKeyStates = {} |
||
93 | -- Hold unit status (dead/alive) |
||
94 | FBUnitStatus = {} |
||
95 | -- Unit combat status using UnitAffectingCombat() |
||
96 | FBUnitCombat = {} |
||
97 | -- Var to hold last combo points value |
||
98 | FBLastComboPts = 0 |
||
99 | -- Table for quick event dispatch |
||
100 | FBEventQuickDispatch = {} |
||
101 | -- Table to hold args for quick event dispatch |
||
102 | FBEventArgs = nil |
||
103 | -- Current top of scripts in menu |
||
104 | FBScriptCount = 1 |
||
105 | -- Table to hold custom conditions from scripts |
||
106 | FBCustom = {} |
||
107 | -- Callbacks for Events |
||
108 | FBEventHandlers = {} |
||
109 | -- Callbacks for extended events |
||
110 | FBExtHandlers = {} |
||
111 | -- Global conditional functions |
||
112 | -- made global so that users can extend it by runscript on='ProfileLoaded' |
||
113 | FBConditions = {} |
||
114 | -- Table to hold delayed macro |
||
115 | FBMacroWait = {} |
||
116 | -- Macro variables callbacks |
||
117 | FBMacroVariables = {} |
||
118 | -- Last event and source |
||
119 | FBLastEvent = "" |
||
120 | FBLastSource = "" |
||
121 | -- Spell Info for FBCastByName |
||
122 | FBPlayerSpells = {} |
||
123 | FBPetSPells = {} |
||
124 | FBPlayerMaxRank = {} |
||
125 | FBPetMaxRank = {} |
||
126 | -- Slot for picked up texture |
||
127 | FBPickUpTexture = nil |
||
128 | -- ID to ButtonNum map |
||
129 | FBIDtoButtonNum = {} |
||
130 | -- Tables to store ready list of inventory |
||
131 | FBBagContents = {} |
||
132 | FBInvContents = {} |
||
133 | -- Table of buttons with pet actions on them |
||
134 | FBPetActions = {} |
||
135 | -- Toggles for event groups |
||
136 | FBCompleteButtonList = {} |
||
137 | FBCompleteBindingList = {} |
||
138 | FBCompleteScaleList = {} |
||
139 | FBCompleteAlphaList = {} |
||
140 | FBCompleteIDList = {} |
||
141 | local index |
||
142 | for index = 1,FBNumButtons do |
||
143 | FBCompleteButtonList[index] = index |
||
144 | if index <= 30 then |
||
145 | FBCompleteBindingList[index] = index |
||
146 | end |
||
147 | if index >4 and index<51 then |
||
148 | table.insert(FBCompleteScaleList, index) |
||
149 | end |
||
150 | if index < 11 then |
||
151 | table.insert(FBCompleteAlphaList, index) |
||
152 | end |
||
153 | end |
||
154 | for index = 1,120 do |
||
155 | FBCompleteIDList[index] = index |
||
156 | end |
||
157 | FBCompleteTextureList = {"'%backpack'","'%macro##'","'%button##'"} |
||
158 | FBCompleteTextVarList = {"'%d'","'%b'","'%c'"} |
||
159 | FBNoTargetsList = {"No Target Needed"} |
||
160 | FBNoValuesList = {"No Values Available"} |
||
161 | FBCompleteReactionList = {"'hostile'","'neutral'","'friendly'"} |
||
162 | FBCompletePageList = {1,2,3,4,5,6} |
||
163 | FBComboPointsList = {0,1,2,3,4,5} |
||
164 | FBCompleteMissList = {"'dodge'","'miss'","'parry'"} |
||
165 | FBIfOpsList = {"and","or","not","(",")"} |
||
166 | FBTrueList = {"'true'"} |
||
167 | FBColorList = { "[10 10 10] - Clear", |
||
168 | "[5 5 5] - Dim", |
||
169 | "[10 1 1] - Dark Red", |
||
170 | "[1 10 1] - Dark Green", |
||
171 | "[1 1 10] - Dark Blue", |
||
172 | "[10 10 1] - Dark Yellow", |
||
173 | "[10 1 10] - Dark Magenta", |
||
174 | "[1 10 10] - Dark Cyan", |
||
175 | "[10 5 5] - Light Red", |
||
176 | "[5 10 5] - Light Green", |
||
177 | "[5 5 10] - Light Blue", |
||
178 | "[10 10 5] - Light Yellow", |
||
179 | "[10 5 10] - Light Magenta", |
||
180 | "[5 10 10] - Light Cyan" |
||
181 | } |
||
182 | |||
183 | -- List of units to check events for |
||
184 | FBGUIUnitList = { "'player'","'pet'","'target'" } |
||
185 | for index = 1,4 do |
||
186 | table.insert(FBGUIUnitList,"'party"..index .. "'") |
||
187 | table.insert(FBGUIUnitList,"'partypet"..index .. "'") |
||
188 | end |
||
189 | |||
190 | FBGUIUnitBuffList = { "'pet'","'target'" } |
||
191 | for index = 1,4 do |
||
192 | table.insert(FBGUIUnitBuffList,"'party"..index .. "'") |
||
193 | table.insert(FBGUIUnitBuffList,"'partypet"..index .. "'") |
||
194 | end |
||
195 | FBGUIUnitCombatList = { "'playercombat'","'targetcombat'" } |
||
196 | FBUnitList = { "player","party1","party2","party3","party4","pet","target", |
||
197 | "partypet1","partypet2","partypet3","partypet4"} |
||
198 | FBUnitCombatList = { "playercombat","targetcombat" } |
||
199 | FBCompletePartyList = { "'party1'", "'party2'", "'party3'", "'party4'", |
||
200 | "'partypet1'", "'partypet2'", "'partypet3'", "'partypet4'"} |
||
201 | FBCompleteTargetTargetList = {"'player'","'pet'" } |
||
202 | FBCompletePetList = { "'pet'" } |
||
203 | FBCompletePCList = {"'player'"} |
||
204 | for index = 1,4 do |
||
205 | table.insert(FBCompleteTargetTargetList,"'party"..index .. "'") |
||
206 | table.insert(FBCompleteTargetTargetList,"'partypet"..index .. "'") |
||
207 | table.insert(FBCompletePCList,"'party"..index.."'") |
||
208 | table.insert(FBCompletePetList,"'partypet"..index.."'") |
||
209 | end |
||
210 | for index, value in ipairs(FBCompleteReactionList) do |
||
211 | table.insert(FBCompleteTargetTargetList,string.sub(value,1,-2) .. "pc'") |
||
212 | table.insert(FBCompleteTargetTargetList,string.sub(value,1,-2) .. "npc'") |
||
213 | end |
||
214 | for index = 1,40 do |
||
215 | table.insert(FBCompleteTargetTargetList,"'raid"..index .. "'") |
||
216 | table.insert(FBCompleteTargetTargetList,"'raidpet"..index .. "'") |
||
217 | table.insert(FBCompletePCList,"'raid"..index.."'") |
||
218 | table.insert(FBCompletePetList,"'raidpet"..index.."'") |
||
219 | end |
||
220 | -- list of all GUI Panels |
||
221 | FBGUIPanelsList= {"Script Editor","Event Editor","Global Options","Auto Items","Performance Options"} |
||
222 | -- Item enchantments |
||
223 | FBItemEnchants = {} |
||
224 | -- Anchor positions |
||
225 | FBAnchors = { ["TOPLEFT"] = true,["TOPRIGHT"] = true, ["TOP"] = true, |
||
226 | ["BOTTOMLEFT"] = true, ["BOTTOMRIGHT"] = true, ["BOTTOM"] = true, |
||
227 | ["CENTER"] = true, ["LEFT"] = true, ["RIGHT"] = true } |
||
228 | -- List of event toggles in a more accessible form |
||
229 | FBEventToggles = {} |
||
230 | -- table of functions for text sub |
||
231 | FBTextSubstitutions = {} |
||
232 | -- Shirtan doing tracking events. |
||
233 | FBLastTracking = "none" |
||
234 | FBTrackingList = { |
||
235 | ["herbs"] = "Interface\\Icons\\INV_Misc_Flower_02", |
||
236 | ["minerals"] = "Interface\\Icons\\Spell_Nature_Earthquake", |
||
237 | ["treasure"] = "Interface\\Icons\\Racial_Dwarf_FindTreasure", |
||
238 | ["beasts"] = "Interface\\Icons\\Ability_Tracking", |
||
239 | ["humanoids"] = "Interface\\Icons\\Spell_Holy_PrayerOfHealing", |
||
240 | ["hidden"] = "Interface\\Icons\\Ability_Stealth", |
||
241 | ["elementals"] = "Interface\\Icons\\Spell_Frost_SummonWaterElemental", |
||
242 | ["undead"] = "Interface\\Icons\\Spell_Shadow_DarkSummoning", |
||
243 | ["demons"] = "Interface\\Icons\\Spell_Shadow_SummonFelHunter", |
||
244 | ["giants"] = "Interface\\Icons\\Ability_Racial_Avatar", |
||
245 | ["dragonkin"] = "Interface\\Icons\\INV_Misc_Head_Dragon_01", |
||
246 | ["senseundead"] = "Interface\\Icons\\Spell_Holy_SenseUndead", |
||
247 | ["sensedemons"] = "Interface\\Icons\\Spell_Shadow_Metamorphosis" |
||
248 | } |
||
249 | FBCompleteTrackingList = {"'herbs'", "'minerals'", "'treasure'", "'beasts'", "'humanoids'", "'hidden'", |
||
250 | "'elementals'", "'undead'", "'demons'", "'giants'", "'dragonkin'", "'senseundead'", |
||
251 | "'sensedemons'", "'none'"} |
||
252 | -- /Tracking events. |
||
253 | FBButtonInfoShown = false |
||
254 | FBButtonInfoTooltipShown = false |
||
255 |