mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-22 23:50:52 +01:00
#9 - TalentTrackLevelMessageEvent added
This commit is contained in:
parent
26741b78a7
commit
8a0c4020cc
File diff suppressed because one or more lines are too long
@ -361,6 +361,7 @@ export class IncomingHeader
|
||||
public static BADGE_POINT_LIMITS = 2501;
|
||||
public static BADGE_REQUEST_FULFILLED = 2998;
|
||||
public static HELPER_TALENT_TRACK = 3406;
|
||||
public static TALENT_TRACK_LEVEL = 1203;
|
||||
public static USER_BANNED = 1683;
|
||||
public static BOT_RECEIVED = 3684;
|
||||
public static PET_LEVEL_NOTIFICATION = 859;
|
||||
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../api';
|
||||
import { MessageEvent } from '../../../../../events';
|
||||
import { TalentTrackLevelMessageParser } from '../../parser';
|
||||
|
||||
export class TalentTrackLevelMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, TalentTrackLevelMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): TalentTrackLevelMessageParser
|
||||
{
|
||||
return this.parser as TalentTrackLevelMessageParser;
|
||||
}
|
||||
}
|
@ -1 +1,2 @@
|
||||
export * from './TalentTrackLevelMessageEvent';
|
||||
export * from './TalentTrackMessageEvent';
|
||||
|
@ -0,0 +1,43 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../api';
|
||||
|
||||
export class TalentTrackLevelMessageParser implements IMessageParser
|
||||
{
|
||||
private _talentTrackName: string;
|
||||
private _level: number;
|
||||
private _maxLevel: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._talentTrackName = null;
|
||||
this._level = -1;
|
||||
this._maxLevel = -1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._talentTrackName = wrapper.readString();
|
||||
this._level = wrapper.readInt();
|
||||
this._maxLevel = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get talentTrackName(): string
|
||||
{
|
||||
return this._talentTrackName;
|
||||
}
|
||||
|
||||
public get level(): number
|
||||
{
|
||||
return this._level;
|
||||
}
|
||||
|
||||
public get maxLevel(): number
|
||||
{
|
||||
return this._maxLevel;
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
export * from './TalentTrackLevel';
|
||||
export * from './TalentTrackLevelMessageParser';
|
||||
export * from './TalentTrackParser';
|
||||
export * from './TalentTrackRewardProduct';
|
||||
export * from './TalentTrackTask';
|
||||
|
Loading…
Reference in New Issue
Block a user