netobj

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: GPL-3.0 Imports: 14 Imported by: 60

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChaoIDs = []string{} /* 109 elements not displayed */

Functions

This section is empty.

Types

type Chao

type Chao struct {
	obj.Chao
	Status   int64 `json:"status"` // enums.ChaoStatus*
	Level    int64 `json:"level"`
	Dealing  int64 `json:"setStatus"` // enums.ChaoDealing*
	Acquired int64 `json:"acquired"`  // flag
}

func NewNetChao

func NewNetChao(chao obj.Chao, status, level, dealing, acquired int64) Chao

type ChaoRouletteGroup

type ChaoRouletteGroup struct {
	ChaoWheelOptions ChaoWheelOptions `json:"ORN_lastChaoWheelOptions"` // actual wheel options for this wheel
	WheelChao        []string         `json:"ORN_wheelChao"`            // what Chao/characters are in this wheel
	ChaoRouletteInfo RouletteInfo     `json:"ORN_chaoRouletteInfo"`     // may not be needed
}

func DefaultChaoRouletteGroup

func DefaultChaoRouletteGroup(playerState PlayerState, allowedCharacters, allowedChao []string) ChaoRouletteGroup

type ChaoSpinPrize

type ChaoSpinPrize struct {
	ID     string `json:"chaoId"`
	Level  int64  `json:"level"`
	Rarity int64  `json:"rarity"`
}

func ChaoIDToChaoSpinPrize

func ChaoIDToChaoSpinPrize(chid string) ChaoSpinPrize

func CharacterIDToChaoSpinPrize

func CharacterIDToChaoSpinPrize(cid string) ChaoSpinPrize

func CharacterToChaoSpinPrize

func CharacterToChaoSpinPrize(char Character) ChaoSpinPrize

func GenericIDToChaoSpinPrize

func GenericIDToChaoSpinPrize(id string) ChaoSpinPrize

func NetChaoToChaoSpinPrize

func NetChaoToChaoSpinPrize(chao Chao) ChaoSpinPrize

type ChaoSpinResult

type ChaoSpinResult struct {
	WonPrize ChaoSpinPrize `json:"getChao"`  // chao or character
	ItemList []obj.Item    `json:"itemList"` // TODO: what does this do?
	ItemWon  int64         `json:"itemWon"`  // probably index of item in ItemList
}

func DefaultChaoSpinResultNoItems

func DefaultChaoSpinResultNoItems(wonPrize ChaoSpinPrize) ChaoSpinResult

type ChaoWheelOptions

type ChaoWheelOptions struct {
	Rarity               []int64        `json:"rarity"`
	ItemWeight           []int64        `json:"itemWeight"`
	CampaignList         []obj.Campaign `json:"campaignList"`
	SpinCost             int64          `json:"spinCost"`
	ChaoRouletteType     int64          `json:"chaoRouletteType"` // value from enums.ChaoWheelType*
	NumSpecialEgg        int64          `json:"numSpecialEgg"`
	RouletteAvailable    int64          `json:"rouletteAvailable"`    // flag
	NumChaoRouletteToken int64          `json:"numChaoRouletteToken"` // number of premium roulette tickets
	NumChaoRoulette      int64          `json:"numChaoRoulette"`      // == 0 --> chaoWheelOptions.IsTutorial
	StartTime            int64          `json:"startTime"`            // TODO: Is this needed?
	EndTime              int64          `json:"endTime"`              // TODO: Is this needed?
}

func DefaultChaoWheelOptions

func DefaultChaoWheelOptions(playerState PlayerState) ChaoWheelOptions

func NewChaoWheelOptions

func NewChaoWheelOptions(rarity, itemWeight []int64, campaignList []obj.Campaign, spinCost, chaoRouletteType, numSpecialEgg, rouletteAvailable, numChaoRouletteToken, numChaoRoulette, startTime, endTime int64) ChaoWheelOptions

type Character

