From 74f000a466b9ac4cdae7b0e3ad3addbee6cd0034 Mon Sep 17 00:00:00 2001 From: dank074 Date: Fri, 26 Nov 2021 15:03:56 -0600 Subject: [PATCH] replace perk event --- src/nitro/communication/NitroMessages.ts | 6 ++++-- .../incoming/user/access/UserPerksEvent.ts | 16 ---------------- .../messages/incoming/user/access/index.ts | 1 - 3 files changed, 4 insertions(+), 19 deletions(-) delete mode 100644 src/nitro/communication/messages/incoming/user/access/UserPerksEvent.ts diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index fd037c1f..5f187854 100644 --- a/src/nitro/communication/NitroMessages.ts +++ b/src/nitro/communication/NitroMessages.ts @@ -110,6 +110,7 @@ import { NotificationDialogMessageEvent } from './messages/incoming/notification import { PetLevelNotificationEvent } from './messages/incoming/notifications/PetLevelNotificationEvent'; import { PetPlacingErrorEvent } from './messages/incoming/notifications/PetPlacingErrorEvent'; import { UnseenItemsEvent } from './messages/incoming/notifications/UnseenItemsEvent'; +import { PerkAllowancesMessageEvent } from './messages/incoming/perk'; import { CommunityGoalEarnedPrizesMessageEvent } from './messages/incoming/quest/CommunityGoalEarnedPrizesMessageEvent'; import { CommunityGoalHallOfFameMessageEvent } from './messages/incoming/quest/CommunityGoalHallOfFameMessageEvent'; import { CommunityGoalProgressMessageEvent } from './messages/incoming/quest/CommunityGoalProgressMessageEvent'; @@ -204,7 +205,6 @@ import { WiredRewardResultMessageEvent } from './messages/incoming/roomevents/Wi import { WiredSaveSuccessEvent } from './messages/incoming/roomevents/WiredSaveSuccessEvent'; import { WiredValidationErrorEvent } from './messages/incoming/roomevents/WiredValidationErrorEvent'; import { AuthenticatedEvent } from './messages/incoming/security/AuthenticatedEvent'; -import { UserPerksEvent } from './messages/incoming/user/access/UserPerksEvent'; import { UserPermissionsEvent } from './messages/incoming/user/access/UserPermissionsEvent'; import { RelationshipStatusInfoEvent } from './messages/incoming/user/data/RelationshipStatusInfoEvent'; import { UserCurrentBadgesEvent } from './messages/incoming/user/data/UserCurrentBadgesEvent'; @@ -699,6 +699,9 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.BOT_ERROR, BotErrorEvent); this._events.set(IncomingHeader.PET_LEVEL_NOTIFICATION, PetLevelNotificationEvent); + // PERK + this._events.set(IncomingHeader.USER_PERKS, PerkAllowancesMessageEvent); + // POLL this._events.set(IncomingHeader.QUESTION, QuestionEvent); this._events.set(IncomingHeader.POLL_CONTENTS, PollContentsEvent); @@ -827,7 +830,6 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.USER_IGNORED, IgnoredUsersEvent); this._events.set(IncomingHeader.USER_IGNORED_RESULT, IgnoreResultEvent); this._events.set(IncomingHeader.USER_RESPECT, RespectReceivedEvent); - this._events.set(IncomingHeader.USER_PERKS, UserPerksEvent); this._events.set(IncomingHeader.USER_PERMISSIONS, UserPermissionsEvent); this._events.set(IncomingHeader.USER_BADGES_CURRENT, UserCurrentBadgesEvent); this._events.set(IncomingHeader.USER_INFO, UserInfoEvent); diff --git a/src/nitro/communication/messages/incoming/user/access/UserPerksEvent.ts b/src/nitro/communication/messages/incoming/user/access/UserPerksEvent.ts deleted file mode 100644 index b51a14a3..00000000 --- a/src/nitro/communication/messages/incoming/user/access/UserPerksEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../../core/communication/messages/MessageEvent'; -import { UserPerksParser } from '../../../parser/user/access/UserPerksParser'; - -export class UserPerksEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, UserPerksParser); - } - - public getParser(): UserPerksParser - { - return this.parser as UserPerksParser; - } -} diff --git a/src/nitro/communication/messages/incoming/user/access/index.ts b/src/nitro/communication/messages/incoming/user/access/index.ts index 00006559..51901c37 100644 --- a/src/nitro/communication/messages/incoming/user/access/index.ts +++ b/src/nitro/communication/messages/incoming/user/access/index.ts @@ -1,2 +1 @@ -export * from './UserPerksEvent'; export * from './UserPermissionsEvent';