\K_Decoration

Decoration.

Represents an object from the table 'k_decoration'.

Summary

Methods
Properties
Constants
__construct()
get_image()
$db
$id
$name
$description
$area
$stat
$element
$max_level
$level_bonus
$level_cost
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$db

$db : resource

Type

resource — Database connection.

$id

$id : integer

Type

integer — Decoration identifier.

$name

$name : string

Type

string — Decoration name.

$description

$description : string

Type

string — Decoration description.

$area

$area : integer

Type

integer — Area of effect identifier (if any).

$stat

$stat : integer

Type

integer — Affected stat id (if any).

$element

$element : integer

Type

integer — Affected element id(if any).

$max_level

$max_level : integer

Type

integer — Max. level.

$level_bonus

$level_bonus : array<mixed,integer>

Type

array<mixed,integer> — Effect bonus per level.

$level_cost

$level_cost : 

Cost per level.

Type

Methods

__construct()

__construct(resource  $db, integer  $id) 

Constructor.

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

Parameters

resource $db

Connection to the database.

integer $id

Decoration identifier.

get_image()

get_image() : string

Gets the path to the building image. The image must be in the img/decoration/ directory, and its name must be the decoration id, padded with '0' to 4 digites, and the extension must be '.png'.

Returns

string —

Image URL, or a fixed unknown image.