Merge branch 'oobjectt-talent-track-level'

This commit is contained in:
dank074 2022-12-26 00:56:36 -06:00
commit 7b48dde682
6 changed files with 64 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -366,6 +366,7 @@ export class IncomingHeader
public static BADGE_POINT_LIMITS = 2501; public static BADGE_POINT_LIMITS = 2501;
public static BADGE_REQUEST_FULFILLED = 2998; public static BADGE_REQUEST_FULFILLED = 2998;
public static HELPER_TALENT_TRACK = 3406; public static HELPER_TALENT_TRACK = 3406;
public static TALENT_TRACK_LEVEL = 1203;
public static USER_BANNED = 1683; public static USER_BANNED = 1683;
public static BOT_RECEIVED = 3684; public static BOT_RECEIVED = 3684;
public static PET_LEVEL_NOTIFICATION = 859; public static PET_LEVEL_NOTIFICATION = 859;

View File

@ -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;
}
}

View File

@ -1 +1,2 @@
export * from './TalentTrackLevelMessageEvent';
export * from './TalentTrackMessageEvent'; export * from './TalentTrackMessageEvent';

View File

@ -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;
}
}

View File

@ -1,4 +1,5 @@
export * from './TalentTrackLevel'; export * from './TalentTrackLevel';
export * from './TalentTrackLevelMessageParser';
export * from './TalentTrackParser'; export * from './TalentTrackParser';
export * from './TalentTrackRewardProduct'; export * from './TalentTrackRewardProduct';
export * from './TalentTrackTask'; export * from './TalentTrackTask';