Module core.libraries.meska.custombonus.server
Metrics-Skill-Achievement Framework (MESKA)
The custombonus-system core functions.
Module Overview
Functions
| meska.custombonus.loadFor(ply[, cb]) | Loads all custombonuses for a player from DB. |
| meska.custombonus.get(ply, skill) | Gets total buffs of active custombonuses for player and skill/globally. |
| meska.custombonus.add(ply, skill, buff, tit, src, tmp[, cb]) | Adds custombonus for a player to their storage. |
| meska.custombonus.update(ply, id, buff[, cb]) | Updates custombonus for a player. |
| meska.custombonus.remove(ply, id[, cb]) | Removes a custombonus. |
| meska.custombonus.syncToClient(ply[, cb]) | Syncs custombonus to player. |
- meska.custombonus.loadFor(ply[, cb])
-
Loads all custombonuses for a player from DB.
Parameters:
- ply Player Entity.
- cb func Callback Function. (optional)
- meska.custombonus.get(ply, skill)
-
Gets total buffs of active custombonuses
for player and skill/globally.
Parameters:
- ply Player Entity.
- skill The skill.
Returns:
-
number Total buffs.
- meska.custombonus.add(ply, skill, buff, tit, src, tmp[, cb])
-
Adds custombonus for a player to their storage.
Parameters:
- ply The player.
- skill The skill.
- buff The buff.
- tit The title.
- src The source.
- tmp If false, store in db. Default: false.
- cb func Callback Function with id as return value. (optional)
- meska.custombonus.update(ply, id, buff[, cb])
-
Updates custombonus for a player.
Parameters:
- ply The player.
- id The id.
- buff The buff.
- cb func Callback Function. (optional)
- meska.custombonus.remove(ply, id[, cb])
-
Removes a custombonus.
Parameters:
- ply The player.
- id The id.
- cb func Callback Function. (optional)
- meska.custombonus.syncToClient(ply[, cb])
-
Syncs custombonus to player.
Parameters:
- ply Player Entity.
- cb func Callback Function. (optional)