From 5ed58b131656c624ff720b0ee2cfa60a449e8659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <12574910+72wo@users.noreply.github.com> Date: Sat, 14 Mar 2026 01:02:36 +0800 Subject: [PATCH] =?UTF-8?q?```=20feat(boss):=20=E7=A7=BB=E9=99=A4alpacadec?= =?UTF-8?q?imal=E4=BE=9D=E8=B5=96=E5=B9=B6=E4=BF=AE=E5=A4=8D=E4=BC=A4?= =?UTF-8?q?=E5=AE=B3=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除了NewSeIdx_699中对alpacadecimal的依赖, 修复了技能伤害计算方式,不再使用最小值限制 fix(pet): 修正宠物服务中的代码格式和查询逻辑 修正了UPdatePrice方法中的代码格式问题, 为PetService添加了ListQueryOp配置,增加了免费和非VIP宠物的查询条件 ``` --- logic/service/fight/boss/NewSeIdx_699.go | 4 +--- logic/service/fight/boss/NewSeIdx_700.go | 2 +- modules/player/service/pet.go | 14 +++++++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/logic/service/fight/boss/NewSeIdx_699.go b/logic/service/fight/boss/NewSeIdx_699.go index 92757b157..4dcf93427 100644 --- a/logic/service/fight/boss/NewSeIdx_699.go +++ b/logic/service/fight/boss/NewSeIdx_699.go @@ -3,8 +3,6 @@ package effect import ( "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" - - "github.com/alpacahq/alpacadecimal" ) // 60. "20%弹60点固定伤害" StarLevel="0 @@ -29,7 +27,7 @@ func (e *NewSel699) Skill_Use_ex() bool { e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{ Type: info.DamageType.Fixed, - Damage: alpacadecimal.Min(e.Ctx().Opp.SumDamage, e.Args()[1]), + Damage: e.Args()[1], //alpacadecimal.Min(e.Ctx().Opp.SumDamage, e.Args()[1]), }) return true diff --git a/logic/service/fight/boss/NewSeIdx_700.go b/logic/service/fight/boss/NewSeIdx_700.go index acc6b0fbc..2fa358c31 100644 --- a/logic/service/fight/boss/NewSeIdx_700.go +++ b/logic/service/fight/boss/NewSeIdx_700.go @@ -13,7 +13,7 @@ type NewSel700 struct { NewSel0 } -func (e *NewSel700) Skill_Use() bool { +func (e *NewSel700) Skill_Use_ex() bool { if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime { return true } diff --git a/modules/player/service/pet.go b/modules/player/service/pet.go index fe257563d..c0fcee023 100644 --- a/modules/player/service/pet.go +++ b/modules/player/service/pet.go @@ -59,7 +59,7 @@ func (s *PetService) UPdatePrice(ctime uint32, Price uint32, is_sale uint32) err } var p model.Pet s.dbm(s.Model).Where("catch_time", ctime).Scan(&p) - if p.SalePrice!=0&&p.SalePrice != Price && utils.IsToday(p.UpdateTime) { //说明要修改价格 + if p.SalePrice != 0 && p.SalePrice != Price && utils.IsToday(p.UpdateTime) { //说明要修改价格 return fmt.Errorf("一天只允许改价一次") } res0, err := s.dbm(s.Model). @@ -302,6 +302,18 @@ func NewPetService(userid uint32) *PetService { userid: userid, Service: &cool.Service{ Model: model.NewPet(), + ListQueryOp: &cool.QueryOp{ + FieldEQ: []string{"player_id", "free", "is_sale"}, + Where: func(ctx context.Context) [][]interface{} { + + return [][]interface{}{ + // {"player_id", userId, true}, + {"free", 1, true}, + {"is_vip", 0, true}, + } + + }, + }, PageQueryOp: &cool.QueryOp{ FieldEQ: []string{"player_id", "free", "is_sale"}, Where: func(ctx context.Context) [][]interface{} {