genshin_draw

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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PoolNormal = iota
	PoolCharacter
	PoolWeapon
)
View Source
const GenshinDrawPoolDir = consts.GenshinDataDir + "/pool"
View Source
const GenshinPoolPicDir = GenshinDrawPoolDir + "/pic"

Variables

This section is empty.

Functions

func PutUserInfo

func PutUserInfo(id int64, u UserInfo) error

func SavePools

func SavePools(tp int, pools []DrawPool) (err error)

SavePools 保存池子信息入文件

Types

type DrawPool

type DrawPool struct {
	Name         string `json:"name"` // [卡池名]
	Type         int    `json:"type"` // 卡池类型,参见上述
	EndTimestamp int64  `json:"end_timestamp"`

	Title  string `json:"title"`   // 卡池介绍中的标题
	PicURL string `json:"pic_url"` // 卡池图片URL

	Limit5 []string `json:"limit5,omitempty"` // UP 5星
	Limit4 []string `json:"limit4,omitempty"` // UP 4星

	Normal5Character []string `json:"normal5_character,omitempty"`
	Normal5Weapon    []string `json:"normal5_weapon,omitempty"`
	Normal4          []string `json:"normal4"`
	Normal3          []string `json:"normal3"`
}

func LoadPools

func LoadPools(tp int) (pools []DrawPool)

LoadPools 获取该类型池子信息

func LoadPoolsByPrefix

func LoadPoolsByPrefix(prefix string) (pools []DrawPool)

LoadPoolsByPrefix 按前缀字符串获取该类型池子信息

type UserInfo

type UserInfo struct {
	// 常驻池
	Last4 uint32
	Last5 uint32
	// 角色池
	CLast4   uint32
	CLast5   uint32
	C4LastUp uint32 // 角色池,抽出的4星中,距离上次抽中UP有几只
	C5LastUp uint32 // 角色池,抽出的5星中,距离上次抽中UP有几只
	// 武器池
	WLast4   uint32
	WLast5   uint32
	W4LastUp uint32 // 武器池,抽出的4星中,距离上次抽中UP有几只
	W5LastUp uint32 // 武器池,抽出的5星中,距离上次抽中UP有几只
}

UserInfo 用户信息(模拟抽卡)

func GetUserInfo

func GetUserInfo(id int64) (u UserInfo)

Jump to

Keyboard shortcuts

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