# SWDB

# \Rune

Owned rune.

Represents an object from the table 'rune'.

## Summary

Methods
Properties
Constants
__construct()
$db
$uid
$id
$assigned_to
$type
$slot
$stars
$ancient
$level
$quality
$original_quality
$quality_name
$original_quality_name
$value
$efficiency
$max_efficiency
$main_stat
$main_stat_name
$main_stat_value
$innate_stat
$innate_stat_name
$innate_stat_value
$substats
$substat_1
$substat_1_name
$substat_1_value
$substat_1_craft
$substat_2
$substat_2_name
$substat_2_value
$substat_2_craft
$substat_3
$substat_3_name
$substat_3_value
$substat_3_craft
$substat_4
$substat_4_name
$substat_4_value
$substat_4_craft
No constants found
No protected methods found
No protected properties found
N/A
refresh_names()
stat_name()
quality_name()
No private properties found
N/A

File
  application/entity/Rune.php
Package
  Default
Class hierarchy
  \Entity
  \Rune

## Tags

category | Entity

## Properties

### $db

    $db : resource

#### Type

resource — Database connection.

#

Inherited from
  \Entity

## Tags

None found

### $uid

    $uid : integer

#### Type

integer — Owner identifier.

#

## Tags

None found

### $id

    $id : integer

#### Type

integer — Rune identifier.

#

## Tags

None found

### $assigned_to

    $assigned_to : integer

#### Type

integer — ID of the monster the rune is assigned to.

#

## Tags

None found

### $type

    $type : \K_Rune_Set

#### Type

\K_Rune_Set — Rune set.

#

## Tags

None found

### $slot

    $slot : integer

#### Type

integer — Position of the rune type (1-6).

#

## Tags

None found

### $stars

    $stars : integer

#### Type

integer — Rune stars.

#

## Tags

None found

### $ancient

    $ancient : boolean

#### Type

boolean — Indicates if the rune is ancient.

#

## Tags

None found

### $level

    $level : integer

#### Type

integer — Level of the rune.

#

## Tags

None found

### $quality

    $quality : integer

#### Type

integer — Rune quality.

#

See also
  \QUALITY

## Tags

None found

### $original_quality

    $original_quality : integer

#### Type

integer — Rune original quality.

#

See also
  \QUALITY

## Tags

None found

### $quality_name

    $quality_name : string

#### Type

string — Rune quality name (uppercase).

#

## Tags

None found

### $original_quality_name

    $original_quality_name : string

#### Type

string — Rune original quality name (uppercase).

#

## Tags

None found

### $value

    $value : integer

#### Type

integer — Price of the rune.

#

## Tags

None found

### $efficiency

    $efficiency : float

#### Type

float — Current efficiency of the rune.

#

## Tags

None found

### $max_efficiency

    $max_efficiency : float

#### Type

float — Maximum potential efficiency of the rune.

#

## Tags

None found

### $main_stat

    $main_stat : integer

#### Type

integer — Main stat of the rune.

#

See also
  \RUNE_STAT

## Tags

None found

### $main_stat_name

    $main_stat_name : string

#### Type

string — Main stat name (uppercase).

#

## Tags

None found

### $main_stat_value

    $main_stat_value : integer

#### Type

integer — Main stat value of the rune.

#

## Tags

None found

### $innate_stat

    $innate_stat : integer

#### Type

integer — Extra stat of the rune.

#

See also
  \RUNE_STAT

## Tags

None found

### $innate_stat_name

    $innate_stat_name : string

#### Type

string — Extra stat name (uppercase).

#

## Tags

None found

### $innate_stat_value

    $innate_stat_value : string

#### Type

string — Extra stat value of the rune.

#

## Tags

None found

### $substats

    $substats : integer

#### Type

integer — Number of substats.

#

## Tags

None found

### $substat_1

    $substat_1 : integer

#### Type

integer — Substat 1 of the rune.

#

See also
  \RUNE_STAT

## Tags

None found

### $substat_1_name

    $substat_1_name : string

#### Type

string — Substat 1 name (uppercase).

#

## Tags

None found

### $substat_1_value

    $substat_1_value : integer

#### Type

integer — Substat 1 value of the rune.

#

## Tags

None found

### $substat_1_craft

    $substat_1_craft : integer

#### Type

integer — Ammount gained by the substat 1 enchant.

#

## Tags

None found

### $substat_2

    $substat_2 : integer

#### Type

integer — Substat 2 of the rune.

#

See also
  \RUNE_STAT

## Tags

None found

### $substat_2_name

    $substat_2_name : string

#### Type

string — Substat 2 name (uppercase).

#

## Tags

None found

### $substat_2_value

    $substat_2_value : integer

#### Type

integer — Substat 2 value of the rune.

#

## Tags

None found

### $substat_2_craft

    $substat_2_craft : integer

#### Type

integer — Ammount gained by the substat 2 enchant.

#

## Tags

None found

### $substat_3

    $substat_3 : integer

#### Type

integer — Substat 3 of the rune.

#

See also
  \RUNE_STAT

## Tags

None found

### $substat_3_name

    $substat_3_name : string

#### Type

string — Substat 3 name (uppercase).

#

## Tags

None found

### $substat_3_value

    $substat_3_value : integer

#### Type

integer — Substat 3 value of the rune.

#

## Tags

None found

### $substat_3_craft

    $substat_3_craft : integer

#### Type

integer — Ammount gained by the substat 3 enchant.

#

## Tags

None found

### $substat_4

    $substat_4 : integer

#### Type

integer — Substat 4 of the rune.

#

See also
  \RUNE_STAT

## Tags

None found

### $substat_4_name

    $substat_4_name : string

#### Type

string — Substat 4 name (uppercase).

#

## Tags

None found

### $substat_4_value

    $substat_4_value : integer

#### Type

integer — Substat 4 value of the rune.

#

## Tags

None found

### $substat_4_craft

    $substat_4_craft : integer

#### Type

integer — Ammount gained by the substat 4 enchant.

#

## Tags

None found

## Methods

### __construct()

    __construct(resource  $db, integer  $id)

Constructor.

Searches the database and retrieves the information about the rune, populating it and it's items.

#### Parameters

resource | $db | Connection to the database.
integer | $id | Rune id.

#

## Tags

None found

### refresh_names()

    refresh_names()

Calculates name variables.

#

## Tags

None found

### stat_name()

    stat_name(integer  $stat) : string

Gets a stat name from the mappings.

#### Parameters

integer | $stat | Stat id.

#### Returns

string —

Stat name (Uppercase)

#

## Tags

None found

### quality_name()

    quality_name(integer  $q) : string

Gets a stat name frm the mappings.

#### Parameters

integer | $q | Quality id.

#### Returns

string —

Quality (Uppercase)

#

## Tags

None found

### Rune.php