type Character struct {
	obj.Character
	Status            int64          `json:"status"` // value from enums.CharacterStatus*
	Level             int64          `json:"level"`
	Exp               int64          `json:"exp"`
	Star              int64          `json:"star"`
	StarMax           int64          `json:"starMax"`
	LockCondition     int64          `json:"lockCondition"` // value from enums.LockCondition*
	CampaignList      []obj.Campaign `json:"campaignList"`
	AbilityLevel      []int64        `json:"abilityLevel"`    // levels for each ability
	AbilityNumRings   []int64        `json:"abilityNumRings"` // where is this being checked? I can't find the string using dnSpy...
	AbilityLevelUp    []int64        `json:"abilityLevelup"`  // this is a list of items using enums.ItemID*
	AbilityLevelUpExp []int64        `json:"abilityLevelupExp,omitempty"`
}

func DefaultCharacter

func DefaultCharacter(char obj.Character) Character

func DefaultCharacterState

func DefaultCharacterState() []Character

func DefaultLockedCharacter

func DefaultLockedCharacter(char obj.Character) Character

func DefaultRouletteLockedCharacter

func DefaultRouletteLockedCharacter(char obj.Character) Character

func DefaultStageLockedCharacter

func DefaultStageLockedCharacter(char obj.Character) Character

func UnlockedCharacterState

func UnlockedCharacterState() []Character

type MileageFriend

type MileageFriend struct {
	ID              string          `json:"friendId"`
	Name            string          `json:"name"`
	URL             string          `json:"url"`
	MileageMapState MileageMapState `json:"mapState"`
}

type MileageMapState

type MileageMapState struct {
	obj.MapInfo
	Episode          int64 `json:"episode"`
	Chapter          int64 `json:"chapter"`
	Point            int64 `json:"point"`            // point in episode
	StageTotalScore  int64 `json:"stageTotalScore"`  // TODO: discover use. This is very likely used for the total score gained in the current chapter, which means this value MUST be set to the total chapter score
	ChapterStartTime int64 `json:"chapterStartTime"` // TODO: discover use. Appears to be used for point item expiry?
}

func DefaultMileageMapState

func DefaultMileageMapState() MileageMapState

func (MileageMapState) AddScore

func (m MileageMapState) AddScore(score int64)

func (MileageMapState) AdvanceChapter

func (m MileageMapState) AdvanceChapter()

type PlayCharacter

type PlayCharacter struct {
}

type Player

type Player struct {
	ID                string                      `json:"userID"`
	Username          string                      `json:"username"`
	Password          string                      `json:"password"`
	Key               string                      `json:"key"`
	LastLogin         int64                       // TODO: use `json:"lastLogin"`
	PlayerState       PlayerState                 `json:"playerState"`
	CharacterState    []Character                 `json:"characterState"`
	ChaoState         []Chao                      `json:"chaoState"`
	MileageMapState   MileageMapState             `json:"mileageMapState"`
	MileageFriends    []MileageFriend             `json:"mileageFriendList"`
	PlayerVarious     PlayerVarious               `json:"playerVarious"`
	LastWheelOptions  WheelOptions                `json:"ORN_wheelOptions"` // TODO: Make RouletteGroup to hold LastWheelOptions and RouletteInfo?
	RouletteInfo      RouletteInfo                `json:"ORN_rouletteInfo"`
	ChaoRouletteGroup ChaoRouletteGroup           `json:"ORN_chaoRouletteGroup"`
	PersonalEvents    []eventconf.ConfiguredEvent `json:"ORN_personalEvents"`
}

func NewPlayer

func NewPlayer(id, username, password, key string, playerState PlayerState, characterState []Character, chaoState []Chao, mileageMapState MileageMapState, mf []MileageFriend, playerVarious PlayerVarious, wheelOptions WheelOptions, rouletteInfo RouletteInfo, chaoRouletteGroup ChaoRouletteGroup, personalEvents []eventconf.ConfiguredEvent) Player

func (*Player) AddAnimals

func (p *Player) AddAnimals(amount int64)

func (*Player) AddDistance

func (p *Player) AddDistance(amount int64)

func (*Player) AddEnergy

func (p *Player) AddEnergy(amount int64)

func (*Player) AddItem

func (p *Player) AddItem(item obj.Item)

func (*Player) AddNetChao

func (p *Player) AddNetChao(netchao Chao) bool

func (*Player) AddNewChao

