```
feat(fight_boss): 更新BOSS战斗效果逻辑以使用新的服务接口 将原来直接访问xmlres.EffectMAP获取效果信息的方式, 替换为通过service.NewEffectService().Args方法获取EID与参数, 提高代码解耦性与可维护性。 refactor(item_buy): 调整金币商品购买时的价格计算逻辑 修复购买金币商品时价格未正确乘以100的问题, 确保消耗金币数量准确无
This commit is contained in:
39
modules/blazing/controller/admin/effec.go
Normal file
39
modules/blazing/controller/admin/effec.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
_ "blazing/logic/service/fight/boss"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/modules/blazing/service"
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
type EffectController struct {
|
||||
*cool.Controller
|
||||
}
|
||||
|
||||
func init() {
|
||||
var task_info_controller = &EffectController{
|
||||
&cool.Controller{
|
||||
Prefix: "/admin/monster/effect",
|
||||
Api: []string{"Add", "Delete", "Update", "Info", "List", "Page"},
|
||||
Service: service.NewEffectService(),
|
||||
},
|
||||
}
|
||||
// 注册路由
|
||||
cool.RegisterController(task_info_controller)
|
||||
}
|
||||
|
||||
type EffIDReq struct {
|
||||
g.Meta `path:"/effid" method:"GET"`
|
||||
}
|
||||
|
||||
func (c *EffectController) GetSession(ctx context.Context, req *EffIDReq) (res *cool.BaseRes, err error) {
|
||||
res = &cool.BaseRes{}
|
||||
res.Data = input.GeteffectIDs(input.EffectType.NewSel)
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user