responses

package
v0.0.0-...-10b6d32 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActStartBaseResponse

type ActStartBaseResponse struct {
	BaseResponse
	PlayerState  netobj.PlayerState `json:"playerState"`
	CampaignList []obj.Campaign     `json:"campaignList"`
}

func ActStartBase

func ActStartBase(base responseobjs.BaseInfo, playerState netobj.PlayerState, campaignList []obj.Campaign) ActStartBaseResponse

type ActStartResponse

type ActStartResponse struct {
	ActStartBaseResponse
	DistanceFriendList []netobj.MileageFriend `json:"distanceFriendList"` // TODO: Discover if correct type
}

func ActStart

func ActStart(base responseobjs.BaseInfo, playerState netobj.PlayerState, campaignList []obj.Campaign, distFriends []netobj.MileageFriend) ActStartResponse

func DefaultActStart

func DefaultActStart(base responseobjs.BaseInfo, player netobj.Player) ActStartResponse

type BaseResponse

type BaseResponse struct {
	responseobjs.BaseInfo
	AssetsVersion     string `json:"assets_version"`
	ClientDataVersion string `json:"client_data_version"`
	DataVersion       string `json:"data_version"`
	InfoVersion       string `json:"info_version"`
	Version           string `json:"version"`
}

func NewBaseResponse

func NewBaseResponse(base responseobjs.BaseInfo) BaseResponse

type CampaignListResponse

type CampaignListResponse struct {
	BaseResponse
	CampaignList []obj.Campaign `json:"campaignList"`
}

func CampaignList

func CampaignList(base responseobjs.BaseInfo, campaignList []obj.Campaign) CampaignListResponse

func DefaultCampaignList

func DefaultCampaignList(base responseobjs.BaseInfo) CampaignListResponse

type ChangeCharacterResponse

type ChangeCharacterResponse struct {
	BaseResponse
	PlayerState netobj.PlayerState `json:"playerState"`
}

func ChangeCharacter

func ChangeCharacter(base responseobjs.BaseInfo, playerState netobj.PlayerState) ChangeCharacterResponse

type ChaoStateResponse

type ChaoStateResponse struct {
	BaseResponse
	ChaoState []netobj.Chao `json:"chaoState"`
}

func ChaoState

func ChaoState(base responseobjs.BaseInfo, chaoState []netobj.Chao) ChaoStateResponse

type ChaoWheelOptionsResponse

type ChaoWheelOptionsResponse struct {
	BaseResponse
	ChaoWheelOptions netobj.ChaoWheelOptions `json:"chaoWheelOptions"`
}

func ChaoWheelOptions

func ChaoWheelOptions(base responseobjs.BaseInfo, chaoWheelOptions netobj.ChaoWheelOptions) ChaoWheelOptionsResponse

func DefaultChaoWheelOptions

func DefaultChaoWheelOptions(base responseobjs.BaseInfo, player netobj.Player) ChaoWheelOptionsResponse

type ChaoWheelSpinResponse

type ChaoWheelSpinResponse struct {
	BaseResponse
	PlayerState      netobj.PlayerState      `json:"playerState"`
	CharacterState   []netobj.Character      `json:"characterState"`
	ChaoState        []netobj.Chao           `json:"chaoState"` // also works with json:"chaoStatus"
	ChaoWheelOptions netobj.ChaoWheelOptions `json:"chaoWheelOptions"`
	ChaoSpinResults  []netobj.ChaoSpinResult `json:"chaoSpinResultList"` // Should only contain one element! Otherwise, ItemWon is interpreted as -1
}

func ChaoWheelSpin

func ChaoWheelSpin(base responseobjs.BaseInfo, playerState netobj.PlayerState, characterState []netobj.Character, chaoState []netobj.Chao, chaoWheelOptions netobj.ChaoWheelOptions, chaoSpinResults []netobj.ChaoSpinResult) ChaoWheelSpinResponse

func DefaultChaoWheelSpin

func DefaultChaoWheelSpin(base responseobjs.BaseInfo, player netobj.Player) ChaoWheelSpinResponse

type CharacterStateResponse

