This commit is contained in:
1
2025-08-28 21:35:56 +00:00
parent 00f38b8c53
commit 79361e68cd
29 changed files with 253 additions and 232 deletions

View File

@@ -1,7 +1,6 @@
package cool
import (
"blazing/common/data/entity"
"blazing/common/utils"
"context"
"reflect"
@@ -14,8 +13,7 @@ import (
var ctx = context.TODO()
var (
Mainplayer = &utils.SyncMap[uint32, *entity.Player]{} //玩家数据
CmdCache = &utils.SyncMap[uint32, reflect.Value]{} //命令缓存
CmdCache = &utils.SyncMap[uint32, reflect.Value]{} //命令缓存
Loger = glog.New()
)
@@ -37,12 +35,3 @@ func init() {
glog.Debug(context.Background(), "初始化雪花算法", newId)
}
func ConutPlayer() int {
count := 0
Mainplayer.Range(func(uint32, *entity.Player) bool {
count++
return true // 继续遍历
})
return count
}