130 lines
4.7 KiB
Go
130 lines
4.7 KiB
Go
package traits
|
|
|
|
// Trait group constants defining the categories of traits
|
|
const (
|
|
TraitsAttributes = 0 // Attribute-based traits (STR, STA, etc.)
|
|
TraitsCombat = 1 // Combat-related traits
|
|
TraitsNoncombat = 2 // Non-combat utility traits
|
|
TraitsPools = 3 // Health/Power/Concentration pool traits
|
|
TraitsResist = 4 // Resistance-based traits
|
|
TraitsTradeskill = 5 // Tradeskill-related traits
|
|
)
|
|
|
|
// Trait type packet constants for client communication
|
|
const (
|
|
PacketTypeEnemyMastery = 0 // Enemy mastery abilities
|
|
PacketTypeSpecializedTraining = 1 // Specialized training abilities
|
|
PacketTypeCharacterTrait = 2 // Character traits
|
|
PacketTypeRacialTradition = 3 // Racial tradition abilities
|
|
)
|
|
|
|
// Trait selection level requirements - classic EverQuest II progression
|
|
// Based on the comment in the C++ code describing the official trait progression
|
|
|
|
// PersonalTraitLevelLimits defines when each personal trait becomes available
|
|
var PersonalTraitLevelLimits = []int16{0, 8, 14, 22, 28, 36, 42, 46, 48}
|
|
|
|
// TrainingTraitLevelLimits defines when each training ability becomes available
|
|
var TrainingTraitLevelLimits = []int16{0, 10, 20, 30, 40, 50}
|
|
|
|
// RacialTraitLevelLimits defines when each racial tradition becomes available
|
|
var RacialTraitLevelLimits = []int16{0, 18, 26, 34, 44}
|
|
|
|
// CharacterTraitLevelLimits defines when each character trait (enemy tactic) becomes available
|
|
var CharacterTraitLevelLimits = []int16{0, 12, 16, 24, 32, 38}
|
|
|
|
// Classic trait progression schedule as documented in the C++ code:
|
|
//
|
|
// Level 8: Personal Trait (1st)
|
|
// Level 10: Training (1st)
|
|
// Level 12: Enemy Tactic (1st)
|
|
// Level 14: Personal Trait (2nd)
|
|
// Level 16: Enemy Tactic (2nd)
|
|
// Level 18: Racial Tradition (1st)
|
|
// Level 20: Training (2nd)
|
|
// Level 22: Personal Trait (3rd)
|
|
// Level 24: Enemy Tactic (3rd)
|
|
// Level 26: Racial Tradition (2nd)
|
|
// Level 28: Personal Trait (4th)
|
|
// Level 30: Training (3rd)
|
|
// Level 32: Enemy Tactic (4th)
|
|
// Level 34: Racial Tradition (3rd)
|
|
// Level 36: Personal Trait (5th)
|
|
// Level 38: Enemy Tactic (5th)
|
|
// Level 40: Training (4th)
|
|
// Level 42: Personal Trait (6th)
|
|
// Level 44: Racial Tradition (4th)
|
|
// Level 46: Personal Trait (7th)
|
|
// Level 48: Personal Trait (8th)
|
|
// Level 50: Training (5th)
|
|
|
|
// Default trait selection levels for non-classic mode
|
|
const (
|
|
DefaultFocusSelectLevel = 9 // Every 9 levels for focus effects
|
|
DefaultTrainingSelectLevel = 10 // Every 10 levels for training abilities
|
|
DefaultRaceSelectLevel = 10 // Every 10 levels for racial abilities
|
|
DefaultCharacterSelectLevel = 4 // Every 4 levels for character traits
|
|
)
|
|
|
|
// Trait packet field limits
|
|
const (
|
|
MaxTraitsPerLine = 5 // Maximum number of traits that can be displayed per line in UI
|
|
)
|
|
|
|
// Trait name categories for UI display
|
|
var TraitGroupNames = map[int8]string{
|
|
TraitsAttributes: "Attributes",
|
|
TraitsCombat: "Combat",
|
|
TraitsNoncombat: "Noncombat",
|
|
TraitsPools: "Pools",
|
|
TraitsResist: "Resist",
|
|
TraitsTradeskill: "Tradeskill",
|
|
}
|
|
|
|
// Validation constants
|
|
const (
|
|
MaxTraitNameLength = 250 // Maximum length for trait names
|
|
UniversalClassReq = -1 // Class requirement value meaning "any class"
|
|
UniversalRaceReq = -1 // Race requirement value meaning "any race"
|
|
UnassignedGroupID = -1 // Group ID for unassigned/default group
|
|
)
|
|
|
|
// Packet filling constants for empty trait slots
|
|
const (
|
|
EmptyTraitIcon = 65535 // 0xFFFF - indicates empty trait slot
|
|
EmptyTraitID = 0xFFFFFFFF // 0xFFFFFFFF - indicates empty trait ID
|
|
EmptyTraitUnknown = 0xFFFFFFFF // 0xFFFFFFFF - unknown field for empty traits
|
|
)
|
|
|
|
// Client version constants for trait packet compatibility
|
|
const (
|
|
FocusEffectsMinVersion = 1188 // Minimum client version that supports focus effects
|
|
)
|
|
|
|
// Rule names for trait system configuration
|
|
const (
|
|
RuleTraitTieringSelection = "TraitTieringSelection" // Enable/disable tiered selection
|
|
RuleClassicTraitLevelTable = "ClassicTraitLevelTable" // Use classic level requirements
|
|
RuleTraitFocusSelectLevel = "TraitFocusSelectLevel" // Level interval for focus effects
|
|
RuleTraitTrainingSelectLevel = "TraitTrainingSelectLevel" // Level interval for training
|
|
RuleTraitRaceSelectLevel = "TraitRaceSelectLevel" // Level interval for racial traits
|
|
RuleTraitCharacterSelectLevel = "TraitCharacterSelectLevel" // Level interval for character traits
|
|
)
|
|
|
|
// Log category constants
|
|
const (
|
|
LogCategoryTraits = "Traits"
|
|
)
|
|
|
|
// Trait selection state constants
|
|
const (
|
|
TraitNotSelected = 0 // Trait is not selected by player
|
|
TraitSelected = 1 // Trait is selected by player
|
|
)
|
|
|
|
// Default trait selection logic constants
|
|
const (
|
|
DefaultUnknownField1 = 1 // Default value for unknown packet field 1
|
|
DefaultUnknownField2 = 1 // Default value for unknown packet field 2
|
|
)
|