type CharacterStateResponse struct {
	BaseResponse
	CharacterState []netobj.Character `json:"characterState"`
}

func CharacterState

func CharacterState(base responseobjs.BaseInfo, characterState []netobj.Character) CharacterStateResponse

type CostListResponse

type CostListResponse struct {
	BaseResponse
	ConsumedCostList []obj.ConsumedItem `json:"consumedCostList"`
}

func CostList

func CostList(base responseobjs.BaseInfo, consumedCostList []obj.ConsumedItem) CostListResponse

func DefaultCostList

func DefaultCostList(base responseobjs.BaseInfo) CostListResponse

type DailyChallengeDataResponse

type DailyChallengeDataResponse struct {
	BaseResponse
	IncentiveList          []obj.Incentive `json:"incentiveList"`
	IncentiveListCount     int64           `json:"incentiveListCont"`
	NumDailyChallengeCount int64           `json:"numDilayChalCont"`
	NumDailyChallengeDay   int64           `json:"numDailyChalDay"`
	MaxDailyChallengeDay   int64           `json:"maxDailyChalDay"`
	EndTime                int64           `json:"chalEndTime"`
}

type EquipChaoResponse

type EquipChaoResponse struct {
	BaseResponse
	PlayerState netobj.PlayerState `json:"playerState"`
}

func EquipChao

func EquipChao(base responseobjs.BaseInfo, playerState netobj.PlayerState) EquipChaoResponse

type EventListResponse

type EventListResponse struct {
	BaseResponse
	EventList []obj.Event `json:"eventList"`
}

func DefaultEventList

func DefaultEventList(base responseobjs.BaseInfo) EventListResponse

func EventList

func EventList(base responseobjs.BaseInfo, eventList []obj.Event) EventListResponse

type FacebookIncentiveResponse

type FacebookIncentiveResponse struct {
	BaseResponse
	PlayerState netobj.PlayerState `json:"playerState"`
	Presents    []obj.Present      `json:"incentive"`
}

func DefaultFacebookIncentive

func DefaultFacebookIncentive(base responseobjs.BaseInfo, player netobj.Player) FacebookIncentiveResponse

func FacebookIncentive

func FacebookIncentive(base responseobjs.BaseInfo, playerState netobj.PlayerState, presents []obj.Present) FacebookIncentiveResponse

type FreeItemListResponse

type FreeItemListResponse struct {
	BaseResponse
	FreeItemList []obj.Item `json:"freeItemList"`
}

func DefaultFreeItemList

func DefaultFreeItemList(base responseobjs.BaseInfo) FreeItemListResponse

func FreeItemList

func FreeItemList(base responseobjs.BaseInfo, freeItemList []obj.Item) FreeItemListResponse

type GetCountryResponse

type GetCountryResponse struct {
	BaseResponse
	CountryID   int64  `json:"countryId,string"`
	CountryCode string `json:"countryCode"`
}

func DefaultGetCountry

func DefaultGetCountry(base responseobjs.BaseInfo) GetCountryResponse

func GetCountry

func GetCountry(base responseobjs.BaseInfo, countryID int64, countryCode string) GetCountryResponse

type InformationResponse

type InformationResponse struct {
	BaseResponse
	Infos             []obj.Information         `json:"informations"`
	OperatorInfos     []obj.OperatorInformation `json:"operatorEachInfos"`
	NumOperatorUnread int64                     `json:"numOperatorInfo"`
}

func DefaultInformation

func DefaultInformation(base responseobjs.BaseInfo) InformationResponse

func Information

func Information(base responseobjs.BaseInfo, infos []obj.Information, opinfos []obj.OperatorInformation, numOpUnread int64) InformationResponse

type ItemStockNumResponse

type ItemStockNumResponse struct {
	BaseResponse
	ItemStockList []obj.Item `json:"itemStockList"`
}

func DefaultItemStockNum

func DefaultItemStockNum(base responseobjs.BaseInfo) ItemStockNumResponse

func ItemStockNum

func ItemStockNum(base responseobjs.BaseInfo, itemStockList []obj.Item) ItemStockNumResponse

type LeagueDataResponse

