``` refactor(monster): 优化怪物生成逻辑并简化OgreInfo数据结构

This commit is contained in:
1
2025-12-28 14:40:17 +00:00
parent 7e840cbf17
commit 67227f3016
4 changed files with 34 additions and 40 deletions

View File

@@ -48,8 +48,8 @@ func (s *Space) LeaveMap(c common.PlayerI) {
s.User.Delete(c.GetInfo().UserID)
s.UserInfo.Delete(c.GetInfo().UserID)
_, ok := maphot[s.Super]
if ok {
current, ok := maphot[s.Super]
if ok && *current > 0 {
atomic.AddInt32(maphot[s.Super], -1)
}