refactor: 重构战斗系统动作提交和竞技场锁定逻辑
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-04-02 23:05:18 +08:00
committed by cnb
parent f221b299cd
commit 218e23ff81
13 changed files with 194 additions and 77 deletions

View File

@@ -13,7 +13,7 @@ import (
// 接收战斗或者取消战斗的包
func (h Controller) OnPlayerHandleFightInvite(data *fight.HandleFightInviteInboundInfo, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
if c.GetSpace().Owner.UserID == c.Info.UserID {
if c.IsArenaPVPLocked() {
return nil, errorcode.ErrorCodes.ErrSystemError
}
if c.GetSpace().Owner.UserID == data.UserID {
@@ -79,7 +79,7 @@ func (h Controller) OnPlayerHandleFightInvite(data *fight.HandleFightInviteInbou
// 邀请其他人进行战斗
func (h Controller) OnPlayerInviteOtherFight(data *fight.InviteToFightInboundInfo, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
if c.GetSpace().Owner.UserID == c.Info.UserID {
if c.IsArenaPVPLocked() {
return nil, errorcode.ErrorCodes.ErrSystemError
}
if c.GetSpace().Owner.ChallengerID == c.Info.UserID {