leveldefs.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package proto
  2. import (
  3. item "bet24.com/servers/micros/item_inventory/proto"
  4. )
  5. const (
  6. Award_Invalid = iota // 0=无效
  7. Award_Available // 1=可领取
  8. Award_Received // 2=已领取
  9. Award_Notify // 3=通知刷新
  10. )
  11. const (
  12. WhiteList_Normal = iota // 无属性
  13. WhiteList_White // 白名单
  14. WhiteList_Black // 黑名单
  15. )
  16. const (
  17. LevelPrivilege_Transfer = iota
  18. LevelPrivilege_ShowGameHall // 显示游戏大厅
  19. )
  20. type LevelPrivilege struct {
  21. Privilege int `json:"pid"`
  22. Param int `json:"p"`
  23. }
  24. type LevelInfo struct {
  25. Level int // 等级
  26. Exp int // 所需经验
  27. Desc string // 描述
  28. GiftPack []item.ItemPack // 升级礼包(json格式)
  29. Privileges []LevelPrivilege `json:",omitempty"` // 对应解锁权限
  30. }
  31. type GameExpInfo struct {
  32. GameID int // 游戏ID
  33. WinExp int // 赢获取经验值
  34. LoseExp int // 输获取经验值
  35. }
  36. // 基本信息
  37. type LevelBaseInfo struct {
  38. Level int // Vip等级
  39. Experience int // 分数
  40. IsWhite int // 是否白名单 0=普通,1=白名单 2=黑名单
  41. IsFacebook bool // 是否facebook账号
  42. LoginAward int // 登录奖励(0=无效 1=有奖励领取 2=已领取 3=通知刷新)
  43. IsAdd bool // 是否可以加经验
  44. }