type LeagueDataResponse struct {
	BaseResponse
	LeagueData obj.LeagueData `json:"leagueData"`
	Mode       int64          `json:"mode"`
}

func DefaultLeagueData

func DefaultLeagueData(base responseobjs.BaseInfo, mode int64) LeagueDataResponse

func LeagueData

func LeagueData(base responseobjs.BaseInfo, leagueData obj.LeagueData, mode int64) LeagueDataResponse

type LoginBonusResponse

type LoginBonusResponse struct {
	BaseResponse
	LoginBonusStatus          obj.LoginBonusStatus   `json:"loginBonusStatus"`
	LoginBonusRewardList      []obj.LoginBonusReward `json:"loginBonusRewardList"`
	FirstLoginBonusRewardList []obj.LoginBonusReward `json:"firstLoginBonusRewardList"`
	StartTime                 int64                  `json:"startTime"`
	EndTime                   int64                  `json:"endTime"`
	RewardID                  int64                  `json:"rewardId"`
	RewardDays                int64                  `json:"rewardDays"`
	FirstRewardDays           int64                  `json:"firstRewardDays"`
}

func DefaultLoginBonus

func DefaultLoginBonus(base responseobjs.BaseInfo) LoginBonusResponse

func LoginBonus

func LoginBonus(base responseobjs.BaseInfo, lbs obj.LoginBonusStatus, lbrl, flbrl []obj.LoginBonusReward, st, et, rid, rd, frd int64) LoginBonusResponse

type LoginCheckKeyResponse

type LoginCheckKeyResponse struct {
	BaseResponse
	Key string `json:"key"`
}

func LoginCheckKey

func LoginCheckKey(base responseobjs.BaseInfo, key string) LoginCheckKeyResponse

type LoginRegisterResponse

type LoginRegisterResponse struct {
	BaseResponse
	UserID      string `json:"userId"`
	Password    string `json:"password"`
	Key         string `json:"key"`
	CountryID   int64  `json:"countryId,string"`
	CountryCode string `json:"countryCode"`
}

func LoginRegister

func LoginRegister(base responseobjs.BaseInfo, uid, password, key string) LoginRegisterResponse

type LoginSuccessResponse

type LoginSuccessResponse struct {
	BaseResponse
	Username             string   `json:"userName"`
	SessionID            string   `json:"sessionId"`
	SessionTimeLimit     int64    `json:"sessionTimeLimit"`
	EnergyRecoveryTime   int64    `json:"energyRecveryTime,string"` // misspelling is _actually_ in the game!
	EnergyRecoveryMax    int64    `json:"energyRecoveryMax,string"` // seconds until energy recovers
	InviteBasicIncentive obj.Item `json:"inviteBasicIncentiv"`
}

func LoginSuccess

func LoginSuccess(base responseobjs.BaseInfo, sid, username string) LoginSuccessResponse

type MessageListResponse

type MessageListResponse struct {
	BaseResponse
	MessageList           []obj.Message         `json:"messageList"`
	TotalMessages         int64                 `json:"totalMessage"`
	OperatorMessageList   []obj.OperatorMessage `json:"operatorMessageList"`
	TotalOperatorMessages int64                 `json:"totalOperatorMessage"`
}

func DefaultMessageList

func DefaultMessageList(base responseobjs.BaseInfo) MessageListResponse

func MessageList

func MessageList(base responseobjs.BaseInfo, msgl []obj.Message, opmsgl []obj.OperatorMessage) MessageListResponse

type MileageDataResponse

type MileageDataResponse struct {
	BaseResponse
	MileageFriendList []netobj.MileageFriend `json:"mileageFriendList"`
	MileageMapState   netobj.MileageMapState `json:"mileageMapState"`
}

func DefaultMileageData

func DefaultMileageData(base responseobjs.BaseInfo, player netobj.Player) MileageDataResponse

func MileageData

func MileageData(base responseobjs.BaseInfo, mileageFriendList []netobj.MileageFriend, mileageMapState netobj.MileageMapState) MileageDataResponse

type MileageRewardResponse

