package msg

const (
	WearLegend    = 1 // 穿戴
	TakeOffLegend = 2 // 卸下
	ReplaceLegend = 3 // 替换
	OneKeyLegend  = 4 // 一键装配
)

// LegendWear 铭文穿戴
type LegendWear struct {
	PlayerId   int64 `json:"userId"`
	Mid        int64 `json:"mid"`
	SlotId     int64 `json:"slotId"`
	Type       int64 `json:"type"`       // 铭文类型 只在一键装配时有用
	ActionType int64 `json:"actionType"` // 镶嵌 卸下 替换 一键装配： 1,2,3,4
}

type LegendWearData struct {
	SlotWear map[int64]int64 `json:"slotWear"` // {slotId:modelId}
	Legends  map[int64]int64 `json:"legends"`
}

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

// LegendReset 铭文重铸
type LegendReset struct {
	PlayerId int64 `json:"userId"`
	MId      int64 `json:"mid"`
	SlotId   int64 `json:"slotId"` // 铭文槽位,背包中重铸传0
}

type LegendResetData struct {
	Costs    map[int64]int64 `json:"costs"`   // 消耗道具
	Legends  map[int64]int64 `json:"legends"` // 发生变化的铭文
	SlotWear map[int64]int64 `json:"slotWear,omitempty"`
}

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

// LegendCompound 铭文合成
type LegendCompound struct {
	PlayerId int64         `json:"userId"`
	Filter   *LegendFilter `json:"filter"` // 筛选条件

}
type LegendFilter struct {
	Types    []int64 `json:"types"`
	Qualitys []int64 `json:"qualitys"`
}

type LegendCompoundData struct {
	Gets  map[int64]int64 `json:"gets"`
	Costs map[int64]int64 `json:"costs"`
}

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

// LegendUpgrade 铭文精通升级
type LegendUpgrade struct {
	PlayerId int64 `json:"userId"`
}

type LegendUpgradeData struct {
	Level int64           `json:"level"`
	Costs map[int64]int64 `json:"costs"`
}

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