You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
UnlockerTypes/Universal.lua

513 lines
18 KiB

---@meta
---@enum CollisionFlags
local CollisionFlags = {
M2Collision = 0x1,
M2Render = 0x2,
WMOCollision = 0x10,
WMORender = 0x20,
Terrain = 0x100,
WaterWalkableLiquid = 0x10000,
Liquid = 0x20000,
EntityCollision = 0x100000,
}
---@enum ObjectType
local ObjectType = {
Object = 0,
Item = 1,
Container = 2,
AzeriteEmpoweredItem = 3,
AzeriteItem = 4,
Unit = 5,
Player = 6,
ActivePlayer = 7,
GameObject = 8,
DynamicObject = 9,
Corpse = 10,
AreaTrigger = 11,
SceneObject = 12,
Conversation = 13,
AiGroup = 14,
Scenario = 15,
Loot = 16,
Invalid = 17,
}
---@enum LuaType
local LuaType = {
Bool = 1,
Char = 2,
Byte = 3,
Short = 4,
UShort = 5,
Int = 6,
UInt = 7,
Long = 8,
ULong = 9,
Float = 10,
Double = 11,
StringType = 12,
IntPtr = 13,
UIntPtr = 14,
GUID = 15,
}
---@enum UnitCreatureType
local UnitCreatureType = {
Beast = 1,
Dragonkin = 2,
Demon = 3,
Elemental = 4,
Giant = 5,
Undead = 6,
Humanoid = 7,
Critter = 8,
Mechanical = 9,
NotSpecified = 10,
Totem = 11,
NonCombatPet = 12,
GasCloud = 13,
WildPet = 14, -- Retail Only
Aberration = 15, -- Retail Only
}
local ot = {
GOT_Door = 0,
GOT_Button = 1,
GOT_QuestGiver = 2,
GOT_Chest = 3,
GOT_Binder = 4,
GOT_Generic = 5,
GOT_Trap = 6,
GOT_Chair = 7,
GOT_SpellFocus = 8,
GOT_Text = 9,
GOT_Goober = 0xa,
GOT_Transport = 0xb,
GOT_AreaDamage = 0xc,
GOT_Camera = 0xd,
GOT_WorldObj = 0xe,
GOT_MapObjTransport = 0xf,
GOT_DuelArbiter = 0x10,
GOT_FishingNode = 0x11,
GOT_Ritual = 0x12,
GOT_Mailbox = 0x13,
GOT_AuctionHouse = 0x14,
GOT_SpellCaster = 0x16,
GOT_MeetingStone = 0x17,
GOT_Unkown18 = 0x18,
GOT_FishingPool = 0x19,
GOT_FORCEDWORD = 0xFFFFFFFF,
}
---@enum GameObjectType
local GameObjectType = {
Door = 0,
Button = 1,
QuestGiver = 2,
Chest = 3, -- Herbs, Minerals, Chests
Binder = 4,
Generic = 5,
Trap = 6,
Chair = 7,
SpellFocus = 8,
Text = 9,
Goober = 0xa, -- 10
Transport = 0xb, -- 11
AreaDamage = 0xc, -- 12
Camera = 0xd, -- 13
WorldObj = 0xe, -- 14
MapObjTransport = 0xf, -- 15
DuelArbiter = 0x10, -- 16
FishingNode = 0x11, -- 17
Ritual = 0x12, -- 18
Mailbox = 0x13, -- 19
AuctionHouse = 0x14, -- 20
GuardPost = 21,
SpellCaster = 0x16, -- 22
MeetingStone = 0x17, -- 23
FlagStand = 0x18, -- 24
FishingPool = 0x19, -- 25
FlagDrop = 26,
DONOTUSE2 = 27,
DONOTUSE3 = 28,
ControlZone = 29,
AuraGenerator = 30,
DungeonDifficulty = 31,
BarberChair = 32,
DestructibleBuilding = 33,
GuildBank = 34,
Trapdoor = 35,
Newflag = 36,
Newflagdrop = 37,
GarrisonBuilding = 38,
GarrisonPlot = 39,
ClientCreature = 40,
ClientItem = 41,
CapturePoint = 42,
PhaseableMO = 43,
GarrisonMonument = 44,
GarrisonShipment = 45,
GarrisonMonumentPlaque = 46,
ItemForge = 47,
UILink = 48,
KeystoneReceptacle = 49,
GatheringNode = 50,
ChallengeModeReward = 51,
Multi = 52,
SeigableMulti = 53,
SeigableMo = 54,
PvpReward = 55,
PlayerChoiceChest = 56,
LegendaryForge = 57,
GearTalentTree = 58,
WeeklyRewardChest = 59,
ClientModel = 60,
ForceDWord = 0xFFFFFFFF, -- 4294967295
}
---@enum MovementFlags
local MovementFlags = {
NONE = 0x00000000,
FORWARD = 0x00000001,
BACKWARD = 0x00000002,
STRAFELEFT = 0x00000004,
STRAFERIGHT = 0x00000008,
TURNLEFT = 0x00000010,
TURNRIGHT = 0x00000020,
PITCHUP = 0x00000040,
PITCHDOWN = 0x00000080,
WALKMODE = 0x00000100,
ONTRANSPORT = 0x00000200,
LEVITATING = 0x00000400,
ROOT = 0x00000800,
FALLING = 0x00001000,
FALLINGFAR = 0x00002000,
PENDINGSTOP = 0x00004000,
PENDINGSTRAFESTOP = 0x00008000,
PENDINGFORWARD = 0x00010000,
PENDINGBACKWARD = 0x00020000,
PENDINGSTRAFELEFT = 0x00040000,
PENDINGSTRAFERIGHT = 0x00080000,
PENDINGROOT = 0x00100000,
SWIMMING = 0x00200000,
ASCENDING = 0x00400000,
DESCENDING = 0x00800000,
CAN_FLY = 0x01000000,
FLYING = 0x02000000,
SPLINEELEVATION = 0x04000000,
SPLINEENABLED = 0x08000000,
WATERWALKING = 0x10000000,
SAFEFALL = 0x20000000,
HOVER = 0x40000000,
}
--- The current player.
---@alias PlayerUnitId "player"
local PlayerUnitId = "player"
--- The current player's focus target as selected by the /focus command.
---@alias FocusUnitId "focus"
local FocusUnitId = "focus"
--- The unit which the mouse is currently (or was most recently) hovering over.
---@alias MouseoverUnitId "mouseover"
local MouseoverUnitId = "mouseover"
--- A valid unit token that always refers to no unit. UnitName will return "Unknown, nil" for this UnitID.
---@alias NoneUnitId "none"
local NoneUnitId = "none"
--- The current player's pet.
---@alias PetUnitId "pet"
local PetUnitId = "pet"
--- The currently targeted unit. May be overridden in macros by unit specified as a value of respective Secure Button attribute.
---@alias TargetUnitId "target"
local TargetUnitId = "target"
--- The current player's vehicle.
---@alias VehicleUnitId "vehicle"
local VehicleUnitId = "vehicle"
--- The NPC with which the player is currently interacting. You must be interacting with the NPC for this to work (e.g. the quest, flight path, merchant, gossip, or bank frame is open).
---@alias NpcUnitId "npc"
local NpcUnitId = "npc"
--- The quest giver NPC with which the player is currently interacting. In most cases this will be identical to the "npc" unit.
---@alias QuestNpcUnitId "questnpc"
local QuestNpcUnitId = "questnpc"
local PartyBaseUnitId = "party"
local PartyPetBaseUnitId = PartyBaseUnitId .. PetUnitId
local RaidBaseUnitId = "raid"
local RaidPetBaseUnitId = RaidBaseUnitId .. PetUnitId
local ArenaBaseUnitId = "arena"
local BossBaseUnitId = "boss"
local NameplateBaseUnitId = "nameplate"
local SpectatedBaseUnitId = "spectated"
local SpectatedTeamAId = "a"
local SpectatedTeamABaseUnitId = SpectatedBaseUnitId .. SpectatedTeamAId
local SpectatedTeamAPetBaseUnitId = SpectatedBaseUnitId .. PetUnitId .. SpectatedTeamAId
local SpectatedTeamBId = "b"
local SpectatedTeamBBaseUnitId = SpectatedBaseUnitId .. SpectatedTeamBId
local SpectatedTeamBPetBaseUnitId = SpectatedBaseUnitId .. PetUnitId .. SpectatedTeamBId
--- The raid member with raidIndex N (1,2,3,...,40) `raid1` - `raid40`.
---@enum (key) RaidUnitIds
local RaidUnitIds = {
raid1 = RaidBaseUnitId .. "1",
raid2 = RaidBaseUnitId .. "2",
raid3 = RaidBaseUnitId .. "3",
raid4 = RaidBaseUnitId .. "4",
raid5 = RaidBaseUnitId .. "5",
raid6 = RaidBaseUnitId .. "6",
raid7 = RaidBaseUnitId .. "7",
raid8 = RaidBaseUnitId .. "8",
raid9 = RaidBaseUnitId .. "9",
raid10 = RaidBaseUnitId .. "10",
raid11 = RaidBaseUnitId .. "11",
raid12 = RaidBaseUnitId .. "12",
raid13 = RaidBaseUnitId .. "13",
raid14 = RaidBaseUnitId .. "14",
raid15 = RaidBaseUnitId .. "15",
raid16 = RaidBaseUnitId .. "16",
raid17 = RaidBaseUnitId .. "17",
raid18 = RaidBaseUnitId .. "18",
raid19 = RaidBaseUnitId .. "19",
raid20 = RaidBaseUnitId .. "20",
raid21 = RaidBaseUnitId .. "21",
raid22 = RaidBaseUnitId .. "22",
raid23 = RaidBaseUnitId .. "23",
raid24 = RaidBaseUnitId .. "24",
raid25 = RaidBaseUnitId .. "25",
raid26 = RaidBaseUnitId .. "26",
raid27 = RaidBaseUnitId .. "27",
raid28 = RaidBaseUnitId .. "28",
raid29 = RaidBaseUnitId .. "29",
raid30 = RaidBaseUnitId .. "30",
raid31 = RaidBaseUnitId .. "31",
raid32 = RaidBaseUnitId .. "32",
raid33 = RaidBaseUnitId .. "33",
raid34 = RaidBaseUnitId .. "34",
raid35 = RaidBaseUnitId .. "35",
raid36 = RaidBaseUnitId .. "36",
raid37 = RaidBaseUnitId .. "37",
raid38 = RaidBaseUnitId .. "38",
raid39 = RaidBaseUnitId .. "39",
raid40 = RaidBaseUnitId .. "40",
}
--- Opposing arena member with index N (1,2,3,4 or 5) `arena1` - `arena5`.
---@enum (key) ArenaUnitIds
local ArenaUnitIds = {
arena1 = ArenaBaseUnitId .. "1",
arena2 = ArenaBaseUnitId .. "2",
arena3 = ArenaBaseUnitId .. "3",
arena4 = ArenaBaseUnitId .. "4",
arena5 = ArenaBaseUnitId .. "5",
}
--- The active bosses of the current encounter if available N (1,2,3...,8) `boss1` - `boss8`.
---@enum (key) BossUnitIds
local BossUnitIds = {
boss1 = BossBaseUnitId .. "1",
boss2 = BossBaseUnitId .. "2",
boss3 = BossBaseUnitId .. "3",
boss4 = BossBaseUnitId .. "4",
boss5 = BossBaseUnitId .. "5",
boss6 = BossBaseUnitId .. "6",
boss7 = BossBaseUnitId .. "7",
boss8 = BossBaseUnitId .. "8",
}
--- The Nth party member excluding the player (1,2,3 or 4) `party1` - `party4`.
---@enum (key) PartyUnitIds
local PartyUnitIds = {
party1 = PartyBaseUnitId .. "1",
party2 = PartyBaseUnitId .. "2",
party3 = PartyBaseUnitId .. "3",
party4 = PartyBaseUnitId .. "4",
}
--- The pet of the Nth party member (N is 1,2,3, or 4) `partypet1` - `partypet4`.
---@enum (key) PartyPetUnitIds
local PartyPetUnitIds = {
partypet1 = PartyPetBaseUnitId .. "1",
partypet2 = PartyPetBaseUnitId .. "2",
partypet3 = PartyPetBaseUnitId .. "3",
partypet4 = PartyPetBaseUnitId .. "4",
}
--- The pet of the raid member with raidIndex N (1,2,3,...,40) `raidpet1` - `raidpet40`.
---@enum (key) RaidPetUnitIds
local RaidPetUnitIds = {
raidpet1 = RaidPetBaseUnitId .. "1",
raidpet2 = RaidPetBaseUnitId .. "2",
raidpet3 = RaidPetBaseUnitId .. "3",
raidpet4 = RaidPetBaseUnitId .. "4",
raidpet5 = RaidPetBaseUnitId .. "5",
raidpet6 = RaidPetBaseUnitId .. "6",
raidpet7 = RaidPetBaseUnitId .. "7",
raidpet8 = RaidPetBaseUnitId .. "8",
raidpet9 = RaidPetBaseUnitId .. "9",
raidpet10 = RaidPetBaseUnitId .. "10",
raidpet11 = RaidPetBaseUnitId .. "11",
raidpet12 = RaidPetBaseUnitId .. "12",
raidpet13 = RaidPetBaseUnitId .. "13",
raidpet14 = RaidPetBaseUnitId .. "14",
raidpet15 = RaidPetBaseUnitId .. "15",
raidpet16 = RaidPetBaseUnitId .. "16",
raidpet17 = RaidPetBaseUnitId .. "17",
raidpet18 = RaidPetBaseUnitId .. "18",
raidpet19 = RaidPetBaseUnitId .. "19",
raidpet20 = RaidPetBaseUnitId .. "20",
raidpet21 = RaidPetBaseUnitId .. "21",
raidpet22 = RaidPetBaseUnitId .. "22",
raidpet23 = RaidPetBaseUnitId .. "23",
raidpet24 = RaidPetBaseUnitId .. "24",
raidpet25 = RaidPetBaseUnitId .. "25",
raidpet26 = RaidPetBaseUnitId .. "26",
raidpet27 = RaidPetBaseUnitId .. "27",
raidpet28 = RaidPetBaseUnitId .. "28",
raidpet29 = RaidPetBaseUnitId .. "29",
raidpet30 = RaidPetBaseUnitId .. "30",
raidpet31 = RaidPetBaseUnitId .. "31",
raidpet32 = RaidPetBaseUnitId .. "32",
raidpet33 = RaidPetBaseUnitId .. "33",
raidpet34 = RaidPetBaseUnitId .. "34",
raidpet35 = RaidPetBaseUnitId .. "35",
raidpet36 = RaidPetBaseUnitId .. "36",
raidpet37 = RaidPetBaseUnitId .. "37",
raidpet38 = RaidPetBaseUnitId .. "38",
raidpet39 = RaidPetBaseUnitId .. "39",
raidpet40 = RaidPetBaseUnitId .. "40",
}
--- The Nth nameplate unit (1,2,3,...,40) `nameplate1` - `nameplate40`.
---@enum (key) NameplateUnitIds
local NameplateUnitIds = {
nameplate1 = NameplateBaseUnitId .. "1",
nameplate2 = NameplateBaseUnitId .. "2",
nameplate3 = NameplateBaseUnitId .. "3",
nameplate4 = NameplateBaseUnitId .. "4",
nameplate5 = NameplateBaseUnitId .. "5",
nameplate6 = NameplateBaseUnitId .. "6",
nameplate7 = NameplateBaseUnitId .. "7",
nameplate8 = NameplateBaseUnitId .. "8",
nameplate9 = NameplateBaseUnitId .. "9",
nameplate10 = NameplateBaseUnitId .. "10",
nameplate11 = NameplateBaseUnitId .. "11",
nameplate12 = NameplateBaseUnitId .. "12",
nameplate13 = NameplateBaseUnitId .. "13",
nameplate14 = NameplateBaseUnitId .. "14",
nameplate15 = NameplateBaseUnitId .. "15",
nameplate16 = NameplateBaseUnitId .. "16",
nameplate17 = NameplateBaseUnitId .. "17",
nameplate18 = NameplateBaseUnitId .. "18",
nameplate19 = NameplateBaseUnitId .. "19",
nameplate20 = NameplateBaseUnitId .. "20",
nameplate21 = NameplateBaseUnitId .. "21",
nameplate22 = NameplateBaseUnitId .. "22",
nameplate23 = NameplateBaseUnitId .. "23",
nameplate24 = NameplateBaseUnitId .. "24",
nameplate25 = NameplateBaseUnitId .. "25",
nameplate26 = NameplateBaseUnitId .. "26",
nameplate27 = NameplateBaseUnitId .. "27",
nameplate28 = NameplateBaseUnitId .. "28",
nameplate29 = NameplateBaseUnitId .. "29",
nameplate30 = NameplateBaseUnitId .. "30",
nameplate31 = NameplateBaseUnitId .. "31",
nameplate32 = NameplateBaseUnitId .. "32",
nameplate33 = NameplateBaseUnitId .. "33",
nameplate34 = NameplateBaseUnitId .. "34",
nameplate35 = NameplateBaseUnitId .. "35",
nameplate36 = NameplateBaseUnitId .. "36",
nameplate37 = NameplateBaseUnitId .. "37",
nameplate38 = NameplateBaseUnitId .. "38",
nameplate39 = NameplateBaseUnitId .. "39",
nameplate40 = NameplateBaseUnitId .. "40",
}
-- The Nth spectated unit (1,2,3,...,15) for Team "a". Only present in commentator mode. `spectateda1` - `spectateda15`
---@enum (key) SpectatedTeamAUnitIds
local SpectatedTeamAUnitIds = {
spectateda1 = SpectatedTeamABaseUnitId .. "1",
spectateda2 = SpectatedTeamABaseUnitId .. "2",
spectateda3 = SpectatedTeamABaseUnitId .. "3",
spectateda4 = SpectatedTeamABaseUnitId .. "4",
spectateda5 = SpectatedTeamABaseUnitId .. "5",
spectateda6 = SpectatedTeamABaseUnitId .. "6",
spectateda7 = SpectatedTeamABaseUnitId .. "7",
spectateda8 = SpectatedTeamABaseUnitId .. "8",
spectateda9 = SpectatedTeamABaseUnitId .. "9",
spectateda10 = SpectatedTeamABaseUnitId .. "10",
spectateda11 = SpectatedTeamABaseUnitId .. "11",
spectateda12 = SpectatedTeamABaseUnitId .. "12",
spectateda13 = SpectatedTeamABaseUnitId .. "13",
spectateda14 = SpectatedTeamABaseUnitId .. "14",
spectateda15 = SpectatedTeamABaseUnitId .. "15",
}
-- The pet of the Nth spectated unit (1,2,3,...,15) for Team "a". Only present in commentator mode. `spectatedpeta1` - `spectatedpeta15`
---@enum (key) SpectatedTeamAPetUnitIds
local SpectatedTeamAPetUnitIds = {
spectatedpeta1 = SpectatedTeamAPetBaseUnitId .. "1",
spectatedpeta2 = SpectatedTeamAPetBaseUnitId .. "2",
spectatedpeta3 = SpectatedTeamAPetBaseUnitId .. "3",
spectatedpeta4 = SpectatedTeamAPetBaseUnitId .. "4",
spectatedpeta5 = SpectatedTeamAPetBaseUnitId .. "5",
spectatedpeta6 = SpectatedTeamAPetBaseUnitId .. "6",
spectatedpeta7 = SpectatedTeamAPetBaseUnitId .. "7",
spectatedpeta8 = SpectatedTeamAPetBaseUnitId .. "8",
spectatedpeta9 = SpectatedTeamAPetBaseUnitId .. "9",
spectatedpeta10 = SpectatedTeamAPetBaseUnitId .. "10",
spectatedpeta11 = SpectatedTeamAPetBaseUnitId .. "11",
spectatedpeta12 = SpectatedTeamAPetBaseUnitId .. "12",
spectatedpeta13 = SpectatedTeamAPetBaseUnitId .. "13",
spectatedpeta14 = SpectatedTeamAPetBaseUnitId .. "14",
spectatedpeta15 = SpectatedTeamAPetBaseUnitId .. "15",
}
-- The Nth spectated unit (1,2,3,...,15) for Team "b". Only present in commentator mode. `spectatedb1` - `spectatedb15`
---@enum (key) SpectatedTeamBUnitIds
local SpectatedTeamBUnitIds = {
spectatedb1 = SpectatedTeamBBaseUnitId .. "1",
spectatedb2 = SpectatedTeamBBaseUnitId .. "2",
spectatedb3 = SpectatedTeamBBaseUnitId .. "3",
spectatedb4 = SpectatedTeamBBaseUnitId .. "4",
spectatedb5 = SpectatedTeamBBaseUnitId .. "5",
spectatedb6 = SpectatedTeamBBaseUnitId .. "6",
spectatedb7 = SpectatedTeamBBaseUnitId .. "7",
spectatedb8 = SpectatedTeamBBaseUnitId .. "8",
spectatedb9 = SpectatedTeamBBaseUnitId .. "9",
spectatedb10 = SpectatedTeamBBaseUnitId .. "10",
spectatedb11 = SpectatedTeamBBaseUnitId .. "11",
spectatedb12 = SpectatedTeamBBaseUnitId .. "12",
spectatedb13 = SpectatedTeamBBaseUnitId .. "13",
spectatedb14 = SpectatedTeamBBaseUnitId .. "14",
spectatedb15 = SpectatedTeamBBaseUnitId .. "15",
}
-- The pet of the Nth spectated unit (1,2,3,...,15) for Team "B". Only present in commentator mode. `spectatedpetb1` - `spectatedpetb15`
---@enum (key) SpectatedTeamBPetUnitIds
local SpectatedTeamBPetUnitIds = {
spectatedpetb1 = SpectatedTeamBPetBaseUnitId .. "1",
spectatedpetb2 = SpectatedTeamBPetBaseUnitId .. "2",
spectatedpetb3 = SpectatedTeamBPetBaseUnitId .. "3",
spectatedpetb4 = SpectatedTeamBPetBaseUnitId .. "4",
spectatedpetb5 = SpectatedTeamBPetBaseUnitId .. "5",
spectatedpetb6 = SpectatedTeamBPetBaseUnitId .. "6",
spectatedpetb7 = SpectatedTeamBPetBaseUnitId .. "7",
spectatedpetb8 = SpectatedTeamBPetBaseUnitId .. "8",
spectatedpetb9 = SpectatedTeamBPetBaseUnitId .. "9",
spectatedpetb10 = SpectatedTeamBPetBaseUnitId .. "10",
spectatedpetb11 = SpectatedTeamBPetBaseUnitId .. "11",
spectatedpetb12 = SpectatedTeamBPetBaseUnitId .. "12",
spectatedpetb13 = SpectatedTeamBPetBaseUnitId .. "13",
spectatedpetb14 = SpectatedTeamBPetBaseUnitId .. "14",
spectatedpetb15 = SpectatedTeamBPetBaseUnitId .. "15",
}
---@alias UnitIds PlayerUnitId | FocusUnitId | MouseoverUnitId | NoneUnitId | PetUnitId | TargetUnitId | VehicleUnitId | NpcUnitId | QuestNpcUnitId | RaidUnitIds | ArenaUnitIds | BossUnitIds | PartyUnitIds | PartyPetUnitIds | RaidPetUnitIds | NameplateUnitIds | SpectatedTeamAUnitIds | SpectatedTeamAPetUnitIds | SpectatedTeamBUnitIds | SpectatedTeamBPetUnitIds