func (p *Player) AddNewChao(chao obj.Chao) bool

func (*Player) AddNewChaoByID

func (p *Player) AddNewChaoByID(chid string) bool

func (*Player) AddRedRings

func (p *Player) AddRedRings(amount int64)

func (*Player) AddRings

func (p *Player) AddRings(amount int64)

func (p *Player) Save() {

}

TODO: remove any functions that access p.PlayerState since we are not calling from a pointer anyways and it will not modify the object

func (*Player) AllChaoMaxLevel

func (p *Player) AllChaoMaxLevel() bool

func (*Player) AllCharactersMaxLevel

func (p *Player) AllCharactersMaxLevel() bool

func (*Player) ApplyHighDistance

func (p *Player) ApplyHighDistance(amount int64)

func (*Player) ApplyHighScore

func (p *Player) ApplyHighScore(score int64) bool

func (*Player) GetAllMaxLevelIDs

func (p *Player) GetAllMaxLevelIDs() []string

func (*Player) GetAllNonMaxedChao

func (p *Player) GetAllNonMaxedChao() []string

func (*Player) GetAllNonMaxedChaoAndCharacters

func (p *Player) GetAllNonMaxedChaoAndCharacters() []string

func (*Player) GetAllNonMaxedCharacters

func (p *Player) GetAllNonMaxedCharacters() []string

func (*Player) GetChao

func (p *Player) GetChao(chid string) (Chao, error)

func (*Player) GetChara

func (p *Player) GetChara(cid string) (Character, error)

func (*Player) GetMainChao

func (p *Player) GetMainChao() (Chao, error)

func (*Player) GetMainChara

func (p *Player) GetMainChara() (Character, error)

func (*Player) GetMaxLevelChao

func (p *Player) GetMaxLevelChao() []Chao

func (*Player) GetMaxLevelChaoIDs

func (p *Player) GetMaxLevelChaoIDs() []string

func (*Player) GetMaxLevelCharacterIDs

func (p *Player) GetMaxLevelCharacterIDs() []string

func (*Player) GetMaxLevelCharacters

func (p *Player) GetMaxLevelCharacters() []Character

func (*Player) GetSubChao

func (p *Player) GetSubChao() (Chao, error)

func (*Player) GetSubChara

func (p *Player) GetSubChara() (Character, error)

func (*Player) HasChao

func (p *Player) HasChao(chid string) bool

func (*Player) IndexOfChao

func (p *Player) IndexOfChao(chid string) int

func (*Player) IndexOfChara

func (p *Player) IndexOfChara(cid string) int

func (*Player) IndexOfItem

func (p *Player) IndexOfItem(iid string) int

func (*Player) RemoveAllItemsOf

func (p *Player) RemoveAllItemsOf(iid string)

func (*Player) RemoveItemOf

func (p *Player) RemoveItemOf(iid string) bool

func (*Player) SetMainChao

func (p *Player) SetMainChao(chid string)

func (*Player) SetMainCharacter

func (p *Player) SetMainCharacter(cid string)

func (*Player) SetPassword

func (p *Player) SetPassword(password string)

func (*Player) SetSubChao

func (p *Player) SetSubChao(chid string)

func (*Player) SetSubCharacter

func (p *Player) SetSubCharacter(cid string)

func (*Player) SetUsername

func (p *Player) SetUsername(username string)

func (*Player) SubAnimals

func (p *Player) SubAnimals(amount int64)

func (*Player) SubEnergy

func (p *Player) SubEnergy(amount int64)

func (*Player) SubRedRings

func (p *Player) SubRedRings(amount int64)

func (*Player) SubRings

func (p *Player) SubRings(amount int64)

type PlayerState

