Fix badges in preview images

This commit is contained in:
Bill 2021-08-31 23:48:04 -04:00
parent 0aa202e6be
commit 7f8e04e290

View File

@ -2377,7 +2377,18 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
{
if(!this._sessionDataManager) return;
const roomObject = this.getRoomObjectFloor(roomId, objectId);
let roomObject: IRoomObjectController = null;
if(roomId === 0)
{
const room = this._roomManager.getRoomInstance(RoomEngine.TEMPORARY_ROOM);
if(room) roomObject = (room.getRoomObject(objectId, objectCategory) as IRoomObjectController);
}
else
{
roomObject = this.getRoomObjectFloor(roomId, objectId);
}
if(!roomObject || !roomObject.logic) return;
@ -3520,7 +3531,7 @@ export class RoomEngine extends NitroManager implements IRoomEngine, IRoomCreato
if(split.length <= 0) return -1;
return parseInt(split[0]);
return (parseInt(split[0]) || 0);
}
private getRoomObjectRoomId(object: IRoomObject): string