From aa3c86b3c100cab7ee9958e0a9b3cc8a7fd36540 Mon Sep 17 00:00:00 2001 From: Aleksander Spro Date: Sun, 18 Sep 2022 16:26:14 +0200 Subject: [PATCH] Some cleanups --- alias.lua | 2 + datatype/_achievement.lua | 26 ++++++----- datatype/_alert.lua | 10 +++-- datatype/_altability.lua | 40 ++++++++--------- datatype/_bool.lua | 2 +- datatype/_buff.lua | 19 ++++---- datatype/_class.lua | 22 +++++----- datatype/_corpse.lua | 14 +++--- datatype/_framelimiter.lua | 20 ++++----- datatype/_friends.lua | 14 +++++- datatype/_heading.lua | 10 ++--- datatype/_invslot.lua | 12 +++--- datatype/_skill.lua | 18 ++++---- datatype/_spawn.lua | 2 +- datatype/_spell.lua | 88 ++++++++++++++++++++------------------ datatype/_target.lua | 68 ++++++++++++++--------------- datatype/_type.lua | 6 ++- 17 files changed, 202 insertions(+), 171 deletions(-) diff --git a/alias.lua b/alias.lua index 13309df..29027e7 100644 --- a/alias.lua +++ b/alias.lua @@ -7,9 +7,11 @@ ---@alias MQString fun(): string --[[ Userdata ]] +---@alias MQAltAbility altability | fun(): string|nil ---@alias MQBuff buff | fun(): string|nil ---@alias MQCachedBuff cachedbuff | fun(): string|nil ---@alias MQCharacter character | fun(): string|nil +---@alias MQInvSlot invslot | fun(): string|nil ---@alias MQItem item | fun(): string|nil ---@alias MQMerchant merchant | fun(): string|nil ---@alias MQPet pet | fun(): string|nil diff --git a/datatype/_achievement.lua b/datatype/_achievement.lua index 6b304d2..0925516 100644 --- a/datatype/_achievement.lua +++ b/datatype/_achievement.lua @@ -1,20 +1,20 @@ ---@meta ---@class achievement ----@field ID MQInt #The achivement's unique ID ----@field Name MQString #The achievement's name ----@field Description MQString #The achievement's description ----@field Points MQInt #The point value for the achievement ----@field ObjectiveCount MQInt #The number of objectives in this achievement ----@field Index MQInt #The index of the achivement. See [Achivement Indices](https://docs.macroquest.org/reference/top-level-objects/tlo-achievement/#note-about-achievement-indices) for more information. ----@field IconID MQInt #ID of the Achievement state. See [Achivement Icon](https://docs.macroquest.org/reference/data-types/datatype-achievement/#achievement-icon) for more information. ----@field State MQString #The achievement state. See [Achievement State](https://docs.macroquest.org/reference/data-types/datatype-achievement/#achievement-state) for more information. +---@field ID MQInt # The achivement's unique ID +---@field Name MQString # The achievement's name +---@field Description MQString # The achievement's description +---@field Points MQInt # The point value for the achievement +---@field ObjectiveCount MQInt # The number of objectives in this achievement +---@field Index MQInt # The index of the achivement. See [Achivement Indices](https://docs.macroquest.org/reference/top-level-objects/tlo-achievement/#note-about-achievement-indices) for more information. +---@field IconID MQInt # ID of the Achievement state. See [Achivement Icon](https://docs.macroquest.org/reference/data-types/datatype-achievement/#achievement-icon) for more information. +---@field State MQString # The achievement state. See [Achievement State](https://docs.macroquest.org/reference/data-types/datatype-achievement/#achievement-state) for more information. ---@field Completed MQBoolean # If the achievement has been completed ---@field Open MQBoolean # If the achievement is open ---@field Locked MQBoolean # If the achievement is locked ---@field Hidden MQBoolean # If the achievement is hidden ----@field CompletedTime fun():time Calendar time when the achievement was completed. -achievement = {} +local achievement = {} +---@diagnostic disable: duplicate-set-field ---Find an objective by it's Description ---@param description string ---@return achievementobj @@ -24,10 +24,14 @@ function achievement.Objective(description) end ---@param id integer ---@return achievementobj function achievement.Objective(id) end +---@diagnostic enable: duplicate-set-field ---Generate an cheivement link. An optional name can be ---provided to display in the achievement, otherwise the ---current character's name will be used. ---@param name? string ---@return string -function achievement.Link(name) end \ No newline at end of file +function achievement.Link(name) end + +---@return time # Calendar time when the achievement was completed. +function achievement.CompletedTime() end \ No newline at end of file diff --git a/datatype/_alert.lua b/datatype/_alert.lua index c48fa75..ecf48d3 100644 --- a/datatype/_alert.lua +++ b/datatype/_alert.lua @@ -1,4 +1,8 @@ ---@meta ----@class alert mq datatype ----@field List fun(index:integer):alertlist Get the item from the list at the specified index ----@field Size MQInt #Get the number of alerts \ No newline at end of file +---@class alert +---@field public Size MQInt # Get the number of alerts +local alert = nil + +---@param index integer +---@return alertlist # Get the item from the list at the specified index +function alert.List(index) end \ No newline at end of file diff --git a/datatype/_altability.lua b/datatype/_altability.lua index 455ffb5..7babd6a 100644 --- a/datatype/_altability.lua +++ b/datatype/_altability.lua @@ -1,21 +1,21 @@ --- @class altability ---- @field public AARankRequired MQFloat #Rank required to train ---- @field public CanTrain MQBoolean #Returns true/false on if the Alternative Ability can be trained ---- @field public Cost MQFloat #Base cost to train ---- @field public Description MQString #Basic description ---- @field public ID MQInt #ID ---- @field public Index MQFloat #Returns the index number of the Alternative Ability ---- @field public MaxRank MQFloat #Max rank available in this ability ---- @field public MinLevel MQFloat #Minimum level to train ---- @field public MyReuseTime MQFloat #Reuse time with any hastened AA abilties ---- @field public Name MQString #Name ---- @field public NextIndex MQFloat #Returns the next index number of the Alternative Ability ---- @field public PointsSpent MQFloat #Returns the amount of points spent on an AA ---- @field public Passive MQBoolean #Returns true/false on if the Alternative Ability is passive ---- @field public RequiresAbility altability Required ability (if any) ---- @field public Rank MQFloat #Returns the Rank of the AA ---- @field public RequiresAbilityPoints MQFloat #Points required in above ability ---- @field public ReuseTime MQFloat #Reuse time in seconds ---- @field public ShortName MQString #Short name ---- @field public Spell MQSpell Spell used by the ability (if any) ---- @field public Type MQFloat #Type (1-6) \ No newline at end of file +--- @field public AARankRequired MQFloat # Rank required to train +--- @field public CanTrain MQBoolean # Returns true/false on if the Alternative Ability can be trained +--- @field public Cost MQFloat # Base cost to train +--- @field public Description MQString # Basic description +--- @field public ID MQInt # ID +--- @field public Index MQFloat # Returns the index number of the Alternative Ability +--- @field public MaxRank MQFloat # Max rank available in this ability +--- @field public MinLevel MQFloat # Minimum level to train +--- @field public MyReuseTime MQFloat # Reuse time with any hastened AA abilties +--- @field public Name MQString # Name +--- @field public NextIndex MQFloat # Returns the next index number of the Alternative Ability +--- @field public PointsSpent MQFloat # Returns the amount of points spent on an AA +--- @field public Passive MQBoolean # Returns true/false on if the Alternative Ability is passive +--- @field public RequiresAbility MQAltAbility # Required ability (if any) +--- @field public Rank MQFloat # Returns the Rank of the AA +--- @field public RequiresAbilityPoints MQFloat # Points required in above ability +--- @field public ReuseTime MQFloat # Reuse time in seconds +--- @field public ShortName MQString # Short name +--- @field public Spell MQSpell # Spell used by the ability (if any) +--- @field public Type MQFloat # Type (1-6) \ No newline at end of file diff --git a/datatype/_bool.lua b/datatype/_bool.lua index ef8ea72..cdc6511 100644 --- a/datatype/_bool.lua +++ b/datatype/_bool.lua @@ -1,2 +1,2 @@ --- @class bool ---- @field public ToString "TRUE" for non-zero, or "FALSE" for zero \ No newline at end of file +--- @field public ToString MQString # "TRUE" for non-zero, or "FALSE" for zero \ No newline at end of file diff --git a/datatype/_buff.lua b/datatype/_buff.lua index d3fe629..a68e1e9 100644 --- a/datatype/_buff.lua +++ b/datatype/_buff.lua @@ -1,10 +1,13 @@ --- @class buff : spell ---- @field public Counters MQFloat #The number of counters added by the buff ---- @field public Dar MQFloat #The remaining damage absorption of the buff (if any). This is not entirely accurate, it will only show you to the Dar of your spell when it was initially cast, or what it was when you last zoned (whichever is more recent). +--- @field public Counters MQFloat # The number of counters added by the buff +--- @field public Dar MQFloat # The remaining damage absorption of the buff (if any). This is not entirely accurate, it will only show you to the Dar of your spell when it was initially cast, or what it was when you last zoned (whichever is more recent). --- @field public Duration ticks The time remaining before the buff fades (not total duration) ---- @field public ID MQInt #The ID of the buff or shortbuff slot ---- @field public Level MQFloat #The level of the person that cast the buff on you (not the level of the spell) ---- @field public Mod MQFloat The modifier to a bard song ---- @field public Remove fun() Removes the named/partial name buff ---- @field public Spell MQSpell The spell ---- @field public ToString MQString #Same as Name \ No newline at end of file +--- @field public ID MQInt # The ID of the buff or shortbuff slot +--- @field public Level MQFloat # The level of the person that cast the buff on you (not the level of the spell) +--- @field public Mod MQFloat # The modifier to a bard song +--- @field public Spell MQSpell # The spell +--- @field public ToString MQString # Same as Name +local buff = nil + +---Removes the named/partial name buff +function buff.Remove() end \ No newline at end of file diff --git a/datatype/_class.lua b/datatype/_class.lua index 0c67509..545f7c7 100644 --- a/datatype/_class.lua +++ b/datatype/_class.lua @@ -1,12 +1,12 @@ ---@class class ----@field public CanCast MQBoolean #Can cast seplls, including Bard ----@field public ClericType MQBoolean #Cleric/Paladin? ----@field public DruidType MQBoolean #Druid/Ranger? ----@field public HealerType MQBoolean #Cleric/Druid/Shaman? ----@field public ID MQInt #The class's ID # ----@field public MercType MQBoolean #Mercenary? ----@field public Name MQString #The long name, as in "Ranger" ----@field public NecromancerType MQBoolean #Necromancer/Shadow Knight? ----@field public PureCaster MQBoolean #Any one of: Cleric, Druid, Shaman, Necromancer, Wizard, Mage, Enchanter ----@field public ShamanType MQBoolean #Shaman/Beastlord? ----@field public ShortName MQString #The short name as in "RNG" \ No newline at end of file +---@field public CanCast MQBoolean # Can cast seplls, including Bard +---@field public ClericType MQBoolean # Cleric/Paladin? +---@field public DruidType MQBoolean # Druid/Ranger? +---@field public HealerType MQBoolean # Cleric/Druid/Shaman? +---@field public ID MQInt # The class's ID # +---@field public MercType MQBoolean # Mercenary? +---@field public Name MQString # The long name, as in "Ranger" +---@field public NecromancerType MQBoolean # Necromancer/Shadow Knight? +---@field public PureCaster MQBoolean # Any one of: Cleric, Druid, Shaman, Necromancer, Wizard, Mage, Enchanter +---@field public ShamanType MQBoolean # Shaman/Beastlord? +---@field public ShortName MQString # The short name as in "RNG" \ No newline at end of file diff --git a/datatype/_corpse.lua b/datatype/_corpse.lua index cfa3a8e..4c2d330 100644 --- a/datatype/_corpse.lua +++ b/datatype/_corpse.lua @@ -1,14 +1,16 @@ ----@class corpse : spawn Data related to the current lootable corpse. See [Corpse](https://docs.macroquest.org/reference/top-level-objects/tlo-corpse/) ----@field public Items MQFloat #Number of items on the corpse ----@field public Open MQBoolean #Corpse open? -corpse = {} +---@class corpse : spawn # Data related to the current lootable corpse. See [Corpse](https://docs.macroquest.org/reference/top-level-objects/tlo-corpse/) +---@field public Items MQFloat # Number of items on the corpse +---@field public Open MQBoolean # Corpse open? +local corpse = {} +---@diagnostic disable: duplicate-set-field --- Finds an item by partial name in this corpse (use = for exact match) ---@param name string ---@return MQItem function corpse.Item(name) end --- Nth item on the corpse ----@param index any +---@param index integer ---@return MQItem -function corpse.Item(index) end \ No newline at end of file +function corpse.Item(index) end +---@diagnostic enable: duplicate-set-field \ No newline at end of file diff --git a/datatype/_framelimiter.lua b/datatype/_framelimiter.lua index a7b44ba..438604d 100644 --- a/datatype/_framelimiter.lua +++ b/datatype/_framelimiter.lua @@ -1,11 +1,11 @@ ---@class framelimiter ----@field public BackgroundFPS MQFloat #Value of the target background fps setting. ----@field public ClearScreen MQBoolean #Value of the clear screen when not rendering setting. ----@field public CPU MQFloat #Current CPU usage as % ----@field public Enabled MQBoolean #TRUE if the frame limiter feature is currently active. ----@field public ForegroundFPS MQFloat #Value of the target foreground fps setting. ----@field public MinSimulationFPS MQFloat #Value of the minimum simualtion rate setting. ----@field public RenderFPS MQFloat #Current graphics scene frame rate (visible fps). ----@field public SaveByChar MQBoolean #TRUE if settings for the frame limiter are being saved by character. ----@field public SimulationFPS MQFloat #Current simulation frame rate (game updates per second). ----@field public Status MQString #Either "Foreground" or "Background". +---@field public BackgroundFPS MQFloat # Value of the target background fps setting. +---@field public ClearScreen MQBoolean # Value of the clear screen when not rendering setting. +---@field public CPU MQFloat # Current CPU usage as % +---@field public Enabled MQBoolean # TRUE if the frame limiter feature is currently active. +---@field public ForegroundFPS MQFloat # Value of the target foreground fps setting. +---@field public MinSimulationFPS MQFloat # Value of the minimum simualtion rate setting. +---@field public RenderFPS MQFloat # Current graphics scene frame rate (visible fps). +---@field public SaveByChar MQBoolean # TRUE if settings for the frame limiter are being saved by character. +---@field public SimulationFPS MQFloat # Current simulation frame rate (game updates per second). +---@field public Status MQString # Either "Foreground" or "Background". diff --git a/datatype/_friends.lua b/datatype/_friends.lua index 695225f..6441400 100644 --- a/datatype/_friends.lua +++ b/datatype/_friends.lua @@ -1,3 +1,13 @@ --- @class friends ---- @field public Friend boolean Returns TRUE if name is on your friend list ---- @field public ToString number Number of friends on your friends list \ No newline at end of file +--- @field public ToString MQString # Number of friends on your friends list +local friends = nil + +---@diagnostic disable: duplicate-set-field +---@param name string +---@return boolean +function friends.Friend(name) end + +---@param index integer +---@return string # Returns the name of friend list member at [index] +function friends.Friend(index) end +---@diagnostic enable: duplicate-set-field \ No newline at end of file diff --git a/datatype/_heading.lua b/datatype/_heading.lua index e1e9930..99807b9 100644 --- a/datatype/_heading.lua +++ b/datatype/_heading.lua @@ -1,6 +1,6 @@ --- @class heading ---- @field public Clock MQFloat #The nearest clock direction, e.g. 1-12 ---- @field public Degrees MQFloat #Heading in degrees ---- @field public DegreesCCW MQFloat #Heading in degrees counter-clockwise. This is the way the rest of MQ and EQ uses it. ---- @field public Name MQString #The long compass direction, e.g. "south by southeast" ---- @field public ShortName MQString #The short compass direction, e.g. "SSE" \ No newline at end of file +--- @field public Clock MQFloat # The nearest clock direction, e.g. 1-12 +--- @field public Degrees MQFloat # Heading in degrees +--- @field public DegreesCCW MQFloat # Heading in degrees counter-clockwise. This is the way the rest of MQ and EQ uses it. +--- @field public Name MQString # The long compass direction, e.g. "south by southeast" +--- @field public ShortName MQString # The short compass direction, e.g. "SSE" \ No newline at end of file diff --git a/datatype/_invslot.lua b/datatype/_invslot.lua index a732169..9d4bd20 100644 --- a/datatype/_invslot.lua +++ b/datatype/_invslot.lua @@ -1,7 +1,7 @@ --- @class invslot ---- @field public ID MQInt #ID of this item slot (usable directly by /itemnotify) ---- @field public Item MQItem Item data for the item in this slot ---- @field public Name MQString #For inventory slots not inside packs, the slot name, otherwise NULL ---- @field public Pack invslot Container that must be opened to access the slot with /itemnotify ---- @field public Slot MQInt #Slot number inside the pack which holds the item, otherwise NULL ---- @field public ToString MQString #Same as ID \ No newline at end of file +--- @field public ID MQInt # ID of this item slot (usable directly by /itemnotify) +--- @field public Item MQItem # Item data for the item in this slot +--- @field public Name MQString # For inventory slots not inside packs, the slot name, otherwise NULL +--- @field public Pack MQInvSlot # Container that must be opened to access the slot with /itemnotify +--- @field public Slot MQInt # Slot number inside the pack which holds the item, otherwise NULL +--- @field public ToString MQString # Same as ID \ No newline at end of file diff --git a/datatype/_skill.lua b/datatype/_skill.lua index 7de0e77..fd0b83f 100644 --- a/datatype/_skill.lua +++ b/datatype/_skill.lua @@ -1,10 +1,10 @@ --- @class skill ---- @field public Activated MQBoolean #Returns TRUE if the skill has been activated ---- @field public AltTimer MQBoolean #Returns TRUE if the skill uses the kick/bash/slam/backstab/frenzy timer ---- @field public ID number Skill number ---- @field public MinLevel MQInt #Minimum level for your class ---- @field public Name MQString #Name of the skill ---- @field public ReuseTime MQFloat #Reuse timer (what number format? ticks, seconds, deciseconds?) ---- @field public SkillCap MQInt #Skill cap based on your current level and class. ---- @field public StartingSkill MQInt #Base skill level for your class ---- @field public ToString MQString #Same as Name \ No newline at end of file +--- @field public Activated MQBoolean # Returns TRUE if the skill has been activated +--- @field public AltTimer MQBoolean # Returns TRUE if the skill uses the kick/bash/slam/backstab/frenzy timer +--- @field public ID MQInt # Skill number +--- @field public MinLevel MQInt # Minimum level for your class +--- @field public Name MQString # Name of the skill +--- @field public ReuseTime MQFloat # Reuse timer (what number format? ticks, seconds, deciseconds?) +--- @field public SkillCap MQInt # Skill cap based on your current level and class. +--- @field public StartingSkill MQInt # Base skill level for your class +--- @field public ToString MQString # Same as Name \ No newline at end of file diff --git a/datatype/_spawn.lua b/datatype/_spawn.lua index a847ce2..fc794b4 100644 --- a/datatype/_spawn.lua +++ b/datatype/_spawn.lua @@ -103,7 +103,7 @@ --- @field public MercID fun(): number --- @field public Mount MQSpawn Mount --- @field public Moving MQBoolean #Moving? ---- @field public MQLoc MQFloat #Location using MQ format +--- @field public MQLoc MQString # Location using MQ format --- @field public Name MQString #Name --- @field public Named MQBoolean #Is this a "named" spawn (ie. does it's name not start with an "a" or an "an") --- @field public NearestSpawn spawn Find the nearest spawn matching this Spawn Search, to this spawn (most efficient on yourself) diff --git a/datatype/_spell.lua b/datatype/_spell.lua index eff597f..0651c33 100644 --- a/datatype/_spell.lua +++ b/datatype/_spell.lua @@ -1,44 +1,48 @@ --- @class spell ---- @field public AERange MQFloat AE range (group spells use this for their range) ---- @field public CastOnAnother MQString #Message when cast on others ---- @field public CastOnYou MQString #Message when cast on yourself ---- @field public CastTime timestamp Cast time (unadjusted) ---- @field public CounterType MQString #The resist counter. Will be one of "Disease", "Poison", "Curse" or "Corruption" ---- @field public CounterNumber MQInt #The number of counters that the spell adds ---- @field public Duration ticks Duration of the spell (if any) ---- @field public DurationValue1 ticks Duration of the spell (if any) ---- @field public FizzleTime timestamp Time to recover after fizzle ---- @field public GemIcon MQInt #Icon number of the spell. Exmaple ${Spell[blah].GemIcon} ---- @field public HastePct MQFloat #Percentage of haste, example of use ${Me.Hasted.HastePct} or ${Spell[Speed of Milyex].HastePct} ---- @field public ID number Spell ID ---- @field public IsSkill MQBoolean #is this spell a skill? ---- @field public IsSwarmSpell MQBoolean #Is this spell a Swarm spell? ---- @field public Level MQInt #Level ---- @field public Location MQFloat #Appears to be max distance ---- @field public Mana MQInt #Mana cost (unadjusted) ---- @field public MyCastTime timestamp Adjusted cast time ---- @field public MyRange MQFloat Adjusted spell range, including focus effects, etc. ---- @field public Name MQString #Spell Name ---- @field public PushBack MQFloat Push back amount ---- @field public Range MQFloat Maximum range to target (use AERange for AE and group spells) ---- @field public Rank MQInt #Returns either 1, 2 or 3 for spells and 4-30 for clickys and potions. ---- @field public RankName MQString #Returns the spell/combat ability name rank character has. ---- @field public ReagentCount MQInt #Number of reagents used for this spell ---- @field public ReagentID MQInt #ID of the reagent item used for this spell ---- @field public RecastTime MQFloat #Time to recast after successful cast +--- @field public AERange MQFloat # AE range (group spells use this for their range) +--- @field public CastOnAnother MQString # Message when cast on others +--- @field public CastOnYou MQString # Message when cast on yourself +--- @field public CastTime timestamp # Cast time (unadjusted) +--- @field public CounterType MQString # The resist counter. Will be one of "Disease", "Poison", "Curse" or "Corruption" +--- @field public CounterNumber MQInt # The number of counters that the spell adds +--- @field public Duration ticks # Duration of the spell (if any) +--- @field public DurationValue1 ticks # Duration of the spell (if any) +--- @field public FizzleTime timestamp # Time to recover after fizzle +--- @field public GemIcon MQInt # Icon number of the spell. Exmaple ${Spell[blah].GemIcon} +--- @field public HastePct MQFloat # Percentage of haste, example of use ${Me.Hasted.HastePct} or ${Spell[Speed of Milyex].HastePct} +--- @field public ID MQInt # Spell ID +--- @field public IsSkill MQBoolean # Is this spell a skill? +--- @field public IsSwarmSpell MQBoolean # Is this spell a Swarm spell? +--- @field public Level MQInt # Level +--- @field public Location MQFloat # Appears to be max distance +--- @field public Mana MQInt # Mana cost (unadjusted) +--- @field public MyCastTime timestamp # Adjusted cast time +--- @field public MyRange MQFloat # Adjusted spell range, including focus effects, etc. +--- @field public Name MQString # Spell Name +--- @field public PushBack MQFloat # Push back amount +--- @field public Range MQFloat # Maximum range to target (use AERange for AE and group spells) +--- @field public Rank MQInt # Returns either 1, 2 or 3 for spells and 4-30 for clickys and potions. +--- @field public RankName MQString # Returns the spell/combat ability name rank character has. +--- @field public ReagentCount MQInt # Number of reagents used for this spell +--- @field public ReagentID MQInt # ID of the reagent item used for this spell +--- @field public RecastTime MQFloat #T ime to recast after successful cast --- @field public RecoveryTime timestamp Same as FizzleTime ---- @field public ResistAdj MQInt #Resist adjustment ---- @field public ResistType MQString #See below for Resist Types ---- @field public Skill MQString #See below for Skill Types ---- @field public SlowPct MQFloat #Percentage of slow, example of use ${Target.Slowed.SlowPct} or ${Spell[Slowing Helix].SlowPct} ---- @field public SpellIcon MQInt #Icon number of the spell. Exmaple ${Spell[blah].SpellIcon} ---- @field public SpellType MQString #The spell type, Will be one of "Beneficial(Group)", "Beneficial", "Detrimental" or "Unknown" ---- @field public Stacks MQBoolean #Does the selected spell stack with your current buffs (duration is in ticks) ---- @field public StacksPet MQBoolean #Does the selected spell stack with your pet's current buffs (duration is in ticks) ---- @field public StacksTarget MQBoolean #Does the selected spell stack with your target's current buffs (duration is in ticks) ---- @field public StacksWith MQBoolean #alias for .WillStack - see entry for more details ---- @field public NewStacks MQBoolean #see entry for more details ---- @field public TargetType MQString #See below for Target Types ---- @field public WearOff MQString #The "wear off" message ---- @field public WillStack fun(name: string): boolean Does the selected spell stack with the specific SPELL nameDOES NOT work with AAs. ---- @field public ToString MQString #Same as Name \ No newline at end of file +--- @field public ResistAdj MQInt # Resist adjustment +--- @field public ResistType MQString # See below for Resist Types +--- @field public Skill MQString # See below for Skill Types +--- @field public SlowPct MQFloat # Percentage of slow, example of use ${Target.Slowed.SlowPct} or ${Spell[Slowing Helix].SlowPct} +--- @field public SpellIcon MQInt # Icon number of the spell. Exmaple ${Spell[blah].SpellIcon} +--- @field public SpellType MQString # The spell type, Will be one of "Beneficial(Group)", "Beneficial", "Detrimental" or "Unknown" +--- @field public Stacks MQBoolean # Does the selected spell stack with your current buffs (duration is in ticks) +--- @field public StacksPet MQBoolean # Does the selected spell stack with your pet's current buffs (duration is in ticks) +--- @field public StacksTarget MQBoolean # Does the selected spell stack with your target's current buffs (duration is in ticks) +--- @field public StacksWith MQBoolean # Alias for .WillStack - see entry for more details +--- @field public NewStacks MQBoolean # See entry for more details +--- @field public TargetType MQString # See below for Target Types +--- @field public WearOff MQString # The "wear off" message +--- @field public ToString MQString # Same as Name +local spell = nil + +---@param name string # The spell name +---@return boolean # Does the selected spell stack with the specific SPELL name, DOES NOT work with AAs. +function spell.WillStack(name) end \ No newline at end of file diff --git a/datatype/_target.lua b/datatype/_target.lua index 0e17aa3..826d38d 100644 --- a/datatype/_target.lua +++ b/datatype/_target.lua @@ -1,36 +1,36 @@ --- @class target : spawn ---- @field public Aego MQCachedBuff Returns the name of the Aego spell if the Target has one ---- @field public AggroHolder MQSpawn Returns the target's current target. ---- @field public Beneficial MQCachedBuff Returns the name of the Beneficial spell if the Target has one. This will skip "player" casted buffs, but will show NPC Casted buffs and some AA buffs. +--- @field public Aego MQCachedBuff # Returns the name of the Aego spell if the Target has one +--- @field public AggroHolder MQSpawn # Returns the target's current target. +--- @field public Beneficial MQCachedBuff # Returns the name of the Beneficial spell if the Target has one. This will skip "player" casted buffs, but will show NPC Casted buffs and some AA buffs. --- @field public BuffDuration timestamp|fun(val:string|integer): timestamp Returns the duration remaining on this target buff by index number or by spell name ---- @field public BuffsPopulated MQBoolean #Returns TRUE when the target's buffs are finished populating. ---- @field public Brells MQString #Returns the name of the Brells spell if the Target has one ---- @field public Charmed MQCachedBuff Returns the name of the Charmed spell if the Target has one ---- @field public Clarity MQCachedBuff Returns the name of the Clarity spell if the Target has one ---- @field public Corrupted MQCachedBuff Returns the name of any the Corruption spell if Target has one ---- @field public Cursed MQCachedBuff Returns the name of the Curse spell if Target has one ---- @field public Crippled MQCachedBuff Returns the name of the Cripple spell if the Target has one ---- @field public Diseased MQCachedBuff Returns the name of a Disease spell if the Target has one ---- @field public Dotted MQCachedBuff Returns the name of a DOT spell if the Target has one ---- @field public DSed MQCachedBuff Returns the name of the Damage Shield spell if the Target has one ---- @field public Focus MQCachedBuff Returns the name of the Focus spell if the Target has one ---- @field public Growth MQCachedBuff Returns the name of the Growth spell if the Target has one ---- @field public Hasted MQCachedBuff Returns the name of the Haste spell if the Target has one ---- @field public HybridHP MQCachedBuff Returns the name of the Hybrid HP spell if the Target has one ---- @field public Maloed MQCachedBuff Returns the name of the Malo spell if the Target has one ---- @field public Mezzed MQCachedBuff Returns the name of the Mez spell if the Target has one ---- @field public Poisoned MQCachedBuff Returns the name of a Poison spell if the Target has one ---- @field public Pred MQCachedBuff Returns the name of the Predator spell if the Target has one ---- @field public Rooted MQCachedBuff Returns the name of the Rooted spell if the Target has one ---- @field public Regen MQCachedBuff Returns the name of the Regen spell if the Target has one ---- @field public RevDSed MQCachedBuff Returns the name of the Reverse Damage Shield spell if the Target has one ---- @field public SE MQCachedBuff Returns the name of the Spiritual Enlightenment spell if the Target has one ---- @field public Shining MQCachedBuff Returns the name of the Shining spell if the Target has one ---- @field public Skin MQCachedBuff Returns the name of the Skin spell if the Target has one ---- @field public Slowed MQCachedBuff Returns the name of the Slow spell if the Target has one ---- @field public Snared MQCachedBuff Returns the name of the Snare spell if the Target has one ---- @field public Strength MQCachedBuff Returns the name of the Strength spell if the Target has one ---- @field public SV MQCachedBuff Returns the name of the Spiritual Vitality spell if the Target has one ---- @field public Symbol MQCachedBuff Returns the name of the Symbol spell if the Target has one ---- @field public Tashed MQCachedBuff Returns the name of the Tash spell if the Target has one ---- @field public ToString string Same as Name \ No newline at end of file +--- @field public BuffsPopulated MQBoolean # Returns TRUE when the target's buffs are finished populating. +--- @field public Brells MQString # Returns the name of the Brells spell if the Target has one +--- @field public Charmed MQCachedBuff # Returns the name of the Charmed spell if the Target has one +--- @field public Clarity MQCachedBuff # Returns the name of the Clarity spell if the Target has one +--- @field public Corrupted MQCachedBuff # Returns the name of any the Corruption spell if Target has one +--- @field public Cursed MQCachedBuff # Returns the name of the Curse spell if Target has one +--- @field public Crippled MQCachedBuff # Returns the name of the Cripple spell if the Target has one +--- @field public Diseased MQCachedBuff # Returns the name of a Disease spell if the Target has one +--- @field public Dotted MQCachedBuff # Returns the name of a DOT spell if the Target has one +--- @field public DSed MQCachedBuff # Returns the name of the Damage Shield spell if the Target has one +--- @field public Focus MQCachedBuff # Returns the name of the Focus spell if the Target has one +--- @field public Growth MQCachedBuff # Returns the name of the Growth spell if the Target has one +--- @field public Hasted MQCachedBuff # Returns the name of the Haste spell if the Target has one +--- @field public HybridHP MQCachedBuff # Returns the name of the Hybrid HP spell if the Target has one +--- @field public Maloed MQCachedBuff # Returns the name of the Malo spell if the Target has one +--- @field public Mezzed MQCachedBuff # Returns the name of the Mez spell if the Target has one +--- @field public Poisoned MQCachedBuff # Returns the name of a Poison spell if the Target has one +--- @field public Pred MQCachedBuff # Returns the name of the Predator spell if the Target has one +--- @field public Rooted MQCachedBuff # Returns the name of the Rooted spell if the Target has one +--- @field public Regen MQCachedBuff # Returns the name of the Regen spell if the Target has one +--- @field public RevDSed MQCachedBuff # Returns the name of the Reverse Damage Shield spell if the Target has one +--- @field public SE MQCachedBuff # Returns the name of the Spiritual Enlightenment spell if the Target has one +--- @field public Shining MQCachedBuff # Returns the name of the Shining spell if the Target has one +--- @field public Skin MQCachedBuff # Returns the name of the Skin spell if the Target has one +--- @field public Slowed MQCachedBuff # Returns the name of the Slow spell if the Target has one +--- @field public Snared MQCachedBuff # Returns the name of the Snare spell if the Target has one +--- @field public Strength MQCachedBuff # Returns the name of the Strength spell if the Target has one +--- @field public SV MQCachedBuff # Returns the name of the Spiritual Vitality spell if the Target has one +--- @field public Symbol MQCachedBuff # Returns the name of the Symbol spell if the Target has one +--- @field public Tashed MQCachedBuff # Returns the name of the Tash spell if the Target has one +--- @field public ToString MQString # Same as Name \ No newline at end of file diff --git a/datatype/_type.lua b/datatype/_type.lua index 7f63ad2..25d7d2b 100644 --- a/datatype/_type.lua +++ b/datatype/_type.lua @@ -1,12 +1,14 @@ --- @class mqtype --- @field public Name MQString #Type name --- @field public ToString MQString #Same as Name -mqtype = nil +local mqtype = nil +---@diagnostic disable: duplicate-set-field ---@param id integer # Internal ID number ---@return string # Member name based on an internal ID number (based on 1 through N, not all values will be used) function mqtype.Member(id) end ---@param name string ---@return integer # Member internal ID number based on name (will be a number from 1 to N) -function mqtype.Member(name) end \ No newline at end of file +function mqtype.Member(name) end +---@diagnostic enable: duplicate-set-field \ No newline at end of file