forked from Tercioo/Plater-Nameplates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDefinitions.lua
230 lines (209 loc) · 9.13 KB
/
Definitions.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
---@alias scriptname string
---@class ctimer : table
---@field Cancelled fun(self: ctimer) : boolean if true this timer was cancelled or finished
---@field Cancel fun(self: ctimer) cancel the timer
---@class plateframe : table
---@field actorType string
---@field ActorNameSpecial fontstring
---@field ActorTitleSpecial fontstring
---@field CurrentUnitNameString fontstring
---@field debugAreaTexture texture
---@field debugAreaText fontstring
---@field FadedIn boolean
---@field FocusIndicator texture
---@field HasUpdateScheduled ctimer
---@field isFriend boolean
---@field isSoftInteract boolean
---@field isObject boolean
---@field isNamePlate boolean if the nameplate is a nameplate
---@field isSelf boolean if the unit is the player
---@field IsSelf boolean if the unit is the player
---@field isBattlePet boolean
---@field isWidgetOnlyMode boolean
---@field isPlayer boolean
---@field IsFriendlyPlayerWithoutHealthBar boolean
---@field IsNpcWithoutHealthBar boolean
---@field IconIndicators texture[]
---@field NameAnchor number
---@field Obscured texture
---@field OnTickFrame frame
---@field Plater boolean if the nameplate has a unitFrame created by plater
---@field PlateConfig table
---@field playerGuildName string
---@field PreviousUnitType string
---@field PlayerCannotAttack boolean
---@field playerHasAggro boolean true if the player has aggro on the unit
---@field PlayBodyFlash fun(text: string, duration: number, ignoreCooldown: boolean)
---@field QuestInfo questdata
---@field QuestAmountCurrent number current progress of the quest
---@field QuestAmountTotal number total of progress of the quest
---@field QuestText string
---@field QuestName string name of the quest
---@field QuestIsCampaign boolean true if the quest is a campaign quest
---@field RaidTarget texture
---@field SpellAnimations table
---@field TargetNeonUp texture
---@field TargetNeonDown texture
---@field Top3DFrame frame
---@field unitNameInternal string
---@field unitFrame unitframe
---@field UnitFrame frame unit frame from blizzard
---@field unitFramePlater table backup the unit frame address so we can restore it in case a script messes up and override the unit frame
---@class plater_petinfo : table
---@field ownerGUID string
---@field ownerName string
---@field petName string
---@field time number
---@class plater_spelldata : table
---@field event string
---@field source string
---@field npcID number
---@field type string?
---@field isChanneled any
---@field encounterID number?
---@field encounterName string?
---@class unitframe : table
---@field healthBar table
---@field castBar table
---@field powerBar table
---@class npccolordb : {[number]: npccolortable} dictionary of npccolortable indexed by npcId
---@class npccolortable : {key1: boolean, key2: boolean, key3: string} [1] enabled [2] scriptOnly [3] colorID
---@class castcolordb : {[number]: castcolortable} dictionary of castcolortable indexed by spellId
---@class castcolortable : {key1: boolean, key2: string, key3: string} [1] enabled [2] colorId [3] renamed spellname
---@class audiocuedb : {[number]: string} dictionary of strings with the path for the audio to play indexed by spellId
---@class npccacheinfo : {key1: string, key2: string, key3: string} [1] npc name [2] zone name [3] language
---@class dbmtimerbar : table
---@field msg string
---@field display string
---@field id number
---@field timer number
---@field start number
---@field icon any
---@field spellId number
---@field barType any
---@field color any
---@field colorId any
---@field modId any
---@field keep any
---@field fade any
---@field name string
---@field guid string
---@field paused boolean
---@class bwtimerbar : table
---@field msg string
---@field id any
---@field timer number
---@field start number
---@field icon any
---@field spellId number
---@field barType any
---@field modId any
---@field name string
---@field paused boolean
---@class targetindicator : table
---@field path string
---@field coords {key1: {key1: number, key2: number, key3: number, key4: number}, key2: {key1: number, key2: number, key3: number, key4: number}, key3: {key1: number, key2: number, key3: number, key4: number}, key4: {key1: number, key2: number, key3: number, key4: number}} texcoords, support 4 or 8 coords method
---@field desaturated boolean
---@field width number
---@field height number
---@field x number --offset
---@field y number --offset
---@class questdata : table
---@field questName string
---@field questText string
---@field finished boolean
---@field groupQuest boolean
---@field groupFinished boolean
---@field amount number
---@field groupAmount number
---@field total number
---@field yourQuest boolean
---@field isCampaignQuest boolean
---@class classspeccoords : {key1: number, key2: number, key3: number, key4: number} texcoords
---@class plater : table
---@field versionString string version from the toc file
---@field fullVersionInfo string version from the toc file + framework version
---@field PerformanceUnits table<number, number> table with performance units: npcId = true
---@field ForceBlizzardNameplateUnits table<number, number> npcId = true
---@field LastCombat {npcNames: table<string, boolean>, spellNames: table<string, boolean>} store the npcnames and spellnames from the last combat
---@field BossModsTimeBarDBM table<any, dbmtimerbar> store the bars created by DBM
---@field BossModsTimeBarBW table<any, bwtimerbar> store the bars created by BigWigs
---@field CooldownEdgeTextures string[] textures used in the cooldown animation, scripts can add more values to it, profile holds only the path to it
---@field SparkTextures string[] textures used in the castbar, scripts can add more values to it, profile holds only the path to it
---@field TargetHighlights string[] textures used to indicate which nameplate is the current target, scripts can add more values to it, profile holds only the path to it
---@field Media {Icons: string[]} store the paths for the bundled icons in Plater Nameplates
---@field TargetIndicators table<string, targetindicator> table with information about target indicators
---@field SpecList table<string, table<number, boolean>> store the specId for each class, format: class = {specId = true, specId = true, specId = true}
---@field DefaultSpellRangeList table<number, number> store the default range for each spec, format: specId = range
---@field DefaultSpellRangeListF table<number, number> store the default range for each spec on friendly targets, format: specId = range
---@field class_specs_coords table<string, classspeccoords> store the texcoords for the specs icons, format: specId = {left, right, top, bottom}
---@field AnchorNames string[] localized anchor names used in the options panel
---@field AnchorNamesByPhraseId string[] same as AnchorNames but indexed by phraseId
---@field ForceInCombatUnits table<number, boolean> npcs in this list will always return true for UnitAffectingCombat()
---@field GetVersionInfo fun(printOut: boolean) : string returns the version info of print to chat if printOut is true
---@field AddPerformanceUnits fun(npcId: number)
---@field RemovePerformanceUnits fun(npcId: number)
---@field AddForceBlizzardNameplateUnits fun(npcId: number)
---@field RemoveForceBlizzardNameplateUnits fun(npcId: number)
---@field GetHealthCutoffValue fun() update the execute range by the class, spec and talents the player is using
---@field CheckRange fun(plateFrame: table, onAdded: boolean) check if the nameplate is in range and update the alpha
---@field PlayAudioForScript fun(canUseScriptAudio: boolean, audioFilePath: string, envTable: scriptenv) play an audio for a script
---@class scriptenv : table
---@field _SpellID number
---@field _UnitID string
---@field _SpellName string
---@field _Texture string
---@field _Caster string
---@field _StackCount number
---@field _Duration number
---@field _StartTime number
---@field _EndTime number
---@field _RemainingTime number
---@field _CastPercent number
---@field _CanInterrupt boolean
---@field _NpcID number
---@field _UnitName string
---@field _UnitGUID string
---@field _HealthPercent number
---@field _CanStealOrPurge boolean
---@field _AuraType string
---@field _AuraAmount number
---@field _CastBarHeight number
---@class scriptoption : table
---@field Type number
---@field Name string
---@field Value any value can be a number, string, boolean or a table
---@field Key string
---@field Icon string
---@field Desc string
---@field Fraction boolean
---@field Min number
---@field Max number
---@class scriptdata : table
---@field ScriptType number
---@field Name string
---@field Desc string
---@field Author string
---@field Revision number
---@field Time number
---@field version number
---@field semver string
---@field url string
---@field Icon string
---@field Prio number
---@field Enabled boolean
---@field NpcNames string[]
---@field SpellIds number[]
---@field Initialization string
---@field Temp_Initialization string
---@field ConstructorCode string
---@field Temp_ConstructorCode string
---@field UpdateCode string
---@field Temp_UpdateCode string
---@field OnShowCode string
---@field Temp_OnShowCode string
---@field OnHideCode string
---@field Temp_OnHideCode string
---@field Options scriptoption[]
---@field OptionsValues table<string, any> store the values of the options
---@field PlaterCore number