### Function: GetSpellDataIndex(spell, idx, secondfield)

**Description:**
Gets the spell data by its index.

**Parameters:**
- `spell` (Spell) - Spell object representing `spell`.
- `idx` (uint32) - Integer value `idx`.
- `secondfield` (bool) - Boolean flag `secondfield`.

**Returns:** Return value varies on the data type in the database for the spell.

**Example:**

Example Required
