diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 0000000..deac5a4
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,249 @@
+# CLAUDE.md
+
+This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+
+## Project Overview
+
+EQ2Go is a Go rewrite of the EverQuest II server emulator from C++ EQ2EMu. Implements core MMO server functionality with authentication, world simulation, and game mechanics using modern Go practices.
+
+## Development Commands
+
+### Building the Project
+```bash
+# Build login server
+go build -o bin/login_server ./cmd/login_server
+
+# Build world server
+go build -o bin/world_server ./cmd/world_server
+
+# Build both servers
+go build ./cmd/...
+```
+
+### Running the Servers
+```bash
+# Run login server (requires login_config.json)
+./bin/login_server
+
+# Run world server (creates world_config.json with defaults if missing)
+./bin/world_server
+
+# With custom configuration
+./bin/world_server -listen-port 9001 -web-port 8081 -log-level debug
+```
+
+### Testing
+```bash
+# Run all tests
+go test ./...
+
+# Test specific packages
+go test ./internal/udp
+go test ./internal/packets/parser
+
+# Run tests with verbose output
+go test -v ./...
+
+# Test with race detection
+go test -race ./...
+```
+
+### Development Tools
+```bash
+# Format code
+go fmt ./...
+
+# Run linter (if golangci-lint is installed)
+golangci-lint run
+
+# Tidy modules
+go mod tidy
+
+# Check for vulnerabilities
+go run golang.org/x/vuln/cmd/govulncheck@latest ./...
+```
+
+## Architecture Overview
+
+### Core Components
+
+**Login Server** - Client authentication, character management, world server coordination
+**World Server** - Game simulation engine, zones, NPCs, combat, quests, web admin interface
+
+**Shared Libraries:**
+- `common/` - EQ2-specific data types and constants
+- `database/` - SQLite wrapper with simplified query interface
+- `udp/` - Custom UDP protocol with reliability layer
+- `packets/` - XML-driven packet definition parser
+- `achievements/` - Achievement system
+- `spawn/` - Base game entity system (positioning, commands, scripting)
+- `entity/` - Combat-capable entities with spell effects, stats, pet management
+- `spells/` - Complete spell system with casting mechanics and processing
+- `titles/` - Character title system with achievement integration
+- `trade/` - Player trading system with item/coin exchange and validation
+- `object/` - Interactive objects extending spawn system (merchants, transporters, devices, collectors)
+- `races/` - Race system with all EQ2 races, alignment classification, stat modifiers, and entity integration
+
+### Network Protocol
+EverQuest II UDP protocol with reliability layer, RC4 encryption, CRC validation, connection management, packet combining.
+
+### Database Layer
+SQLite with simplified query interface, transactions, connection pooling, parameter binding.
+
+### Packet System
+XML-driven packet definitions with version-specific formats, conditional fields, templates, dynamic arrays.
+
+## Key Files and Locations
+
+**Server Entry Points:**
+- `cmd/login_server/main.go`: Login server startup and configuration
+- `cmd/world_server/main.go`: World server startup with command-line options
+
+**Core Data Structures:**
+- `internal/common/types.go`: EQ2-specific types (EQ2Color, EQ2Equipment, AppearanceData, etc.)
+
+**Network Implementation:**
+- `internal/udp/server.go`: Multi-connection UDP server
+- `internal/udp/connection.go`: Individual client connection handling
+- `internal/udp/protocol.go`: Protocol packet types and constants
+
+**Database:**
+- `internal/database/wrapper.go`: Simplified SQLite interface
+- Database files: `login.db`, `world.db` (created automatically)
+
+**Spawn System:**
+- `internal/spawn/spawn.go`: Base spawn entity with position, stats, commands, and scripting
+- `internal/spawn/spawn_lists.go`: Spawn location and entry management
+- `internal/spawn/README.md`: Comprehensive spawn system documentation
+
+**Entity System:**
+- `internal/entity/entity.go`: Combat-capable spawn extension with spell casting and pet management
+- `internal/entity/info_struct.go`: Comprehensive character statistics and information management
+- `internal/entity/spell_effects.go`: DEPRECATED - now imports from spells package
+- `internal/entity/README.md`: Complete entity system documentation
+
+**Spells System:**
+- Core: `spell_data.go`, `spell.go`, `spell_effects.go`, `spell_manager.go`, `constants.go`
+- Processing: `process_constants.go`, `spell_process.go`, `spell_targeting.go`, `spell_resources.go`
+- Docs: `README.md`, `SPELL_PROCESS.md`
+
+**Titles System:**
+- `internal/titles/title.go`: Core title data structures and player title management
+- `internal/titles/constants.go`: Title system constants, categories, and rarity levels
+- `internal/titles/master_list.go`: Global title registry and management with categorization
+- `internal/titles/player_titles.go`: Individual player title collections and active title tracking
+- `internal/titles/title_manager.go`: Central title system coordinator with background cleanup
+- `internal/titles/integration.go`: Integration systems for earning titles through achievements, quests, PvP, events
+- `internal/titles/README.md`: Complete title system documentation
+
+**Trade System:**
+- `internal/trade/trade.go`: Core trade mechanics with two-party item/coin exchange
+- `internal/trade/types.go`: Trade data structures, participants, and validation
+- `internal/trade/constants.go`: Trade constants, error codes, and configuration
+- `internal/trade/utils.go`: Coin calculations, validation helpers, and formatting
+- `internal/trade/manager.go`: Trade service with high-level management and placeholders
+
+**Object System:**
+- `internal/object/object.go`: Core object mechanics extending spawn functionality with interaction
+- `internal/object/constants.go`: Object constants, spawn types, and interaction types
+- `internal/object/manager.go`: Object manager with zone-based and type-based indexing
+- `internal/object/integration.go`: Spawn system integration with ObjectSpawn wrapper
+- `internal/object/interfaces.go`: Integration interfaces for trade/spell systems and entity adapters
+
+**Race System:**
+- `internal/races/races.go`: Core race management with all 21 EQ2 races and alignment mapping
+- `internal/races/constants.go`: Race IDs, names, and display constants
+- `internal/races/utils.go`: Race utilities with stat modifiers, descriptions, and parsing
+- `internal/races/integration.go`: Entity system integration with RaceAware interface
+- `internal/races/manager.go`: High-level race management with statistics and command processing
+
+**Packet Definitions:**
+- `internal/packets/xml/`: XML packet structure definitions
+- `internal/packets/PARSER.md`: Packet definition language documentation
+- `internal/packets/parser/`: Parser implementation for XML packet definitions
+
+## Configuration
+
+**Login Server**: Requires `login_config.json` with database and server settings
+
+**World Server**: Creates `world_config.json` with defaults:
+```json
+{
+ "listen_addr": "0.0.0.0",
+ "listen_port": 9000,
+ "max_clients": 1000,
+ "web_port": 8080,
+ "database_path": "world.db",
+ "log_level": "info"
+}
+```
+
+Command-line flags override JSON configuration.
+
+## Important Dependencies
+
+**Core Dependencies:**
+- `zombiezen.com/go/sqlite`: Modern SQLite driver
+- `golang.org/x/crypto`: Cryptographic functions
+
+**Module Information:**
+- Go version: 1.24.5
+- Module name: `eq2emu`
+
+## Development Notes
+
+**Architecture Transition**: This Go implementation is based on the extensive C++ EQ2EMu codebase documented in `EQ2EMU_Architecture_White_Paper.md`. The Go version maintains compatibility with the original protocol while modernizing the implementation.
+
+**Packet Handling**: The XML packet definition system allows for easy addition of new packet types without code changes. See `internal/packets/PARSER.md` for syntax reference.
+
+**Database Schema**: Currently uses SQLite for development/testing. Production deployments may require migration to PostgreSQL or MySQL for better concurrent access.
+
+**Spawn System**: The spawn system (`internal/spawn/`) provides the foundation for all game entities. It's converted from the C++ EQ2EMu codebase with modern Go concurrency patterns.
+
+**Entity System**: The entity system (`internal/entity/`) extends spawns with combat capabilities, implementing the complete EverQuest II character statistics system, spell effect management, and pet systems. Key features include:
+- **InfoStruct**: Complete character statistics (attributes, resistances, experience, currency, equipment data)
+- **Entity**: Combat-capable spawn with spell casting, pet management, and bonus calculations
+- **Thread Safety**: All systems use proper Go concurrency patterns with mutexes and atomic operations
+- **Stat Calculations**: Dynamic stat calculations with bonuses from equipment, spells, and other sources
+- **Pet Management**: Support for multiple pet types (summon, charm, deity, cosmetic) with proper ownership tracking
+
+**Spells System**: Complete spell management with spell definitions, effect system, and real-time casting engine. Features spell processing (50ms intervals), comprehensive targeting (self/single/group/AOE), resource management (power/health/concentration), cast/recast timers, interrupt handling, heroic opportunities, and thread-safe operations.
+
+**Titles System**: Character title management with prefix/suffix positioning, categories, rarity levels, achievement integration, and thread-safe operations.
+
+**Trade System**: Player-to-player trading with item/coin exchange, validation (no-trade, heirloom restrictions), slot management, acceptance workflow, bot trading support, and client version compatibility (6/12 slots).
+
+**Object System**: Interactive world objects extending spawn system with merchants, transporters, devices, and collectors. Features clickable interaction, command handling, device IDs, size randomization, transport/teleport support, and complete spawn integration with entity/item adapters for trade/spell system compatibility.
+
+**Race System**: Complete EverQuest II race management with all 21 races (Human through Aerakyn), alignment classification (good/evil/neutral), racial stat modifiers, starting locations, lore descriptions, and full entity system integration. Features randomization by alignment, compatibility checking, usage statistics, and RaceAware interface for seamless integration with existing systems.
+
+All systems are converted from C++ with TODO comments marking areas for future implementation (LUA integration, advanced mechanics, etc.).
+
+**Testing**: Focus testing on the UDP protocol layer and packet parsing, as these are critical for client compatibility.
+
+## Code Documentation Standards
+
+**Function Documentation**: All functions must have thorough documentation explaining their purpose, parameters, return values, and any important behavior. Do NOT follow the standard Go convention of starting comments with the function name - instead, write clear explanations of what the function does.
+
+**Examples:**
+
+Good:
+```go
+// Creates a new UDP server instance with the specified address and packet handler.
+// The server will listen on the given address and route incoming packets to the handler.
+// Returns an error if the address is invalid or the socket cannot be bound.
+func NewServer(addr string, handler PacketHandler, config ...Config) (*Server, error) {
+```
+
+Poor (standard Go convention - avoid this):
+```go
+// NewServer creates a new UDP server instance with the specified address and packet handler.
+func NewServer(addr string, handler PacketHandler, config ...Config) (*Server, error) {
+```
+
+**Additional Documentation Requirements:**
+- Document all public types, constants, and variables
+- Include examples in documentation for complex functions
+- Explain any non-obvious algorithms or business logic
+- Document error conditions and edge cases
+- For packet-related code, reference the relevant XML definitions or protocol specifications
\ No newline at end of file
diff --git a/internal/classes.cpp b/internal/classes.cpp
new file mode 100644
index 0000000..ba9d7fd
--- /dev/null
+++ b/internal/classes.cpp
@@ -0,0 +1,199 @@
+/*
+ EQ2Emulator: Everquest II Server Emulator
+ Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
+
+ This file is part of EQ2Emulator.
+
+ EQ2Emulator is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ EQ2Emulator is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with EQ2Emulator. If not, see .
+*/
+#include "../common/debug.h"
+#include "../common/Log.h"
+#include "classes.h"
+#include "../common/MiscFunctions.h"
+#include
+
+Classes::Classes(){
+ class_map["COMMONER"] = 0;
+ class_map["FIGHTER"] = 1;
+ class_map["WARRIOR"] = 2;
+ class_map["GUARDIAN"] = 3;
+ class_map["BERSERKER"] = 4;
+ class_map["BRAWLER"] = 5;
+ class_map["MONK"] = 6;
+ class_map["BRUISER"] = 7;
+ class_map["CRUSADER"] = 8;
+ class_map["SHADOWKNIGHT"] = 9;
+ class_map["PALADIN"] = 10;
+ class_map["PRIEST"] = 11;
+ class_map["CLERIC"] = 12;
+ class_map["TEMPLAR"] = 13;
+ class_map["INQUISITOR"] = 14;
+ class_map["DRUID"] = 15;
+ class_map["WARDEN"] = 16;
+ class_map["FURY"] = 17;
+ class_map["SHAMAN"] = 18;
+ class_map["MYSTIC"] = 19;
+ class_map["DEFILER"] = 20;
+ class_map["MAGE"] = 21;
+ class_map["SORCERER"] = 22;
+ class_map["WIZARD"] = 23;
+ class_map["WARLOCK"] = 24;
+ class_map["ENCHANTER"] = 25;
+ class_map["ILLUSIONIST"] = 26;
+ class_map["COERCER"] = 27;
+ class_map["SUMMONER"] = 28;
+ class_map["CONJUROR"] = 29;
+ class_map["NECROMANCER"] = 30;
+ class_map["SCOUT"] = 31;
+ class_map["ROGUE"] = 32;
+ class_map["SWASHBUCKLER"] = 33;
+ class_map["BRIGAND"] = 34;
+ class_map["BARD"] = 35;
+ class_map["TROUBADOR"] = 36;
+ class_map["DIRGE"] = 37;
+ class_map["PREDATOR"] = 38;
+ class_map["RANGER"] = 39;
+ class_map["ASSASSIN"] = 40;
+ class_map["ANIMALIST"] = 41;
+ class_map["BEASTLORD"] = 42;
+ class_map["SHAPER"] = 43;
+ class_map["CHANNELER"] = 44;
+ class_map["ARTISAN"] = 45;
+ class_map["CRAFTSMAN"] = 46;
+ class_map["PROVISIONER"] = 47;
+ class_map["WOODWORKER"] = 48;
+ class_map["CARPENTER"] = 49;
+ class_map["OUTFITTER"] = 50;
+ class_map["ARMORER"] = 51;
+ class_map["WEAPONSMITH"] = 52;
+ class_map["TAILOR"] = 53;
+ class_map["SCHOLAR"] = 54;
+ class_map["JEWELER"] = 55;
+ class_map["SAGE"] = 56;
+ class_map["ALCHEMIST"] = 57;
+}
+
+int8 Classes::GetBaseClass(int8 class_id) {
+ int8 ret = 0;
+ if(class_id>=WARRIOR && class_id <= PALADIN)
+ ret = FIGHTER;
+ if((class_id>=CLERIC && class_id <= DEFILER) || (class_id == SHAPER || class_id == CHANNELER))
+ ret = PRIEST;
+ if(class_id>=SORCERER && class_id <= NECROMANCER)
+ ret = MAGE;
+ if(class_id>=ROGUE && class_id <= BEASTLORD)
+ ret = SCOUT;
+ LogWrite(WORLD__DEBUG, 5, "World", "%s returning base class ID: %i", __FUNCTION__, ret);
+ return ret;
+}
+
+int8 Classes::GetSecondaryBaseClass(int8 class_id){
+ int8 ret = 0;
+ if(class_id==GUARDIAN || class_id == BERSERKER)
+ ret = WARRIOR;
+ if(class_id==MONK || class_id == BRUISER)
+ ret = BRAWLER;
+ if(class_id==SHADOWKNIGHT || class_id == PALADIN)
+ ret = CRUSADER;
+ if(class_id==TEMPLAR || class_id == INQUISITOR)
+ ret = CLERIC;
+ if(class_id==WARDEN || class_id == FURY)
+ ret = DRUID;
+ if(class_id==MYSTIC || class_id == DEFILER)
+ ret = SHAMAN;
+ if(class_id==WIZARD || class_id == WARLOCK)
+ ret = SORCERER;
+ if(class_id==ILLUSIONIST || class_id == COERCER)
+ ret = ENCHANTER;
+ if(class_id==CONJUROR || class_id == NECROMANCER)
+ ret = SUMMONER;
+ if(class_id==SWASHBUCKLER || class_id == BRIGAND)
+ ret = ROGUE;
+ if(class_id==TROUBADOR || class_id == DIRGE)
+ ret = BARD;
+ if(class_id==RANGER || class_id == ASSASSIN)
+ ret = PREDATOR;
+ if(class_id==BEASTLORD)
+ ret = ANIMALIST;
+ if(class_id == CHANNELER)
+ ret = SHAPER;
+ LogWrite(WORLD__DEBUG, 5, "World", "%s returning secondary class ID: %i", __FUNCTION__, ret);
+ return ret;
+}
+
+int8 Classes::GetTSBaseClass(int8 class_id) {
+ int8 ret = 0;
+ if (class_id + 42 >= ARTISAN)
+ ret = ARTISAN - 44;
+ else
+ ret = class_id;
+
+ LogWrite(WORLD__DEBUG, 5, "World", "%s returning base tradeskill class ID: %i", __FUNCTION__, ret);
+ return ret;
+}
+
+int8 Classes::GetSecondaryTSBaseClass(int8 class_id) {
+ int8 ret = class_id + 42;
+ if (ret == ARTISAN)
+ ret = ARTISAN - 44;
+ else if (ret >= CRAFTSMAN && ret < OUTFITTER)
+ ret = CRAFTSMAN - 44;
+ else if (ret >= OUTFITTER && ret < SCHOLAR)
+ ret = OUTFITTER - 44;
+ else if (ret >= SCHOLAR)
+ ret = SCHOLAR - 44;
+ else
+ ret = class_id;
+
+ LogWrite(WORLD__DEBUG, 5, "World", "%s returning secondary tradeskill class ID: %i", __FUNCTION__, ret);
+ return ret;
+}
+
+sint8 Classes::GetClassID(const char* name){
+ string class_name = string(name);
+ class_name = ToUpper(class_name);
+ if(class_map.count(class_name) == 1) {
+ LogWrite(WORLD__DEBUG, 5, "World", "%s returning class ID: %i for class name %s", __FUNCTION__, class_map[class_name], class_name.c_str());
+ return class_map[class_name];
+ }
+ LogWrite(WORLD__WARNING, 0, "World", "Could not find class_id in function: %s (return -1)", __FUNCTION__);
+ return -1;
+}
+
+const char* Classes::GetClassName(int8 class_id){
+ map::iterator itr;
+ for(itr = class_map.begin(); itr != class_map.end(); itr++){
+ if(itr->second == class_id) {
+ LogWrite(WORLD__DEBUG, 5, "World", "%s returning class name: %s for class_id %i", __FUNCTION__, itr->first.c_str(), class_id);
+ return itr->first.c_str();
+ }
+ }
+ LogWrite(WORLD__WARNING, 0, "World", "Could not find class name in function: %s (return 0)", __FUNCTION__);
+ return 0;
+}
+
+string Classes::GetClassNameCase(int8 class_id) {
+ map::iterator itr;
+ for (itr = class_map.begin(); itr != class_map.end(); itr++){
+ if (itr->second == class_id) {
+ string class_name = string(itr->first);
+ transform(itr->first.begin() + 1, itr->first.end(), class_name.begin() + 1, ::tolower);
+ class_name[0] = ::toupper(class_name[0]);
+ LogWrite(WORLD__DEBUG, 5, "World", "%s returning class name: %s for class_id %i", __FUNCTION__, class_name.c_str(), class_id);
+ return class_name;
+ }
+ }
+ LogWrite(WORLD__WARNING, 0, "World", "Could not find class name in function: %s (return blank)", __FUNCTION__);
+ return "";
+}
diff --git a/internal/classes.h b/internal/classes.h
new file mode 100644
index 0000000..58beefe
--- /dev/null
+++ b/internal/classes.h
@@ -0,0 +1,119 @@
+/*
+ EQ2Emulator: Everquest II Server Emulator
+ Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
+
+ This file is part of EQ2Emulator.
+
+ EQ2Emulator is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ EQ2Emulator is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with EQ2Emulator. If not, see .
+*/
+#ifndef CLASSES_CH
+#define CLASSES_CH
+#include "../common/types.h"
+#include