type MileageRewardResponse struct {
	BaseResponse
	MileageRewards []obj.MileageReward `json:"mileageMapRewardList"`
}

func DefaultMileageReward

func DefaultMileageReward(base responseobjs.BaseInfo, chapter, episode int64) MileageRewardResponse

func MileageReward

func MileageReward(base responseobjs.BaseInfo, mileageRewards []obj.MileageReward) MileageRewardResponse

type PlayerStateResponse

type PlayerStateResponse struct {
	BaseResponse
	PlayerState netobj.PlayerState `json:"playerState"`
}

func PlayerState

func PlayerState(base responseobjs.BaseInfo, playerState netobj.PlayerState) PlayerStateResponse

type PostGameResultsResponse

type PostGameResultsResponse struct {
	QuickPostGameResultsResponse
	MileageMapState      netobj.MileageMapState `json:"mileageMapState"`
	MileageIncentiveList []obj.MileageIncentive `json:"mileageIncentiveList"`
	EventIncentiveList   []obj.Item             `json:"eventIncentiveList"`
	WheelOptions         netobj.WheelOptions    `json:"wheelOptions"`
}

func DefaultPostGameResults

func DefaultPostGameResults(base responseobjs.BaseInfo, player netobj.Player, pcs []netobj.Character, incentives []obj.MileageIncentive) PostGameResultsResponse

type PrizeChaoWheelResponse

type PrizeChaoWheelResponse struct {
	BaseResponse
	PrizeList []obj.ChaoPrize `json:"prizeList"`
}

func DefaultPrizeChaoWheel

func DefaultPrizeChaoWheel(base responseobjs.BaseInfo) PrizeChaoWheelResponse

func PrizeChaoWheel

func PrizeChaoWheel(base responseobjs.BaseInfo, prizeList []obj.ChaoPrize) PrizeChaoWheelResponse

type QuickActStartResponse

type QuickActStartResponse struct {
	ActStartBaseResponse
}

func DefaultQuickActStart

func DefaultQuickActStart(base responseobjs.BaseInfo, player netobj.Player) QuickActStartResponse

func QuickActStart

func QuickActStart(base responseobjs.BaseInfo, playerState netobj.PlayerState, campaignList []obj.Campaign) QuickActStartResponse

type QuickPostGameResultsResponse

type QuickPostGameResultsResponse struct {
	BaseResponse
	PlayerState             netobj.PlayerState    `json:"playerState"`
	ChaoState               []netobj.Chao         `json:"chaoState"`
	DailyChallengeIncentive []obj.Incentive       `json:"dailyChallengeIncentive"` // should be obj.Item, but game doesn't care
	CharacterState          []netobj.Character    `json:"characterState"`
	MessageList             []obj.Message         `json:"messageList"`
	OperatorMessageList     []obj.OperatorMessage `json:"operatorMessageList"`
	TotalMessage            int64                 `json:"totalMessage"`
	TotalOperatorMessage    int64                 `json:"totalOperatorMessage"`
	PlayCharacterState      []netobj.Character    `json:"playCharacterState"` // Character can substitute PlayCharacter
}

type RedStarExchangeListResponse

type RedStarExchangeListResponse struct {
	BaseResponse
	ItemList      []obj.RedStarItem `json:"itemList"`
	TotalItems    int64             `json:"totalItems"`
	MonthPurchase int64             `json:"monthPurchase"`
	Birthday      string            `json:"birthday"`
}

func RedStarExchangeList

func RedStarExchangeList(base responseobjs.BaseInfo, itemList []obj.RedStarItem, monthPurchase int64, birthday string) RedStarExchangeListResponse

type RedStarExchangeResponse

type RedStarExchangeResponse struct {
	BaseResponse
	PlayerState netobj.PlayerState `json:"playerState"`
}

func DefaultRedStarExchange

func DefaultRedStarExchange(base responseobjs.BaseInfo, player netobj.Player) RedStarExchangeResponse

func RedStarExchange

func RedStarExchange(base responseobjs.BaseInfo, playerState netobj.PlayerState) RedStarExchangeResponse

type TickerResponse

type TickerResponse struct {
	BaseResponse
	TickerList []obj.Ticker `json:"tickerList"`
}

