Collectinator

API

r1

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, SpellID, ItemID, Rarity, CompanionType, Game) Adds a companion into the database.

Parameters

DB
The database (array) which you wish to add data too.
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.
CompanionType
Type of entry added to the database.
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:Collectinator_Command

(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:Collectinator_Command(true)


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:InitCompanionDB

(DB) Populates the internal companion database with all the mini-pets and mounts.

Parameters

DB
Companion database

Return value

Database is populated with all appropiate entries for pets and mounts. Total number of entries are returned.

Usage

Collectinator:InitCompanionDB(CompanionDB)


Collectinator:addLookupList

(DB, ID, Name, Loc, Coordx, Coordy, Faction) Adds an item to a specific database listing (ie: vendor, mob, etc)

Parameters

DB
Database which the entry will be stored.
ID
Unique identified for the entry.
Name
Name of the entry.
Loc
Location of the entry in the world.
Coordx
X coordinate of where the entry is found.
Coordy
Y coordinate of where the entry is found.
Faction
Faction identifier for the entry.

Return value

None, array is passed as a reference.

Usage

Collectinator:addLookupList:(VendorDB,NPC ID, NPC Name, NPC Location, X Coord, Y Coord, Faction)


(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


ScanCompanions

(DB, numminipets, nummounts) Scans all companions you have (mounts and mini-pets) and adds them to the saved variables.

Parameters

DB
numminipets
The number of mini-pets which you know.
nummounts
The number of mini-pets which you know.

Return value

The entries in the DB are flagged as known

Usage

Collectinator:ScanCompanions(DB, playerData["totalknownpets"], playerData["totalknownmounts"])