constnetobjs

package
v0.0.0-...-f291cd2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: GPL-3.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlankPlayer = func() netobj.Player {
	randChar := func(charset string, length int64) string {
		runes := []rune(charset)
		final := make([]rune, 10)
		for i := range final {
			final[i] = runes[rand.Intn(len(runes))]
		}
		return string(final)
	}

	uid := ""
	for i := range make([]byte, 10) {
		if i == 0 {
			uid += strconv.Itoa(rand.Intn(9) + 1)
		} else {
			uid += strconv.Itoa(rand.Intn(10))
		}
	}
	username := ""
	password := randChar("abcdefghijklmnopqrstuvwxyz1234567890", 10)
	migrationPassword := randChar("abcdefghijklmnopqrstuvwxyz1234567890", 10)
	userPassword := ""
	key := randChar("abcdefghijklmnopqrstuvwxyz1234567890", 10)
	playerState := netobj.DefaultPlayerState()
	characterState := netobj.DefaultCharacterState()
	chaoState := GetAllNetChaoList()
	mileageMapState := netobj.DefaultMileageMapState()
	mileageFriends := []netobj.MileageFriend{}
	playerVarious := netobj.DefaultPlayerVarious()
	optionUserResult := netobj.DefaultOptionUserResult()
	rouletteInfo := netobj.DefaultRouletteInfo()
	wheelOptions := netobj.DefaultWheelOptions(playerState.NumRouletteTicket, rouletteInfo.RouletteCountInPeriod, enums.WheelRankNormal, consts.RouletteFreeSpins)

	allowedCharacters := []string{}
	allowedChao := []string{}
	for _, chao := range chaoState {
		if chao.Level < 10 {
			allowedChao = append(allowedChao, chao.ID)
		}
	}
	for _, character := range characterState {
		if character.Star < 10 {
			allowedCharacters = append(allowedCharacters, character.ID)
		}
	}
	chaoRouletteGroup := netobj.DefaultChaoRouletteGroup(playerState, allowedCharacters, allowedChao)
	personalEvents := []eventconf.ConfiguredEvent{}
	messages := []obj.Message{}
	operatorMessages := []obj.OperatorMessage{}
	loginBonusState := netobj.DefaultLoginBonusState(0)
	eventState := netobj.DefaultEventState()
	battleState := netobj.DefaultBattleState()
	disallowInactivePurge := false
	lastLoginPlatformID := int64(0)
	return netobj.NewPlayer(
		uid,
		username,
		password,
		migrationPassword,
		userPassword,
		key,
		playerState,
		characterState,
		chaoState,
		mileageMapState,
		mileageFriends,
		playerVarious,
		optionUserResult,
		wheelOptions,
		rouletteInfo,
		chaoRouletteGroup,
		personalEvents,
		messages,
		operatorMessages,
		loginBonusState,
		false,
		eventState,
		0,
		battleState,
		disallowInactivePurge,
		lastLoginPlatformID,
	)

}() // TODO: Solve duplication requirement with db/assistants.go
View Source
var ChaoIDs = []string{} /* 109 elements not displayed */
View Source
var NetChao = GetAllNetChao()
View Source
var NetChaoList = GetAllNetChaoList()

Functions

func DefaultChaoState

func DefaultChaoState() []netobj.Chao

func GetAllNetChao

func GetAllNetChao() map[string]netobj.Chao

func GetAllNetChaoList

func GetAllNetChaoList() []netobj.Chao

func UnlockedChaoState

func UnlockedChaoState() []netobj.Chao

Types

This section is empty.

Jump to

Keyboard shortcuts

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