Files
bl/logic/service/fight/itemover/300501.go
xinian 0622f4710b
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
feat: 添加道具捕捉后的回调机制
2026-03-27 17:06:18 +08:00

28 lines
620 B
Go

package itemover
import (
"blazing/logic/service/common"
"blazing/logic/service/fight/input"
"blazing/modules/player/model"
)
func init() {
input.InitFunc(300501, &RuleBase{})
}
// RuleBase 规则基类:包含通用参数存储和基础方法
type RuleBase struct {
args []int // 通用参数存储,替代各个子类的 params
}
// Exec 基类默认执行方法(子类可重写)
func (r *RuleBase) Exec(f common.FightI, t *model.PetInfo) bool {
t.FixShiny()
return true
}
// SetArgs 基类参数设置方法(所有子类继承使用)
func (r *RuleBase) SetArgs(param ...int) {
r.args = param
}