Add cap_value script command (#7307)

* Supports int64.
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
HAO YAN
2022-10-20 22:33:20 +08:00
committed by GitHub
parent 8073d4e084
commit 7d19b4bbdd
2 changed files with 19 additions and 0 deletions

View File

@@ -24129,6 +24129,12 @@ BUILDIN_FUNC(minmax){
return SCRIPT_CMD_SUCCESS;
}
BUILDIN_FUNC(cap_value)
{
script_pushint64(st, cap_value(script_getnum64(st, 2), script_getnum64(st, 3), script_getnum64(st, 4)));
return SCRIPT_CMD_SUCCESS;
}
/**
* Safety Base/Job EXP addition than using `set BaseExp,n;` or `set JobExp,n;`
* Unlike `getexp` that affected by some adjustments.
@@ -27047,6 +27053,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF2(minmax,"minimum", "*"),
BUILDIN_DEF2(minmax,"max", "*"),
BUILDIN_DEF2(minmax,"maximum", "*"),
BUILDIN_DEF(cap_value, "iii"),
// <--- [zBuffer] List of mathematics commands
BUILDIN_DEF(md5,"s"),
// [zBuffer] List of dynamic var commands --->