mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
Merge branch 'user-classification' of https://github.com/oobjectt/nitro-renderer into oobjectt-user-classification
This commit is contained in:
commit
5472a78d4e
File diff suppressed because one or more lines are too long
@ -247,6 +247,7 @@ export class IncomingHeader
|
|||||||
public static USER_SETTINGS = 513;
|
public static USER_SETTINGS = 513;
|
||||||
public static USER_SUBSCRIPTION = 954;
|
public static USER_SUBSCRIPTION = 954;
|
||||||
public static USER_WARDROBE_PAGE = 3315;
|
public static USER_WARDROBE_PAGE = 3315;
|
||||||
|
public static USER_CLASSIFICATION = 966;
|
||||||
public static GET_USER_TAGS = 1255;
|
public static GET_USER_TAGS = 1255;
|
||||||
public static WIRED_ACTION = 1434;
|
public static WIRED_ACTION = 1434;
|
||||||
public static WIRED_CONDITION = 1108;
|
public static WIRED_CONDITION = 1108;
|
||||||
|
@ -70,3 +70,4 @@ export * from './user/inventory';
|
|||||||
export * from './user/inventory/currency';
|
export * from './user/inventory/currency';
|
||||||
export * from './user/inventory/subscription';
|
export * from './user/inventory/subscription';
|
||||||
export * from './user/wardrobe';
|
export * from './user/wardrobe';
|
||||||
|
export * from './userclassification';
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../api';
|
||||||
|
import { MessageEvent } from '../../../../../events';
|
||||||
|
import { UserClassificationMessageParser } from '../../parser';
|
||||||
|
|
||||||
|
export class UserClassificationMessageEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, UserClassificationMessageParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): UserClassificationMessageParser
|
||||||
|
{
|
||||||
|
return this.parser as UserClassificationMessageParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
export * from './UserClassificationMessageEvent';
|
@ -72,3 +72,4 @@ export * from './user/inventory';
|
|||||||
export * from './user/inventory/currency';
|
export * from './user/inventory/currency';
|
||||||
export * from './user/inventory/subscription';
|
export * from './user/inventory/subscription';
|
||||||
export * from './user/wardrobe';
|
export * from './user/wardrobe';
|
||||||
|
export * from './userclassification';
|
||||||
|
@ -0,0 +1,57 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||||
|
|
||||||
|
export class UserClassificationMessageParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _classifiedUsersNames: Map<number, string>;
|
||||||
|
private _classifiedUsersClass: Map<number, string>;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
if(this._classifiedUsersNames)
|
||||||
|
{
|
||||||
|
this._classifiedUsersNames = new Map();
|
||||||
|
}
|
||||||
|
if(this._classifiedUsersClass)
|
||||||
|
{
|
||||||
|
this._classifiedUsersClass = new Map();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
let _local_3: number;
|
||||||
|
let _local_4: string;
|
||||||
|
let _local_5: string;
|
||||||
|
|
||||||
|
let count: number = wrapper.readInt();
|
||||||
|
|
||||||
|
this._classifiedUsersNames = new Map();
|
||||||
|
this._classifiedUsersClass = new Map();
|
||||||
|
|
||||||
|
while(count > 0)
|
||||||
|
{
|
||||||
|
_local_3 = wrapper.readInt();
|
||||||
|
_local_4 = wrapper.readString();
|
||||||
|
_local_5 = wrapper.readString();
|
||||||
|
this._classifiedUsersNames.set(_local_3, _local_4);
|
||||||
|
this._classifiedUsersClass.set(_local_3, _local_5);
|
||||||
|
count--;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get classifiedUsernameMap(): Map<number, string>
|
||||||
|
{
|
||||||
|
return this._classifiedUsersNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get classifiedUserTypeMap(): Map<number, string>
|
||||||
|
{
|
||||||
|
return this._classifiedUsersClass;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
export * from './UserClassificationMessageParser';
|
Loading…
Reference in New Issue
Block a user