package msg

type RestoreStamina struct {
	PlayerID int64 `json:"userId"`
}

type ResponseRestoreStamina struct {
	ErrCode int                 `json:"errCode"`
	Msg     string              `json:"msg,omitempty"`
	Data    *RestoreStaminaData `json:"data"`
}

type RestoreStaminaData struct {
	Stamina      int64 `json:"stamina"`
	MaxStama     int64 `json:"maxStama"`
	CoolDown     int   `json:"cd"`
	DiamondCount int   `json:"diamondCount"`
	AdCount      int   `json:"adCount"`
}

const (
	BuyStaminaCostTypeAd      = 1 // 广告获得体力
	BuyStaminaCostTypeDiamond = 2 // 钻石获得体力
)

type BuyStamina struct {
	PlayerID   int64  `json:"userId"`
	CostType   int    `json:"type"`
	ClientPlat string `json:"clientPlat"`
}

type ResponseBuyStamina struct {
	ErrCode int             `json:"errCode"`
	Msg     string          `json:"msg,omitempty"`
	Data    *BuyStaminaData `json:"data"`
}

type BuyStaminaData struct {
	Stamina      int64           `json:"stamina"`
	AdCount      int             `json:"adCount"`
	DiamondCount int             `json:"diamondCount"`
	Cost         map[int64]int64 `json:"cost"`
	CostType     int             `json:"costType"`
	Materials    map[int64]int64 `json:"materials"`
}

type RestoreEnergy struct {
	PlayerID int64 `json:"userId"`
}

type ResponseRestoreEnergy struct {
	ErrCode int                `json:"errCode"`
	Msg     string             `json:"msg,omitempty"`
	Data    *RestoreEnergyData `json:"data"`
}

type RestoreEnergyData struct {
	Energy       int64 `json:"energy"`
	MaxEnergy    int64 `json:"maxEnergy"`
	CoolDown     int   `json:"cd"`
	DiamondCount int   `json:"diamondCount"`
	AdCount      int   `json:"adCount"`
}

type BuyEnergy struct {
	PlayerID int64 `json:"userId"`
	CostType int   `json:"type"`
}

type ResponseBuyEnergy struct {
	ErrCode int            `json:"errCode"`
	Msg     string         `json:"msg,omitempty"`
	Data    *BuyEnergyData `json:"data"`
}

type BuyEnergyData struct {
	Energy       int64           `json:"energy"`
	AdCount      int             `json:"adCount"`
	DiamondCount int             `json:"diamondCount"`
	Cost         map[int64]int64 `json:"cost"`
	CostType     int             `json:"costType"`
	Materials    map[int64]int64 `json:"materials"`
}

// 领取联合作战卷轴
type ClaimCoopTicket struct {
	PlayerID int64 `json:"userId"`
	TicketId int64 `json:"ticketId"`
}

type ResponseClaimCoopTicket struct {
	ErrCode int                  `json:"errCode"`
	Msg     string               `json:"msg,omitempty"`
	Data    *ClaimCoopTicketData `json:"data"`
}

type ClaimCoopTicketData struct {
	TicketId int64 `json:"ticketId"` // 卷轴id
	Num      int64 `json:"num"`      // 卷轴数量
	CD       int64 `json:"cd"`       //cd 秒
}

// 查看卷轴
type ViewCoopTicket struct {
	PlayerID int64 `json:"userId"`
	TicketId int64 `json:"ticketId"`
}

type ResponseViewCoopTicket struct {
	ErrCode int                  `json:"errCode"`
	Msg     string               `json:"msg,omitempty"`
	Data    *ClaimCoopTicketData `json:"data"`
}
