From 3f59f1a353cf7ea13716d345ba59b3c8efcd2604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <12574910+72wo@users.noreply.github.com> Date: Wed, 4 Mar 2026 12:48:49 +0800 Subject: [PATCH] =?UTF-8?q?```=20feat(boss-fight):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=AE=A0=E7=89=A9=E6=88=98=E6=96=97=E5=A5=96=E5=8A=B1=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复闪亮怪物奖励物品的位置,将奖励物品发放逻辑从条件判断前移到判断后, 确保只有符合条件的玩家才能获得玄铁奖励。 fix(player-energy): 修复能量时间消耗问题 注释掉EnergyTime的自动减1逻辑,避免玩家能量值异常减少。 refactor(shop-config): 优化商店查询配置 移除商品名称字段查询,只保留remark字段作为关键词搜索, 简化商品表的SELECT语句,提高查询效率。 ``` --- logic/controller/fight_boss野怪和地图怪.go | 14 +++++++------- logic/service/player/save.go | 2 +- modules/config/service/shop.go | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/logic/controller/fight_boss野怪和地图怪.go b/logic/controller/fight_boss野怪和地图怪.go index 6cb2bd385..86c0bdd69 100644 --- a/logic/controller/fight_boss野怪和地图怪.go +++ b/logic/controller/fight_boss野怪和地图怪.go @@ -175,14 +175,7 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf p.AddPetExp(foi.Winpet, int64(addexp)) pettype := int64(xmlres.PetMAP[int(refPet.GetID())].Type) - if monster.IsShiny() && p.CanGetXUAN() && pettype < 16 { - xuan := 400686 + pettype - ok := p.ItemAdd(xuan, 1) - if ok { - items.ADDitem(uint32(xuan), 1) - } - } if p.CanGetItem() { item := p.GetSpace().GetDrop() @@ -195,7 +188,14 @@ func (Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundInf } } + if monster.IsShiny() && p.CanGetXUAN() && pettype < 16 { + xuan := 400686 + pettype + ok := p.ItemAdd(xuan, 1) + if ok { + items.ADDitem(uint32(xuan), 1) + } + } p.SendPackCmd(8004, items) evs := gconv.Int64s(strings.Split(xmlres.PetMAP[int(monster.ID)].YieldingEV, " ")) diff --git a/logic/service/player/save.go b/logic/service/player/save.go index e8575d310..93505feec 100644 --- a/logic/service/player/save.go +++ b/logic/service/player/save.go @@ -97,7 +97,7 @@ func (p *Player) CanGetXUAN() bool { var base = 1 if p.Info.EnergyTime > 0 { base = 2 - p.Info.EnergyTime-- + // p.Info.EnergyTime-- } if grand.Meet(base, 2) { return true diff --git a/modules/config/service/shop.go b/modules/config/service/shop.go index c07e1c377..f455162e6 100644 --- a/modules/config/service/shop.go +++ b/modules/config/service/shop.go @@ -23,11 +23,11 @@ func NewShopService() *ShopService { {"is_enable", 1, true}, } }, - Select: "product_id,product_name,seerdou_price,jindou_price,remark", + Select: "product_id,seerdou_price,jindou_price,remark", }, PageQueryOp: &cool.QueryOp{ - KeyWordField: []string{"desc", "product_name"}, + KeyWordField: []string{"remark"}, }, }, }