This commit is contained in:
MyNameIsBatman 2021-11-27 00:04:39 -03:00
parent 890acc487d
commit f442456e16
5 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
import { GuideReportingStatusMessageParser } from './../../parser/help/GuideReportingStatusMessageParser';
export class GuideReportingStatusMessageEvent extends MessageEvent implements IMessageEvent
{
constructor(callBack: Function)
{
super(callBack, GuideReportingStatusMessageParser);
}
public getParser(): GuideReportingStatusMessageParser
{
return this.parser as GuideReportingStatusMessageParser;
}
}

View File

@ -29,6 +29,22 @@ export class PerkAllowancesMessageParser implements IMessageParser
return true;
}
public isAllowed(perkCode: string): boolean
{
let allowed = false;
for(const perk of this._perks)
{
if(perk.code === perkCode)
{
allowed = perk.isAllowed;
break;
}
}
return allowed;
}
public get perks(): PerkData[]
{
return this._perks;

View File

@ -0,0 +1,15 @@
export class PerkEnum
{
public static USE_GUIDE_TOOL: string = 'USE_GUIDE_TOOL';
public static GIVE_GUIDE_TOUR: string = 'GIVE_GUIDE_TOUR';
public static JUDGE_CHAT_REVIEWS: string = 'JUDGE_CHAT_REVIEWS';
public static VOTE_IN_COMPETITIONS: string = 'VOTE_IN_COMPETITIONS';
public static CALL_ON_HELPERS: string = 'CALL_ON_HELPERS';
public static CITIZEN: string = 'CITIZEN';
public static TRADE: string = 'TRADE';
public static HEIGHTMAP_EDITOR_BETA: string = 'HEIGHTMAP_EDITOR_BETA';
public static BUILDER_AT_WORK: string = 'BUILDER_AT_WORK';
public static NAVIGATOR_ROOM_THUMBNAIL_CAMERA: string = 'NAVIGATOR_ROOM_THUMBNAIL_CAMERA';
public static CAMERA: string = 'CAMERA';
public static MOUSE_ZOOM: string = 'MOUSE_ZOOM';
}

View File

@ -0,0 +1,2 @@
export * from './PerkData';
export * from './PerkEnum';

View File

@ -1 +1,2 @@
export * from './common';
export * from './PerkAllowancesMessageParser';