feat(user-talk): 优化聊天功能中的物品奖励逻辑
重构 Talk 方法中物品奖励的获取方式,使用新的配置服务以支持多物品 ID 奖励机制。 移除了对 github.com/gogf/gf/v2/util/grand 包的依赖,改为通过服务获取实际物品数量。 同时更新了相关模型定义: - 修改 MineralCollectionConfig 中 ItemID 为数组形式以支持多个物品配置 - 调整 ItemGift 模型字段
This commit is contained in:
@@ -24,17 +24,20 @@ type PetBaseConfig struct {
|
||||
// PrimaryScene int32 `gorm:"not null;default:0;comment:'首场景标识(0:非首场景地图;n>0:第n星系的星球且是首场景,默认0)'" json:"primary_scene"`
|
||||
|
||||
// ===================== 战斗核心属性(BossMon节点) =====================
|
||||
MonID int32 `gorm:"not null;comment:'BOSS对应的精灵ID'" json:"mon_id"`
|
||||
Hp int32 `gorm:"not null;comment:'BOSS血量值(LvHpMatchUser非0时此配置无效)'" json:"hp"`
|
||||
Lv int32 `gorm:"not null;comment:'BOSS等级(LvHpMatchUser非0时此配置无效)'" json:"lv"`
|
||||
MonID int32 `gorm:"not null;comment:'BOSS对应的精灵ID'" json:"mon_id"`
|
||||
Nature uint32 `gorm:"not null;default:0;comment:'BOSS属性-性格'" json:"nature"`
|
||||
Effect []uint32 `gorm:"type:jsonb;not null;default:'[]';comment:'BOSS特性'" json:"effect"`
|
||||
Lv int32 `gorm:"not null;comment:'BOSS等级(LvHpMatchUser非0时此配置无效)'" json:"lv"`
|
||||
Color string `gorm:"comment:'BOSS颜色'" json:"color"`
|
||||
Hp int32 `gorm:"not null;comment:'BOSS血量值(LvHpMatchUser非0时此配置无效)'" json:"hp"`
|
||||
|
||||
// ===================== BOSS属性(Boss_prop) =====================
|
||||
Prop []uint32 `gorm:"type:jsonb;not null;default:'[]';comment:'BOSS属性'" json:"prop"`
|
||||
Nature uint32 `gorm:"not null;default:0;comment:'BOSS属性-性格'" json:"nature"`
|
||||
SKill []uint32 `gorm:"type:jsonb;not null;default:'[]';comment:'BOSS技能'" json:"skill"`
|
||||
Effect []uint32 `gorm:"type:jsonb;not null;default:'[]';comment:'BOSS特性'" json:"effect"`
|
||||
Color string `gorm:"comment:'BOSS颜色'" json:"color"`
|
||||
IsEnable uint32 `gorm:"not null;default:0;comment:'是否启用'" json:"is_enable"`
|
||||
Desc *string `gorm:"comment:'BOSS描述'" json:"desc"`
|
||||
Prop []uint32 `gorm:"type:jsonb;not null;default:'[]';comment:'BOSS属性'" json:"prop"`
|
||||
|
||||
SKill []uint32 `gorm:"type:jsonb;not null;default:'[]';comment:'BOSS技能'" json:"skill"`
|
||||
|
||||
IsEnable uint32 `gorm:"not null;default:0;comment:'是否启用'" json:"is_enable"`
|
||||
Desc *string `gorm:"comment:'BOSS描述'" json:"desc"`
|
||||
|
||||
// ISMELEE uint32 `gorm:"not null;default:0;comment:'是否乱斗配置'" json:"is_melee"`
|
||||
// // ===================== BOSS奖励规则(Boss_bonus) =====================
|
||||
|
||||
Reference in New Issue
Block a user