parent
7a489dcee9
commit
a6da048ccc
|
@ -1,6 +1,17 @@
|
|||
import {IMessageDataWrapper, IMessageParser} from "../../../../../../api";
|
||||
|
||||
export class RentableSpaceStatusMessageParser implements IMessageParser {
|
||||
public static readonly SPACE_ALREADY_RENTED = 100;
|
||||
public static readonly SPACE_EXTEND_NOT_RENTED = 101;
|
||||
public static readonly SPACE_EXTEND_NOT_RENTED_BY_YOU = 102;
|
||||
public static readonly CAN_RENT_ONLY_ONE_SPACE = 103;
|
||||
public static readonly NOT_ENOUGH_CREDITS = 200;
|
||||
public static readonly NOT_ENOUGH_PIXELS = 201;
|
||||
public static readonly CANT_RENT_NO_PERMISSION = 202;
|
||||
public static readonly CANT_RENT_NO_HABBO_CLUB = 203;
|
||||
public static readonly CANT_RENT = 300;
|
||||
public static readonly CANT_RENT_GENERIC = 400;
|
||||
|
||||
private _rented: boolean;
|
||||
private _renterId: number;
|
||||
private _renterName: string;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {AdvancedMap, RoomObjectVariable, RoomWidgetEnum} from "../../../../../api";
|
||||
import {RoomObjectVariable, RoomWidgetEnum} from "../../../../../api";
|
||||
import {RoomObjectDataRequestEvent} from "../../../../../events";
|
||||
import {FurnitureLogic} from "./FurnitureLogic";
|
||||
|
||||
|
@ -17,7 +17,7 @@ export class FurnitureRentableSpaceLogic extends FurnitureLogic {
|
|||
this.eventDispatcher.dispatchEvent(new RoomObjectDataRequestEvent(RoomObjectDataRequestEvent.RODRE_CURRENT_USER_ID, this.object));
|
||||
}
|
||||
|
||||
const renterId = this.object.model.getValue<AdvancedMap<string, string>>(RoomObjectVariable.FURNITURE_DATA).getValue("renterId");
|
||||
const renterId = (this.object.model.getValue<string>(RoomObjectVariable.FURNITURE_DATA) as any)["renterId"] as string;
|
||||
const userId = this.object.model.getValue<number>(RoomObjectVariable.SESSION_CURRENT_USER_ID);
|
||||
|
||||
if (renterId) {
|
||||
|
|
Loading…
Reference in New Issue