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 ​
Name | Type |
---|---|
player | alt.Player |
slot | number |
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 ​
Name | Type |
---|---|
effectNameFromItem | string |
callback | EffectCallback |
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 ​
Name | Type | Default value | Description |
---|---|---|---|
player | Player | undefined | The player who is using the item. |
slot | number | undefined | - |
type | InventoryType | undefined | INVENTORY_TYPE |
eventToCall | string | 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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type | Description |
---|---|---|
effectName | string | The name of the effect to remove. |
Returns ​
boolean
The value of the effect.