Collectinator

API

r7

CheckForKnownCompanions

(DB) Scans the database and the local list of companions and flags which ones you know

Parameters

DB
Companion database which we are parsing.

Return value

Companion DB is updated by reference.

Usage

Collectinator:CheckForKnownCompanions(DB)


Collectinator:AddCompanion

(DB, CompanionType, SpellID, ItemID, Rarity, Game) Adds a companion into the database.

Parameters

DB
The database (array) which you wish to add data too.
CompanionType
Type of entry added to the database.
SpellID
The [http://www.wowwiki.com/SpellLink Spell ID] of the item being entered to the database.
ItemID
The [http://www.wowwiki.com/ItemLink Item ID] of the item, or nil
Rarity
The rarity of the item.
Game
Game version item was found in, for example, Original, BC, or Wrath.

Return value

None, array is passed as a reference.

Usage

Collectinator:AddCompanion(DB)


Collectinator:AddCompanionAcquire

(DB, SpellID, ...) Adds acquire methods to a specific companion.

Parameters

DB
The database (array) which you wish to add acquire methods too.
SpellID
The [http://www.wowwiki.com/SpellLink Spell ID] of the item being entered to the database.
...
A listing of acquire methods. See database-documentation for a listing of acquire methods and how they behave.

Return value

None, array is passed as a reference.

Usage

Collectinator:AddCompanionAcquire:(DB, 2329, 8, 8)


Collectinator:AddCompanionFlags

(DB, SpellID, ...) Adds filtering flags to a specific entry.

Parameters

DB
The database (array) which you wish to add flags too.
SpellID
The [http://www.wowwiki.com/SpellLink Spell ID] of the item being entered to the database.
...
A listing of filtering flags. See database-documentation for a listing of filtering flags.

Return value

None, array is passed as a reference.

Usage

Collectinator:AddCompanionFlags(DB)


Collectinator:ClearExclusionList

() Clears the exclusion list of all entries.

Return value

The exclusion list is cleared.

Usage

Collectinator:ClearExclusionList()


Collectinator:GetLocations

(SpellID) Scans the acquire methods for the location and update the entry in the database with them.

Parameters

SpellID
The [http://www.wowwiki.com/SpellLink Spell ID] of the item being entry to the database.

Return value

Locations are populated for the given spell.

Usage

Collectinator:GetLocations([http://www.wowwiki.com/SpellLink Spell ID])


Collectinator:MarkExclusions

(DB, scantype) Marks all exclusions in the item database to not be displayed

Parameters

DB
Reference to the entire database.
scantype
What type of scan occured: CRITTER, MOUNT, etc

Return value

All entries which are to be excluded in the database have their display flag marked to false.

Usage

Collectinator:MarkExclusions(CompanionDB, "CRITTER")


Collectinator:Scan

(textdump, autoupdatescan, scantype) Causes a scan of the companions to be conducted.

Parameters

textdump
Boolean indicating if we want the output to be a text dump, or if we want to use the GUI.
autoupdatescan
Boolean, true if we're triggering this from an event (aka we learned a new pet), false otherwise.
scantype
CRITTER for pets, MOUNT for mounts

Return value

A frame with either the text dump, or the GUI frame.

Usage

Collectinator:Scan(true)


Collectinator:ToggleExclude

(SpellID) Removes or adds a item to the exclusion list.

Parameters

SpellID
The [http://www.wowwiki.com/SpellLink Spell ID] in the database which we want to exclude

Return value

The specified [http://www.wowwiki.com/SpellLink Spell ID] is excluded from the database.

Usage

Collectinator:ToggleExclude


Collectinator:ViewExclusionList

() Prints all the ID's in the exclusion list out into chat.

Return value

All the entries in the exclusion list are printed out into chat.

Usage

Collectinator:ViewExclusionList()


(SpellLink) Gets a spell ID from a spell link.

Parameters

SpellLink
The [http://www.wowwiki.com/SpellLink SpellLink] which you wish to get the Spell ID from.

Return value

The spell ID of the passed [http://www.wowwiki.com/SpellLink SpellLink].

Usage

Collectinator:GetIDFromLink(SpellLink)


GetPlayerProfessions(ProfTable)

Scans the players professions and populates which ones they have

Parameters

ProfTable


addon:COMPANION_LEARNED()

Event handling functions


addon:GetFactionLevels(RepTable)

Scans all reputations to get reputation levels to determine if the player can learn a reputation item

Parameters

RepTable