Files
bl/common/data/xmlres/talk.go
昔念 7b5ec208fc refactor(socket): 重构 ClientData 结构体并优化相关逻辑
- 简化 ClientData 结构体,移除不必要的方法
- 优化 Player 结构体,调整 Conn 类型
- 更新 wscodec.go 中的 Conn 结构体
- 删除未使用的 XML 相关文件和代码
- 调整 ServerEvent 和 controller 中的相关逻辑
2025-08-30 00:36:08 +08:00

24 lines
950 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package xmlres
import (
"github.com/ECUST-XX/xml" // 注意需确保该xml库与示例中使用的一致
)
// TalkCount 根节点,对应<talk_count>标签
// 注意xml.Name需指定命名空间与XML中的xmlns保持一致
type TalkCount struct {
XMLName xml.Name `xml:"nieo.seer.org.talk-count talk_count"`
Entries []TalkEntry `xml:"entry"` // 包含所有entry节点
}
// Entry 单个条目配置,对应<entry>标签
type TalkEntry struct {
ID int `xml:"id,attr"` // 条目ID
ItemID int `xml:"item_id,attr"` // 物品ID
ItemMinCount int `xml:"item_min_count,attr"` // 物品最小数量
ItemMaxCount int `xml:"item_max_count,attr"` // 物品最大数量
Desc string `xml:"desc,attr"` // 描述信息
Count int `xml:"count,attr"` // 计数
Policy string `xml:"policy,attr,omitempty"` // 策略可选如week
}