sc

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2022 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const ReturnCostTag = "return_cost"

Variables

This section is empty.

Functions

func AddBaseCoin

func AddBaseCoin(id int64, add float64) (left float64, ok bool)

AddBaseCoin 将指定用户的!基础货币!加add,为负数时则减

func AddFavor

func AddFavor(id int64, add float64) (left float64, ok bool)

AddFavor 将指定用户的好感度加add,为负数时则减

func BaseCoinOf

func BaseCoinOf(id int64) float64

BaseCoinOf 获取指定用户的基础货币数

func FavorOf

func FavorOf(id int64) float64

FavorOf 获取指定用户的好感度

func LevelAt

func LevelAt(favor float64) (level int, up float64)

LevelAt 指定好感度对应的好感度等级和升级所需的好感度

func RealCoin

func RealCoin(base float64) float64

RealCoin 获取真实金额,即基础货币 * 倍率

func SetNeedReturnCost added in v0.3.2

func SetNeedReturnCost(ctx *zero.Ctx)

SetNeedReturnCost 标记当前操作需要返还扣除的货币

func SumFavorAt

func SumFavorAt(level int) float64

SumFavorAt 在level级别升级所需的总好感度

func Unit

func Unit() string

Unit 获取货币单位

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL