修复小问题

This commit is contained in:
unkown committed 2023-10-03 00:19:35 +08:00
1 parent cd5fd5114c
commit 69f4341aff
2 files changed
+11 -1

No files matched your search

+1 -1
View File
@@ -132,7 +132,7 @@ func (p *PluginPubg) GlobalTickPubg() {
}
alivePlayerList := p.GetAlivePlayerList()
if len(alivePlayerList) <= 1 {
if len(alivePlayerList) <= 1 {
if len(alivePlayerList) == 1 {
info := fmt.Sprintf("『%v』大吉大利,今晚吃鸡。", alivePlayerList[0].NickName)
GAME.PlayerChatReq(world.GetOwner(), &proto.PlayerChatReq{ChatInfo: &proto.ChatInfo{Content: &proto.ChatInfo_Text{Text: info}}})
}
+10
View File
@@ -117,7 +117,17 @@ func (g *Game) GetScenePointReq(player *model.Player, payloadMsg pb.Message) {
return
}
dbWorld := owner.GetDbWorld()
if dbWorld == nil {
logger.Error("db world is nil, uid: %v", player.PlayerId)
g.SendError(cmd.GetScenePointRsp, player, &proto.GetScenePointRsp{})
return
}
dbScene := dbWorld.GetSceneById(req.SceneId)
if dbScene == nil {
logger.Error("db scene is nil, sceneId: %v, uid: %v", req.SceneId, player.PlayerId)
g.SendError(cmd.GetScenePointRsp, player, &proto.GetScenePointRsp{})
return
}
// 区域 暂时解锁全部区域
areaIdMap := make(map[uint32]bool)
for _, worldAreaData := range gdconf.GetWorldAreaDataMap() {