plaza

package
v0.0.0-...-64c21b7 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetNumberOfMiis     = `SELECT COUNT(*) FROM miis`
	GetNumberOfArtisans = `SELECT COUNT(*) FROM artisans`
)
View Source
const (
	GetPopularArtisans = `SELECT artisan_id FROM artisans WHERE artisan_id != 100000993 ORDER BY total_likes DESC LIMIT 100`
	GetArtisan         = `SELECT mii_data, total_likes, country_id, is_master, last_post FROM artisans WHERE artisan_id = $1`
)
View Source
const (
	GetPopularMiis = `` /* 270-byte string literal not displayed */

	GetPermPopularMiis = `` /* 297-byte string literal not displayed */

	GetNumberOfMiisWithLikes = `SELECT COUNT(*) FROM miis WHERE likes > 0`

	ResetMiiLikes = `UPDATE miis SET likes = 0`
)
View Source
const GetBargainMiis = `` /* 274-byte string literal not displayed */
View Source
const GetMiis = `` /* 276-byte string literal not displayed */
View Source
const GetMiisBySkillAndGender = `` /* 315-byte string literal not displayed */
View Source
const (
	GetTop50Miis = `` /* 280-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func GetPopularAndRandomMiis

func GetPopularAndRandomMiis(pool *pgxpool.Pool, ctx context.Context, max int) ([]common.MiiWithArtisan, error)

func MakeArtisanInfo

func MakeArtisanInfo(entryNumber uint32, miiInfo *MiiInfo, artisanInfo *ArtisanInfo) []byte

func MakeBargainList

func MakeBargainList(pool *pgxpool.Pool, ctx context.Context) error

func MakeList

func MakeList(listType common.ListTag, miis []common.MiiWithArtisan, filename string, number *uint32) error

func MakeNewList

func MakeNewList(pool *pgxpool.Pool, ctx context.Context) error

func MakeNumberInfo

func MakeNumberInfo(pool *pgxpool.Pool, ctx context.Context) error

func MakeOwnSearch

func MakeOwnSearch(miis []common.MiiWithArtisan, artisanId uint32) []byte

func MakePopCraftsList

func MakePopCraftsList(pool *pgxpool.Pool, ctx context.Context) error

func MakeSearchList

func MakeSearchList(listType common.ListTag, miis []common.MiiWithArtisan, entryNumber uint32) []byte

func MakeSelectList

func MakeSelectList(pool *pgxpool.Pool, ctx context.Context) error

func MakeSpotList

func MakeSpotList(pool *pgxpool.Pool, ctx context.Context) error

func MakeTop50

func MakeTop50(pool *pgxpool.Pool, ctx context.Context) error

func WriteWiiSportsResortMiis

func WriteWiiSportsResortMiis(pool *pgxpool.Pool, ctx context.Context) error

Types

type Artisan

type Artisan struct {
	Tag            [2]byte
	TagSize        uint16
	ArtisanIndex   uint32
	ArtisanNumber  uint32
	MiiArtisanData [76]byte

	IsMasterMiiArtisan uint8

	CountryCode uint8
	// contains filtered or unexported fields
}

type ArtisanInfo

type ArtisanInfo struct {
	Tag        common.ListTag
	TagSize    uint16
	Unknown    uint32
	Unknown1   uint32
	Unknown2   uint32
	IsMaster   uint16
	Popularity uint8

	Ranking uint8

	Unknown3 uint8
	// contains filtered or unexported fields
}

type ExtendedArtisan

type ExtendedArtisan struct {
	Tag            [2]byte
	TagSize        uint16
	ArtisanIndex   uint32
	ArtisanNumber  uint32
	MiiArtisanData [76]byte

	IsMasterMiiArtisan uint8
	Popularity         uint8

	CountryCode uint16

	RK
	// contains filtered or unexported fields
}
type Header struct {
	Tag common.ListTag

	CountryRegion uint32
	ListNumber    uint32
	ErrorCode     uint32

	Padding      [4]byte
	MiiTag       [2]byte
	MiiTagSize   uint16
	Unknown      uint32
	NumberOfMiis uint32
	// contains filtered or unexported fields
}

type Info

type Info struct {
	Tag common.ListTag

	CountryRegion uint32
	EntryNumber   uint32
	ErrorCode     uint32

	Padding [8]byte
	MiiInfo
	ArtisanInfo
	// contains filtered or unexported fields
}

func (*Info) ToBytes

func (i *Info) ToBytes(_ any) []byte

type Mii

type Mii struct {
	Tag         common.ListTag
	TagSize     uint16
	MiiIndex    uint32
	EntryNumber uint32
	MiiData     [76]byte

	Popularity uint8

	Skill    uint16
	Initials [2]byte
	// contains filtered or unexported fields
}

type MiiInfo

type MiiInfo struct {
	Tag         common.ListTag
	TagSize     uint16
	Unknown     uint32
	EntryNumber uint32
	MiiData     [76]byte
	Unknown2    uint16

	Initials [2]byte
	// contains filtered or unexported fields
}

type MiiList

type MiiList struct {
	Header Header
	Miis   []MiiPair
}

MiiList is the structure that different types of inherit. It contains a list of Miis and their corresponding Artisans.

func (MiiList) ToBytes

func (m MiiList) ToBytes(_ any) []byte

type MiiPair

type MiiPair struct {
	Mii     Mii
	Artisan Artisan
}

MiiPair is a Mii paired with it's Artisan

type NumberInfo

type NumberInfo struct {
	Tag common.ListTag

	CountryRegion uint32
	ListNumber    uint32
	ErrorCode     uint32

	Padding             [4]byte
	NumberInfoTag       [2]byte
	TagSize             uint16
	Unknown             uint32
	NumberOfMiis        uint32
	NumberOfMiiArtisans uint32
	// contains filtered or unexported fields
}

func (NumberInfo) ToBytes

func (f NumberInfo) ToBytes(data any) []byte

type OwnSearch

type OwnSearch struct {
	Header Header
	Miis   []Mii
}

OwnSearch is the data the server requests when searching for a Mii artisan. It is essentially MiiList but without the artisan.

func (OwnSearch) ToBytes

func (o OwnSearch) ToBytes(_ any) []byte

type Popcrafts

type Popcrafts struct {
	Header   PopcraftsHeader
	Artisans []ExtendedArtisan
}

func (Popcrafts) ToBytes

func (p Popcrafts) ToBytes(_ any) []byte

type PopcraftsHeader

type PopcraftsHeader struct {
	Tag [2]byte

	CountryRegion uint32
	ListNumber    uint32
	ErrorCode     uint32

	Padding [4]byte
	// contains filtered or unexported fields
}

type RK

type RK struct {
	Tag          [2]byte
	TagSize      uint16
	Unknown      uint32
	ArtisanIndex uint32
	Day          uint16
	Month        uint8
	// contains filtered or unexported fields
}

type ResortMii

type ResortMii struct {
	Index       uint8
	Initials    [2]byte
	CountryCode uint8

	EntryNumber uint64
	MiiData     [76]byte
	ArtisanData [76]byte
	// contains filtered or unexported fields
}

type WiiSportsResort

type WiiSportsResort struct {
	OpenTimestamp  uint32
	CloseTimestamp uint32
	Header         [24]byte
	Miis           []ResortMii
}

func (WiiSportsResort) ToBytes

func (w WiiSportsResort) ToBytes(_ any) []byte

Jump to

Keyboard shortcuts

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