mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 22:36:27 +01:00
move talent track packets to correct dir
This commit is contained in:
parent
62ac80cab2
commit
a5c5aa742d
File diff suppressed because one or more lines are too long
@ -1,3 +1,2 @@
|
||||
export * from './CallForHelpDisabledNotifyMessageEvent';
|
||||
export * from './CallForHelpResultMessageEvent';
|
||||
export * from './TalentTrackEvent';
|
||||
|
@ -47,6 +47,7 @@ export * from './room/unit/chat';
|
||||
export * from './roomevents';
|
||||
export * from './security';
|
||||
export * from './sound';
|
||||
export * from './talent';
|
||||
export * from './user';
|
||||
export * from './user/access';
|
||||
export * from './user/data';
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { TalentTrackParser } from '../../parser/help/TalentTrackParser';
|
||||
import { TalentTrackParser } from '../../parser/talent/TalentTrackParser';
|
||||
|
||||
export class TalentTrackEvent extends MessageEvent implements IMessageEvent
|
||||
export class TalentTrackMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
@ -0,0 +1 @@
|
||||
export * from './TalentTrackMessageEvent';
|
@ -1,45 +0,0 @@
|
||||
import { TalentTrackLevelAchievement } from './TalentTrackLevelAchievement';
|
||||
import { TalentTrackLevelItem } from './TalentTrackLevelItem';
|
||||
|
||||
export class TalentTrackLevel
|
||||
{
|
||||
private _level: number;
|
||||
private _state: number;
|
||||
private _achievements: TalentTrackLevelAchievement[]
|
||||
private _perks: string[];
|
||||
private _items: TalentTrackLevelItem[];
|
||||
|
||||
constructor(level: number, state: number, achievements: TalentTrackLevelAchievement[], perks: string[], items: TalentTrackLevelItem[])
|
||||
{
|
||||
this._level = level;
|
||||
this._state = state;
|
||||
this._achievements = achievements;
|
||||
this._perks = perks;
|
||||
this._items = items;
|
||||
}
|
||||
|
||||
public get level(): number
|
||||
{
|
||||
return this._level;
|
||||
}
|
||||
|
||||
public get state(): number
|
||||
{
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public get achievements(): TalentTrackLevelAchievement[]
|
||||
{
|
||||
return this._achievements;
|
||||
}
|
||||
|
||||
public get perks(): string[]
|
||||
{
|
||||
return this._perks;
|
||||
}
|
||||
|
||||
public get items(): TalentTrackLevelItem[]
|
||||
{
|
||||
return this._items;
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
export class TalentTrackLevelAchievement
|
||||
{
|
||||
private _id: number;
|
||||
private _index: number;
|
||||
private _achievementCode: string;
|
||||
private _state: number;
|
||||
private _progress: number;
|
||||
private _achievementProgress: number;
|
||||
|
||||
constructor(id: number, index: number, achievementCode: string, state: number, progress: number, achievementProgress: number)
|
||||
{
|
||||
this._id = id;
|
||||
this._index = index;
|
||||
this._achievementCode = achievementCode;
|
||||
this._state = state;
|
||||
this._progress = progress;
|
||||
this._achievementProgress = achievementProgress;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get index(): number
|
||||
{
|
||||
return this._index;
|
||||
}
|
||||
|
||||
public get achievementCode(): string
|
||||
{
|
||||
return this._achievementCode;
|
||||
}
|
||||
|
||||
public get state(): number
|
||||
{
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public get progress(): number
|
||||
{
|
||||
return this._progress;
|
||||
}
|
||||
|
||||
public get achievementProgress(): number
|
||||
{
|
||||
return this._achievementProgress;
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
export class TalentTrackLevelItem
|
||||
{
|
||||
private _name: string;
|
||||
private _unknownInt: number;
|
||||
|
||||
constructor(name: string, unknownInt: number)
|
||||
{
|
||||
this._name = name;
|
||||
this._unknownInt = unknownInt;
|
||||
}
|
||||
|
||||
public get name(): string
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
|
||||
public get unknownInt(): number
|
||||
{
|
||||
return this._unknownInt;
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
export * from './TalentTrackLevel';
|
||||
export * from './TalentTrackLevelAchievement';
|
||||
export * from './TalentTrackLevelItem';
|
@ -1,4 +1,2 @@
|
||||
export * from './CallForHelpDisabledNotifyMessageParser';
|
||||
export * from './CallForHelpResultMessageParser';
|
||||
export * from './common';
|
||||
export * from './TalentTrackParser';
|
||||
|
@ -24,4 +24,5 @@ export * from './room';
|
||||
export * from './roomevents';
|
||||
export * from './security';
|
||||
export * from './sound';
|
||||
export * from './talent';
|
||||
export * from './user';
|
||||
|
@ -0,0 +1,45 @@
|
||||
import { TalentTrackRewardProduct } from './TalentTrackRewardProduct';
|
||||
import { TalentTrackTask } from './TalentTrackTask';
|
||||
|
||||
export class TalentTrackLevel
|
||||
{
|
||||
private _level: number;
|
||||
private _state: number;
|
||||
private _tasks: TalentTrackTask[]
|
||||
private _rewardPerks: string[];
|
||||
private _rewardProducts: TalentTrackRewardProduct[];
|
||||
|
||||
constructor(level: number, state: number, achievements: TalentTrackTask[], perks: string[], items: TalentTrackRewardProduct[])
|
||||
{
|
||||
this._level = level;
|
||||
this._state = state;
|
||||
this._tasks = achievements;
|
||||
this._rewardPerks = perks;
|
||||
this._rewardProducts = items;
|
||||
}
|
||||
|
||||
public get level(): number
|
||||
{
|
||||
return this._level;
|
||||
}
|
||||
|
||||
public get state(): number
|
||||
{
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public get tasks(): TalentTrackTask[]
|
||||
{
|
||||
return this._tasks;
|
||||
}
|
||||
|
||||
public get perks(): string[]
|
||||
{
|
||||
return this._rewardPerks;
|
||||
}
|
||||
|
||||
public get items(): TalentTrackRewardProduct[]
|
||||
{
|
||||
return this._rewardProducts;
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { TalentTrackLevel } from './common/TalentTrackLevel';
|
||||
import { TalentTrackLevelAchievement } from './common/TalentTrackLevelAchievement';
|
||||
import { TalentTrackLevelItem } from './common/TalentTrackLevelItem';
|
||||
import { TalentTrackLevel } from './TalentTrackLevel';
|
||||
import { TalentTrackRewardProduct } from './TalentTrackRewardProduct';
|
||||
import { TalentTrackTask } from './TalentTrackTask';
|
||||
|
||||
export class TalentTrackParser implements IMessageParser
|
||||
{
|
||||
@ -30,7 +30,7 @@ export class TalentTrackParser implements IMessageParser
|
||||
const levelId = wrapper.readInt();
|
||||
const levelState = wrapper.readInt();
|
||||
|
||||
const levelAchievements: TalentTrackLevelAchievement[] = [];
|
||||
const levelAchievements: TalentTrackTask[] = [];
|
||||
const achievementsCount = wrapper.readInt();
|
||||
|
||||
for(let j = 0; j < achievementsCount; j++)
|
||||
@ -42,7 +42,7 @@ export class TalentTrackParser implements IMessageParser
|
||||
const progress = wrapper.readInt();
|
||||
const achievementProgress = wrapper.readInt();
|
||||
|
||||
levelAchievements.push(new TalentTrackLevelAchievement(id, index, code, state, progress, achievementProgress));
|
||||
levelAchievements.push(new TalentTrackTask(id, index, code, state, progress, achievementProgress));
|
||||
}
|
||||
|
||||
const levelPerks: string[] = [];
|
||||
@ -50,7 +50,7 @@ export class TalentTrackParser implements IMessageParser
|
||||
|
||||
for(let j = 0; j < perksCount; j++) levelPerks.push(wrapper.readString());
|
||||
|
||||
const levelItems: TalentTrackLevelItem[] = [];
|
||||
const levelItems: TalentTrackRewardProduct[] = [];
|
||||
const itemsCount = wrapper.readInt();
|
||||
|
||||
for(let j = 0; j < itemsCount; j++)
|
||||
@ -58,7 +58,7 @@ export class TalentTrackParser implements IMessageParser
|
||||
const name = wrapper.readString();
|
||||
const unknownInt = wrapper.readInt();
|
||||
|
||||
levelItems.push(new TalentTrackLevelItem(name, unknownInt));
|
||||
levelItems.push(new TalentTrackRewardProduct(name, unknownInt));
|
||||
}
|
||||
|
||||
this._levels.push(new TalentTrackLevel(levelId, levelState, levelAchievements, levelPerks, levelItems));
|
@ -0,0 +1,21 @@
|
||||
export class TalentTrackRewardProduct
|
||||
{
|
||||
private _productCode: string;
|
||||
private _vipDays: number;
|
||||
|
||||
constructor(name: string, unknownInt: number)
|
||||
{
|
||||
this._productCode = name;
|
||||
this._vipDays = unknownInt;
|
||||
}
|
||||
|
||||
public get productCode(): string
|
||||
{
|
||||
return this._productCode;
|
||||
}
|
||||
|
||||
public get vipDays(): number
|
||||
{
|
||||
return this._vipDays;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
export class TalentTrackTask
|
||||
{
|
||||
private _id: number;
|
||||
private _requiredLevel: number;
|
||||
private _badgeCode: string;
|
||||
private _state: number;
|
||||
private _currentScore: number;
|
||||
private _totalScore: number;
|
||||
|
||||
constructor(id: number, requiredLevel: number, badgeCode: string, state: number, currentScore: number, totalScore: number)
|
||||
{
|
||||
this._id = id;
|
||||
this._requiredLevel = requiredLevel;
|
||||
this._badgeCode = badgeCode;
|
||||
this._state = state;
|
||||
this._currentScore = currentScore;
|
||||
this._totalScore = totalScore;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get requiredLevel(): number
|
||||
{
|
||||
return this._requiredLevel;
|
||||
}
|
||||
|
||||
public get badgeCode(): string
|
||||
{
|
||||
return this._badgeCode;
|
||||
}
|
||||
|
||||
public get state(): number
|
||||
{
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public get currentScore(): number
|
||||
{
|
||||
return this._currentScore;
|
||||
}
|
||||
|
||||
public get totalScore(): number
|
||||
{
|
||||
return this._totalScore;
|
||||
}
|
||||
}
|
4
src/nitro/communication/messages/parser/talent/index.ts
Normal file
4
src/nitro/communication/messages/parser/talent/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export * from './TalentTrackLevel';
|
||||
export * from './TalentTrackParser';
|
||||
export * from './TalentTrackRewardProduct';
|
||||
export * from './TalentTrackTask';
|
Loading…
Reference in New Issue
Block a user