fix(fight): 移除调试打印语句并修复宠物类型验证逻辑 移除了PetKing函数中的调试打印语句,确保不再输出调试信息到控制台。 同时保持了宠物类型验证的核心逻辑不变。 fix(fight): 修正boss技能伤害计算公式 修改了NewSel323的OnSkill方法中伤害计算的公式, 将原来的百分比计算方式调整为正确的血量差值计算方式。 feat(space): 调整空间定时器间隔时间 将Space.Next方法的时间间隔从6-30秒大幅增加到10-30分钟, 以适应实际的游戏节奏需求。 refactor(config): 更新宠物基础配置模型结构 移除了PetBaseConfig中Hp字段的not null约束, 使配置更加灵活。 feat(config): 扩展地图坑位配置支持新功能 为map_pit配置添加了MustTask必做任务字段和DropItemIds掉落物ID列表, 同时为item和pet服务增加了列表查询操作的等值过滤支持。 ```
This commit is contained in:
@@ -30,7 +30,7 @@ type PetBaseConfig struct {
|
||||
Lv int32 `gorm:"not null;comment:'BOSS等级(LvHpMatchUser非0时此配置无效)'" json:"lv"`
|
||||
Color string `gorm:"comment:'BOSS颜色'" json:"color"`
|
||||
Skin int32 `gorm:"not null;default:0;comment:'BOSS皮肤ID'" json:"skin"`
|
||||
Hp int32 `gorm:"not null;comment:'BOSS血量值(LvHpMatchUser非0时此配置无效)'" json:"hp"`
|
||||
Hp int32 `gorm:"comment:'BOSS血量值(LvHpMatchUser非0时此配置无效)'" json:"hp"`
|
||||
|
||||
// ===================== BOSS属性(Boss_prop) =====================
|
||||
Prop []uint32 `gorm:"type:jsonb;not null;default:'[]';comment:'BOSS属性'" json:"prop"`
|
||||
|
||||
@@ -21,6 +21,7 @@ type Event struct {
|
||||
Week []int32 `gorm:"type:int[];comment:'触发的星期'" json:"week"`
|
||||
//首发精灵判断Event
|
||||
FirstSprites []int32 `gorm:"type:int[];comment:'首发精灵判断'" json:"first_sprites"`
|
||||
MustTask []int32 `gorm:"type:int[];comment:'必须任务'" json:"must_task"`
|
||||
}
|
||||
|
||||
// MapPit 地图坑位核心配置模型(参照MonsterRefresh实现风格)
|
||||
@@ -31,11 +32,12 @@ type MapPit struct {
|
||||
MapID int32 `gorm:"not null;index;comment:'所属地图ID'" json:"map_id" description:"地图ID"`
|
||||
|
||||
RefreshID []uint32 `gorm:"type:int[];comment:'精灵ID列表'" json:"refresh_id"`
|
||||
Pos []int `gorm:"type:int[];comment:'坑位位置'" json:"pos"`
|
||||
Pos []int `gorm:"type:int[];comment:'坑位位置'" json:"pos"`
|
||||
//最小等级
|
||||
MinLevel int `gorm:"type:int;not null;default:1;comment:'最小等级'" json:"min_level"`
|
||||
//最大等级
|
||||
MaxLevel int `gorm:"type:int;not null;default:1;comment:'最大等级'" json:"max_level"`
|
||||
MaxLevel int `gorm:"type:int;not null;default:1;comment:'最大等级'" json:"max_level"`
|
||||
DropItemIds []uint32 `gorm:"type:int[];comment:'掉落物IDs" json:"drop_item_ids"`
|
||||
//是否可捕捉MapPit
|
||||
IsCapture int `gorm:"type:int;default:0;comment:'是否可捕捉'" json:"is_capture"`
|
||||
}
|
||||
|
||||
@@ -61,6 +61,9 @@ func NewItemService() *ItemService {
|
||||
&cool.Service{
|
||||
|
||||
Model: model.NewItemGift(),
|
||||
ListQueryOp: &cool.QueryOp{
|
||||
FieldEQ: []string{"is_egg", "is_light"},
|
||||
},
|
||||
PageQueryOp: &cool.QueryOp{
|
||||
KeyWordField: []string{"remark"},
|
||||
FieldEQ: []string{"is_egg"},
|
||||
|
||||
@@ -13,6 +13,9 @@ func NewPetRewardService() *PetRewardService {
|
||||
return &PetRewardService{
|
||||
&cool.Service{
|
||||
Model: model.NewPetReward(),
|
||||
ListQueryOp: &cool.QueryOp{
|
||||
FieldEQ: []string{"is_egg", "is_light"},
|
||||
},
|
||||
|
||||
PageQueryOp: &cool.QueryOp{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user