refactor(blazing): 重构任务系统并优化相关功能
- 重构了任务系统的数据结构和执行逻辑 - 优化了地图加载和怪物刷新机制 - 改进了宠物系统的基础架构 - 调整了玩家信息和背包的处理方式 - 统一了数据访问层的接口和实现
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"blazing/common/data/share"
|
||||
"blazing/common/data/socket"
|
||||
"blazing/logic/service/maps"
|
||||
|
||||
"github.com/gogf/gf/v2/os/glog"
|
||||
"github.com/panjf2000/gnet/v2"
|
||||
@@ -49,6 +50,9 @@ func (s *Server) OnClose(c gnet.Conn, _ error) (action gnet.Action) {
|
||||
|
||||
if v.Player != nil {
|
||||
glog.Debug(context.Background(), v.Player.Info.UserID, "断开连接")
|
||||
|
||||
maps.LeaveMap(v.Player)
|
||||
|
||||
v.Player.IsLogin = false
|
||||
socket.Mainplayer.Delete(v.Player.Info.UserID)
|
||||
share.ShareManager.DeleteUserOnline(v.Player.Info.UserID) //设置用户登录服务器
|
||||
|
||||
Reference in New Issue
Block a user