Documentation ¶
Index ¶
- Variables
- type Chao
- type ChaoRouletteGroup
- type ChaoSpinPrize
- type ChaoSpinResult
- type ChaoWheelOptions
- type Character
- type MileageFriend
- type MileageMapState
- type PlayCharacter
- type Player
- func (p *Player) AddAnimals(amount int64)
- func (p *Player) AddDistance(amount int64)
- func (p *Player) AddEnergy(amount int64)
- func (p *Player) AddItem(item obj.Item)
- func (p *Player) AddNetChao(netchao Chao) bool
- func (p *Player) AddNewChao(chao obj.Chao) bool
- func (p *Player) AddNewChaoByID(chid string) bool
- func (p *Player) AddRedRings(amount int64)
- func (p *Player) AddRings(amount int64)
- func (p *Player) AllChaoMaxLevel() bool
- func (p *Player) AllCharactersMaxLevel() bool
- func (p *Player) ApplyHighDistance(amount int64)
- func (p *Player) ApplyHighScore(score int64) bool
- func (p *Player) GetAllMaxLevelIDs() []string
- func (p *Player) GetAllNonMaxedChao() []string
- func (p *Player) GetAllNonMaxedChaoAndCharacters() []string
- func (p *Player) GetAllNonMaxedCharacters() []string
- func (p *Player) GetChao(chid string) (Chao, error)
- func (p *Player) GetChara(cid string) (Character, error)
- func (p *Player) GetMainChao() (Chao, error)
- func (p *Player) GetMainChara() (Character, error)
- func (p *Player) GetMaxLevelChao() []Chao
- func (p *Player) GetMaxLevelChaoIDs() []string
- func (p *Player) GetMaxLevelCharacterIDs() []string
- func (p *Player) GetMaxLevelCharacters() []Character
- func (p *Player) GetSubChao() (Chao, error)
- func (p *Player) GetSubChara() (Character, error)
- func (p *Player) HasChao(chid string) bool
- func (p *Player) IndexOfChao(chid string) int
- func (p *Player) IndexOfChara(cid string) int
- func (p *Player) IndexOfItem(iid string) int
- func (p *Player) RemoveAllItemsOf(iid string)
- func (p *Player) RemoveItemOf(iid string) bool
- func (p *Player) SetMainChao(chid string)
- func (p *Player) SetMainCharacter(cid string)
- func (p *Player) SetPassword(password string)
- func (p *Player) SetSubChao(chid string)
- func (p *Player) SetSubCharacter(cid string)
- func (p *Player) SetUsername(username string)
- func (p *Player) SubAnimals(amount int64)
- func (p *Player) SubEnergy(amount int64)
- func (p *Player) SubRedRings(amount int64)
- func (p *Player) SubRings(amount int64)
- type PlayerState
- type PlayerVarious
- type RouletteInfo
- type WheelOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ChaoIDs = []string{} /* 109 elements not displayed */
Functions ¶
This section is empty.
Types ¶
type 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 DefaultCharacterState ¶
func DefaultCharacterState() []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 (*Player) AddDistance ¶
func (*Player) AddNetChao ¶
func (*Player) AddNewChaoByID ¶
func (*Player) AddRedRings ¶
func (*Player) AddRings ¶
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 (*Player) AllCharactersMaxLevel ¶
func (*Player) ApplyHighDistance ¶
func (*Player) ApplyHighScore ¶
func (*Player) GetAllMaxLevelIDs ¶
func (*Player) GetAllNonMaxedChao ¶
func (*Player) GetAllNonMaxedChaoAndCharacters ¶
func (*Player) GetAllNonMaxedCharacters ¶
func (*Player) GetMainChao ¶
func (*Player) GetMainChara ¶
func (*Player) GetMaxLevelChao ¶
func (*Player) GetMaxLevelChaoIDs ¶
func (*Player) GetMaxLevelCharacterIDs ¶
func (*Player) GetMaxLevelCharacters ¶
func (*Player) GetSubChao ¶
func (*Player) GetSubChara ¶
func (*Player) IndexOfChao ¶
func (*Player) IndexOfChara ¶
func (*Player) IndexOfItem ¶
func (*Player) RemoveAllItemsOf ¶
func (*Player) RemoveItemOf ¶
func (*Player) SetMainChao ¶
func (*Player) SetMainCharacter ¶
func (*Player) SetPassword ¶
func (*Player) SetSubChao ¶
func (*Player) SetSubCharacter ¶
func (*Player) SetUsername ¶
func (*Player) SubAnimals ¶
func (*Player) SubRedRings ¶
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.