func DefaultTicker

func DefaultTicker(base responseobjs.BaseInfo, player netobj.Player) TickerResponse

func Ticker

func Ticker(base responseobjs.BaseInfo, tickerList []obj.Ticker) TickerResponse

type UpgradeCharacterResponse

type UpgradeCharacterResponse struct {
	BaseResponse
	PlayerState    netobj.PlayerState `json:"playerState"`
	CharacterState []netobj.Character `json:"characterState"`
}

func DefaultUpgradeCharacter

func DefaultUpgradeCharacter(base responseobjs.BaseInfo, player netobj.Player) UpgradeCharacterResponse

func UpgradeCharacter

func UpgradeCharacter(base responseobjs.BaseInfo, playerState netobj.PlayerState, characterState []netobj.Character) UpgradeCharacterResponse

type VariousParameterResponse

type VariousParameterResponse struct {
	BaseResponse
	netobj.PlayerVarious
}

type WeeklyLeaderboardEntriesResponse

type WeeklyLeaderboardEntriesResponse struct {
	BaseResponse
	PlayerEntry  obj.LeaderboardEntry   `json:"playerEntry"`
	LastOffset   int64                  `json:"lastOffset"`
	StartTime    int64                  `json:"startTime"`
	ResetTime    int64                  `json:"resetTime"`
	StartIndex   int64                  `json:"startIndex"`
	Mode         int64                  `json:"mode"`
	TotalEntries int64                  `json:"totalEntries"`
	EntriesList  []obj.LeaderboardEntry `json:"entriesList"`
}

func DefaultWeeklyLeaderboardEntries

func DefaultWeeklyLeaderboardEntries(base responseobjs.BaseInfo, player netobj.Player, mode int64) WeeklyLeaderboardEntriesResponse

func WeeklyLeaderboardEntries

func WeeklyLeaderboardEntries(base responseobjs.BaseInfo, pe obj.LeaderboardEntry, lo, st, rt, si, m, te int64, el []obj.LeaderboardEntry) WeeklyLeaderboardEntriesResponse

type WeeklyLeaderboardOptionsResponse

type WeeklyLeaderboardOptionsResponse struct {
	BaseResponse
	Mode      int64 `json:"mode"`      // 0 == ENDLESS, 1 == QUICK
	Type      int64 `json:"type"`      // 0 == RankingScoreType.HIGH_SCORE, else == RankingScoreType.TOTAL_SCORE
	Param     int64 `json:"param"`     // seemingly unused
	StartTime int64 `json:"startTime"` // both times are also seemingly unused...
	ResetTime int64 `json:"resetTime"`
}

func DefaultWeeklyLeaderboardOptions

func DefaultWeeklyLeaderboardOptions(base responseobjs.BaseInfo, mode int64) WeeklyLeaderboardOptionsResponse

func WeeklyLeaderboardOptions

func WeeklyLeaderboardOptions(base responseobjs.BaseInfo, mode, ltype, param, startTime, resetTime int64) WeeklyLeaderboardOptionsResponse

type WheelOptionsResponse

type WheelOptionsResponse struct {
	BaseResponse
	WheelOptions netobj.WheelOptions `json:"wheelOptions"`
}

func WheelOptions

func WheelOptions(base responseobjs.BaseInfo, wheelOptions netobj.WheelOptions) WheelOptionsResponse

type WheelSpinResponse

type WheelSpinResponse struct {
	BaseResponse
	PlayerState    netobj.PlayerState  `json:"playerState"`
	CharacterState []netobj.Character  `json:"characterState"`
	ChaoState      []netobj.Chao       `json:"chaoState"`
	WheelOptions   netobj.WheelOptions `json:"wheelOptions"`
}

func DefaultWheelSpin

func DefaultWheelSpin(base responseobjs.BaseInfo, player netobj.Player) WheelSpinResponse

func WheelSpin

func WheelSpin(base responseobjs.BaseInfo, playerState netobj.PlayerState, characterState []netobj.Character, chaoState []netobj.Chao, wheelOptions netobj.WheelOptions) WheelSpinResponse

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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