Skip to content

Commit

Permalink
Refactor to use alias MQInt
Browse files Browse the repository at this point in the history
  • Loading branch information
projecteon committed Sep 16, 2022
1 parent 9f79a65 commit e07db2f
Show file tree
Hide file tree
Showing 36 changed files with 170 additions and 170 deletions.
10 changes: 5 additions & 5 deletions datatype/_achievement.lua
@@ -1,12 +1,12 @@
---@meta
---@class achievement
---@field ID fun():integer The achivement's unique ID
---@field ID MQInt #The achivement's unique ID
---@field Name fun():string The achievement's name
---@field Description fun():string The achievement's description
---@field Points fun():integer The point value for the achievement
---@field ObjectiveCount fun():integer The number of objectives in this achievement
---@field Index fun():integer 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 fun():integer ID of the Achievement state. See [Achivement Icon](https://docs.macroquest.org/reference/data-types/datatype-achievement/#achievement-icon) for more information.
---@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 fun():string 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
Expand Down
14 changes: 7 additions & 7 deletions datatype/_achievementcat.lua
@@ -1,17 +1,17 @@
---@meta
---@class achievementcat
---@field ID fun():integer The unique ID for the category
---@field ID MQInt #The unique ID for the category
---@field Name fun():string The category's display name
---@field Description fun():string The category's Description
---@field AchivementByIndex fun(index:integer):achievement Find an achievement by its index in this category
---@field AchivementCount fun():integer The number of achievements in this category
---@field AchivementCount MQInt #The number of achievements in this category
---@field CategoryByIndex fun(index:integer):integer Find a child category by its index in this category
---@field CategoryCount fun():integer The number of child categories in this category
---@field Points fun():integer The total earned points of achievements in this category
---@field CompletedAchievements fun():integer The number of achievements earned in this category and its subcategories
---@field TotalAchievements fun():integer The total number of achievements in this category and its subcategories
---@field CategoryCount MQInt #The number of child categories in this category
---@field Points MQInt #The total earned points of achievements in this category
---@field CompletedAchievements MQInt #The number of achievements earned in this category and its subcategories
---@field TotalAchievements MQInt #The total number of achievements in this category and its subcategories
---@field ImageTextureName fun():string Name of the image texure that is used to represent this category in the Achievements Window
---@field Index fun():integer The index of the category in the achievement manager. For more information see [Achievement Indices](https://docs.macroquest.org/reference/top-level-objects/tlo-achievement/#note-about-achievement-indices)
---@field Index MQInt #The index of the category in the achievement manager. For more information see [Achievement Indices](https://docs.macroquest.org/reference/top-level-objects/tlo-achievement/#note-about-achievement-indices)
achievementcat = {}

---Find an achievement in this category by its ID
Expand Down
10 changes: 5 additions & 5 deletions datatype/_achievementmgr.lua
@@ -1,12 +1,12 @@
---@meta
---@class achievementmgr
---@field AchievementByIndex fun(index:integer):achievement Find an achievement by its index
---@field AchievementCount fun():integer The number of achievements in the mananger
---@field AchievementCount MQInt #The number of achievements in the mananger
---@field CategoryByIndex fun(index:integer):achievementcat Find an achievement category by its index
---@field CategoryCount fun():integer The number of achievement categories in the mananger
---@field Points fun():integer The total number of accumulated achievement points
---@field CompletedAchievements fun():integer The number of completed achievements
---@field TotalAchievements fun():integer The number of available achievements
---@field CategoryCount MQInt #The number of achievement categories in the mananger
---@field Points MQInt #The total number of accumulated achievement points
---@field CompletedAchievements MQInt #The number of completed achievements
---@field TotalAchievements MQInt #The number of available achievements
---@field Ready MQBoolean #Indicates that the manager has loaded all achievement data is ready to be used
achievementmgr = {}

Expand Down
2 changes: 1 addition & 1 deletion datatype/_alert.lua
@@ -1,4 +1,4 @@
---@meta
---@class alert mq datatype
---@field List fun(index:integer):alertlist Get the item from the list at the specified index
---@field Size fun():integer Get the number of alerts
---@field Size MQInt #Get the number of alerts
34 changes: 17 additions & 17 deletions datatype/_alertlisttype.lua
@@ -1,6 +1,6 @@
---@meta
---@class alertlist MQDatatype
---@field AlertList fun():integer Any spawn on the associated alert list
---@field AlertList MQInt #Any spawn on the associated alert list
---@field bAlert MQBoolean #Indicates usage of alert filter
---@field bAura MQBoolean #Any aur.
---@field bBanker MQBoolean #Any banker
Expand Down Expand Up @@ -36,24 +36,24 @@
---@field bTrader MQBoolean #Any player that is a trader
---@field bTributeMaster MQBoolean #Any NPC that is a tribute master
---@field Class fun():string Any spawn that is the given class
---@field FRadius fun():integer Any spawn that is given distance from the given loc filter
---@field FromSpawnID fun():integer Search starts at given spawn id
---@field FRadius MQInt #Any spawn that is given distance from the given loc filter
---@field FromSpawnID MQInt #Search starts at given spawn id
---@field GuildID fun():integer Any member of the guild with the given id
---@field Light fun():string Any spawn that is equipped with the given light source
---@field MaxLevel fun():integer Any spawn that is at this level or lower
---@field MinLevel fun():integer Any spawn that is at this level or greater
---@field MaxLevel MQInt #Any spawn that is at this level or lower
---@field MinLevel MQInt #Any spawn that is at this level or greater
---@field Name fun():string Any spawn with the given name
---@field NearAlertList fun():integer Any spawn near the given alert list
---@field NoAlertList fun():integer Excludes any spawn in the given alert list
---@field NotID fun():integer Excludes any spawn with the given id
---@field NotNearAlertList fun():integer Excludes any spawn near the given alert list
---@field PlayerState fun():integer Any spawn with the given state
---@field NearAlertList MQInt #Any spawn near the given alert list
---@field NoAlertList MQInt #Excludes any spawn in the given alert list
---@field NotID MQInt #Excludes any spawn with the given id
---@field NotNearAlertList MQInt #Excludes any spawn near the given alert list
---@field PlayerState MQInt #Any spawn with the given state
---@field Race fun():string Any spawn with the given race
---@field Radius fun():integer Excludes the spawn if any player is within this distance (nopcnear filter)
---@field SortBy fun():integer Indicates the sort order of the filter
---@field Radius MQInt #Excludes the spawn if any player is within this distance (nopcnear filter)
---@field SortBy MQInt #Indicates the sort order of the filter
---@field Spawn fun():spawn If an ID or Name is part of the filter, attempts to return a spawn with the matching ID or Name
---@field SpawnID fun():integer Any spawn with the given Spawn ID
---@field SpawnType fun():integer Any spawn with the given type
---@field xLoc fun():integer x component of the loc filter
---@field yLoc fun():integer y component of the loc filter
---@field ZRadius fun():integer z distance component of the loc filter
---@field SpawnID MQInt #Any spawn with the given Spawn ID
---@field SpawnType MQInt #Any spawn with the given type
---@field xLoc MQInt #x component of the loc filter
---@field yLoc MQInt #y component of the loc filter
---@field ZRadius MQInt #z distance component of the loc filter
2 changes: 1 addition & 1 deletion datatype/_altability.lua
Expand Up @@ -3,7 +3,7 @@
--- @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 fun(): string Basic description
--- @field public ID fun(): integer ID
--- @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
Expand Down
2 changes: 1 addition & 1 deletion datatype/_buff.lua
Expand Up @@ -2,7 +2,7 @@
--- @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 fun(): integer The ID of the buff or shortbuff slot
--- @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 float The modifier to a bard song
--- @field public Remove fun() Removes the named/partial name buff
Expand Down
10 changes: 5 additions & 5 deletions datatype/_cachedBuff.lua
Expand Up @@ -4,10 +4,10 @@
---@class cachedbuff : spell
---@field public CasterName fun(): string Returns the name of the caster who applied the cached buff
---@field public Caster fun(): string Same as *CasterName*, added for conistency.
---@field public Count fun(): integer Returns the amount of buffs catched, or -1 it none
---@field public Duration fun(): integer Returns the duration of the buff
---@field public OriginalDuration fun(): integer Returns the original duration of the buff
---@field public Slot fun(): integer Returns the buff slot the target had the buff in
---@field public Count MQInt #Returns the amount of buffs catched, or -1 it none
---@field public Duration MQInt #Returns the duration of the buff
---@field public OriginalDuration MQInt #Returns the original duration of the buff
---@field public Slot MQInt #Returns the buff slot the target had the buff in
---@field public Spell spell|function(): spell Access the spell
---@field public SpellID fun(): integer Returns the buff's spell ID
---@field public SpellID MQInt #Returns the buff's spell ID
---@field public Staleness timestamp|fun(): timestamp How long has it been since this information was refreshed
2 changes: 1 addition & 1 deletion datatype/_class.lua
Expand Up @@ -3,7 +3,7 @@
---@field public ClericType MQBoolean #Cleric/Paladin?
---@field public DruidType MQBoolean #Druid/Ranger?
---@field public HealerType MQBoolean #Cleric/Druid/Shaman?
---@field public ID fun(): integer The class's ID #
---@field public ID MQInt #The class's ID #
---@field public MercType MQBoolean #Mercenary?
---@field public Name fun(): string The long name, as in "Ranger"
---@field public NecromancerType MQBoolean #Necromancer/Shadow Knight?
Expand Down
6 changes: 3 additions & 3 deletions datatype/_dynamiczone.lua
Expand Up @@ -3,9 +3,9 @@
---@field public InRaid fun():boolean
---@field public Leader fun():dzmember The leader of the dynamic zone
---@field public LeaderFlagged MQBoolean #Returns true if the dzleader can successfully enter the dz (this also means the dz is actually Loaded.)Example: ${DynamicZone.LeaderFlagged}
---@field public MaxMembers fun():integer Maximum number of characters that can enter this dynamic zone
---@field public Members fun():integer Current number of characters in the dynamic zone
---@field public MinMembers fun():integer Minimum of members required
---@field public MaxMembers MQInt #Maximum number of characters that can enter this dynamic zone
---@field public Members MQInt #Current number of characters in the dynamic zone
---@field public MinMembers MQInt #Minimum of members required
---@field public Name fun():string The full name of the dynamic zone
dynamiczone = {}

Expand Down
2 changes: 1 addition & 1 deletion datatype/_dztimer.lua
Expand Up @@ -3,4 +3,4 @@
---@field ExpeditionName fun():string The name of the expedition
---@field EventName fun():string The name of the event
---@field Timer fun():timestamp The timestamp indicating when this lockout expires
---@field EventID fun():integer ID of the event. Value only unique per Expedition. Non-event lockouts (Replay Timer) will have a -1 event ID
---@field EventID MQInt #ID of the event. Value only unique per Expedition. Non-event lockouts (Replay Timer) will have a -1 event ID
4 changes: 2 additions & 2 deletions datatype/_evolving.lua
@@ -1,6 +1,6 @@
--- @class evolving
--- @field public ExpPct fun(): float Percentage of experience that the item has gained
--- @field public ExpOn MQBoolean #Is evolving item experience turned on for this item?
--- @field public Level fun(): integer The level of the evolving item.
--- @field public MaxLevel fun(): integer The maximum level of the evolving item
--- @field public Level MQInt #The level of the evolving item.
--- @field public MaxLevel MQInt #The maximum level of the evolving item
--- @field public ToString fun(): string Same as ExpOn
4 changes: 2 additions & 2 deletions datatype/_fellowship.lua
Expand Up @@ -5,9 +5,9 @@
--- @field public CampfireY fun(): float Campfire Y location
--- @field public CampfireZ fun(): float Campfire Z location
--- @field public CampfireZone zone| fun(): zone Zone information for the zone that contains your campfire
--- @field public ID fun(): integer Fellowship ID
--- @field public ID MQInt #Fellowship ID
--- @field public Leader fun(): string Fellowship leader's name
--- @field public Member fun(): fellowshipmember Member data by name or #
--- @field public Members fun(): integer Number of members in the fellowship
--- @field public Members MQInt #Number of members in the fellowship
--- @field public MotD fun(): string Fellowship Message of the Day
--- @field public ToString fun(): string TRUE if currently in a fellowship, FALSE if not
2 changes: 1 addition & 1 deletion datatype/_fellowshipmember.lua
@@ -1,6 +1,6 @@
--- @class fellowshipmember
--- @field public Class fun(): class Member's class
--- @field public Level fun(): integer Member's level
--- @field public Level MQInt #Member's level
--- @field public LastOn fun(): ticks How long since member was last online
--- @field public Name fun(): string Member's name
--- @field public Zone zone | fun(): zone Zone information for the member's zone
Expand Down
4 changes: 2 additions & 2 deletions datatype/_invslot.lua
@@ -1,7 +1,7 @@
--- @class invslot
--- @field public ID fun(): integer ID of this item slot (usable directly by /itemnotify)
--- @field public ID MQInt #ID of this item slot (usable directly by /itemnotify)
--- @field public Item item Item data for the item in this slot
--- @field public Name fun(): string 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 fun(): integer Slot number inside the pack which holds the item, otherwise NULL
--- @field public Slot MQInt #Slot number inside the pack which holds the item, otherwise NULL
--- @field public ToString fun(): string Same as ID
16 changes: 8 additions & 8 deletions datatype/_itemspell .lua
@@ -1,13 +1,13 @@
--- @class itemspell
--- @field public CastTime timestamp Cast time (unadjusted)
--- @field public EffectiveCasterLevel fun(): integer Effective level that is used to cast the spell.
--- @field public EffectType fun(): integer The type of item spell effect.
--- @field public MaxCharges fun(): integer The maximum number of charges supported by this spell.
--- @field public EffectiveCasterLevel MQInt #Effective level that is used to cast the spell.
--- @field public EffectType MQInt #The type of item spell effect.
--- @field public MaxCharges MQInt #The maximum number of charges supported by this spell.
--- @field public OverrideDescription fun(): string Overrides the normal spell description string, if set.
--- @field public OverrideName fun(): string Overrides the normal spell name string, if set.
--- @field public ProcRate fun(): integer Combat effect proc rate.
--- @field public RecastType fun(): integer Recast type of the spell.
--- @field public RequiredLevel fun(): integer Level required for the spell to be usable.
--- @field public ProcRate MQInt #Combat effect proc rate.
--- @field public RecastType MQInt #Recast type of the spell.
--- @field public RequiredLevel MQInt #Level required for the spell to be usable.
--- @field public Spell spell The spell.
--- @field public SpellID fun(): integer ID of the Spell.
--- @field public TimerID fun(): integer Timer ID of the spell.
--- @field public SpellID MQInt #ID of the Spell.
--- @field public TimerID MQInt #Timer ID of the spell.
6 changes: 3 additions & 3 deletions datatype/_lua.lua
@@ -1,18 +1,18 @@
--- @class LuaInfo
--- @field public PID fun(): integer The PID of the running or most recently executed version of this script
--- @field public PID MQInt #The PID of the running or most recently executed version of this script
--- @field public Name fun(): string The name of the script
--- @field public Path fun(): string The full path of the script
--- @field public Arguments fun(): string A comma delimited list of arguments passed to the script
--- @field public StartTime fun(): string The time the most recent execution of the script was started
--- @field public EndTime fun(): string The time the most recent execution of the script ended or NULL if the script has not ended
--- @field public ReturnCount fun(): integer The number of returns from the script, will be 0 if the script has not ended
--- @field public ReturnCount MQInt #The number of returns from the script, will be 0 if the script has not ended
--- @field public Return fun(index: integer): string string If not indexed, a comma-delimited list of return values. Accepts an integereger index to get a single return value if there is more than one
--- @field public Status fun(): string The execution status of the script
---
--- @class Lua
--- @field public PIDs fun(): string A comma-delimited list of integereger PIDs that have info to access
--- @field public Dir fun(): string The base lua scripts directory
--- @field public Turbo fun(): integer The turbo value
--- @field public Turbo MQInt #The turbo value
--- @field public RequirePaths fun(): string The semicolon-delimited value for lua require search paths
--- @field public CRequirePaths fun(): string The semicolon-delimited value for dll require search paths
--- @field public Script fun(pid: integer): LuaInfo The accessor to get info on individual scripts. Accepts a PID as an index, or will default to the last executed script that has finished running
4 changes: 2 additions & 2 deletions datatype/_mercenary.lua
@@ -1,7 +1,7 @@
--- @class mercenary
--- @field public AAPoints fun(): integer AA Points spent on mercenary abilities
--- @field public AAPoints MQInt #AA Points spent on mercenary abilities
--- @field public Stance fun(): string Current stance of the mercenary
--- @field public State fun(): string Current state of the mercenary (returns "DEAD","SUSPENDED","ACTIVE", or "UNKNOWN"
--- @field public StateID fun(): integer Current state ID of the mercenary as a number.
--- @field public StateID MQInt #Current state ID of the mercenary as a number.
--- @field public Index fun(): string Index
--- @field public ToString fun(): string Same as Name
2 changes: 1 addition & 1 deletion datatype/_pet.lua
Expand Up @@ -11,7 +11,7 @@
---@field Target spawn Returns the pet's current target
---@field Taunt MQBoolean #Taunt state
---@field Focus MQBoolean #Focus state
---@field ID fun(): integer returns pet ID
---@field ID MQInt #returns pet ID
local pet = {}

---Returns the slot number for the buff name
Expand Down
2 changes: 1 addition & 1 deletion datatype/_race.lua
@@ -1,4 +1,4 @@
--- @class race
--- @field public ID fun(): integer The ID of the race
--- @field public ID MQInt #The ID of the race
--- @field public Name fun(): string The name of the race
--- @field public ToString fun(): string The name of the race

0 comments on commit e07db2f

Please sign in to comment.