Skip to content
On this page

Athena.systems.inventory.effects

Type Aliases

EffectCallback

Ƭ EffectCallback: (player: alt.Player, slot: number, type: "inventory" | "toolbar") => void

Type declaration

Usage

Athena.systems.inventory.effects.(player, slot, type): void

Parameters
NameType
playeralt.Player
slotnumber
type"inventory" | "toolbar"
Returns

void

Defined in

server/systems/inventory/effects.ts:5


InventoryType

Ƭ InventoryType: "inventory" | "toolbar"

Defined in

server/systems/inventory/effects.ts:4

Functions

add

Usage

Athena.systems.inventory.effects.add(effectNameFromItem, callback): any

Register an item effect to invoke a callback on consumption.

Static

Parameters

NameType
effectNameFromItemstring
callbackEffectCallback

Returns

any

Defined in

server/systems/inventory/effects.ts:17


invoke

Usage

Athena.systems.inventory.effects.invoke(player, slot, type, eventToCall?): boolean

Invokes a callback for an item effect

Parameters

NameTypeDefault valueDescription
playerPlayerundefinedThe player who is using the item.
slotnumberundefined-
typeInventoryTypeundefinedINVENTORY_TYPE
eventToCallstring | string[]undefined-

Returns

boolean

The callback function.

Defined in

server/systems/inventory/effects.ts:51


override

Usage

Athena.systems.inventory.effects.override(functionName, callback): any

Used to override inventory item effects functionality

Parameters

NameType
functionName"add"
callback(effectNameFromItem: string, callback: EffectCallback) => any

Returns

any

Defined in

server/systems/inventory/effects.ts:142

Usage

Athena.systems.inventory.effects.override(functionName, callback): any

Used to override inventory item effects functionality

Parameters

NameType
functionName"remove"
callback(effectName: string) => boolean

Returns

any

Defined in

server/systems/inventory/effects.ts:143

Usage

Athena.systems.inventory.effects.override(functionName, callback): any

Used to override inventory item effects functionality

Parameters

NameType
functionName"invoke"
callback(player: Player, slot: number, type: InventoryType, eventToCall: string | string[]) => boolean

Returns

any

Defined in

server/systems/inventory/effects.ts:144


remove

Usage

Athena.systems.inventory.effects.remove(effectName): boolean

Remove an effect from the effects map.

Parameters

NameTypeDescription
effectNamestringThe name of the effect to remove.

Returns

boolean

The value of the effect.

Defined in

server/systems/inventory/effects.ts:35

Created by Stuyk | Est. 2020