mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-31 11:12:35 +01:00
renamed ChangeUserNameResultMessageEvent
This commit is contained in:
parent
d5843fc8bd
commit
3184d9a117
@ -1,6 +1,6 @@
|
|||||||
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
|
import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration';
|
||||||
import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent';
|
import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent';
|
||||||
import { ChangeNameUpdateEvent } from './messages/incoming/avatar/ChangeNameUpdateEvent';
|
import { ChangeUserNameResultMessageEvent } from 'nitro-renderer/src/nitro/communication/messages/incoming/avatar/ChangeUserNameResultMessageEvent';
|
||||||
import { CatalogClubEvent } from './messages/incoming/catalog/CatalogClubEvent';
|
import { CatalogClubEvent } from './messages/incoming/catalog/CatalogClubEvent';
|
||||||
import { CatalogClubGiftsEvent } from './messages/incoming/catalog/CatalogClubGiftsEvent';
|
import { CatalogClubGiftsEvent } from './messages/incoming/catalog/CatalogClubGiftsEvent';
|
||||||
import { CatalogGiftConfigurationEvent } from './messages/incoming/catalog/CatalogGiftConfigurationEvent';
|
import { CatalogGiftConfigurationEvent } from './messages/incoming/catalog/CatalogGiftConfigurationEvent';
|
||||||
@ -423,7 +423,7 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.GENERIC_ERROR, GenericErrorEvent);
|
this._events.set(IncomingHeader.GENERIC_ERROR, GenericErrorEvent);
|
||||||
|
|
||||||
// AVATAR
|
// AVATAR
|
||||||
this._events.set(IncomingHeader.USER_CHANGE_NAME, ChangeNameUpdateEvent);
|
this._events.set(IncomingHeader.USER_CHANGE_NAME, ChangeUserNameResultMessageEvent);
|
||||||
|
|
||||||
// CATALOG
|
// CATALOG
|
||||||
this._events.set(IncomingHeader.CATALOG_CLUB, CatalogClubEvent);
|
this._events.set(IncomingHeader.CATALOG_CLUB, CatalogClubEvent);
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
|
||||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
|
||||||
import { ChangeNameUpdateParser } from '../../parser/avatar/ChangeNameUpdateParser';
|
|
||||||
|
|
||||||
export class ChangeNameUpdateEvent extends MessageEvent implements IMessageEvent
|
|
||||||
{
|
|
||||||
public static _Str_5797: number = 0;
|
|
||||||
public static _Str_7005: number = 1;
|
|
||||||
public static _Str_7389: number = 2;
|
|
||||||
public static _Str_7137: number = 3;
|
|
||||||
public static _Str_7836: number = 4;
|
|
||||||
public static _Str_7721: number = 5;
|
|
||||||
public static _Str_8620: number = 6;
|
|
||||||
public static _Str_9429: number = 7;
|
|
||||||
|
|
||||||
constructor(callBack: Function)
|
|
||||||
{
|
|
||||||
super(callBack, ChangeNameUpdateParser);
|
|
||||||
}
|
|
||||||
|
|
||||||
public getParser(): ChangeNameUpdateParser
|
|
||||||
{
|
|
||||||
return this.parser as ChangeNameUpdateParser;
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,25 @@
|
|||||||
|
import { IMessageEvent } from 'nitro-renderer/src/core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from 'nitro-renderer/src/core/communication/messages/MessageEvent';
|
||||||
|
import { ChangeNameUpdateParser } from 'nitro-renderer/src/nitro/communication/messages/parser/avatar/ChangeNameUpdateParser';
|
||||||
|
|
||||||
|
export class ChangeUserNameResultMessageEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
public static NAME_OK: number = 0;
|
||||||
|
public static ERROR_NAME_REQUIRED: number = 1;
|
||||||
|
public static ERROR_NAME_TOO_SHORT: number = 2;
|
||||||
|
public static ERROR_NAME_TOO_LONG: number = 3;
|
||||||
|
public static ERROR_NAME_NOT_VALID: number = 4;
|
||||||
|
public static ERROR_NAME_IN_USE: number = 5;
|
||||||
|
public static ERROR_NAME_CHANGE_NOT_ALLOWED: number = 6;
|
||||||
|
public static ERROR_MERGE_HOTEL_DOWN: number = 7;
|
||||||
|
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, ChangeNameUpdateParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): ChangeNameUpdateParser
|
||||||
|
{
|
||||||
|
return this.parser as ChangeNameUpdateParser;
|
||||||
|
}
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
export * from './ChangeNameUpdateEvent';
|
export * from './ChangeUserNameResultMessageEvent';
|
||||||
|
@ -4,7 +4,7 @@ import { IMessageComposer } from '../../core/communication/messages/IMessageComp
|
|||||||
import { NitroEvent } from '../../core/events/NitroEvent';
|
import { NitroEvent } from '../../core/events/NitroEvent';
|
||||||
import { INitroCommunicationManager } from '../communication/INitroCommunicationManager';
|
import { INitroCommunicationManager } from '../communication/INitroCommunicationManager';
|
||||||
import { AvailabilityStatusMessageEvent } from '../communication/messages/incoming/availability/AvailabilityStatusMessageEvent';
|
import { AvailabilityStatusMessageEvent } from '../communication/messages/incoming/availability/AvailabilityStatusMessageEvent';
|
||||||
import { ChangeNameUpdateEvent } from '../communication/messages/incoming/avatar/ChangeNameUpdateEvent';
|
import { ChangeUserNameResultMessageEvent } from '../communication/messages/incoming/avatar/ChangeUserNameResultMessageEvent';
|
||||||
import { RoomModelNameEvent } from '../communication/messages/incoming/room/mapping/RoomModelNameEvent';
|
import { RoomModelNameEvent } from '../communication/messages/incoming/room/mapping/RoomModelNameEvent';
|
||||||
import { UserPermissionsEvent } from '../communication/messages/incoming/user/access/UserPermissionsEvent';
|
import { UserPermissionsEvent } from '../communication/messages/incoming/user/access/UserPermissionsEvent';
|
||||||
import { UserFigureEvent } from '../communication/messages/incoming/user/data/UserFigureEvent';
|
import { UserFigureEvent } from '../communication/messages/incoming/user/data/UserFigureEvent';
|
||||||
@ -123,7 +123,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
this._communication.registerMessageEvent(new UserInfoEvent(this.onUserInfoEvent.bind(this)));
|
this._communication.registerMessageEvent(new UserInfoEvent(this.onUserInfoEvent.bind(this)));
|
||||||
this._communication.registerMessageEvent(new UserPermissionsEvent(this.onUserPermissionsEvent.bind(this)));
|
this._communication.registerMessageEvent(new UserPermissionsEvent(this.onUserPermissionsEvent.bind(this)));
|
||||||
this._communication.registerMessageEvent(new AvailabilityStatusMessageEvent(this.onAvailabilityStatusMessageEvent.bind(this)));
|
this._communication.registerMessageEvent(new AvailabilityStatusMessageEvent(this.onAvailabilityStatusMessageEvent.bind(this)));
|
||||||
this._communication.registerMessageEvent(new ChangeNameUpdateEvent(this.onChangeNameUpdateEvent.bind(this)));
|
this._communication.registerMessageEvent(new ChangeUserNameResultMessageEvent(this.onChangeNameUpdateEvent.bind(this)));
|
||||||
this._communication.registerMessageEvent(new UserNameChangeMessageEvent(this.onUserNameChangeMessageEvent.bind(this)));
|
this._communication.registerMessageEvent(new UserNameChangeMessageEvent(this.onUserNameChangeMessageEvent.bind(this)));
|
||||||
this._communication.registerMessageEvent(new RoomModelNameEvent(this.onRoomModelNameEvent.bind(this)));
|
this._communication.registerMessageEvent(new RoomModelNameEvent(this.onRoomModelNameEvent.bind(this)));
|
||||||
this._communication.registerMessageEvent(new InClientLinkEvent(this.onInClientLinkEvent.bind(this)));
|
this._communication.registerMessageEvent(new InClientLinkEvent(this.onInClientLinkEvent.bind(this)));
|
||||||
@ -291,7 +291,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
this._isAuthenticHabbo = parser.isAuthenticUser;
|
this._isAuthenticHabbo = parser.isAuthenticUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
private onChangeNameUpdateEvent(event: ChangeNameUpdateEvent): void
|
private onChangeNameUpdateEvent(event: ChangeUserNameResultMessageEvent): void
|
||||||
{
|
{
|
||||||
if(!event || !event.connection) return;
|
if(!event || !event.connection) return;
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ export class SessionDataManager extends NitroManager implements ISessionDataMana
|
|||||||
|
|
||||||
if(!parser) return;
|
if(!parser) return;
|
||||||
|
|
||||||
if(parser.resultCode !== ChangeNameUpdateEvent._Str_5797) return;
|
if(parser.resultCode !== ChangeUserNameResultMessageEvent.NAME_OK) return;
|
||||||
|
|
||||||
this._canChangeName = false;
|
this._canChangeName = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user