mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-12 10:42:27 +08:00
多人世界队伍
This commit is contained in:
@@ -75,6 +75,15 @@ func (p *Player) InitAvatar(avatar *Avatar) {
|
||||
return
|
||||
}
|
||||
|
||||
func (p *Player) GetAvatarIdByGuid(guid uint64) uint32 {
|
||||
for avatarId, avatar := range p.AvatarMap {
|
||||
if guid == avatar.Guid {
|
||||
return avatarId
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (p *Player) AddAvatar(avatarId uint32) {
|
||||
avatarDataConfig, ok := gdc.CONF.AvatarDataMap[int32(avatarId)]
|
||||
if !ok {
|
||||
|
||||
@@ -56,7 +56,6 @@ type Player struct {
|
||||
EnterSceneToken uint32 `bson:"-"` // 玩家的世界进入令牌
|
||||
DbState int `bson:"-"` // 数据库存档状态
|
||||
WorldId uint32 `bson:"-"` // 所在的世界id
|
||||
PeerId uint32 `bson:"-"` // 多人世界的玩家编号
|
||||
GameObjectGuidCounter uint64 `bson:"-"` // 游戏对象guid计数器
|
||||
ClientTime uint32 `bson:"-"` // 玩家客户端的本地时钟
|
||||
ClientRTT uint32 `bson:"-"` // 玩家客户端往返时延
|
||||
|
||||
Reference in New Issue
Block a user