package groups

// Group loot method constants
const (
	LOOT_METHOD_LEADER_ONLY       = 0
	LOOT_METHOD_ROUND_ROBIN       = 1
	LOOT_METHOD_NEED_BEFORE_GREED = 2
	LOOT_METHOD_LOTTO             = 3
)

// Group loot rarity constants
const (
	LOOT_RARITY_COMMON    = 0
	LOOT_RARITY_UNCOMMON  = 1
	LOOT_RARITY_RARE      = 2
	LOOT_RARITY_LEGENDARY = 3
	LOOT_RARITY_FABLED    = 4
)

// Group auto-split constants
const (
	AUTO_SPLIT_DISABLED = 0
	AUTO_SPLIT_ENABLED  = 1
)

// Group lock method constants
const (
	LOCK_METHOD_OPEN        = 0
	LOCK_METHOD_INVITE_ONLY = 1
	LOCK_METHOD_CLOSED      = 2
)

// Group auto-lock constants
const (
	AUTO_LOCK_DISABLED = 0
	AUTO_LOCK_ENABLED  = 1
)

// Group auto-loot method constants
const (
	AUTO_LOOT_DISABLED = 0
	AUTO_LOOT_ENABLED  = 1
)

// Default yell constants
const (
	DEFAULT_YELL_DISABLED = 0
	DEFAULT_YELL_ENABLED  = 1
)

// Group size limits
const (
	MAX_GROUP_SIZE  = 6
	MAX_RAID_GROUPS = 4
	MAX_RAID_SIZE   = MAX_GROUP_SIZE * MAX_RAID_GROUPS
)

// Group member position constants
const (
	GROUP_POSITION_LEADER   = 0
	GROUP_POSITION_MEMBER_1 = 1
	GROUP_POSITION_MEMBER_2 = 2
	GROUP_POSITION_MEMBER_3 = 3
	GROUP_POSITION_MEMBER_4 = 4
	GROUP_POSITION_MEMBER_5 = 5
)

// Group invite error codes
const (
	GROUP_INVITE_SUCCESS            = 0
	GROUP_INVITE_ALREADY_IN_GROUP   = 1
	GROUP_INVITE_ALREADY_HAS_INVITE = 2
	GROUP_INVITE_GROUP_FULL         = 3
	GROUP_INVITE_DECLINED           = 4
	GROUP_INVITE_TARGET_NOT_FOUND   = 5
	GROUP_INVITE_SELF_INVITE        = 6
	GROUP_INVITE_PERMISSION_DENIED  = 7
	GROUP_INVITE_TARGET_BUSY        = 8
)

// Group message types
const (
	GROUP_MESSAGE_TYPE_SYSTEM = 0
	GROUP_MESSAGE_TYPE_COMBAT = 1
	GROUP_MESSAGE_TYPE_LOOT   = 2
	GROUP_MESSAGE_TYPE_QUEST  = 3
	GROUP_MESSAGE_TYPE_CHAT   = 4
)

// Channel constants for group communication
const (
	CHANNEL_GROUP_SAY  = 11
	CHANNEL_GROUP_CHAT = 31
	CHANNEL_RAID_SAY   = 35
)

// Group update flags
const (
	GROUP_UPDATE_FLAG_MEMBER_LIST  = 1 << 0
	GROUP_UPDATE_FLAG_MEMBER_STATS = 1 << 1
	GROUP_UPDATE_FLAG_MEMBER_ZONE  = 1 << 2
	GROUP_UPDATE_FLAG_LEADERSHIP   = 1 << 3
	GROUP_UPDATE_FLAG_OPTIONS      = 1 << 4
	GROUP_UPDATE_FLAG_RAID_INFO    = 1 << 5
)

// Raid group constants
const (
	RAID_GROUP_A = 0
	RAID_GROUP_B = 1
	RAID_GROUP_C = 2
	RAID_GROUP_D = 3
)

// Group buffer sizes for messaging
const (
	GROUP_MESSAGE_BUFFER_SIZE = 4096
	GROUP_NAME_MAX_LENGTH     = 64
	GROUP_ZONE_NAME_MAX       = 256
)

// Group timing constants (in milliseconds)
const (
	GROUP_UPDATE_INTERVAL      = 1000  // 1 second
	GROUP_INVITE_TIMEOUT       = 30000 // 30 seconds
	GROUP_BUFF_UPDATE_INTERVAL = 5000  // 5 seconds
)

// Group validation constants
const (
	MIN_GROUP_ID = 1
	MAX_GROUP_ID = 2147483647 // Max int32
)
