mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
Gamecenter | Score packets
This commit is contained in:
parent
81cfd5c56f
commit
d410ecc22a
File diff suppressed because one or more lines are too long
@ -470,4 +470,6 @@ export class IncomingHeader
|
|||||||
public static WEEKLY_GAME2_LEADERBOARD = 2196;
|
public static WEEKLY_GAME2_LEADERBOARD = 2196;
|
||||||
public static RENTABLE_FURNI_RENT_OR_BUYOUT_OFFER = 35;
|
public static RENTABLE_FURNI_RENT_OR_BUYOUT_OFFER = 35;
|
||||||
public static HANDSHAKE_IDENTITY_ACCOUNT = 3523;
|
public static HANDSHAKE_IDENTITY_ACCOUNT = 3523;
|
||||||
|
public static GAME2_FRIENDS_LEADERBOARD = 3099;
|
||||||
|
public static GAME2_TOTAL_LEADERBOARD = 3863;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../../api';
|
||||||
|
import { MessageEvent } from '../../../../../../events';
|
||||||
|
import { Game2LeaderboardParser } from '../../../parser';
|
||||||
|
|
||||||
|
export class Game2FriendsLeaderboardEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, Game2LeaderboardParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): Game2LeaderboardParser
|
||||||
|
{
|
||||||
|
return this.parser as Game2LeaderboardParser;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../../api';
|
||||||
|
import { MessageEvent } from '../../../../../../events';
|
||||||
|
import { Game2LeaderboardParser } from '../../../parser';
|
||||||
|
|
||||||
|
export class Game2TotalLeaderboardEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, Game2LeaderboardParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): Game2LeaderboardParser
|
||||||
|
{
|
||||||
|
return this.parser as Game2LeaderboardParser;
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
export * from './Game2FriendsLeaderboardEvent';
|
||||||
|
export * from './Game2TotalLeaderboardEvent';
|
||||||
export * from './Game2WeeklyFriendsLeaderboardEvent';
|
export * from './Game2WeeklyFriendsLeaderboardEvent';
|
||||||
export * from './Game2WeeklyLeaderboardEvent';
|
export * from './Game2WeeklyLeaderboardEvent';
|
||||||
export * from './WeeklyCompetitiveFriendsLeaderboardEvent';
|
export * from './WeeklyCompetitiveFriendsLeaderboardEvent';
|
||||||
|
@ -46,6 +46,10 @@ export class OutgoingHeader
|
|||||||
public static LEAVEQUEUEMESSAGE = 2384;
|
public static LEAVEQUEUEMESSAGE = 2384;
|
||||||
public static RESETRESOLUTIONACHIEVEMENTMESSAGE = 3144;
|
public static RESETRESOLUTIONACHIEVEMENTMESSAGE = 3144;
|
||||||
public static GETWEEKLYGAMEREWARDWINNERS = 1054;
|
public static GETWEEKLYGAMEREWARDWINNERS = 1054;
|
||||||
|
public static GETWEEKLYCOMPETITIVELEADERBOARD = 654;
|
||||||
|
public static GETFRIENDSWEEKLYCOMPETITIVELEADERBOARD = 1081;
|
||||||
|
public static GAME2GETFRIENDSLEADERBOARD = 1859;
|
||||||
|
public static GAME2GETTOTALLEADERBOARD = 3362;
|
||||||
public static GAME2GETACCOUNTGAMESTATUSMESSAGE = 11;
|
public static GAME2GETACCOUNTGAMESTATUSMESSAGE = 11;
|
||||||
public static GAME2CHECKGAMEDIRECTORYSTATUSMESSAGE = 3259;
|
public static GAME2CHECKGAMEDIRECTORYSTATUSMESSAGE = 3259;
|
||||||
public static GAME2EXITGAMEMESSAGE = 1445;
|
public static GAME2EXITGAMEMESSAGE = 1445;
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../api';
|
||||||
|
|
||||||
|
export class Game2GetFriendsLeaderboardComposer implements IMessageComposer<ConstructorParameters<typeof Game2GetFriendsLeaderboardComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof Game2GetFriendsLeaderboardComposer>;
|
||||||
|
|
||||||
|
constructor(k: number, _arg_2: number, _arg_3: number, _arg_4: number, _arg_5: number)
|
||||||
|
{
|
||||||
|
this._data = [ k, _arg_2, _arg_3, _arg_4, _arg_5 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
dispose(): void
|
||||||
|
{
|
||||||
|
this._data = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../api';
|
||||||
|
|
||||||
|
export class Game2GetTotalLeaderboardComposer implements IMessageComposer<ConstructorParameters<typeof Game2GetTotalLeaderboardComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof Game2GetTotalLeaderboardComposer>;
|
||||||
|
|
||||||
|
constructor(k: number, _arg_2: number, _arg_3: number, _arg_4: number, _arg_5: number)
|
||||||
|
{
|
||||||
|
this._data = [ k, _arg_2, _arg_3, _arg_4, _arg_5 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
dispose(): void
|
||||||
|
{
|
||||||
|
this._data = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../api';
|
||||||
|
|
||||||
|
export class GetFriendsWeeklyCompetitiveLeaderboardComposer implements IMessageComposer<ConstructorParameters<typeof GetFriendsWeeklyCompetitiveLeaderboardComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof GetFriendsWeeklyCompetitiveLeaderboardComposer>;
|
||||||
|
|
||||||
|
constructor(k: number, _arg_2: number)
|
||||||
|
{
|
||||||
|
this._data = [ k, _arg_2 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
dispose(): void
|
||||||
|
{
|
||||||
|
this._data = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
import { IMessageComposer } from '../../../../../../api';
|
||||||
|
|
||||||
|
export class GetWeeklyCompetitiveLeaderboardComposer implements IMessageComposer<ConstructorParameters<typeof GetWeeklyCompetitiveLeaderboardComposer>>
|
||||||
|
{
|
||||||
|
private _data: ConstructorParameters<typeof GetWeeklyCompetitiveLeaderboardComposer>;
|
||||||
|
|
||||||
|
constructor(k: number, _arg_2: number)
|
||||||
|
{
|
||||||
|
this._data = [ k, _arg_2 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
dispose(): void
|
||||||
|
{
|
||||||
|
this._data = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMessageArray()
|
||||||
|
{
|
||||||
|
return this._data;
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,8 @@
|
|||||||
|
export * from './Game2GetFriendsLeaderboardComposer';
|
||||||
|
export * from './Game2GetTotalLeaderboardComposer';
|
||||||
export * from './Game2GetWeeklyFriendsLeaderboardComposer';
|
export * from './Game2GetWeeklyFriendsLeaderboardComposer';
|
||||||
export * from './Game2GetWeeklyLeaderboardComposer';
|
export * from './Game2GetWeeklyLeaderboardComposer';
|
||||||
|
export * from './GetFriendsWeeklyCompetitiveLeaderboardComposer';
|
||||||
|
export * from './GetWeeklyCompetitiveLeaderboardComposer';
|
||||||
export * from './GetWeeklyGameRewardComposer';
|
export * from './GetWeeklyGameRewardComposer';
|
||||||
export * from './GetWeeklyGameRewardWinnersComposer';
|
export * from './GetWeeklyGameRewardWinnersComposer';
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
import { LeaderboardEntry } from '.';
|
||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../../api';
|
||||||
|
|
||||||
|
export class Game2LeaderboardParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _gameTypeId: number;
|
||||||
|
private _leaderBoard: LeaderboardEntry[];
|
||||||
|
private _totalListSize: number;
|
||||||
|
|
||||||
|
public flush(): boolean
|
||||||
|
{
|
||||||
|
this._gameTypeId = -1;
|
||||||
|
this._leaderBoard = [];
|
||||||
|
this._totalListSize = -1;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
let totalLeaderboards: number = wrapper.readInt();
|
||||||
|
|
||||||
|
while(totalLeaderboards > 0)
|
||||||
|
{
|
||||||
|
this._leaderBoard.push(new LeaderboardEntry(wrapper));
|
||||||
|
totalLeaderboards--;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._totalListSize = wrapper.readInt();
|
||||||
|
this._gameTypeId = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get gameTypeId(): number
|
||||||
|
{
|
||||||
|
return this._gameTypeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get leaderboard(): LeaderboardEntry[]
|
||||||
|
{
|
||||||
|
return this._leaderBoard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get totalListSize(): number
|
||||||
|
{
|
||||||
|
return this._totalListSize;
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
export * from './Game2LeaderboardParser';
|
||||||
export * from './Game2WeeklyLeaderboardParser';
|
export * from './Game2WeeklyLeaderboardParser';
|
||||||
export * from './GameRewardWinnerEntry';
|
export * from './GameRewardWinnerEntry';
|
||||||
export * from './LeaderboardEntry';
|
export * from './LeaderboardEntry';
|
||||||
|
Loading…
Reference in New Issue
Block a user