70 lines
2.3 KiB
Go

// Package collections provides collection quest management for the EverQuest II server emulator.
//
// Collections are special quests where players gather specific items scattered throughout
// the world. When all items are found, the collection can be turned in for rewards.
// The system tracks both master collections available to all players and individual
// player progress on those collections.
//
// Basic Usage:
//
// db, _ := database.NewSQLite("collections.db")
//
// // Create new collection
// collection := collections.New(db)
// collection.ID = 1001
// collection.Name = "Antonian Cameos"
// collection.Category = "Heritage"
// collection.Level = 20
// collection.Save()
//
// // Load existing collection
// loaded, _ := collections.Load(db, 1001)
// loaded.Delete()
//
// // Add collection items
// collection.CollectionItems = append(collection.CollectionItems, collections.CollectionItem{
// ItemID: 12345,
// Index: 0,
// Found: collections.ItemNotFound,
// })
//
// Master List Management:
//
// masterList := collections.NewMasterList()
// masterList.LoadAllCollections(db)
// masterList.AddCollection(collection)
//
// // Find collections
// found := masterList.GetCollection(1001)
// heritage := masterList.FindCollectionsByCategory("Heritage")
// needsItem := masterList.GetCollectionsNeedingItem(12345)
//
// Player Collection Management:
//
// playerList := collections.NewPlayerList(characterID, db)
// playerList.LoadPlayerCollections(masterList)
//
// // Check if player needs an item
// if playerList.NeedsItem(12345) {
// // Award the item to collections that need it
// }
//
// // Find collections ready to turn in
// readyCollections := playerList.GetCollectionsToHandIn()
//
// Collection Features:
//
// // Check collection progress
// progress := collection.GetProgress() // Returns percentage 0-100
// ready := collection.GetIsReadyToTurnIn()
//
// // Mark items as found
// found := collection.MarkItemFound(itemID)
//
// // Clone collections for players
// playerCollection := masterCollection.Clone()
//
// The package supports both master collections (defined by game data) and player-specific
// collection instances with individual progress tracking. Collections can have multiple
// reward types including items, coin, and experience points.
package collections