```
feat(fight_boss): 更新BOSS战斗效果逻辑以使用新的服务接口 将原来直接访问xmlres.EffectMAP获取效果信息的方式, 替换为通过service.NewEffectService().Args方法获取EID与参数, 提高代码解耦性与可维护性。 refactor(item_buy): 调整金币商品购买时的价格计算逻辑 修复购买金币商品时价格未正确乘以100的问题, 确保消耗金币数量准确无
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"blazing/logic/service/player"
|
||||
"blazing/modules/blazing/model"
|
||||
"blazing/modules/blazing/service"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
@@ -88,11 +89,13 @@ func (h Controller) PlayerFightBoss(data *fight.ChallengeBossInboundInfo, c *pla
|
||||
|
||||
for _, v := range strings.Split(bm.NewSeIdxs, " ") {
|
||||
idx := gconv.Uint16(v)
|
||||
eff := xmlres.EffectMAP[int(idx)]
|
||||
args := strings.Split(eff.Args, " ")
|
||||
// eff := xmlres.EffectMAP[int(idx)]
|
||||
// args := strings.Split(eff.Args, " ")
|
||||
|
||||
EID, args := service.NewEffectService().Args(uint32(idx))
|
||||
mo.EffectInfo = append(mo.EffectInfo, model.PetEffectInfo{
|
||||
Idx: idx,
|
||||
EID: gconv.Uint16(eff.Eid),
|
||||
EID: gconv.Uint16(EID),
|
||||
Args: gconv.Ints(args),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user