From ef7595a218a1c525c05e1828abb9087a8e755a44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=98=94=E5=BF=B5?=
<12574910+72wo@users.noreply.github.com>
Date: Fri, 6 Mar 2026 23:49:20 +0800
Subject: [PATCH] =?UTF-8?q?```=20fix(fight):=20=E7=A7=BB=E9=99=A4=E8=B0=83?=
=?UTF-8?q?=E8=AF=95=E6=89=93=E5=8D=B0=E8=AF=AD=E5=8F=A5=E5=B9=B6=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E5=AE=A0=E7=89=A9=E7=B1=BB=E5=9E=8B=E9=AA=8C=E8=AF=81?=
=?UTF-8?q?=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
移除了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服务增加了列表查询操作的等值过滤支持。
```
---
logic/controller/fight_pvp_king.go | 2 +-
logic/service/fight/boss/NewSeIdx_323.go | 2 +-
logic/service/space/space.go | 2 +-
modules/config/model/base_pet.go | 2 +-
modules/config/model/map_pit.go | 6 +-
modules/config/service/item.go | 3 +
modules/config/service/pet.go | 3 +
...onfig.xml.BufferRecordConfig__xmlClass.bin | 2957 ++++++++++++++++-
8 files changed, 2967 insertions(+), 10 deletions(-)
diff --git a/logic/controller/fight_pvp_king.go b/logic/controller/fight_pvp_king.go
index 07d1e625f..6ae34b932 100644
--- a/logic/controller/fight_pvp_king.go
+++ b/logic/controller/fight_pvp_king.go
@@ -64,7 +64,7 @@ func (h Controller) PetKing(data *fight.PetKingJoinInboundInfo, c *player.Player
//草","水","火","电","战斗","飞行","机械","地面","冰"
// 按顺序:草、水、火、电、战斗、飞行、机械、地面、冰
- println("11", c.GetPetInfo()[0].Type(), ElementTypeNumbers[data.FightType-1])
+ //println("11", c.GetPetInfo()[0].Type(), ElementTypeNumbers[data.FightType-1])
if c.GetPetInfo()[0].Type() != int(ElementTypeNumbers[data.FightType-1]) {
return nil, errorcode.ErrorCode(errorcode.ErrorCodes.ErrVictoryConditionNotMet)
}
diff --git a/logic/service/fight/boss/NewSeIdx_323.go b/logic/service/fight/boss/NewSeIdx_323.go
index 8b372e2f0..7be6fb740 100644
--- a/logic/service/fight/boss/NewSeIdx_323.go
+++ b/logic/service/fight/boss/NewSeIdx_323.go
@@ -16,7 +16,7 @@ func (e *NewSel323) OnSkill() bool {
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
- r := e.Ctx().Our.CurrentPet.GetMaxHP().Sub(e.Ctx().Our.CurrentPet.GetHP().Div(e.Ctx().Our.CurrentPet.GetMaxHP())).Div(alpacadecimal.NewFromInt(100))
+ r := e.Ctx().Our.CurrentPet.GetMaxHP().Sub(e.Ctx().Our.CurrentPet.GetHP()).Div(alpacadecimal.NewFromInt(100))
dug := r.Mul(e.Args()[1])
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{Type: info.DamageType.Fixed,
Damage: dug})
diff --git a/logic/service/space/space.go b/logic/service/space/space.go
index 78d969048..fbef190e4 100644
--- a/logic/service/space/space.go
+++ b/logic/service/space/space.go
@@ -123,7 +123,7 @@ func ParseCoordinateString(s string) []infomodel.Pos {
}
func (t *Space) Next(time.Time) time.Time {
- return time.Now().Add(grand.D(6*time.Second, 30*time.Second))
+ return time.Now().Add(grand.D(10*time.Minute, 30*time.Minute))
}
func (ret *Space) init() {
diff --git a/modules/config/model/base_pet.go b/modules/config/model/base_pet.go
index 7608a5019..a26a4c036 100644
--- a/modules/config/model/base_pet.go
+++ b/modules/config/model/base_pet.go
@@ -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"`
diff --git a/modules/config/model/map_pit.go b/modules/config/model/map_pit.go
index 6d1ad40c4..0dfc2fe0f 100644
--- a/modules/config/model/map_pit.go
+++ b/modules/config/model/map_pit.go
@@ -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"`
}
diff --git a/modules/config/service/item.go b/modules/config/service/item.go
index afe29f796..d0d5c96b3 100644
--- a/modules/config/service/item.go
+++ b/modules/config/service/item.go
@@ -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"},
diff --git a/modules/config/service/pet.go b/modules/config/service/pet.go
index 91d70cb1c..6127ef407 100644
--- a/modules/config/service/pet.go
+++ b/modules/config/service/pet.go
@@ -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{
diff --git a/public/binaryData/78_com.robot.core.config.xml.BufferRecordConfig__xmlClass.bin b/public/binaryData/78_com.robot.core.config.xml.BufferRecordConfig__xmlClass.bin
index 121978c00..4e60d0539 100644
--- a/public/binaryData/78_com.robot.core.config.xml.BufferRecordConfig__xmlClass.bin
+++ b/public/binaryData/78_com.robot.core.config.xml.BufferRecordConfig__xmlClass.bin
@@ -416,7 +416,7 @@
-
+
@@ -502,7 +502,7 @@
-
+
@@ -654,7 +654,7 @@
-
+
@@ -1033,4 +1033,2953 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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