API

Collectinator provides an interface for scanning companions and moutns to find what is missing.
There are a set of functions which allow you make use of the Collectinator database outside of Collectinator. Collectinator supports all mounts/pets currently in World of Warcraft 4.3.2


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.wowpedia.org/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: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, current_frame, 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.
current_frame
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()


GetIDFromLink(SpellLink)

Gets a spell ID from a spell link.

Parameters

SpellLink
The SpellLink which you wish to get the Spell ID from

Return value

The spell ID of the passed SpellLink

Usage

Collectinator:GetIDFromLink(SpellLink)


addon:AddTitle(title_id, title_type, era)

Title DB functions

0 - prefix 1 - suffix 2 - comma-led suffix

Parameters

title_id
title_type
era


addon:COMPANION_LEARNED()

Event handling functions

When we learn a new pet, we want to automatically scan the companions and update our saved variables


addon:GetFactionLevels(RepTable)

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

Parameters

RepTable


addon:GetWarcraftPets(PetDB)

WarcraftPets Integration

Parameters

PetDB


addon:OnInitialize()

Initialization functions

Registers the slash commands, options, and database


addon:ResetSearch(DB)

Searching Functions

Goes through the item database and resets all the search flags

Parameters

DB


playerData

total_str
Total number of items in the scan.
known_str
Total number of items known in the scan.
total_filtered_str
Total number of items filtered during the scan.
known_filtered_str
Total number of items known filtered during the scan.
unknown_exclude_str
Total number of items unknown excluded during the scan.
known_exclude_str
Total number of items known excluded during the scan.
playerFaction
Players faction
playerClass
Players class



Comments

Posts Quoted:
Reply
Clear All Quotes