package trade

// Trade error codes converted from C++ Trade.cpp
const (
	TradeResultSuccess         = 0   // Item successfully added to trade
	TradeResultAlreadyInTrade  = 1   // Item already in trade
	TradeResultNoTrade         = 2   // Item is no-trade
	TradeResultHeirloom        = 3   // Item is heirloom and cannot be traded
	TradeResultInvalidSlot     = 254 // Slot is full or invalid
	TradeResultSlotOutOfRange  = 255 // Slot is out of range
	TradeResultInsufficientQty = 253 // Not enough quantity to trade
)

// Trade packet types converted from C++ Trade.cpp
const (
	TradePacketTypeOpen     = 1  // Open trade window
	TradePacketTypeCancel   = 2  // Cancel trade
	TradePacketTypeAccept   = 16 // Accept trade
	TradePacketTypeComplete = 24 // Trade completed
)

// Trade slot configuration
const (
	TradeMaxSlotsDefault = 12  // Default max slots for newer clients
	TradeMaxSlotsLegacy  = 6   // Max slots for older clients (version <= 561)
	TradeSlotAutoFind    = 255 // Automatically find next free slot
)

// Coin conversion constants (from C++ CalculateCoins)
const (
	CoinsPlatinumThreshold = 1000000 // 1 platinum = 1,000,000 copper
	CoinsGoldThreshold     = 10000   // 1 gold = 10,000 copper
	CoinsSilverThreshold   = 100     // 1 silver = 100 copper
)

// Trade validation constants
const (
	TradeSlotEmpty = -1 // Indicates empty trade slot
)
