base.go 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package model
  2. import (
  3. "strings"
  4. "time"
  5. )
  6. // 基础配置类型(key)
  7. const (
  8. BaseConfig_ChatCfg = "ChatCfg" // 聊天配置
  9. )
  10. type Timestamp int64
  11. func (t *Timestamp) UnmarshalJSON(b []byte) error {
  12. // Remove quotes
  13. s := strings.Trim(string(b), "\"")
  14. // Parse the date string
  15. parsedTime, err := time.ParseInLocation("2006/01/02", s, time.Local)
  16. if err != nil {
  17. return err
  18. }
  19. // Convert to Unix timestamp
  20. *t = Timestamp(parsedTime.Unix())
  21. return nil
  22. }
  23. // 游戏基础表|Vertical-BaseData exported from Base表.xlsx
  24. type BaseData struct {
  25. ChapterStartTime Timestamp `json:"StartTime"` // 合作模式的周期开始时间,从此天0点开始,包含此天。
  26. ChatMsgNumMax int64 `json:"ChatMsgNumMax"` // 每个频道最多保留对话上限
  27. ChatContentMax int64 `json:"ChatContentMax"` // 单个聊天对话最大字节数,1个汉字=2个字节
  28. ChatSendCDTs int64 `json:"ChatSendCDTs"` // 消息发送CD /秒
  29. SceneSkillDefault string `json:"SceneSkillDefault"` // 场景皮肤技能穿戴界面,无穿戴皮肤时,默认显示的场景龙骨展示
  30. ChatPrivateEffectTs int64 `json:"ChatPrivateEffectTs"` // 私聊频道存在时间,单位/天
  31. Rename int64 `json:"Rename"` // 改名花费钻石金额(首次免费,之后按此扣费)
  32. ChatTime int64 `json:"ChatTime"` // 聊天频道时间符出现间隔(秒)
  33. CoolingTime int64 `json:"CoolingTime"` // 合作模式邀请好友时的冷却时间(单位秒)
  34. EquipBagMax int64 `json:"EquipBagMax"` // 装备背包上限 /件
  35. PrayerConsume int64 `json:"PrayerConsume"` // 祈愿消耗幸运币数 全局通用
  36. RecordingSharing []int64 `json:"RecordingSharing"` // 抖音【录制分享】奖励
  37. RecordingSharingNum int64 `json:"RecordingSharingNum"` // 抖音【录制分享】奖励每日2次
  38. StartGift []int64 `json:"StartGift"` // 抖音【启动礼包】奖励,每日1次
  39. AddGift []int64 `json:"AddGift"` // 抖音【添加好礼】奖励,一次
  40. OfflineStamina int64 `json:"OfflineStamina"` // 前日离线,每小时获得的体力值
  41. }