type PlayerState struct {
	Items                  []obj.Item `json:"items"`         // items owned
	EquippedItemIDs        []string   `json:"equipItemList"` // default is list of 3 "-1"s. look to be item ids
	MainCharaID            string     `json:"mainCharaID"`
	SubCharaID             string     `json:"subCharaID"`
	MainChaoID             string     `json:"mainChaoID"`
	SubChaoID              string     `json:"subChaoID"`
	NumRings               int64      `json:"numRings,string"`           // number of rings
	NumBuyRings            int64      `json:"numBuyRings,string"`        // number of rings purchased
	NumRedRings            int64      `json:"numRedRings,string"`        // number of red rings
	NumBuyRedRings         int64      `json:"numBuyRedRings,string"`     // number of red rings purchased
	Energy                 int64      `json:"energy,string"`             // energy/'lives'
	EnergyBuy              int64      `json:"energyBuy,string"`          // ?
	EnergyRenewsAt         int64      `json:"energyRenewsAt"`            // does 0 mean it is instant?
	MumMessages            int64      `json:"mumMessages"`               // number of unread messages
	RankingLeague          int64      `json:"rankingLeague,string"`      // 'league index'
	QuickRankingLeague     int64      `json:"quickRankingLeague,string"` // same as above, but for timed mode
	NumRouletteTicket      int64      `json:"numRouletteTicket,string"`
	NumChaoRouletteTicket  int64      `json:"numChaoRouletteTicket"` // This isn't a requirement from the game for PlayerState, but is useful to have here
	ChaoEggs               int64      `json:"chaoEggs"`              // Same as above
	HighScore              int64      `json:"totalHighScore,string"`
	TimedHighScore         int64      `json:"quickTotalHighScore,string"`
	TotalDistance          int64      `json:"totalDistance,string"`
	HighDistance           int64      `json:"maximumDistance,string"` // high distance in one go?
	DailyMissionID         int64      `json:"dailyMissionId,string"`
	DailyMissionEndTime    int64      `json:"dailyMissionEndTime"` // 11:59 pm of current day
	DailyChallengeValue    int64      `json:"dailyChallengeValue"` // internally listed as ProgressStatus... Current day of the challenge?
	DailyChallengeComplete int64      `json:"dailyChallengeComplete"`
	NumDailyChallenge      int64      `json:"numDailyChalCont"`
	NumPlaying             int64      `json:"numPlaying,string"` // ?
	Animals                int64      `json:"numAnimals,string"`
	Rank                   int64      `json:"numRank,string"`
}

func DefaultPlayerState

func DefaultPlayerState() PlayerState

type PlayerVarious

type PlayerVarious struct {
	CmSkipCount          int64 `json:"cmSkipCount"` // no clear purpose
	EnergyRecoveryMax    int64 `json:"energyRecoveryMax"`
	EnergyRecoveryTime   int64 `json:"energyRecveryTime"` // time until...?
	OnePlayCmCount       int64 `json:"onePlayCmCount"`
	OnePlayContinueCount int64 `json:"onePlayContinueCount"`
	IsPurchased          int64 `json:"isPurchased"`
}

func DefaultPlayerVarious

func DefaultPlayerVarious() PlayerVarious

type RouletteInfo

type RouletteInfo struct {
	RoulettePeriodEnd     int64 `json:"ORN_roulettePeriodEnd"`
	RouletteCountInPeriod int64 `json:"ORN_rouletteCountInPeriod"`
	GotJackpotThisPeriod  bool  `json:"ORN_gotJackpotThisPeriod"`
}

func DefaultRouletteInfo

func DefaultRouletteInfo() RouletteInfo

type WheelOptions

type WheelOptions struct {
	Items                []string   `json:"items"`
	Item                 []int64    `json:"item"`
	ItemWeight           []int64    `json:"itemWeight"`
	ItemWon              int64      `json:"itemWon"`
	NextFreeSpin         int64      `json:"nextFreeSpin"` // midnight (start of next day)
	SpinCost             int64      `json:"spinCost"`
	RouletteRank         int64      `json:"rouletteRank"`
	NumRouletteToken     int64      `json:"numRouletteToken"`
	NumJackpotRing       int64      `json:"numJackpotRing"`
	NumRemainingRoulette int64      `json:"numRemainingRoulette"`
	ItemList             []obj.Item `json:"itemList"`
}

func DefaultWheelOptions

func DefaultWheelOptions(numRouletteTicket, rouletteCountInPeriod int64) WheelOptions

func UpgradeWheelOptions

func UpgradeWheelOptions(origWheel WheelOptions, numRouletteTicket, rouletteCountInPeriod int64) WheelOptions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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