28 lines
620 B
Go
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
|
|
}
|