"refactor(map): 优化地图怪物刷新逻辑并调整天气系统实现"

This commit is contained in:
1
2025-12-16 08:35:22 +00:00
parent a3e8e4dd19
commit 1d830ea808
7 changed files with 44 additions and 37 deletions

View File

@@ -3,6 +3,7 @@ package controller
import (
"blazing/common/socket/errorcode"
"sync/atomic"
"time"
"blazing/logic/service/fight"
"blazing/logic/service/maphot"
@@ -38,6 +39,7 @@ func (h Controller) MapHot(data *maphot.InInfo, c *player.Player) (result *mapho
}
func (h *Controller) MapLeave(data *space.LeaveMapInboundInfo, c *player.Player) (result *info.LeaveMapOutboundInfo, err errorcode.ErrorCode) { //这个时候player应该是空的
atomic.StoreUint32(&c.Canmon, 0)
c.MapNPC.Reset(5 * time.Second)
//data.Broadcast(c.Info.MapID, info.LeaveMapOutboundInfo{UserID: c.Info.UserID}) //同步广播
result = &info.LeaveMapOutboundInfo{
UserID: c.Info.UserID,