refactor: 将 CanFight 方法移至基类
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-23 01:03:49 +08:00
committed by cnb
parent 9380bac839
commit 65f696dfc3
2 changed files with 3 additions and 12 deletions

View File

@@ -1,16 +1,8 @@
package player
import (
"blazing/common/socket/errorcode"
)
type AI_player struct {
baseplayer
CanCapture int
Prop [6]int8
}
func (p *AI_player) CanFight() errorcode.ErrorCode {
return 0
}

View File

@@ -54,6 +54,9 @@ func (p *baseplayer) GetPetInfo(limitlevel uint32) []model.PetInfo {
}
func (f *baseplayer) InvitePlayer(ff common.PlayerI) {
}
func (p *baseplayer) CanFight() errorcode.ErrorCode {
return 0
}
func (p *baseplayer) QuitFight() {
@@ -102,7 +105,3 @@ func (p *baseplayer) ItemAdd(ItemId, ItemCnt int64) (result bool) {
func (lw *baseplayer) SendLoadPercent(info.LoadPercentOutboundInfo) {
}
func (p *baseplayer) CanFight() errorcode.ErrorCode {
return 0
}