修改底层map

This commit is contained in:
1
2025-10-10 04:49:23 +00:00
parent ac671408f7
commit df6606b021
10 changed files with 54 additions and 103 deletions

View File

@@ -4,8 +4,6 @@ import (
"blazing/common/socket/errorcode"
"blazing/cool"
"blazing/logic/service/common"
"blazing/logic/service/player"
"blazing/logic/service/space"
"blazing/logic/service/user"
@@ -28,10 +26,10 @@ func (h *Controller) ChangePlayerName(data *user.ChangePlayerNameInboundInfo, c
Nickname: newnice,
UserID: c.Info.UserID,
}
space.GetSpace(c.Info.MapID).Range(func(playerID uint32, player common.PlayerI) bool {
for _, player := range space.GetSpace(c.Info.MapID).User.Items() {
player.SendPack(data.Head.Pack(&result))
return true
})
}
return result, 0
}