refactor(fight): 重构战斗模块

- 移除未使用的结构体和接口
- 优化战斗准备和邀请逻辑
- 调整玩家和怪物信息的处理方式
- 更新战斗相关的数据结构
- 重构战斗模式和邀请相关代码
This commit is contained in:
2025-09-02 00:45:29 +08:00
parent 0dbb7d9a8d
commit 39893e4df9
16 changed files with 408 additions and 325 deletions

View File

@@ -2,9 +2,9 @@ package socket
import (
"blazing/common/utils"
"blazing/modules/blazing/model"
"blazing/modules/blazing/service"
"context"
"fmt"
"sync"
@@ -41,6 +41,16 @@ func (c *Conn) SendPack(bytes []byte) error {
return nil
}
type OgreInfo struct {
Data [9]OgrePetInfo
}
type OgrePetInfo struct {
Id uint32
Shiny uint32
Lv uint32 `struc:"skip"` //等级
}
type Player struct {
MainConn *Conn
@@ -54,6 +64,9 @@ type Player struct {
context.Context
Playerinvite uint32 //当前邀请的玩家ID
Onlinetime uint32 //当前登录时间
OgreInfo *OgreInfo
FightID string //绑定战斗标识
//FightInfo info.NoteReadyToFightInfo
}
// PlayerOption 定义配置 Player 的函数类型