package msg

import "leafstalk/covenant/model"

// 寻宝信息
type HuntTreasureInfo struct {
	PlayerId int64 `json:"userId"`
	//ActivityUId int64 `json:"activityUId"`
}

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

type HuntStatus struct {
	FreeHuntRemainTime int64 `json:"freeHuntRemainTime"` // 免费寻宝剩余时间
	HuntCount          int64 `json:"huntCount"`
	ProcessReward      int64 `json:"processReward"`
	LuckNum            int64 `json:"luckNum"`
}

type HuntTreasureInfoData struct {
	ActivityUId int64                   `json:"activityUId"` // 活动id
	RemainTime  int64                   `json:"remainTime"`  // 活动剩余时间
	Days        int64                   `json:"days"`        // 活动进行到第几天
	Hunt        *HuntStatus             `json:"hunt"`        // 寻宝状态
	Supply      *model.SupplyPrivilege2 `json:"supply"`      // 补给状态
	Exchanges   map[int64]int64         `json:"exchanges"`   // 兑换状态
	Gift        map[int64]int64         `json:"gift"`        // 礼包状态
}

// 寻宝
type HuntTreasure struct {
	PlayerId int64 `json:"userId"`
	//ActivityUId int64 `json:"activityUId"` // game协程中获取并传入
	Num  int64 `json:"num"`
	Free int64 `json:"free"` //1:免费，0:不免费
}

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

type HuntTreasureData struct {
	Bundle      *model.DropedBundle `json:"bundle"`
	Cost        map[int64]int64     `json:"cost"`
	RewardsSort []int64             `json:"rewardsSort"`
	Hunt        *HuntStatus         `json:"hunt"`
}

// 寻宝进度奖励
type HuntProcessReward struct {
	PlayerId int64 `json:"userId"`
	//ActivityUId int64 `json:"activityUId"`
}

type HuntProcessRewardData struct {
	Bundle *model.DropedBundle `json:"bundle"`
	Hunt   *HuntStatus         `json:"hunt"`
}

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

// 寻宝补给信息
//type HuntTreasureSupplyInfo struct {
//	PlayerId    int64 `json:"userId"`
//	ActivitySet int64 `json:"activitySet"`
//}
//
//type HuntTreasureSupplyInfoData struct {
//	FreeDay   int64 `json:"freeDay"`   // 免费已签到天数
//	SeniorDay int64 `json:"seniorDay"` // 高级已签到天数
//	IsSenior  int64 `json:"isSenior"`  // 是否购买高级基金 0:未购买，1:已购买
//}
//
//type ResponseHuntTreasureSupplyInfo struct {
//	ErrCode int                         `json:"errCode"`
//	Msg     string                      `json:"msg,omitempty"`
//	Data    *HuntTreasureSupplyInfoData `json:"data"`
//}

// 寻宝补给
type HuntTreasureSupply struct {
	PlayerId int64 `json:"userId"`
}

type HuntTreasureSupplyData struct {
	Bundle *model.DropedBundle     `json:"bundle"`
	Supply *model.SupplyPrivilege2 `json:"supply"` // 补给状态
}

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

// 寻宝兑换信息
//type HuntTreasureExchangeInfo struct {
//	PlayerId int64 `json:"userId"`
//}
//
//type ResponseHuntTreasureExchangeInfo struct {
//	ErrCode int                  `json:"errCode"`
//	Msg     string               `json:"msg,omitempty"`
//	Data    *TreasureLevelUpData `json:"data"`
//}

// 寻宝兑换
type HuntTreasureExchange struct {
	PlayerId int64 `json:"userId"`
	Uid      int64 `json:"uid"`
	Num      int64 `json:"num"`
}

type HuntTreasureExchangeData struct {
	Bundle    *model.DropedBundle `json:"bundle"`
	Cost      map[int64]int64     `json:"cost"`
	Exchanges map[int64]int64     `json:"exchanges"` // 兑换状态
}

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

// 礼包购买
type HuntTreasureBuyGift struct {
	PlayerId int64 `json:"userId"`
	Num      int64 `json:"num"`
	Index    int64 `json:"index"`
}

type HuntTreasureBuyGiftData struct {
	Bundle *model.DropedBundle `json:"bundle"`
	Cost   map[int64]int64     `json:"cost"`
	Gift   map[int64]int64     `json:"gift"` // 礼包状态
}

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