***
This commit is contained in:
1 parent
3f5294ac00
commit
0ae134758a
9 files changed
+111
-69
No files matched your search
@@ -190,6 +190,10 @@ func (g *GCGManager) CreateGame(gameId uint32, playerList []*model.Player) *GCGG
|
||||
return game
|
||||
}
|
||||
|
||||
func (g *GCGManager) DestroyGame(gameGuid uint32) {
|
||||
delete(g.gameMap, gameGuid)
|
||||
}
|
||||
|
||||
// PhaseStart 阶段开始
|
||||
func (g *GCGManager) PhaseStart(game *GCGGame) {
|
||||
// 设置除了先手的玩家不允许操控
|
||||
|
||||
@@ -166,7 +166,7 @@ func (u *UserManager) UserLoginLoad(userId uint32, clientSeq uint32, gateAppId s
|
||||
// OnlineUser 玩家上线
|
||||
func (u *UserManager) OnlineUser(player *model.Player) {
|
||||
player.Online = true
|
||||
player.OnlineTime = uint32(time.Now().UnixMilli())
|
||||
player.OnlineTime = uint32(time.Now().Unix())
|
||||
USER_MANAGER.AddUser(player)
|
||||
MESSAGE_QUEUE.SendToAll(&mq.NetMsg{
|
||||
MsgType: mq.MsgTypeServer,
|
||||
@@ -193,7 +193,7 @@ type PlayerOfflineInfo struct {
|
||||
func (u *UserManager) UserOfflineSave(player *model.Player, changeGsInfo *ChangeGsInfo) {
|
||||
player.Online = false
|
||||
player.OfflineTime = uint32(time.Now().Unix())
|
||||
player.TotalOnlineTime += uint32(time.Now().UnixMilli()) - player.OnlineTime
|
||||
player.TotalOnlineTime += uint32(time.Now().Unix()) - player.OnlineTime
|
||||
if player.NotSave {
|
||||
LOCAL_EVENT_MANAGER.GetLocalEventChan() <- &LocalEvent{
|
||||
EventId: UserOfflineSaveToDbFinish,
|
||||
|
||||
@@ -582,8 +582,14 @@ func (g *Game) ChangePlayerAvatarSkillDepot(userId uint32, avatarId uint32, chan
|
||||
AbilityControlBlock: g.PacketAvatarAbilityControlBlock(avatar.AvatarId, changeSkillDepotId),
|
||||
})
|
||||
|
||||
dbAvatar.AddCurrEnergy(avatar.AvatarId, 0, true)
|
||||
g.UpdatePlayerAvatarFightProp(player.PlayerId, avatar.AvatarId)
|
||||
avatarSkillDataConfig := gdconf.GetAvatarEnergySkillConfig(avatar.SkillDepotId)
|
||||
if avatarSkillDataConfig == nil {
|
||||
return
|
||||
}
|
||||
fightPropEnergy := constant.ELEMENT_TYPE_FIGHT_PROP_ENERGY_MAP[int(avatarSkillDataConfig.CostElemType)]
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.MaxEnergy)] = float32(avatarSkillDataConfig.CostElemVal)
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)] = float32(avatar.CurrEnergy)
|
||||
g.UpdatePlayerAvatarFightProp(player.PlayerId, avatarId)
|
||||
}
|
||||
|
||||
func (g *Game) AddPlayerAvatarHp(userId uint32, avatarId uint32, value float32, max bool, reason proto.ChangHpReason) {
|
||||
@@ -598,6 +604,9 @@ func (g *Game) AddPlayerAvatarHp(userId uint32, avatarId uint32, value float32,
|
||||
}
|
||||
scene := world.GetSceneById(player.SceneId)
|
||||
entityId := world.GetPlayerWorldAvatarEntityId(player, avatarId)
|
||||
if entityId == 0 {
|
||||
return
|
||||
}
|
||||
entity := scene.GetEntity(entityId)
|
||||
fightProp := entity.GetFightProp()
|
||||
currHp := fightProp[constant.FIGHT_PROP_CUR_HP]
|
||||
@@ -639,6 +648,9 @@ func (g *Game) SubPlayerAvatarHp(userId uint32, avatarId uint32, value float32,
|
||||
}
|
||||
scene := world.GetSceneById(player.SceneId)
|
||||
entityId := world.GetPlayerWorldAvatarEntityId(player, avatarId)
|
||||
if entityId == 0 {
|
||||
return
|
||||
}
|
||||
entity := scene.GetEntity(entityId)
|
||||
fightProp := entity.GetFightProp()
|
||||
currHp := fightProp[constant.FIGHT_PROP_CUR_HP]
|
||||
@@ -695,7 +707,25 @@ func (g *Game) AddPlayerAvatarEnergy(userId uint32, avatarId uint32, value float
|
||||
return
|
||||
}
|
||||
dbAvatar := player.GetDbAvatar()
|
||||
dbAvatar.AddCurrEnergy(avatarId, float64(value), max)
|
||||
avatar, exist := dbAvatar.AvatarMap[avatarId]
|
||||
if !exist {
|
||||
logger.Error("avatar not exist, avatarId: %v", avatarId)
|
||||
return
|
||||
}
|
||||
avatarSkillDataConfig := gdconf.GetAvatarEnergySkillConfig(avatar.SkillDepotId)
|
||||
if avatarSkillDataConfig == nil {
|
||||
logger.Error("get avatar energy skill is nil, skillDepotId: %v", avatar.SkillDepotId)
|
||||
return
|
||||
}
|
||||
fightPropEnergy := constant.ELEMENT_TYPE_FIGHT_PROP_ENERGY_MAP[int(avatarSkillDataConfig.CostElemType)]
|
||||
if max {
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)] = float32(avatarSkillDataConfig.CostElemVal)
|
||||
} else {
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)] += value
|
||||
if avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)] > float32(avatarSkillDataConfig.CostElemVal) {
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)] = float32(avatarSkillDataConfig.CostElemVal)
|
||||
}
|
||||
}
|
||||
g.UpdatePlayerAvatarFightProp(player.PlayerId, avatarId)
|
||||
}
|
||||
|
||||
@@ -709,7 +739,25 @@ func (g *Game) CostPlayerAvatarEnergy(userId uint32, avatarId uint32, value floa
|
||||
return
|
||||
}
|
||||
dbAvatar := player.GetDbAvatar()
|
||||
dbAvatar.CostCurrEnergy(avatarId, float64(value), max)
|
||||
avatar, exist := dbAvatar.AvatarMap[avatarId]
|
||||
if !exist {
|
||||
logger.Error("avatar not exist, avatarId: %v", avatarId)
|
||||
return
|
||||
}
|
||||
avatarSkillDataConfig := gdconf.GetAvatarEnergySkillConfig(avatar.SkillDepotId)
|
||||
if avatarSkillDataConfig == nil {
|
||||
logger.Error("get avatar energy skill is nil, skillDepotId: %v", avatar.SkillDepotId)
|
||||
return
|
||||
}
|
||||
fightPropEnergy := constant.ELEMENT_TYPE_FIGHT_PROP_ENERGY_MAP[int(avatarSkillDataConfig.CostElemType)]
|
||||
if max {
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)] = 0.0
|
||||
} else {
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)] -= value
|
||||
if avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)] < 0.0 {
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)] = 0.0
|
||||
}
|
||||
}
|
||||
g.UpdatePlayerAvatarFightProp(player.PlayerId, avatarId)
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ func (g *Game) handleEvtBeingHit(player *model.Player, scene *Scene, hitInfo *pr
|
||||
}
|
||||
defEntity := scene.GetEntity(attackResult.DefenseId)
|
||||
if defEntity == nil {
|
||||
logger.Error("not found def entity, DefenseId: %v", attackResult.DefenseId)
|
||||
// logger.Error("not found def entity, DefenseId: %v", attackResult.DefenseId)
|
||||
return
|
||||
}
|
||||
switch defEntity.GetEntityType() {
|
||||
@@ -223,6 +223,12 @@ func (g *Game) handleEvtBeingHit(player *model.Player, scene *Scene, hitInfo *pr
|
||||
}
|
||||
fightProp[constant.FIGHT_PROP_CUR_HP] = currHp
|
||||
g.EntityFightPropUpdateNotifyBroadcast(scene, defEntity)
|
||||
if currHp == 0.0 {
|
||||
g.KillEntity(player, scene, defEntity.GetId(), proto.PlayerDieType_PLAYER_DIE_GM)
|
||||
}
|
||||
if defEntity.GetGroupId() == 0 {
|
||||
return
|
||||
}
|
||||
monsterDataConfig := gdconf.GetMonsterDataById(int32(defEntity.GetMonsterEntity().GetMonsterId()))
|
||||
if monsterDataConfig == nil {
|
||||
logger.Error("get monster data config is nil, monsterId: %v", defEntity.GetMonsterEntity().GetMonsterId())
|
||||
@@ -235,9 +241,6 @@ func (g *Game) handleEvtBeingHit(player *model.Player, scene *Scene, hitInfo *pr
|
||||
g.monsterDrop(player, MonsterDropTypeHp, hpDrop.Id, defEntity)
|
||||
}
|
||||
}
|
||||
if currHp == 0.0 {
|
||||
g.KillEntity(player, scene, defEntity.GetId(), proto.PlayerDieType_PLAYER_DIE_GM)
|
||||
}
|
||||
case constant.ENTITY_TYPE_GADGET:
|
||||
gadgetEntity := defEntity.GetGadgetEntity()
|
||||
gadgetDataConfig := gdconf.GetGadgetDataById(int32(gadgetEntity.GetGadgetId()))
|
||||
@@ -322,10 +325,13 @@ func (g *Game) handleEntityMove(player *model.Player, world *World, scene *Scene
|
||||
}
|
||||
rate /= 10.0
|
||||
fightProp := entity.GetFightProp()
|
||||
currHp := fightProp[constant.FIGHT_PROP_CUR_HP]
|
||||
maxHp := fightProp[constant.FIGHT_PROP_MAX_HP]
|
||||
damage := maxHp * rate
|
||||
if motionInfo.State == proto.MotionState_MOTION_FIGHT {
|
||||
damage /= 2.0
|
||||
damage := float32(0.0)
|
||||
if motionInfo.State == proto.MotionState_MOTION_FALL_ON_GROUND {
|
||||
damage = maxHp * rate
|
||||
} else if motionInfo.State == proto.MotionState_MOTION_FIGHT {
|
||||
damage = currHp * rate
|
||||
}
|
||||
g.SubPlayerAvatarHp(player.PlayerId, entity.GetAvatarEntity().GetAvatarId(), damage, false, proto.ChangHpReason_CHANGE_HP_SUB_FALL)
|
||||
}
|
||||
|
||||
+18
-4
@@ -61,8 +61,7 @@ func (g *Game) SetPlayerBornDataReq(player *model.Player, payloadMsg pb.Message)
|
||||
|
||||
// 创建世界
|
||||
world := WORLD_MANAGER.CreateWorld(player)
|
||||
world.AddPlayer(player)
|
||||
player.WorldId = world.GetId()
|
||||
g.WorldAddPlayer(world, player)
|
||||
// 进入场景
|
||||
player.SceneJump = true
|
||||
player.SceneLoadState = model.SceneNone
|
||||
@@ -121,8 +120,7 @@ func (g *Game) OnLogin(userId uint32, clientSeq uint32, gateAppId string, player
|
||||
} else {
|
||||
// 创建世界
|
||||
world := WORLD_MANAGER.CreateWorld(player)
|
||||
world.AddPlayer(player)
|
||||
player.WorldId = world.GetId()
|
||||
g.WorldAddPlayer(world, player)
|
||||
// 进入场景
|
||||
player.SceneJump = true
|
||||
player.SceneLoadState = model.SceneNone
|
||||
@@ -249,6 +247,17 @@ func (g *Game) OnOffline(userId uint32, changeGsInfo *ChangeGsInfo) {
|
||||
return
|
||||
}
|
||||
|
||||
// 回写当前血量和元素能量属性
|
||||
dbAvatar := player.GetDbAvatar()
|
||||
for _, avatar := range dbAvatar.AvatarMap {
|
||||
avatar.CurrHP = float64(avatar.FightPropMap[constant.FIGHT_PROP_CUR_HP])
|
||||
avatarSkillDataConfig := gdconf.GetAvatarEnergySkillConfig(avatar.SkillDepotId)
|
||||
if avatarSkillDataConfig != nil {
|
||||
fightPropEnergy := constant.ELEMENT_TYPE_FIGHT_PROP_ENERGY_MAP[int(avatarSkillDataConfig.CostElemType)]
|
||||
avatar.CurrEnergy = float64(avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)])
|
||||
}
|
||||
}
|
||||
|
||||
world := WORLD_MANAGER.GetWorldById(player.WorldId)
|
||||
if world != nil {
|
||||
g.WorldRemovePlayer(world, player)
|
||||
@@ -257,6 +266,11 @@ func (g *Game) OnOffline(userId uint32, changeGsInfo *ChangeGsInfo) {
|
||||
TICK_MANAGER.DestroyUserGlobalTick(userId)
|
||||
|
||||
USER_MANAGER.UserOfflineSave(player, changeGsInfo)
|
||||
|
||||
game, exist := GCG_MANAGER.gameMap[player.GCGCurGameGuid]
|
||||
if exist {
|
||||
GCG_MANAGER.DestroyGame(game.guid)
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Game) LoginNotify(userId uint32, clientSeq uint32, player *model.Player) {
|
||||
|
||||
@@ -153,6 +153,12 @@ func (g *Game) AcceptQuest(player *model.Player, notifyClient bool) {
|
||||
}
|
||||
}
|
||||
if canAccept {
|
||||
if questData.QuestId == 35304 {
|
||||
world := WORLD_MANAGER.GetWorldById(player.WorldId)
|
||||
if world != nil {
|
||||
g.AddPlayerAvatarEnergy(player.PlayerId, world.GetPlayerActiveAvatarId(player), 0.0, true)
|
||||
}
|
||||
}
|
||||
if questData.QuestId == 35721 {
|
||||
// TODO 由于第一次风龙任务进入秘境客户端会无限重连相关原因暂时屏蔽
|
||||
COMMAND_MANAGER.gmCmd.GMFreeMode(player.PlayerId)
|
||||
|
||||
@@ -225,7 +225,6 @@ func (g *Game) AskAddFriendReq(player *model.Player, payloadMsg pb.Message) {
|
||||
g.SendMsg(cmd.AskAddFriendRsp, player.PlayerId, player.ClientSeq, askAddFriendRsp)
|
||||
|
||||
targetPlayer := USER_MANAGER.GetOnlineUser(targetUid)
|
||||
targetDbSocial := targetPlayer.GetDbSocial()
|
||||
if targetPlayer == nil {
|
||||
// 非本地玩家
|
||||
if USER_MANAGER.GetRemoteUserOnlineState(targetUid) {
|
||||
@@ -260,7 +259,7 @@ func (g *Game) AskAddFriendReq(player *model.Player, payloadMsg pb.Message) {
|
||||
logger.Error("apply add friend target player is nil, uid: %v", targetUid)
|
||||
return
|
||||
}
|
||||
targetDbSocial = targetPlayer.GetDbSocial()
|
||||
targetDbSocial := targetPlayer.GetDbSocial()
|
||||
if targetDbSocial.IsFriend(player.PlayerId) {
|
||||
logger.Error("friend or apply already exist, uid: %v", player.PlayerId)
|
||||
return
|
||||
@@ -271,6 +270,7 @@ func (g *Game) AskAddFriendReq(player *model.Player, payloadMsg pb.Message) {
|
||||
return
|
||||
}
|
||||
|
||||
targetDbSocial := targetPlayer.GetDbSocial()
|
||||
if targetDbSocial.IsFriend(player.PlayerId) {
|
||||
logger.Error("friend or apply already exist, uid: %v", player.PlayerId)
|
||||
return
|
||||
@@ -322,7 +322,6 @@ func (g *Game) DealAddFriendReq(player *model.Player, payloadMsg pb.Message) {
|
||||
|
||||
if agree {
|
||||
targetPlayer := USER_MANAGER.GetOnlineUser(targetUid)
|
||||
targetDbSocial := targetPlayer.GetDbSocial()
|
||||
if targetPlayer == nil {
|
||||
// 非本地玩家
|
||||
if USER_MANAGER.GetRemoteUserOnlineState(targetUid) {
|
||||
@@ -347,7 +346,7 @@ func (g *Game) DealAddFriendReq(player *model.Player, payloadMsg pb.Message) {
|
||||
} else {
|
||||
// 全服离线玩家
|
||||
targetPlayer = USER_MANAGER.LoadTempOfflineUser(targetUid, true)
|
||||
targetDbSocial = targetPlayer.GetDbSocial()
|
||||
targetDbSocial := targetPlayer.GetDbSocial()
|
||||
if targetPlayer == nil {
|
||||
logger.Error("apply add friend target player is nil, uid: %v", targetUid)
|
||||
return
|
||||
@@ -357,6 +356,7 @@ func (g *Game) DealAddFriendReq(player *model.Player, payloadMsg pb.Message) {
|
||||
}
|
||||
return
|
||||
}
|
||||
targetDbSocial := targetPlayer.GetDbSocial()
|
||||
targetDbSocial.AddFriend(player.PlayerId)
|
||||
}
|
||||
}
|
||||
|
||||
+10
-46
@@ -69,6 +69,16 @@ func (a *DbAvatar) InitDbAvatar(player *Player) {
|
||||
func (a *DbAvatar) InitAvatar(player *Player, avatar *Avatar) {
|
||||
// 角色战斗属性
|
||||
avatar.FightPropMap = make(map[uint32]float32)
|
||||
// 当前血量
|
||||
avatar.FightPropMap[constant.FIGHT_PROP_CUR_HP] = float32(avatar.CurrHP)
|
||||
// 当前元素能量
|
||||
avatarSkillDataConfig := gdconf.GetAvatarEnergySkillConfig(avatar.SkillDepotId)
|
||||
if avatarSkillDataConfig != nil {
|
||||
fightPropEnergy := constant.ELEMENT_TYPE_FIGHT_PROP_ENERGY_MAP[int(avatarSkillDataConfig.CostElemType)]
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.MaxEnergy)] = float32(avatarSkillDataConfig.CostElemVal)
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)] = float32(avatar.CurrEnergy)
|
||||
}
|
||||
// 更新角色面板
|
||||
a.UpdateAvatarFightProp(avatar)
|
||||
// guid
|
||||
avatar.Guid = player.GetNextGameObjectGuid()
|
||||
@@ -95,20 +105,11 @@ func (a *DbAvatar) UpdateAvatarFightProp(avatar *Avatar) {
|
||||
avatar.FightPropMap[constant.FIGHT_PROP_CUR_ATTACK] = avatarDataConfig.GetBaseAttackByLevel(avatar.Level)
|
||||
avatar.FightPropMap[constant.FIGHT_PROP_CUR_DEFENSE] = avatarDataConfig.GetBaseDefenseByLevel(avatar.Level)
|
||||
avatar.FightPropMap[constant.FIGHT_PROP_MAX_HP] = avatarDataConfig.GetBaseHpByLevel(avatar.Level)
|
||||
// 当前血量
|
||||
avatar.FightPropMap[constant.FIGHT_PROP_CUR_HP] = float32(avatar.CurrHP)
|
||||
// 双暴
|
||||
avatar.FightPropMap[constant.FIGHT_PROP_CRITICAL] = avatarDataConfig.Critical
|
||||
avatar.FightPropMap[constant.FIGHT_PROP_CRITICAL_HURT] = avatarDataConfig.CriticalHurt
|
||||
// 元素充能
|
||||
avatar.FightPropMap[constant.FIGHT_PROP_CHARGE_EFFICIENCY] = 1.0
|
||||
avatarSkillDataConfig := gdconf.GetAvatarEnergySkillConfig(avatar.SkillDepotId)
|
||||
if avatarSkillDataConfig == nil {
|
||||
return
|
||||
}
|
||||
fightPropEnergy := constant.ELEMENT_TYPE_FIGHT_PROP_ENERGY_MAP[int(avatarSkillDataConfig.CostElemType)]
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.MaxEnergy)] = float32(avatarSkillDataConfig.CostElemVal)
|
||||
avatar.FightPropMap[uint32(fightPropEnergy.CurEnergy)] = float32(avatar.CurrEnergy)
|
||||
}
|
||||
|
||||
func (a *DbAvatar) AddAvatar(player *Player, avatarId uint32) {
|
||||
@@ -180,43 +181,6 @@ func (a *DbAvatar) ChangeSkillDepot(avatarId uint32, skillDepotId uint32) {
|
||||
}
|
||||
}
|
||||
|
||||
func (a *DbAvatar) AddCurrEnergy(avatarId uint32, value float64, max bool) {
|
||||
avatar, exist := a.AvatarMap[avatarId]
|
||||
if !exist {
|
||||
logger.Error("avatar not exist, avatarId: %v", avatarId)
|
||||
return
|
||||
}
|
||||
avatarSkillDataConfig := gdconf.GetAvatarEnergySkillConfig(avatar.SkillDepotId)
|
||||
if avatarSkillDataConfig == nil {
|
||||
logger.Error("get avatar energy skill is nil, skillDepotId: %v", avatar.SkillDepotId)
|
||||
return
|
||||
}
|
||||
if max {
|
||||
avatar.CurrEnergy = float64(avatarSkillDataConfig.CostElemVal)
|
||||
} else {
|
||||
avatar.CurrEnergy += value
|
||||
if avatar.CurrEnergy > float64(avatarSkillDataConfig.CostElemVal) {
|
||||
avatar.CurrEnergy = float64(avatarSkillDataConfig.CostElemVal)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (a *DbAvatar) CostCurrEnergy(avatarId uint32, value float64, max bool) {
|
||||
avatar, exist := a.AvatarMap[avatarId]
|
||||
if !exist {
|
||||
logger.Error("avatar not exist, avatarId: %v", avatarId)
|
||||
return
|
||||
}
|
||||
if max {
|
||||
avatar.CurrEnergy = 0.0
|
||||
} else {
|
||||
avatar.CurrEnergy -= value
|
||||
if avatar.CurrEnergy < 0.0 {
|
||||
avatar.CurrEnergy = 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (a *DbAvatar) WearReliquary(avatarId uint32, reliquary *Reliquary) {
|
||||
avatar := a.AvatarMap[avatarId]
|
||||
reliquaryConfig := gdconf.GetItemDataById(int32(reliquary.ItemId))
|
||||
|
||||
+2
-2
@@ -80,13 +80,13 @@ type Player struct {
|
||||
ClientVersion int `bson:"-" msgpack:"-"` // 玩家在线的客户端版本
|
||||
OfflineClear bool `bson:"-" msgpack:"-"` // 是否离线时清除账号数据
|
||||
NotSave bool `bson:"-" msgpack:"-"` // 是否离线回档
|
||||
RemoteWorldPlayerNum uint32 `bson:"-" msgpack:"-"` // 远程展示世界内人数
|
||||
Speed *Vector `bson:"-" msgpack:"-"` // 速度
|
||||
WuDi bool `bson:"-" msgpack:"-"` // 是否开启玩家角色无敌
|
||||
EnergyInf bool `bson:"-" msgpack:"-"` // 是否开启玩家角色无限能量
|
||||
StaminaInf bool `bson:"-" msgpack:"-"` // 是否开启玩家无限耐力
|
||||
// 特殊数据
|
||||
ChatMsgMap map[uint32][]*ChatMsg `bson:"-" msgpack:"-"` // 聊天信息 数据量偏大 只从db读写 不保存到redis
|
||||
ChatMsgMap map[uint32][]*ChatMsg `bson:"-" msgpack:"-"` // 聊天信息 数据量偏大 只从db读写 不保存到redis
|
||||
RemoteWorldPlayerNum uint32 `bson:"-"` // 远程展示世界内人数 在线同步到redis 不保存到db
|
||||
}
|
||||
|
||||
func (p *Player) GetPos() *Vector {
|
||||
|
||||
Reference in new issue
Block a user