Move to Renderer V2

This commit is contained in:
duckietm
2024-04-03 09:27:56 +02:00
parent 110c3ad393
commit b3134ce50b
4080 changed files with 115593 additions and 66375 deletions
@@ -0,0 +1,28 @@
import { Texture } from 'pixi.js';
import { NitroEvent } from '../core';
export class BadgeImageReadyEvent extends NitroEvent
{
public static IMAGE_READY: string = 'BIME_BADGE_IMAGE_READY';
private _badgeId: string;
private _image: Texture;
constructor(badgeId: string, image: Texture)
{
super(BadgeImageReadyEvent.IMAGE_READY);
this._badgeId = badgeId;
this._image = image;
}
public get badgeId(): string
{
return this._badgeId;
}
public get image(): Texture
{
return this._image;
}
}
@@ -0,0 +1,27 @@
import { NitroEvent } from '../core';
export class MysteryBoxKeysUpdateEvent extends NitroEvent
{
public static MYSTERY_BOX_KEYS_UPDATE: string = 'mbke_update';
private _boxColor: string;
private _keyColor: string;
constructor(boxColor: string, keyColor: string)
{
super(MysteryBoxKeysUpdateEvent.MYSTERY_BOX_KEYS_UPDATE);
this._boxColor = boxColor;
this._keyColor = keyColor;
}
public get boxColor(): string
{
return this._boxColor;
}
public get keyColor(): string
{
return this._keyColor;
}
}
@@ -0,0 +1,11 @@
import { NitroEvent } from '../core';
export class PerksUpdatedEvent extends NitroEvent
{
public static PERKS_UPDATED: string = 'PUE_perks_updated';
constructor()
{
super(PerksUpdatedEvent.PERKS_UPDATED);
}
}
@@ -0,0 +1,69 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionChatEvent extends RoomSessionEvent
{
public static CHAT_EVENT: string = 'RSCE_CHAT_EVENT';
public static FLOOD_EVENT: string = 'RSCE_FLOOD_EVENT';
public static CHAT_TYPE_SPEAK: number = 0;
public static CHAT_TYPE_WHISPER: number = 1;
public static CHAT_TYPE_SHOUT: number = 2;
public static CHAT_TYPE_RESPECT: number = 3;
public static CHAT_TYPE_PETRESPECT: number = 4;
public static CHAT_TYPE_HAND_ITEM_RECEIVED: number = 5;
public static CHAT_TYPE_PETTREAT: number = 6;
public static CHAT_TYPE_PETREVIVE: number = 7;
public static CHAT_TYPE_PET_REBREED_FERTILIZE: number = 8;
public static CHAT_TYPE_PET_SPEED_FERTILIZE: number = 9;
public static CHAT_TYPE_MUTE_REMAINING: number = 10;
private _objectId: number;
private _message: string;
private _chatType: number;
private _links: string[];
private _extraParam: number;
private _style: number;
constructor(type: string, session: IRoomSession, objectId: number, message: string, chatType: number, style: number = 0, links: string[] = null, extraParam: number = -1)
{
super(type, session);
this._objectId = objectId;
this._message = message;
this._chatType = chatType;
this._links = links;
this._extraParam = extraParam;
this._style = style;
}
public get objectId(): number
{
return this._objectId;
}
public get message(): string
{
return this._message;
}
public get chatType(): number
{
return this._chatType;
}
public get links(): string[]
{
return this._links;
}
public get extraParam(): number
{
return this._extraParam;
}
public get style(): number
{
return this._style;
}
}
@@ -0,0 +1,49 @@
import { BreedingPetInfo, IRoomSession, RarityCategoryData } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionConfirmPetBreedingEvent extends RoomSessionEvent
{
public static CONFIRM_PET_BREEDING: string = 'RSPFUE_CONFIRM_PET_BREEDING';
private _nestId: number;
private _pet1: BreedingPetInfo;
private _pet2: BreedingPetInfo;
private _rarityCategories: RarityCategoryData[];
private _resultPetTypeId: number;
constructor(session: IRoomSession, nestId: number, pet1: BreedingPetInfo, pet2: BreedingPetInfo, rarityCategories: RarityCategoryData[], resultPetTypeId: number)
{
super(RoomSessionConfirmPetBreedingEvent.CONFIRM_PET_BREEDING, session);
this._nestId = nestId;
this._pet1 = pet1;
this._pet2 = pet2;
this._rarityCategories = rarityCategories;
this._resultPetTypeId = resultPetTypeId;
}
public get nestId(): number
{
return this._nestId;
}
public get pet1(): BreedingPetInfo
{
return this._pet1;
}
public get pet2(): BreedingPetInfo
{
return this._pet2;
}
public get rarityCategories(): RarityCategoryData[]
{
return this._rarityCategories;
}
public get resultPetTypeId(): number
{
return this._resultPetTypeId;
}
}
@@ -0,0 +1,28 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionConfirmPetBreedingResultEvent extends RoomSessionEvent
{
public static RSPFUE_CONFIRM_PET_BREEDING_RESULT: string = 'RSPFUE_CONFIRM_PET_BREEDING_RESULT';
private _breedingNestStuffId: number;
private _result: number;
constructor(session: IRoomSession, breedingNestStuffId: number, result: number)
{
super(RoomSessionConfirmPetBreedingResultEvent.RSPFUE_CONFIRM_PET_BREEDING_RESULT, session);
this._breedingNestStuffId = breedingNestStuffId;
this._result = result;
}
public get breedingNestStuffId(): number
{
return this._breedingNestStuffId;
}
public get result(): number
{
return this._result;
}
}
@@ -0,0 +1,28 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionDanceEvent extends RoomSessionEvent
{
public static RSDE_DANCE: string = 'RSDE_DANCE';
private _roomIndex: number;
private _danceId: number;
constructor(session: IRoomSession, roomIndex: number, danceId: number)
{
super(RoomSessionDanceEvent.RSDE_DANCE, session);
this._roomIndex = roomIndex;
this._danceId = danceId;
}
public get roomIndex(): number
{
return this._roomIndex;
}
public get danceId(): number
{
return this._danceId;
}
}
@@ -0,0 +1,45 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionDimmerPresetsEventPresetItem } from './RoomSessionDimmerPresetsEventPresetItem';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionDimmerPresetsEvent extends RoomSessionEvent
{
public static ROOM_DIMMER_PRESETS: string = 'RSDPE_PRESETS';
private _selectedPresetId: number = 0;
private _presets: RoomSessionDimmerPresetsEventPresetItem[];
constructor(type: string, session: IRoomSession)
{
super(type, session);
this._presets = [];
}
public storePreset(id: number, type: number, color: number, brightness: number): void
{
this._presets[(id - 1)] = new RoomSessionDimmerPresetsEventPresetItem(id, type, color, brightness);
}
public getPreset(id: number): RoomSessionDimmerPresetsEventPresetItem
{
if((id < 0) || (id >= this._presets.length)) return null;
return this._presets[id];
}
public get presetCount(): number
{
return this._presets.length;
}
public get selectedPresetId(): number
{
return this._selectedPresetId;
}
public set selectedPresetId(id: number)
{
this._selectedPresetId = id;
}
}
@@ -0,0 +1,35 @@
export class RoomSessionDimmerPresetsEventPresetItem
{
private _id: number;
private _type: number;
private _color: number;
private _brightness: number;
constructor(id: number, type: number, color: number, brightness: number)
{
this._id = id;
this._type = type;
this._color = color;
this._brightness = brightness;
}
public get id(): number
{
return this._id;
}
public get type(): number
{
return this._type;
}
public get color(): number
{
return this._color;
}
public get brightness(): number
{
return this._brightness;
}
}
@@ -0,0 +1,23 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionDoorbellEvent extends RoomSessionEvent
{
public static DOORBELL: string = 'RSDE_DOORBELL';
public static RSDE_REJECTED: string = 'RSDE_REJECTED';
public static RSDE_ACCEPTED: string = 'RSDE_ACCEPTED';
private _userName: string = '';
constructor(type: string, session: IRoomSession, userName: string)
{
super(type, session);
this._userName = userName;
}
public get userName(): string
{
return this._userName;
}
}
@@ -0,0 +1,32 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionErrorMessageEvent extends RoomSessionEvent
{
public static RSEME_KICKED: string = 'RSEME_KICKED';
public static RSEME_PETS_FORBIDDEN_IN_HOTEL: string = 'RSEME_PETS_FORBIDDEN_IN_HOTEL';
public static RSEME_PETS_FORBIDDEN_IN_FLAT: string = 'RSEME_PETS_FORBIDDEN_IN_FLAT';
public static RSEME_MAX_PETS: string = 'RSEME_MAX_PETS';
public static RSEME_MAX_NUMBER_OF_OWN_PETS: string = 'RSEME_MAX_NUMBER_OF_OWN_PETS';
public static RSEME_NO_FREE_TILES_FOR_PET: string = 'RSEME_NO_FREE_TILES_FOR_PET';
public static RSEME_SELECTED_TILE_NOT_FREE_FOR_PET: string = 'RSEME_SELECTED_TILE_NOT_FREE_FOR_PET';
public static RSEME_BOTS_FORBIDDEN_IN_HOTEL: string = 'RSEME_BOTS_FORBIDDEN_IN_HOTEL';
public static RSEME_BOTS_FORBIDDEN_IN_FLAT: string = 'RSEME_BOTS_FORBIDDEN_IN_FLAT';
public static RSEME_BOT_LIMIT_REACHED: string = 'RSEME_BOT_LIMIT_REACHED';
public static RSEME_SELECTED_TILE_NOT_FREE_FOR_BOT: string = 'RSEME_SELECTED_TILE_NOT_FREE_FOR_BOT';
public static RSEME_BOT_NAME_NOT_ACCEPTED: string = 'RSEME_BOT_NAME_NOT_ACCEPTED';
private _message: string;
constructor(k: string, _arg_2: IRoomSession, _arg_3: string = null)
{
super(k, _arg_2);
this._message = _arg_3;
}
public get message(): string
{
return this._message;
}
}
@@ -0,0 +1,31 @@
import { IRoomSession } from '@nitrots/api';
import { NitroEvent } from '../core';
export class RoomSessionEvent extends NitroEvent
{
public static CREATED: string = 'RSE_CREATED';
public static STARTED: string = 'RSE_STARTED';
public static ENDED: string = 'RSE_ENDED';
public static ROOM_DATA: string = 'RSE_ROOM_DATA';
private _session: IRoomSession;
private _openLandingView: boolean;
constructor(type: string, session: IRoomSession, openLandingView: boolean = true)
{
super(type);
this._session = session;
this._openLandingView = openLandingView;
}
public get session(): IRoomSession
{
return this._session;
}
public get openLandingView(): boolean
{
return this._openLandingView;
}
}
@@ -0,0 +1,42 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionFavoriteGroupUpdateEvent extends RoomSessionEvent
{
public static FAVOURITE_GROUP_UPDATE: string = 'RSFGUE_FAVOURITE_GROUP_UPDATE';
private _roomIndex: number;
private _habboGroupId: number;
private _habboGroupName: string;
private _status: number;
constructor(session: IRoomSession, roomIndex: number, groupId: number, status: number, groupName: string)
{
super(RoomSessionFavoriteGroupUpdateEvent.FAVOURITE_GROUP_UPDATE, session);
this._roomIndex = roomIndex;
this._habboGroupId = groupId;
this._habboGroupName = groupName;
this._status = status;
}
public get roomIndex(): number
{
return this._roomIndex;
}
public get habboGroupId(): number
{
return this._habboGroupId;
}
public get habboGroupName(): string
{
return this._habboGroupName;
}
public get status(): number
{
return this._status;
}
}
@@ -0,0 +1,35 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionFriendRequestEvent extends RoomSessionEvent
{
public static RSFRE_FRIEND_REQUEST: string = 'RSFRE_FRIEND_REQUEST';
private _requestId: number = 0;
private _userId: number = 0;
private _userName: string;
constructor(session: IRoomSession, requestId: number, userId: number, userName: string)
{
super(RoomSessionFriendRequestEvent.RSFRE_FRIEND_REQUEST, session);
this._requestId = requestId;
this._userId = userId;
this._userName = userName;
}
public get requestId(): number
{
return this._requestId;
}
public get userId(): number
{
return this._userId;
}
public get userName(): string
{
return this._userName;
}
}
@@ -0,0 +1,28 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionNestBreedingSuccessEvent extends RoomSessionEvent
{
public static NEST_BREEDING_SUCCESS: string = 'RSPFUE_NEST_BREEDING_SUCCESS';
private _rarityCategory: number;
private _petId: number;
constructor(session: IRoomSession, petId: number, rarityCategory: number)
{
super(RoomSessionNestBreedingSuccessEvent.NEST_BREEDING_SUCCESS, session);
this._petId = petId;
this._rarityCategory = rarityCategory;
}
public get rarityCategory(): number
{
return this._rarityCategory;
}
public get petId(): number
{
return this._petId;
}
}
@@ -0,0 +1,35 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionPetBreedingEvent extends RoomSessionEvent
{
public static PET_BREEDING: string = 'RSPFUE_PET_BREEDING';
private _state: number;
private _ownPetId: number;
private _otherPetId: number;
constructor(session: IRoomSession, state: number, ownPetId: number, otherPetId: number)
{
super(RoomSessionPetBreedingEvent.PET_BREEDING, session);
this._state = state;
this._ownPetId = ownPetId;
this._otherPetId = otherPetId;
}
public get state(): number
{
return this._state;
}
public get ownPetId(): number
{
return this._ownPetId;
}
public get otherPetId(): number
{
return this._otherPetId;
}
}
@@ -0,0 +1,28 @@
import { IPetBreedingResultData, IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionPetBreedingResultEvent extends RoomSessionEvent
{
public static PET_BREEDING_RESULT: string = 'RSPFUE_PET_BREEDING_RESULT';
private _resultData: IPetBreedingResultData;
private _otherResultData: IPetBreedingResultData;
constructor(session: IRoomSession, resultData: IPetBreedingResultData, otherResultData: IPetBreedingResultData)
{
super(RoomSessionPetBreedingResultEvent.PET_BREEDING_RESULT, session);
this._resultData = resultData;
this._otherResultData = otherResultData;
}
public get resultData(): IPetBreedingResultData
{
return this._resultData;
}
public get otherResultData(): IPetBreedingResultData
{
return this._otherResultData;
}
}
@@ -0,0 +1,35 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionPetCommandsUpdateEvent extends RoomSessionEvent
{
public static PET_COMMANDS: string = 'RSPIUE_ENABLED_PET_COMMANDS';
private _petId: number;
private _allCommandIds: number[];
private _enabledCommandIds: number[];
constructor(k: IRoomSession, id: number, commands: number[], enabledCommands: number[])
{
super(RoomSessionPetCommandsUpdateEvent.PET_COMMANDS, k);
this._petId = id;
this._allCommandIds = commands;
this._enabledCommandIds = enabledCommands;
}
public get id(): number
{
return this._petId;
}
public get commands(): number[]
{
return this._allCommandIds;
}
public get enabledCommands(): number[]
{
return this._enabledCommandIds;
}
}
@@ -0,0 +1,28 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionPetFigureUpdateEvent extends RoomSessionEvent
{
public static PET_FIGURE_UPDATE: string = 'RSPFUE_PET_FIGURE_UPDATE';
private _petId: number;
private _figure: string;
constructor(roomSession: IRoomSession, id: number, figure: string)
{
super(RoomSessionPetFigureUpdateEvent.PET_FIGURE_UPDATE, roomSession);
this._petId = id;
this._figure = figure;
}
public get id(): number
{
return this._petId;
}
public get figure(): string
{
return this._figure;
}
}
@@ -0,0 +1,21 @@
import { IRoomPetData, IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionPetInfoUpdateEvent extends RoomSessionEvent
{
public static PET_INFO: string = 'RSPIUE_PET_INFO';
private _petInfo: IRoomPetData;
constructor(k: IRoomSession, _arg_2: IRoomPetData)
{
super(RoomSessionPetInfoUpdateEvent.PET_INFO, k);
this._petInfo = _arg_2;
}
public get petInfo(): IRoomPetData
{
return this._petInfo;
}
}
@@ -0,0 +1,28 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionPetLevelUpdateEvent extends RoomSessionEvent
{
public static PET_LEVEL_UPDATE: string = 'RSPLUE_PET_LEVEL_UPDATE';
private _petId: number;
private _level: number;
constructor(session: IRoomSession, petId: number, level: number)
{
super(RoomSessionPetLevelUpdateEvent.PET_LEVEL_UPDATE, session);
this._petId = petId;
this._level = level;
}
public get petId(): number
{
return this._petId;
}
public get level(): number
{
return this._level;
}
}
@@ -0,0 +1,43 @@
import { IRoomSession, PetFigureData } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionPetPackageEvent extends RoomSessionEvent
{
public static RSOPPE_OPEN_PET_PACKAGE_REQUESTED: string = 'RSOPPE_OPEN_PET_PACKAGE_REQUESTED';
public static RSOPPE_OPEN_PET_PACKAGE_RESULT: string = 'RSOPPE_OPEN_PET_PACKAGE_RESULT';
private _objectId: number = -1;
private _figureData: PetFigureData;
private _nameValidationStatus: number = 0;
private _nameValidationInfo: string = null;
constructor(petPackageName: string, session: IRoomSession, objectId: number, figureData: PetFigureData, nameValidationStatus: number, nameValidationInfo: string)
{
super(petPackageName, session);
this._objectId = objectId;
this._figureData = figureData;
this._nameValidationStatus = nameValidationStatus;
this._nameValidationInfo = nameValidationInfo;
}
public get objectId(): number
{
return this._objectId;
}
public get figureData(): PetFigureData
{
return this._figureData;
}
public get nameValidationStatus(): number
{
return this._nameValidationStatus;
}
public get nameValidationInfo(): string
{
return this._nameValidationInfo;
}
}
@@ -0,0 +1,49 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionPetStatusUpdateEvent extends RoomSessionEvent
{
public static PET_STATUS_UPDATE: string = 'RSPFUE_PET_STATUS_UPDATE';
private _petId: number;
private _canBreed: boolean;
private _canHarvest: boolean;
private _canRevive: boolean;
private _hasBreedingPermission: boolean;
constructor(roomSession: IRoomSession, petId: number, canBreed: boolean, canHarvest: boolean, canRevive: boolean, hasBreedingPermission: boolean)
{
super(RoomSessionPetStatusUpdateEvent.PET_STATUS_UPDATE, roomSession);
this._petId = petId;
this._canBreed = canBreed;
this._canHarvest = canHarvest;
this._canRevive = canRevive;
this._hasBreedingPermission = hasBreedingPermission;
}
public get petId(): number
{
return this._petId;
}
public get canBreed(): boolean
{
return this._canBreed;
}
public get canHarvest(): boolean
{
return this._canHarvest;
}
public get canRevive(): boolean
{
return this._canRevive;
}
public get hasBreedingPermission(): boolean
{
return this._hasBreedingPermission;
}
}
@@ -0,0 +1,100 @@
import { IPollQuestion, IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionPollEvent extends RoomSessionEvent
{
public static OFFER: string = 'RSPE_POLL_OFFER';
public static ERROR: string = 'RSPE_POLL_ERROR';
public static CONTENT: string = 'RSPE_POLL_CONTENT';
private _id: number = -1;
private _headline: string;
private _summary: string;
private _numQuestions: number = 0;
private _startMessage: string = '';
private _endMessage: string = '';
private _questionArray: IPollQuestion[] = null;
private _npsPoll: boolean = false;
constructor(k: string, _arg_2: IRoomSession, _arg_3: number)
{
super(k, _arg_2);
this._id = _arg_3;
}
public get id(): number
{
return this._id;
}
public get headline(): string
{
return this._headline;
}
public set headline(k: string)
{
this._headline = k;
}
public get summary(): string
{
return this._summary;
}
public set summary(k: string)
{
this._summary = k;
}
public get numQuestions(): number
{
return this._numQuestions;
}
public set numQuestions(k: number)
{
this._numQuestions = k;
}
public get startMessage(): string
{
return this._startMessage;
}
public set startMessage(k: string)
{
this._startMessage = k;
}
public get endMessage(): string
{
return this._endMessage;
}
public set endMessage(k: string)
{
this._endMessage = k;
}
public get questionArray(): IPollQuestion[]
{
return this._questionArray;
}
public set questionArray(k: IPollQuestion[])
{
this._questionArray = k;
}
public get npsPoll(): boolean
{
return this._npsPoll;
}
public set npsPoll(k: boolean)
{
this._npsPoll = k;
}
}
@@ -0,0 +1,64 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionPresentEvent extends RoomSessionEvent
{
public static RSPE_PRESENT_OPENED: string = 'RSPE_PRESENT_OPENED';
private _classId: number = 0;
private _itemType: string = '';
private _productCode: string;
private _placedItemId: number = 0;
private _placedItemType: string = '';
private _placedInRoom: boolean;
private _petFigureString: string;
constructor(k: string, _arg_2: IRoomSession, classId: number, itemType: string, productCode: string, placedItemId: number, placedItemType: string, placedInRoom: boolean, petFigureString: string)
{
super(k, _arg_2);
this._classId = classId;
this._itemType = itemType;
this._productCode = productCode;
this._placedItemId = placedItemId;
this._placedItemType = placedItemType;
this._placedInRoom = placedInRoom;
this._petFigureString = petFigureString;
}
public get classId(): number
{
return this._classId;
}
public get itemType(): string
{
return this._itemType;
}
public get productCode(): string
{
return this._productCode;
}
public get placedItemId(): number
{
return this._placedItemId;
}
public get placedInRoom(): boolean
{
return this._placedInRoom;
}
public get placedItemType(): string
{
return this._placedItemType;
}
public get petFigureString(): string
{
return this._petFigureString;
}
}
@@ -0,0 +1,12 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionPropertyUpdateEvent extends RoomSessionEvent
{
public static RSDUE_ALLOW_PETS: string = 'RSDUE_ALLOW_PETS';
constructor(k: string, _arg_2: IRoomSession)
{
super(k, _arg_2);
}
}
@@ -0,0 +1,57 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionQueueEvent extends RoomSessionEvent
{
public static QUEUE_STATUS: string = 'RSQE_QUEUE_STATUS';
public static QUEUE_TYPE_CLUB: string = 'c';
public static QUEUE_TYPE_NORMAL: string = 'd';
public static QUEUE_TARGET_VISITOR: number = 2;
public static QUEUE_TARGET_SPECTATOR: number = 1;
private _name: string;
private _target: number;
private _queues: Map<string, number>;
private _isActive: boolean;
private _activeQueue: string;
constructor(k: IRoomSession, _arg_2: string, _arg_3: number, _arg_4: boolean = false)
{
super(RoomSessionQueueEvent.QUEUE_STATUS, k);
this._name = _arg_2;
this._target = _arg_3;
this._queues = new Map();
this._isActive = _arg_4;
}
public get isActive(): boolean
{
return this._isActive;
}
public get queueSetName(): string
{
return this._name;
}
public get queueSetTarget(): number
{
return this._target;
}
public get queueTypes(): string[]
{
return Array.from(this._queues.keys());
}
public getQueueSize(k: string): number
{
return this._queues.get(k);
}
public addQueue(k: string, _arg_2: number): void
{
this._queues.set(k, _arg_2);
}
}
@@ -0,0 +1,12 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionSpectatorModeEvent extends RoomSessionEvent
{
public static SPECTATOR_MODE: string = 'RSSME_SPECTATOR_MODE';
constructor(type: string, session: IRoomSession)
{
super(type, session);
}
}
@@ -0,0 +1,29 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionUserBadgesEvent extends RoomSessionEvent
{
public static RSUBE_BADGES: string = 'RSUBE_BADGES';
private _userId: number = 0;
private _badges: string[];
constructor(k: IRoomSession, _arg_2: number, _arg_3: string[])
{
super(RoomSessionUserBadgesEvent.RSUBE_BADGES, k);
this._badges = [];
this._userId = _arg_2;
this._badges = _arg_3;
}
public get userId(): number
{
return this._userId;
}
public get badges(): string[]
{
return this._badges;
}
}
@@ -0,0 +1,21 @@
import { IRoomSession, IRoomUserData } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionUserDataUpdateEvent extends RoomSessionEvent
{
public static USER_DATA_UPDATED: string = 'RMUDUE_USER_DATA_UPDATED';
private _addedUsers: IRoomUserData[];
constructor(session: IRoomSession, addedUsers: IRoomUserData[])
{
super(RoomSessionUserDataUpdateEvent.USER_DATA_UPDATED, session);
this._addedUsers = addedUsers;
}
public get addedUsers(): IRoomUserData[]
{
return this._addedUsers;
}
}
@@ -0,0 +1,49 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionUserFigureUpdateEvent extends RoomSessionEvent
{
public static USER_FIGURE: string = 'RSUBE_FIGURE';
private _roomIndex: number = 0;
private _figure: string = '';
private _gender: string = '';
private _customInfo: string = '';
private _achievementScore: number;
constructor(session: IRoomSession, roomIndex: number, figure: string, gender: string, customInfo: string, achievementScore: number)
{
super(RoomSessionUserFigureUpdateEvent.USER_FIGURE, session);
this._roomIndex = roomIndex;
this._figure = figure;
this._gender = gender;
this._customInfo = customInfo;
this._achievementScore = achievementScore;
}
public get roomIndex(): number
{
return this._roomIndex;
}
public get figure(): string
{
return this._figure;
}
public get gender(): string
{
return this._gender;
}
public get customInfo(): string
{
return this._customInfo;
}
public get activityPoints(): number
{
return this._achievementScore;
}
}
@@ -0,0 +1,27 @@
import { NitroEvent } from '../core';
export class RoomSessionUserTagsEvent extends NitroEvent
{
public static UTRE_USER_TAGS_RECEIVED: string = 'UTRE_USER_TAGS_RECEIVED';
private _userId: number;
private _tags: string[];
constructor(k: number, _arg_2: string[])
{
super(RoomSessionUserTagsEvent.UTRE_USER_TAGS_RECEIVED);
this._userId = k;
this._tags = _arg_2;
}
public get userId(): number
{
return this._userId;
}
public get tags(): string[]
{
return this._tags;
}
}
@@ -0,0 +1,50 @@
import { IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionVoteEvent extends RoomSessionEvent
{
public static VOTE_QUESTION: string = 'RSPE_VOTE_QUESTION';
public static VOTE_RESULT: string = 'RSPE_VOTE_RESULT';
private _question: string = '';
private _choices: string[];
private _SafeStr_7651: string[];
private _SafeStr_7654: number = 0;
constructor(_arg_1: string, _arg_2: IRoomSession, _arg_3: string, _arg_4: string[], _arg_5: string[] = null, _arg_6: number = 0)
{
super(_arg_1, _arg_2);
this._choices = [];
this._SafeStr_7651 = [];
this._question = _arg_3;
this._choices = _arg_4;
this._SafeStr_7651 = _arg_5;
if(this._SafeStr_7651 == null)
{
this._SafeStr_7651 = [];
}
this._SafeStr_7654 = _arg_6;
}
public get question(): string
{
return this._question;
}
public get choices(): string[]
{
return this._choices.slice();
}
public get _SafeStr_4173(): string[]
{
return this._SafeStr_7651.slice();
}
public get _SafeStr_4174(): number
{
return this._SafeStr_7654;
}
}
@@ -0,0 +1,111 @@
import { IQuestion, IRoomSession } from '@nitrots/api';
import { RoomSessionEvent } from './RoomSessionEvent';
export class RoomSessionWordQuizEvent extends RoomSessionEvent
{
public static QUESTION: string = 'RWPUW_NEW_QUESTION';
public static FINISHED: string = 'RWPUW_QUESION_FINSIHED';
public static ANSWERED: string = 'RWPUW_QUESTION_ANSWERED';
private _id: number = -1;
private _pollType: string = null;
private _pollId: number = -1;
private _questionId: number = -1;
private _duration: number = -1;
private _question: IQuestion = null;
private _userId: number = -1;
private _value: string;
private _answerCounts: Map<string, number>;
constructor(k: string, _arg_2: IRoomSession, _arg_3: number = -1)
{
super(k, _arg_2);
this._id = _arg_3;
}
public get id(): number
{
return this._id;
}
public get pollType(): string
{
return this._pollType;
}
public set pollType(pollType: string)
{
this._pollType = pollType;
}
public get pollId(): number
{
return this._pollId;
}
public set pollId(k: number)
{
this._pollId = k;
}
public get questionId(): number
{
return this._questionId;
}
public set questionId(k: number)
{
this._questionId = k;
}
public get duration(): number
{
return this._duration;
}
public set duration(k: number)
{
this._duration = k;
}
public get question(): IQuestion
{
return this._question;
}
public set question(k: IQuestion)
{
this._question = k;
}
public get userId(): number
{
return this._userId;
}
public set userId(k: number)
{
this._userId = k;
}
public get value(): string
{
return this._value;
}
public set value(value: string)
{
this._value = value;
}
public get answerCounts(): Map<string, number>
{
return this._answerCounts;
}
public set answerCounts(k: Map<string, number>)
{
this._answerCounts = k;
}
}
@@ -0,0 +1,20 @@
import { NitroEvent } from '../core';
export class SessionDataPreferencesEvent extends NitroEvent
{
public static UPDATED: string = 'APUE_UPDATED';
private _uiFlags: number;
constructor(k: number)
{
super(SessionDataPreferencesEvent.UPDATED);
this._uiFlags = k;
}
public get uiFlags(): number
{
return this._uiFlags;
}
}
@@ -0,0 +1,20 @@
import { NitroEvent } from '../core';
export class UserNameUpdateEvent extends NitroEvent
{
public static UNUE_NAME_UPDATED: string = 'unue_name_updated';
private _name: string;
constructor(name: string)
{
super(UserNameUpdateEvent.UNUE_NAME_UPDATED);
this._name = name;
}
public get name(): string
{
return this._name;
}
}
+36
View File
@@ -0,0 +1,36 @@
export * from './BadgeImageReadyEvent';
export * from './MysteryBoxKeysUpdateEvent';
export * from './PerksUpdatedEvent';
export * from './RoomSessionChatEvent';
export * from './RoomSessionConfirmPetBreedingEvent';
export * from './RoomSessionConfirmPetBreedingResultEvent';
export * from './RoomSessionDanceEvent';
export * from './RoomSessionDimmerPresetsEvent';
export * from './RoomSessionDimmerPresetsEventPresetItem';
export * from './RoomSessionDoorbellEvent';
export * from './RoomSessionErrorMessageEvent';
export * from './RoomSessionEvent';
export * from './RoomSessionFavoriteGroupUpdateEvent';
export * from './RoomSessionFriendRequestEvent';
export * from './RoomSessionNestBreedingSuccessEvent';
export * from './RoomSessionPetBreedingEvent';
export * from './RoomSessionPetBreedingResultEvent';
export * from './RoomSessionPetCommandsUpdateEvent';
export * from './RoomSessionPetFigureUpdateEvent';
export * from './RoomSessionPetInfoUpdateEvent';
export * from './RoomSessionPetLevelUpdateEvent';
export * from './RoomSessionPetPackageEvent';
export * from './RoomSessionPetStatusUpdateEvent';
export * from './RoomSessionPollEvent';
export * from './RoomSessionPresentEvent';
export * from './RoomSessionPropertyUpdateEvent';
export * from './RoomSessionQueueEvent';
export * from './RoomSessionSpectatorModeEvent';
export * from './RoomSessionUserBadgesEvent';
export * from './RoomSessionUserDataUpdateEvent';
export * from './RoomSessionUserFigureUpdateEvent';
export * from './RoomSessionUserTagsEvent';
export * from './RoomSessionVoteEvent';
export * from './RoomSessionWordQuizEvent';
export * from './SessionDataPreferencesEvent';
export * from './UserNameUpdateEvent';