feat-roomrank-decode.go
422 Bytes
package configs
// Decode 解析配置原始数据
func (c *RoomRankConfig) Decode(gameId string, configRaw *RoomRankConfigRaw) {
c.GameId = gameId
c.Raw = configRaw
c.Id = configRaw.Id
// 解析奖励
c.GenerateConfigClient()
}
// GenerateConfigClient 生成给客户端的配置
func (c *RoomRankConfig) GenerateConfigClient() {
configClient := &RoomRankConfigClient{
Id: c.Id,
}
c.Client = configClient
}