feat(item): 添加 NatureProbs 字段并优化宠物道具使用逻辑
- 在 `Item` 结构体中新增 `NatureProbs` 字段,用于支持性格概率配置 - 重构 `ItemUsePet` 控制器方法,引入处理器注册机制统一管理道具效果 - 修复神经元相关道具的特殊处理逻辑,增强代码可维护性 - 调整 `S2C_USE_PET_ITEM_OUT_OF_FIGHT` 响应结构体,增加技能列表长度字段 - 修改 `ResetNature` 方法命名及判断条件,提升语义清晰度与健壮性 - 新增 `PetInfo_One_Unscoped` 查询方法以支持软删除数据访问 - 实
This commit is contained in:
@@ -47,10 +47,11 @@ type Item struct {
|
||||
YuanshenDegrade int `xml:"YuanshenDegrade,attr,omitempty"` // 融合精灵还原标识(融合精灵还原药剂)
|
||||
EvRemove int `xml:"EvRemove,attr,omitempty"` // 学习力遗忘类型(各类学习力遗忘剂)
|
||||
//bShowPetBag int `xml:"bShowPetBag,attr,omitempty"` // 宠物背包显示标识(副融合精灵保留药剂等)
|
||||
Nature *string `xml:"Nature,attr"` // 指向int的指针,无值时为nil
|
||||
NatureSet *string `xml:"NatureSet,attr"` // 指向string的指针,无值时为nil
|
||||
Pet *Pet `xml:"pet,omitempty"` // 精灵属性子节点
|
||||
TeamPK *TeamPK `xml:"teamPK,omitempty"` // 要塞保卫战子节点
|
||||
Nature *string `xml:"Nature,attr"` // 指向int的指针,无值时为nil
|
||||
NatureSet *string `xml:"NatureSet,attr"` // 指向string的指针,无值时为nil
|
||||
NatureProbs *string `xml:"NatureProbs,attr"` // 指向string的指针,无值时为nil
|
||||
Pet *Pet `xml:"pet,omitempty"` // 精灵属性子节点
|
||||
TeamPK *TeamPK `xml:"teamPK,omitempty"` // 要塞保卫战子节点
|
||||
}
|
||||
|
||||
// Pet 精灵属性子节点,对应<pet>标签
|
||||
|
||||
Reference in New Issue
Block a user