Search
Preparing search index...
The search index is not available
oldschooljs
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Globals
LootTable
Class LootTable
Hierarchy
LootTable
Index
Constructors
constructor
Properties
all
Items
every
Items
length
limit
one
InItems
table
tertiary
Items
total
Weight
Methods
add
add
Result
ToLoot
add
ToAll
Items
clone
determine
Quantity
every
one
In
resolve
Name
roll
tertiary
Constructors
constructor
new
Loot
Table
(
lootTableOptions
?:
LootTableOptions
)
:
LootTable
Parameters
Default value
lootTableOptions:
LootTableOptions
= {}
Returns
LootTable
Properties
all
Items
all
Items
:
number
[]
every
Items
every
Items
:
LootTableItem
[]
length
length
:
number
Optional
limit
limit
:
undefined
|
number
one
InItems
one
InItems
:
OneInItems
[]
table
table
:
LootTableItem
[]
tertiary
Items
tertiary
Items
:
OneInItems
[]
total
Weight
total
Weight
:
number
Methods
add
add
(
item
:
LootTable
|
number
|
string
|
[
string
,
undefined
|
number
|
number
[]
]
[]
|
LootTableItem
[]
, quantity
?:
number
[]
|
number
, weight
?:
number
, options
?:
LootTableMoreOptions
)
:
this
Parameters
item:
LootTable
|
number
|
string
|
[
string
,
undefined
|
number
|
number
[]
]
[]
|
LootTableItem
[]
Default value
quantity:
number
[]
|
number
= 1
Default value
weight:
number
= 1
Optional
options:
LootTableMoreOptions
Returns
this
Private
add
Result
ToLoot
add
Result
ToLoot
(
result
:
LootTableItem
|
undefined
, loot
:
Bank
)
:
void
Parameters
result:
LootTableItem
|
undefined
loot:
Bank
Returns
void
Private
add
ToAll
Items
add
ToAll
Items
(
items
:
number
|
number
[]
|
LootTable
|
LootTableItem
|
LootTableItem
[]
)
:
void
Parameters
items:
number
|
number
[]
|
LootTable
|
LootTableItem
|
LootTableItem
[]
Returns
void
clone
clone
(
)
:
LootTable
Returns
LootTable
Protected
determine
Quantity
determine
Quantity
(
quantity
:
number
|
number
[]
)
:
number
Parameters
quantity:
number
|
number
[]
Returns
number
every
every
(
item
:
LootTable
|
number
|
string
, quantity
?:
number
|
number
[]
, options
?:
LootTableMoreOptions
)
:
this
Parameters
item:
LootTable
|
number
|
string
Default value
quantity:
number
|
number
[]
= 1
Optional
options:
LootTableMoreOptions
Returns
this
one
In
one
In
(
chance
:
number
, item
:
LootTable
|
number
|
string
, quantity
?:
number
|
number
[]
, options
?:
LootTableMoreOptions
)
:
this
Parameters
chance:
number
item:
LootTable
|
number
|
string
Default value
quantity:
number
|
number
[]
= 1
Optional
options:
LootTableMoreOptions
Returns
this
Private
resolve
Name
resolve
Name
(
name
:
string
)
:
number
Parameters
name:
string
Returns
number
roll
roll
(
quantity
?:
number
)
:
Bank
Parameters
Default value
quantity:
number
= 1
Returns
Bank
tertiary
tertiary
(
chance
:
number
, item
:
LootTable
|
number
|
string
, quantity
?:
number
|
number
[]
, options
?:
LootTableMoreOptions
)
:
this
Parameters
chance:
number
item:
LootTable
|
number
|
string
Default value
quantity:
number
|
number
[]
= 1
Optional
options:
LootTableMoreOptions
Returns
this
Globals
Loot
Table
constructor
all
Items
every
Items
length
limit
one
InItems
table
tertiary
Items
total
Weight
add
add
Result
ToLoot
add
ToAll
Items
clone
determine
Quantity
every
one
In
resolve
Name
roll
tertiary