This repository has been archived on 2026-10-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Ananta-ps/pkg/protocol/models/fishing_gear_catalog4229938.go

31 lines
1.2 KiB
Go
Raw Permalink 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 models
import (
"encoding/json"
"sync"
)
var _ = json.RawMessage{}
var _ = sync.Mutex{}
//
// 渔具目录(懒加载一次):读真实 Configs/FishingGearConfig.json。
// 为什么单独放一份、而不复用 Drmk.Handlers 里的 FishingCatalog4229938:
// 那个类在 Drmk.Handlers 程序集,而登录帧是在 Drmk.Core 的 RuntimePayloadFactory 里组装的,
// Core 看不到 Handlers 的 internal 类型。这里只做「渔具 id 列表」这一件事,保持最小面。
// 权威结构(dump.cs):
// FishingGearConfig —— Id / GearType / Quality / IconRes / ModelRes / Name / Description
// FishingGearInfo —— UniqueId(uint) / TemplateId(uint) / RemainingDurability(uint)
// PlayerFishingInfo —— GearDict(Dictionary<uint, FishingGearInfo>) 是第 1 个字段
// 所以播种时只要「UniqueId / TemplateId / RemainingDurability」三元组,与代理的
// WriteFishingGearInfo 完全对齐。
//
type FishingGearCatalog4229938 struct {
GearIdsField []uint32 `json:"gearIdsField"`
Gate any `json:"gate"`
GearIds []uint32 `json:"gearIds"`
// 读不到配置时的兜底:只发入门鱼竿,保证钓鱼链路永远能跑。
FallbackGearIds []uint32 `json:"fallbackGearIds"`
}