mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 23:50:52 +01:00
Merge branch 'oobjectt-pet-scratch-failed'
This commit is contained in:
commit
a848d21649
File diff suppressed because one or more lines are too long
@ -121,6 +121,7 @@ export class IncomingHeader
|
||||
public static PET_INFO = 2901;
|
||||
public static PET_TRAINING_PANEL = 1164;
|
||||
public static PET_LEVEL_UPDATE = 2824;
|
||||
public static PET_SCRATCH_FAILED = 1130;
|
||||
public static RECYCLER_PRIZES = 3164;
|
||||
public static ROOM_BAN_LIST = 1869;
|
||||
public static ROOM_BAN_REMOVE = 3429;
|
||||
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../api';
|
||||
import { MessageEvent } from '../../../../../events';
|
||||
import { PetScratchFailedMessageParser } from './../../parser';
|
||||
|
||||
export class PetScratchFailedMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, PetScratchFailedMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): PetScratchFailedMessageParser
|
||||
{
|
||||
return this.parser as PetScratchFailedMessageParser;
|
||||
}
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
export * from './PetLevelUpdateMessageEvent';
|
||||
export * from './PetScratchFailedMessageEvent';
|
||||
export * from './PetTrainingPanelMessageEvent';
|
||||
|
@ -0,0 +1,33 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||
|
||||
export class PetScratchFailedMessageParser implements IMessageParser
|
||||
{
|
||||
private _currentAge: number;
|
||||
private _requiredAge: number;
|
||||
|
||||
flush(): boolean
|
||||
{
|
||||
this._currentAge = -1;
|
||||
this._requiredAge = -1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
this._currentAge = wrapper.readInt();
|
||||
this._requiredAge = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get currentAge(): number
|
||||
{
|
||||
return this._currentAge;
|
||||
}
|
||||
|
||||
public get requiredAge(): number
|
||||
{
|
||||
return this._requiredAge;
|
||||
}
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
export * from './PetLevelUpdateMessageParser';
|
||||
export * from './PetScratchFailedMessageParser';
|
||||
export * from './PetTrainingMessageParser';
|
||||
|
@ -2,7 +2,7 @@ import { Resource, Texture } from '@pixi/core';
|
||||
import { GetAssetManager, IFurnitureData, IFurnitureDataListener, IGroupInformationManager, IMessageComposer, INitroCommunicationManager, INitroEvent, IProductData, IProductDataListener, ISessionDataManager, NitroConfiguration, NoobnessLevelEnum, SecurityLevel } from '../../api';
|
||||
import { NitroManager } from '../../core';
|
||||
import { MysteryBoxKeysUpdateEvent, NitroSettingsEvent, SessionDataPreferencesEvent, UserNameUpdateEvent } from '../../events';
|
||||
import { AvailabilityStatusMessageEvent, ChangeUserNameResultMessageEvent, FigureUpdateEvent, GetUserTagsComposer, InClientLinkEvent, MysteryBoxKeysEvent, NoobnessLevelMessageEvent, PetRespectComposer, RoomReadyMessageEvent, RoomUnitChatComposer, UserInfoEvent, UserNameChangeMessageEvent, UserPermissionsEvent, UserRespectComposer, UserTagsMessageEvent } from '../communication';
|
||||
import { AvailabilityStatusMessageEvent, ChangeUserNameResultMessageEvent, FigureUpdateEvent, GetUserTagsComposer, InClientLinkEvent, MysteryBoxKeysEvent, NoobnessLevelMessageEvent, PetRespectComposer, PetScratchFailedMessageEvent, RoomReadyMessageEvent, RoomUnitChatComposer, UserInfoEvent, UserNameChangeMessageEvent, UserPermissionsEvent, UserRespectComposer, UserTagsMessageEvent } from '../communication';
|
||||
import { Nitro } from '../Nitro';
|
||||
import { HabboWebTools } from '../utils/HabboWebTools';
|
||||
import { BadgeImageManager } from './badge/BadgeImageManager';
|
||||
@ -108,6 +108,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
||||
this._communication.registerMessageEvent(new UserInfoEvent(this.onUserInfoEvent.bind(this)));
|
||||
this._communication.registerMessageEvent(new UserPermissionsEvent(this.onUserPermissionsEvent.bind(this)));
|
||||
this._communication.registerMessageEvent(new AvailabilityStatusMessageEvent(this.onAvailabilityStatusMessageEvent.bind(this)));
|
||||
this._communication.registerMessageEvent(new PetScratchFailedMessageEvent(this.onPetRespectFailed.bind(this)));
|
||||
this._communication.registerMessageEvent(new ChangeUserNameResultMessageEvent(this.onChangeNameUpdateEvent.bind(this)));
|
||||
this._communication.registerMessageEvent(new UserNameChangeMessageEvent(this.onUserNameChangeMessageEvent.bind(this)));
|
||||
this._communication.registerMessageEvent(new UserTagsMessageEvent(this.onUserTags.bind(this)));
|
||||
@ -285,6 +286,13 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
||||
this._isAuthenticHabbo = parser.isAuthenticUser;
|
||||
}
|
||||
|
||||
private onPetRespectFailed(event: PetScratchFailedMessageEvent): void
|
||||
{
|
||||
if(!event || !event.connection) return;
|
||||
|
||||
this._respectsPetLeft++;
|
||||
}
|
||||
|
||||
private onChangeNameUpdateEvent(event: ChangeUserNameResultMessageEvent): void
|
||||
{
|
||||
if(!event || !event.connection) return;
|
||||
|
Loading…
Reference in New Issue
Block a user