You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 15:36:18 +00:00
feat: custom prefix system protocol layer
Prefix parsers, composers and events: - UserPrefixesParser, PrefixReceivedParser, ActivePrefixUpdatedParser - PurchasePrefixComposer, SetActivePrefixComposer, DeletePrefixComposer, RequestPrefixesComposer - RoomUnitChatParser reads prefixText/Color/Icon/Effect from chat packets - RoomSessionChatEvent carries prefix data to client - RoomChatHandler passes prefix fields through event chain
This commit is contained in:
@@ -474,4 +474,9 @@ export class IncomingHeader
|
||||
public static WEEKLY_GAME2_LEADERBOARD = 2196;
|
||||
public static RENTABLE_FURNI_RENT_OR_BUYOUT_OFFER = 35;
|
||||
public static HANDSHAKE_IDENTITY_ACCOUNT = 3523;
|
||||
|
||||
// Custom Prefixes
|
||||
public static USER_PREFIXES = 7001;
|
||||
public static PREFIX_RECEIVED = 7002;
|
||||
public static ACTIVE_PREFIX_UPDATED = 7003;
|
||||
}
|
||||
|
||||
@@ -5,4 +5,5 @@ export * from './clothes';
|
||||
export * from './furni';
|
||||
export * from './furni/gifts';
|
||||
export * from './pets';
|
||||
export * from './prefixes';
|
||||
export * from './trading';
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { ActivePrefixUpdatedParser } from '../../../parser';
|
||||
|
||||
export class ActivePrefixUpdatedEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, ActivePrefixUpdatedParser);
|
||||
}
|
||||
|
||||
public getParser(): ActivePrefixUpdatedParser
|
||||
{
|
||||
return this.parser as ActivePrefixUpdatedParser;
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { PrefixReceivedParser } from '../../../parser';
|
||||
|
||||
export class PrefixReceivedEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, PrefixReceivedParser);
|
||||
}
|
||||
|
||||
public getParser(): PrefixReceivedParser
|
||||
{
|
||||
return this.parser as PrefixReceivedParser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '@nitrots/api';
|
||||
import { MessageEvent } from '@nitrots/events';
|
||||
import { UserPrefixesParser } from '../../../parser';
|
||||
|
||||
export class UserPrefixesEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, UserPrefixesParser);
|
||||
}
|
||||
|
||||
public getParser(): UserPrefixesParser
|
||||
{
|
||||
return this.parser as UserPrefixesParser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from './ActivePrefixUpdatedEvent';
|
||||
export * from './PrefixReceivedEvent';
|
||||
export * from './UserPrefixesEvent';
|
||||
Reference in New Issue
Block a user