stam.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package model
  2. // const (
  3. // // 1 体力 2 挑战者卷轴 3 精力 4 神秘卷轴
  4. // StaminaType = 1
  5. // DefierType = 2
  6. // EnergyType = 3
  7. // MysteryType = 4
  8. // )
  9. // const (
  10. // ItemIdStamina = 2005
  11. // ItemIdEntry = 2007
  12. // )
  13. // 体力类型-BrawnType exported from 体力相关表.xlsx
  14. type BrawnType struct {
  15. UId int64 `json:"UId"` // 门票编号
  16. Name string `json:"Name"` // 门票名字
  17. RestoreMax int64 `json:"RestoreMax"` // 最大恢复上限 到此上限后停止恢复 但不影响获得 -1:不会停止
  18. RestoreSpeed int64 `json:"RestoreSpeed"` // 恢复速度 x秒恢复1点 /秒
  19. ItemId int64 `json:"ItemId"` // 匹配道具ID
  20. Price int64 `json:"Price"` // 购买价格 /钻 -1:不可购买
  21. Quota int64 `json:"Quota"` // 每日限购数
  22. Single int64 `json:"Single"` // 单次购买数
  23. AdBuyID int64 `json:"AdBuyID"` // 广告点购买ID -1:没有
  24. AdBuyNum int64 `json:"AdBuyNum"` // 广告购买次数
  25. } // package model
  26. // 门票类型-Ticket exported from 体力相关表.xlsx
  27. type Ticket struct {
  28. UId int64 `json:"UId"` // 门票编号
  29. Name string `json:"Name"` // 门票名字
  30. InitNum int64 `json:"InitNum"` // 玩家初始量
  31. RestoreSpeed int64 `json:"RestoreSpeed"` // 恢复速度 x秒恢复1点 /秒
  32. ItemId int64 `json:"ItemId"` // 匹配道具ID
  33. }
  34. // 恢复一点需要的时间
  35. func (b *BrawnType) GetRestoreTimeLenP1() int64 {
  36. return b.RestoreSpeed
  37. }
  38. func (b *BrawnType) GetMaxValue() int64 {
  39. return b.RestoreMax
  40. }
  41. // 恢复一点需要的时间
  42. func (t *Ticket) GetRestoreTimeLenP1() int64 {
  43. return t.RestoreSpeed
  44. }
  45. func (t *Ticket) GetRestoreItemId() int64 {
  46. return t.ItemId
  47. }