You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
🆙 added latest changes
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": [ "@nitrots/eslint-config" ]
|
||||
}
|
||||
@@ -5,13 +5,11 @@
|
||||
"type": "module",
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"compile": "tsc --project ./tsconfig.json --noEmit false",
|
||||
"eslint": "eslint ./src --fix"
|
||||
"compile": "tsc --project ./tsconfig.json --noEmit false"
|
||||
},
|
||||
"main": "./index",
|
||||
"dependencies": {
|
||||
"@nitrots/api": "1.0.0",
|
||||
"@nitrots/eslint-config": "1.0.0",
|
||||
"@nitrots/events": "1.0.0",
|
||||
"@nitrots/utils": "1.0.0"
|
||||
},
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,9 @@
|
||||
export class IncomingHeader
|
||||
{
|
||||
// These packets do not belong to this revision, so these are custom packet ids
|
||||
public static AREA_HIDE = 6001;
|
||||
|
||||
// Original packets
|
||||
public static ACHIEVEMENT_LIST = 305;
|
||||
public static AUTHENTICATED = 2491;
|
||||
public static AUTHENTICATION = -1;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { AreaHideMessageParser } from '../../../parser';
|
||||
|
||||
export class AreaHideMessageEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, AreaHideMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): AreaHideMessageParser
|
||||
{
|
||||
return this.parser as AreaHideMessageParser;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
export * from './AreaHideMessageEvent';
|
||||
export * from './CustomUserNotificationMessageEvent';
|
||||
export * from './DiceValueMessageEvent';
|
||||
export * from './floor';
|
||||
export * from './FurniRentOrBuyoutOfferMessageEvent';
|
||||
export * from './FurnitureAliasesEvent';
|
||||
export * from './FurnitureDataEvent';
|
||||
@@ -17,6 +17,7 @@ export * from './RentableSpaceStatusMessageEvent';
|
||||
export * from './RequestSpamWallPostItMessageEvent';
|
||||
export * from './RoomDimmerPresetsMessageEvent';
|
||||
export * from './RoomMessageNotificationMessageEvent';
|
||||
export * from './wall';
|
||||
export * from './WelcomeGiftStatusEvent';
|
||||
export * from './floor';
|
||||
export * from './wall';
|
||||
export * from './youtube';
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
export class OutgoingHeader
|
||||
{
|
||||
// These packets do not belong to this revision, so these are custom packet ids
|
||||
public static CLICK_FURNI = 6002;
|
||||
|
||||
public static ACHIEVEMENT_LIST = 219;
|
||||
public static AUTHENTICATION = -1;
|
||||
public static BOT_CONFIGURATION = 1986;
|
||||
@@ -469,7 +472,5 @@ export class OutgoingHeader
|
||||
public static RENTABLE_EXTEND_RENT_OR_BUYOUT_FURNI = 1071;
|
||||
public static RENTABLE_GET_RENT_OR_BUYOUT_OFFER = 2518;
|
||||
|
||||
// CUSTOM HEADERS
|
||||
|
||||
public static DELETE_ITEM = 10018;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { IMessageComposer } from '@nitrots/api';
|
||||
|
||||
export class ClickFurniMessageComposer implements IMessageComposer<ConstructorParameters<typeof ClickFurniMessageComposer>>
|
||||
{
|
||||
private _data: ConstructorParameters<typeof ClickFurniMessageComposer>;
|
||||
|
||||
constructor(id: number, category: number)
|
||||
{
|
||||
this._data = [id, category];
|
||||
}
|
||||
|
||||
public getMessageArray()
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
export * from './BotPlaceComposer';
|
||||
export * from './BotRemoveComposer';
|
||||
export * from './BotSkillSaveComposer';
|
||||
export * from './ClickFurniMessageComposer';
|
||||
export * from './CompostPlantMessageComposer';
|
||||
export * from './GetItemDataComposer';
|
||||
export * from './HarvestPetMessageComposer';
|
||||
|
||||
+6
-10
@@ -1,13 +1,8 @@
|
||||
import { IMessageDataWrapper } from '@nitrots/api';
|
||||
import { FurnitureType, IMessageDataWrapper } from '@nitrots/api';
|
||||
|
||||
export class CatalogPageMessageProductData
|
||||
{
|
||||
public static I: string = 'i';
|
||||
public static S: string = 's';
|
||||
public static E: string = 'e';
|
||||
public static B: string = 'b';
|
||||
|
||||
private _productType: string;
|
||||
private _productType: FurnitureType;
|
||||
private _furniClassId: number;
|
||||
private _extraParam: string;
|
||||
private _productCount: number;
|
||||
@@ -38,11 +33,11 @@ export class CatalogPageMessageProductData
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
this._productType = wrapper.readString();
|
||||
this._productType = wrapper.readString().toUpperCase() as FurnitureType;
|
||||
|
||||
switch(this._productType)
|
||||
{
|
||||
case CatalogPageMessageProductData.B:
|
||||
case FurnitureType.BADGE:
|
||||
this._extraParam = wrapper.readString();
|
||||
this._productCount = 1;
|
||||
return true;
|
||||
@@ -57,11 +52,12 @@ export class CatalogPageMessageProductData
|
||||
this._uniqueLimitedItemSeriesSize = wrapper.readInt();
|
||||
this._uniqueLimitedItemsLeft = wrapper.readInt();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public get productType(): string
|
||||
public get productType(): FurnitureType
|
||||
{
|
||||
return this._productType;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import { IMessageDataWrapper } from '@nitrots/api';
|
||||
|
||||
export class AreaHideMessageData
|
||||
{
|
||||
private _furniId: number;
|
||||
private _on: boolean;
|
||||
private _rootX: number;
|
||||
private _rootY: number;
|
||||
private _width: number;
|
||||
private _length: number;
|
||||
private _invert: boolean;
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._furniId = wrapper.readInt();
|
||||
this._on = wrapper.readBoolean();
|
||||
this._rootX = wrapper.readInt();
|
||||
this._rootY = wrapper.readInt();
|
||||
this._width = wrapper.readInt();
|
||||
this._length = wrapper.readInt();
|
||||
this._invert = wrapper.readBoolean();
|
||||
}
|
||||
|
||||
public get furniId(): number
|
||||
{
|
||||
return this._furniId;
|
||||
}
|
||||
|
||||
public get on(): boolean
|
||||
{
|
||||
return this._on;
|
||||
}
|
||||
|
||||
public get rootX(): number
|
||||
{
|
||||
return this._rootX;
|
||||
}
|
||||
|
||||
public get rootY(): number
|
||||
{
|
||||
return this._rootY;
|
||||
}
|
||||
|
||||
public get width(): number
|
||||
{
|
||||
return this._width;
|
||||
}
|
||||
|
||||
public get length(): number
|
||||
{
|
||||
return this._length;
|
||||
}
|
||||
|
||||
public get invert(): boolean
|
||||
{
|
||||
return this._invert;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from './AreaHideMessageData';
|
||||
export * from './FavoriteMembershipUpdateMessageParser';
|
||||
export * from './ObjectData';
|
||||
export * from './ObjectsDataUpdateParser';
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
import { AreaHideMessageData } from '../engine';
|
||||
|
||||
export class AreaHideMessageParser implements IMessageParser
|
||||
{
|
||||
private _areaData: AreaHideMessageData;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._areaData = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._areaData = new AreaHideMessageData(wrapper);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get areaData(): AreaHideMessageData
|
||||
{
|
||||
return this._areaData;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
export * from './AreaHideMessageParser';
|
||||
export * from './CustomUserNotificationMessageParser';
|
||||
export * from './DiceValueMessageParser';
|
||||
export * from './floor';
|
||||
export * from './FurniRentOrBuyoutOfferMessageParser';
|
||||
export * from './FurnitureAliasesParser';
|
||||
export * from './FurnitureDataParser';
|
||||
@@ -18,6 +18,7 @@ export * from './RequestSpamWallPostItMessageParser';
|
||||
export * from './RoomDimmerPresetsMessageData';
|
||||
export * from './RoomDimmerPresetsMessageParser';
|
||||
export * from './RoomMessageNotificationMessageParser';
|
||||
export * from './wall';
|
||||
export * from './WelcomeGiftStatusParser';
|
||||
export * from './floor';
|
||||
export * from './wall';
|
||||
export * from './youtube';
|
||||
|
||||
@@ -25,7 +25,5 @@
|
||||
"ESNext"
|
||||
],
|
||||
"module": "ES6"
|
||||
},
|
||||
"include": [
|
||||
"src" ]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user