mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-19 06:46:28 +01:00
Added GroupPurchasedEvent
This commit is contained in:
parent
b0e0b18462
commit
1bea85dd6e
@ -45,6 +45,7 @@ import { GroupBuyDataEvent } from './messages/incoming/group/GroupBuyDataEvent';
|
|||||||
import { GroupConfirmMemberRemoveEvent } from './messages/incoming/group/GroupConfirmMemberRemoveEvent';
|
import { GroupConfirmMemberRemoveEvent } from './messages/incoming/group/GroupConfirmMemberRemoveEvent';
|
||||||
import { GroupInformationEvent } from './messages/incoming/group/GroupInformationEvent';
|
import { GroupInformationEvent } from './messages/incoming/group/GroupInformationEvent';
|
||||||
import { GroupMembersEvent } from './messages/incoming/group/GroupMembersEvent';
|
import { GroupMembersEvent } from './messages/incoming/group/GroupMembersEvent';
|
||||||
|
import { GroupPurchasedEvent } from './messages/incoming/group/GroupPurchasedEvent';
|
||||||
import { GroupSettingsEvent } from './messages/incoming/group/GroupSettingsEvent';
|
import { GroupSettingsEvent } from './messages/incoming/group/GroupSettingsEvent';
|
||||||
import { CallForHelpResultMessageEvent } from './messages/incoming/help/CallForHelpResultMessageEvent';
|
import { CallForHelpResultMessageEvent } from './messages/incoming/help/CallForHelpResultMessageEvent';
|
||||||
import { IncomingHeader } from './messages/incoming/IncomingHeader';
|
import { IncomingHeader } from './messages/incoming/IncomingHeader';
|
||||||
@ -582,6 +583,7 @@ export class NitroMessages implements IMessageConfiguration
|
|||||||
this._events.set(IncomingHeader.GROUP_CREATE_OPTIONS, GroupBuyDataEvent);
|
this._events.set(IncomingHeader.GROUP_CREATE_OPTIONS, GroupBuyDataEvent);
|
||||||
this._events.set(IncomingHeader.GROUP_BADGE_PARTS, GroupBadgePartsEvent);
|
this._events.set(IncomingHeader.GROUP_BADGE_PARTS, GroupBadgePartsEvent);
|
||||||
this._events.set(IncomingHeader.GROUP_SETTINGS, GroupSettingsEvent);
|
this._events.set(IncomingHeader.GROUP_SETTINGS, GroupSettingsEvent);
|
||||||
|
this._events.set(IncomingHeader.GROUP_PURCHASED, GroupPurchasedEvent);
|
||||||
|
|
||||||
// HELP
|
// HELP
|
||||||
this._events.set(IncomingHeader.CFH_RESULT_MESSAGE, CallForHelpResultMessageEvent);
|
this._events.set(IncomingHeader.CFH_RESULT_MESSAGE, CallForHelpResultMessageEvent);
|
||||||
|
@ -49,6 +49,7 @@ export class IncomingHeader
|
|||||||
public static GROUP_MEMBERS = 1200;
|
public static GROUP_MEMBERS = 1200;
|
||||||
public static GROUP_MEMBERS_REFRESH = 2445;
|
public static GROUP_MEMBERS_REFRESH = 2445;
|
||||||
public static GROUP_MEMBER_REMOVE_CONFIRM = 1876;
|
public static GROUP_MEMBER_REMOVE_CONFIRM = 1876;
|
||||||
|
public static GROUP_PURCHASED = 2808;
|
||||||
public static GROUP_SETTINGS = 3965;
|
public static GROUP_SETTINGS = 3965;
|
||||||
public static GROUP_BADGE_PARTS = 2238;
|
public static GROUP_BADGE_PARTS = 2238;
|
||||||
public static ITEM_DIMMER_SETTINGS = 2710;
|
public static ITEM_DIMMER_SETTINGS = 2710;
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||||
|
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||||
|
import { GroupPurchasedParser } from '../../parser/group/GroupPurchasedParser';
|
||||||
|
|
||||||
|
export class GroupPurchasedEvent extends MessageEvent implements IMessageEvent
|
||||||
|
{
|
||||||
|
constructor(callBack: Function)
|
||||||
|
{
|
||||||
|
super(callBack, GroupPurchasedParser);
|
||||||
|
}
|
||||||
|
|
||||||
|
public getParser(): GroupPurchasedParser
|
||||||
|
{
|
||||||
|
return this.parser as GroupPurchasedParser;
|
||||||
|
}
|
||||||
|
}
|
@ -3,4 +3,5 @@ export * from './GroupBuyDataEvent';
|
|||||||
export * from './GroupConfirmMemberRemoveEvent';
|
export * from './GroupConfirmMemberRemoveEvent';
|
||||||
export * from './GroupInformationEvent';
|
export * from './GroupInformationEvent';
|
||||||
export * from './GroupMembersEvent';
|
export * from './GroupMembersEvent';
|
||||||
|
export * from './GroupPurchasedEvent';
|
||||||
export * from './GroupSettingsEvent';
|
export * from './GroupSettingsEvent';
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||||
|
|
||||||
|
export class GroupPurchasedParser implements IMessageParser
|
||||||
|
{
|
||||||
|
private _roomId: number;
|
||||||
|
private _groupId: number;
|
||||||
|
|
||||||
|
flush(): boolean
|
||||||
|
{
|
||||||
|
this._roomId = 0;
|
||||||
|
this._groupId = 0;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
parse(wrapper: IMessageDataWrapper): boolean
|
||||||
|
{
|
||||||
|
if(!wrapper) return false;
|
||||||
|
|
||||||
|
this._roomId = wrapper.readInt();
|
||||||
|
this._groupId = wrapper.readInt();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get roomId(): number
|
||||||
|
{
|
||||||
|
return this._roomId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get guildId(): number
|
||||||
|
{
|
||||||
|
return this._groupId;
|
||||||
|
}
|
||||||
|
}
|
@ -3,5 +3,6 @@ export * from './GroupBuyDataParser';
|
|||||||
export * from './GroupConfirmMemberRemoveParser';
|
export * from './GroupConfirmMemberRemoveParser';
|
||||||
export * from './GroupInformationParser';
|
export * from './GroupInformationParser';
|
||||||
export * from './GroupMembersParser';
|
export * from './GroupMembersParser';
|
||||||
|
export * from './GroupPurchasedParser';
|
||||||
export * from './GroupSettingsParser';
|
export * from './GroupSettingsParser';
|
||||||
export * from './utils';
|
export * from './utils';
|
||||||
|
Loading…
Reference in New Issue
Block a user