机器人服务器房间不能解散bug

This commit is contained in:
DESKTOP-45ANQ2C\unis 2025-01-10 10:16:02 +08:00
parent fc14c2a467
commit 87bca00698
2 changed files with 11 additions and 0 deletions

View File

@ -62,6 +62,14 @@ func (nsa *NpcServerAgent) SyncDBGameFree(roomId int, DBGameFree *server.DB_Game
}
}
func (nsa *NpcServerAgent) DestroyScene(sceneId int) {
pack := &server.GRDestroyScene{
SceneId: proto.Int(sceneId),
}
nsa.sendPacket(int(server.SSPacketID_PACKET_GR_DESTROYSCENE), pack)
}
// Invite 邀请机器人
func (nsa *NpcServerAgent) Invite(roomId, cnt int, gameFreeId int32) bool {
//logger.Logger.Trace("(nsa *NpcServerAgent) Invite", roomId, cnt, isAgent, gameFreeId)

View File

@ -908,6 +908,9 @@ func (this *Scene) Destroy(force bool) {
}
proto.SetDefaults(pack)
this.SendToWorld(int(server.SSPacketID_PACKET_GW_DESTROYSCENE), pack)
NpcServerAgentSingleton.DestroyScene(int(this.SceneId))
logger.Logger.Trace("(this *Scene) Destroy(force bool) isCompleted", isCompleted)
}