Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
projecteon committed Sep 15, 2022
2 parents 55c634f + 47d0dd8 commit b494038
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 69 deletions.
24 changes: 13 additions & 11 deletions datatype/_cachedBuff.lua
@@ -1,11 +1,13 @@

--- Using CachedBuff to get buff info on targets, group members etc, only requires you to target the entity once.
--- The upside is obviously that we don't have to target back and forth constantly.
---
--- Usagei
--- @class cachedbuff
--- @field public CasterName fun(): string Returns the name of the caster who applied the cached buff
--- @field public Count fun(): number Returns the amount of buffs catched, or -1 it none
--- @field public Duration fun(): number Returns the duration of the cached buff
--- @field public Slot fun(): number Returns the buff slot the target had the buff in
--- @field public SpellID fun(): number Returns the buff's spell ID
---@meta
---Using CachedBuff to get buff info on targets, group members etc, only requires you to target the entity once.
---The upside is obviously that we don't have to target back and forth constantly.
---@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 Spell spell|function(): spell Access the spell
---@field public SpellID fun(): integer 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/_character.lua
Expand Up @@ -14,7 +14,7 @@
--- @field public AssistComplete fun(): boolean returns true/false if the assist is complete
--- @field public AttackBonus fun(): number Attack bonus from gear and spells
--- @field public AttackSpeed fun(): number Your Attack Speed. No haste spells/items = AttackSpeed of 100. A 41% haste item will result in an AttackSpeed of 141. This variable does not take into account spell or song haste.
--- @field public Aura fun(): string The aura effect name
--- @field public Aura fun(n: integer): string The aura effect name
--- @field public AutoFire fun(): boolean Is Autofire on?
--- @field public AvoidanceBonus fun(): number Avoidance bonus from gear/spells
--- @field public BardSongPlaying fun(): boolean Is a bard song playing?
Expand Down
12 changes: 6 additions & 6 deletions datatype/_mercenary.lua
@@ -1,7 +1,7 @@
--- @class mercenary
--- @field public AAPoints number AA Points spent on mercenary abilities
--- @field public Stance string Current stance of the mercenary
--- @field public State string Current state of the mercenary (returns "DEAD","SUSPENDED","ACTIVE", or "UNKNOWN"
--- @field public StateID number Current state ID of the mercenary as a number.
--- @field public Index string Index
--- @field public ToString string Same as Name
--- @field public AAPoints fun(): integer 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 Index fun(): string Index
--- @field public ToString fun(): string Same as Name
2 changes: 1 addition & 1 deletion datatype/_pet.lua
@@ -1,7 +1,7 @@
---@meta

---@diagnostic disable: duplicate-set-field
---@class pet
---@class pet : spawn
---@field Combat fun(): boolean Combat state
---@field Ghold fun(): boolean GHold state
---@field Hold fun(): boolean Hold state
Expand Down
56 changes: 41 additions & 15 deletions datatype/_raid.lua
@@ -1,15 +1,41 @@
--- @class raid
--- @field public AverageLevel number Average level of raid members (more accurate than in the window)
--- @field public Invited boolean Have I been invited to the raid?
--- @field public Leader raidmember Raid leader
--- @field public Locked boolean Returns TRUE if the raid is locked
--- @field public Looter string Specified looter name by number
--- @field public Looters number Number of specified looters
--- @field public LootType number Loot type number:1 Leader2 Leader & GroupLeader3 Leader & Specified
--- @field public MainAssist raidmember Raid main assist
--- @field public MasterLooter raidmember Raid Master Looter
--- @field public Member raidmember Raid member by number or name
--- @field public Members number Total number of raid members
--- @field public Target raidmember Raid target (clicked in raid window)
--- @field public TotalLevels number Sum of all raid members' levels
--- @field public ToString string None
---@diagnostic disable: duplicate-set-field

---@meta
---@class raid
---@field public AverageLevel fun(): integer Average level of raid members (more accurate than in the window)
---@field public Invited fun(): boolean Have I been invited to the raid?
---@field public Leader fun(): raidmember Raid leader
---@field public Locked fun(): boolean Returns TRUE if the raid is locked
---@field public Looter fun(): integer Number of specified looters
---Loot type:
--- - 1 Leader
--- - 2 Leader & GroupLeader
--- - 3 Leader & Specified
---@field public LootType fun(): integer
---@field public MainAssist fun(): raidmember Raid main assist
---@field public MasterLooter fun(): raidmember Raid Master Looter
---@field public Members fun(): integer Total number of raid members
---@field public Target fun(): raidmember Raid target (clicked in raid window)
---@field public TotalLevels fun(): integer Sum of all raid members' levels
---@field public ToString fun(): string None
local raid = {}

---Raid member by name
---@param name string
---@return raidmember
function raid.Member(name) end

---Raid member by index
---@param index integer
---@return raidmember
function raid.Member(index) end

---Specified looter by name
---@param name string
---@return string
function raid.Looter(name) end

---Specified looter by index
---@param index integer
---@return string
function raid.Looter(index) end
1 change: 1 addition & 0 deletions datatype/_spawn.lua
Expand Up @@ -14,6 +14,7 @@
--- @field public Binding fun(): boolean Binding wounds?
--- @field public Blind fun(): number Blind? Not sure why this is a number?
--- @field public Body body Body type
--- @field public Buff fun(name: string): string
--- @field public bShowHelm fun(): boolean Showing Helm?
--- @field public bStationary fun(): boolean Stationary spawn? Not to be confused with "Moving"
--- @field public bTempPet fun(): boolean Is the spawn a Temporary Pet?
Expand Down
2 changes: 1 addition & 1 deletion datatype/_spell.lua
Expand Up @@ -40,5 +40,5 @@
--- @field public NewStacks fun(): boolean see entry for more details
--- @field public TargetType fun(): string See below for Target Types
--- @field public WearOff fun(): string The "wear off" message
--- @field public WillStack fun(): boolean Does the selected spell stack with the specific SPELL nameDOES NOT work with AAs.
--- @field public WillStack fun(name: string): boolean Does the selected spell stack with the specific SPELL nameDOES NOT work with AAs.
--- @field public ToString fun(): string Same as Name
68 changes: 34 additions & 34 deletions datatype/_target.lua
@@ -1,38 +1,38 @@
--- @class target : spawn
--- @field public Aego fun(): spell Returns the name of the Aego spell if the Target has one
--- @field public AggroHolder spawn Returns the target's current target.
--- @field public Beneficial spell 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 Buff spell Returns the target's spell by buff index number or the first buff if no Index is provided.
--- @field public Aego cachedbuff|fun(): string Returns the name of the Aego spell if the Target has one
--- @field public AggroHolder spawn|fun(): spawn Returns the target's current target.
--- @field public Beneficial cachedbuff|fun(): string 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 Buff cachedbuff|fun(): cachedbuff Returns the target's spell by buff index number or the first buff if no Index is provided.
--- @field public BuffCount fun(): integer Returns the number of buffs on the target.
--- @field public BuffDuration timestamp Returns the duration remaining on this target buff by index number or by spell name
--- @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 fun(): boolean Returns TRUE when the target's buffs are finished populating.
--- @field public Brells spell Returns the name of the Brells spell if the Target has one
--- @field public Charmed spell Returns the name of the Charmed spell if the Target has one
--- @field public Clarity spell Returns the name of the Clarity spell if the Target has one
--- @field public Corrupted spell Returns the name of any the Corruption spell if Target has one
--- @field public Cursed spell Returns the name of the Curse spell if Target has one
--- @field public Crippled spell Returns the name of the Cripple spell if the Target has one
--- @field public Diseased fun(): string Returns the name of a Disease spell if the Target has one
--- @field public Dotted fun(): string Returns the name of a DOT spell if the Target has one
--- @field public DSed spell Returns the name of the Damage Shield spell if the Target has one
--- @field public Focus spell Returns the name of the Focus spell if the Target has one
--- @field public Growth spell Returns the name of the Growth spell if the Target has one
--- @field public Hasted spell Returns the name of the Haste spell if the Target has one
--- @field public HybridHP spell Returns the name of the Hybrid HP spell if the Target has one
--- @field public Maloed spell Returns the name of the Malo spell if the Target has one
--- @field public Mezzed spell Returns the name of the Mez spell if the Target has one
--- @field public Poisoned fun(): string Returns the name of a Poison spell if the Target has one
--- @field public Pred spell Returns the name of the Predator spell if the Target has one
--- @field public Rooted spell Returns the name of the Rooted spell if the Target has one
--- @field public Regen spell Returns the name of the Regen spell if the Target has one
--- @field public RevDSed spell Returns the name of the Reverse Damage Shield spell if the Target has one
--- @field public SE spell Returns the name of the Spiritual Enlightenment spell if the Target has one
--- @field public Shining spell Returns the name of the Shining spell if the Target has one
--- @field public Skin spell Returns the name of the Skin spell if the Target has one
--- @field public Slowed spell Returns the name of the Slow spell if the Target has one
--- @field public Snared spell Returns the name of the Snare spell if the Target has one
--- @field public Strength spell Returns the name of the Strength spell if the Target has one
--- @field public SV spell Returns the name of the Spiritual Vitality spell if the Target has one
--- @field public Symbol spell Returns the name of the Symbol spell if the Target has one
--- @field public Tashed spell Returns the name of the Tash spell if the Target has one
--- @field public Brells fun(): string Returns the name of the Brells spell if the Target has one
--- @field public Charmed cachedbuff|fun(): string Returns the name of the Charmed spell if the Target has one
--- @field public Clarity cachedbuff|fun(): string Returns the name of the Clarity spell if the Target has one
--- @field public Corrupted cachedbuff|fun(): string Returns the name of any the Corruption spell if Target has one
--- @field public Cursed cachedbuff|fun(): string Returns the name of the Curse spell if Target has one
--- @field public Crippled cachedbuff|fun(): string Returns the name of the Cripple spell if the Target has one
--- @field public Diseased cachedbuff|fun(): string Returns the name of a Disease spell if the Target has one
--- @field public Dotted cachedbuff|fun(): string Returns the name of a DOT spell if the Target has one
--- @field public DSed cachedbuff|fun(): string Returns the name of the Damage Shield spell if the Target has one
--- @field public Focus cachedbuff|fun(): string Returns the name of the Focus spell if the Target has one
--- @field public Growth cachedbuff|fun(): string Returns the name of the Growth spell if the Target has one
--- @field public Hasted cachedbuff|fun(): string Returns the name of the Haste spell if the Target has one
--- @field public HybridHP cachedbuff|fun(): string Returns the name of the Hybrid HP spell if the Target has one
--- @field public Maloed cachedbuff|fun(): string Returns the name of the Malo spell if the Target has one
--- @field public Mezzed cachedbuff|fun(): string Returns the name of the Mez spell if the Target has one
--- @field public Poisoned cachedbuff|fun(): string Returns the name of a Poison spell if the Target has one
--- @field public Pred cachedbuff|fun(): string Returns the name of the Predator spell if the Target has one
--- @field public Rooted cachedbuff|fun(): string Returns the name of the Rooted spell if the Target has one
--- @field public Regen cachedbuff|fun(): string Returns the name of the Regen spell if the Target has one
--- @field public RevDSed cachedbuff|fun(): string Returns the name of the Reverse Damage Shield spell if the Target has one
--- @field public SE cachedbuff|fun(): string Returns the name of the Spiritual Enlightenment spell if the Target has one
--- @field public Shining cachedbuff|fun(): string Returns the name of the Shining spell if the Target has one
--- @field public Skin cachedbuff|fun(): string Returns the name of the Skin spell if the Target has one
--- @field public Slowed cachedbuff|fun(): string Returns the name of the Slow spell if the Target has one
--- @field public Snared cachedbuff|fun(): string Returns the name of the Snare spell if the Target has one
--- @field public Strength cachedbuff|fun(): string Returns the name of the Strength spell if the Target has one
--- @field public SV cachedbuff|fun(): string Returns the name of the Spiritual Vitality spell if the Target has one
--- @field public Symbol cachedbuff|fun(): string Returns the name of the Symbol spell if the Target has one
--- @field public Tashed cachedbuff|fun(): string Returns the name of the Tash spell if the Target has one
--- @field public ToString string Same as Name

0 comments on commit b494038

Please sign in to comment.