You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 23:16:20 +00:00
Sync renderer safety push
This commit is contained in:
@@ -69,6 +69,7 @@ export * from './roomsettings';
|
||||
export * from './security';
|
||||
export * from './sound';
|
||||
export * from './talent';
|
||||
export * from './translation';
|
||||
export * from './user';
|
||||
export * from './user/access';
|
||||
export * from './user/data';
|
||||
|
||||
@@ -3,6 +3,7 @@ export * from './avatareffect';
|
||||
export * from './badges';
|
||||
export * from './clothing';
|
||||
export * from './furniture';
|
||||
export * from './nickicons';
|
||||
export * from './pets';
|
||||
export * from './prefixes';
|
||||
export * from './purse';
|
||||
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export interface INickIconData
|
||||
{
|
||||
iconKey: string;
|
||||
displayName: string;
|
||||
points: number;
|
||||
pointsType: number;
|
||||
owned: boolean;
|
||||
active: boolean;
|
||||
id: number;
|
||||
}
|
||||
|
||||
export interface ICustomizePrefixCatalogData
|
||||
{
|
||||
id: number;
|
||||
displayName: string;
|
||||
text: string;
|
||||
color: string;
|
||||
icon: string;
|
||||
effect: string;
|
||||
font: string;
|
||||
points: number;
|
||||
pointsType: number;
|
||||
owned: boolean;
|
||||
active: boolean;
|
||||
ownedPrefixId: number;
|
||||
}
|
||||
|
||||
export interface ICustomizeOwnedPrefixData
|
||||
{
|
||||
id: number;
|
||||
displayName: string;
|
||||
text: string;
|
||||
color: string;
|
||||
icon: string;
|
||||
effect: string;
|
||||
font: string;
|
||||
active: boolean;
|
||||
isCustom: boolean;
|
||||
points: number;
|
||||
pointsType: number;
|
||||
catalogPrefixId: number;
|
||||
}
|
||||
|
||||
export class UserNickIconsParser implements IMessageParser
|
||||
{
|
||||
private _nickIcons: INickIconData[];
|
||||
private _displayOrder: string;
|
||||
private _customPrefixMaxLength: number;
|
||||
private _customPrefixPriceCredits: number;
|
||||
private _customPrefixPricePoints: number;
|
||||
private _customPrefixPointsType: number;
|
||||
private _customPrefixFontPriceCredits: number;
|
||||
private _customPrefixFontPricePoints: number;
|
||||
private _customPrefixFontPointsType: number;
|
||||
private _prefixCatalog: ICustomizePrefixCatalogData[];
|
||||
private _ownedPrefixes: ICustomizeOwnedPrefixData[];
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._nickIcons = [];
|
||||
this._displayOrder = 'icon-prefix-name';
|
||||
this._customPrefixMaxLength = 15;
|
||||
this._customPrefixPriceCredits = 0;
|
||||
this._customPrefixPricePoints = 0;
|
||||
this._customPrefixPointsType = 0;
|
||||
this._customPrefixFontPriceCredits = 0;
|
||||
this._customPrefixFontPricePoints = 0;
|
||||
this._customPrefixFontPointsType = 0;
|
||||
this._prefixCatalog = [];
|
||||
this._ownedPrefixes = [];
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._nickIcons = [];
|
||||
this._displayOrder = 'icon-prefix-name';
|
||||
this._customPrefixMaxLength = 15;
|
||||
this._customPrefixPriceCredits = 0;
|
||||
this._customPrefixPricePoints = 0;
|
||||
this._customPrefixPointsType = 0;
|
||||
this._customPrefixFontPriceCredits = 0;
|
||||
this._customPrefixFontPricePoints = 0;
|
||||
this._customPrefixFontPointsType = 0;
|
||||
this._prefixCatalog = [];
|
||||
this._ownedPrefixes = [];
|
||||
|
||||
let count = wrapper.readInt();
|
||||
|
||||
while(count > 0)
|
||||
{
|
||||
this._nickIcons.push({
|
||||
iconKey: wrapper.readString(),
|
||||
displayName: wrapper.readString(),
|
||||
points: wrapper.readInt(),
|
||||
pointsType: wrapper.readInt(),
|
||||
owned: (wrapper.readInt() === 1),
|
||||
active: (wrapper.readInt() === 1),
|
||||
id: wrapper.readInt()
|
||||
});
|
||||
|
||||
count--;
|
||||
}
|
||||
|
||||
if(wrapper.bytesAvailable)
|
||||
{
|
||||
this._displayOrder = wrapper.readString();
|
||||
this._customPrefixMaxLength = wrapper.readInt();
|
||||
this._customPrefixPriceCredits = wrapper.readInt();
|
||||
this._customPrefixPricePoints = wrapper.readInt();
|
||||
this._customPrefixPointsType = wrapper.readInt();
|
||||
this._customPrefixFontPriceCredits = wrapper.readInt();
|
||||
this._customPrefixFontPricePoints = wrapper.readInt();
|
||||
this._customPrefixFontPointsType = wrapper.readInt();
|
||||
|
||||
let catalogCount = wrapper.readInt();
|
||||
|
||||
while(catalogCount > 0)
|
||||
{
|
||||
this._prefixCatalog.push({
|
||||
id: wrapper.readInt(),
|
||||
displayName: wrapper.readString(),
|
||||
text: wrapper.readString(),
|
||||
color: wrapper.readString(),
|
||||
icon: wrapper.readString(),
|
||||
effect: wrapper.readString(),
|
||||
font: wrapper.readString(),
|
||||
points: wrapper.readInt(),
|
||||
pointsType: wrapper.readInt(),
|
||||
owned: (wrapper.readInt() === 1),
|
||||
active: (wrapper.readInt() === 1),
|
||||
ownedPrefixId: wrapper.readInt()
|
||||
});
|
||||
|
||||
catalogCount--;
|
||||
}
|
||||
|
||||
let ownedCount = wrapper.readInt();
|
||||
|
||||
while(ownedCount > 0)
|
||||
{
|
||||
this._ownedPrefixes.push({
|
||||
id: wrapper.readInt(),
|
||||
displayName: wrapper.readString(),
|
||||
text: wrapper.readString(),
|
||||
color: wrapper.readString(),
|
||||
icon: wrapper.readString(),
|
||||
effect: wrapper.readString(),
|
||||
font: wrapper.readString(),
|
||||
active: (wrapper.readInt() === 1),
|
||||
isCustom: (wrapper.readInt() === 1),
|
||||
points: wrapper.readInt(),
|
||||
pointsType: wrapper.readInt(),
|
||||
catalogPrefixId: wrapper.readInt()
|
||||
});
|
||||
|
||||
ownedCount--;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get nickIcons(): INickIconData[]
|
||||
{
|
||||
return this._nickIcons;
|
||||
}
|
||||
|
||||
public get displayOrder(): string
|
||||
{
|
||||
return this._displayOrder;
|
||||
}
|
||||
|
||||
public get customPrefixMaxLength(): number
|
||||
{
|
||||
return this._customPrefixMaxLength;
|
||||
}
|
||||
|
||||
public get customPrefixPriceCredits(): number
|
||||
{
|
||||
return this._customPrefixPriceCredits;
|
||||
}
|
||||
|
||||
public get customPrefixPricePoints(): number
|
||||
{
|
||||
return this._customPrefixPricePoints;
|
||||
}
|
||||
|
||||
public get customPrefixPointsType(): number
|
||||
{
|
||||
return this._customPrefixPointsType;
|
||||
}
|
||||
|
||||
public get customPrefixFontPriceCredits(): number
|
||||
{
|
||||
return this._customPrefixFontPriceCredits;
|
||||
}
|
||||
|
||||
public get customPrefixFontPricePoints(): number
|
||||
{
|
||||
return this._customPrefixFontPricePoints;
|
||||
}
|
||||
|
||||
public get customPrefixFontPointsType(): number
|
||||
{
|
||||
return this._customPrefixFontPointsType;
|
||||
}
|
||||
|
||||
public get prefixCatalog(): ICustomizePrefixCatalogData[]
|
||||
{
|
||||
return this._prefixCatalog;
|
||||
}
|
||||
|
||||
public get ownedPrefixes(): ICustomizeOwnedPrefixData[]
|
||||
{
|
||||
return this._ownedPrefixes;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from './UserNickIconsParser';
|
||||
+4
@@ -7,6 +7,7 @@ export class ActivePrefixUpdatedParser implements IMessageParser
|
||||
private _color: string;
|
||||
private _icon: string;
|
||||
private _effect: string;
|
||||
private _font: string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@@ -15,6 +16,7 @@ export class ActivePrefixUpdatedParser implements IMessageParser
|
||||
this._color = '';
|
||||
this._icon = '';
|
||||
this._effect = '';
|
||||
this._font = '';
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -27,6 +29,7 @@ export class ActivePrefixUpdatedParser implements IMessageParser
|
||||
this._color = wrapper.readString();
|
||||
this._icon = wrapper.readString();
|
||||
this._effect = wrapper.readString();
|
||||
this._font = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -36,4 +39,5 @@ export class ActivePrefixUpdatedParser implements IMessageParser
|
||||
public get color(): string { return this._color; }
|
||||
public get icon(): string { return this._icon; }
|
||||
public get effect(): string { return this._effect; }
|
||||
public get font(): string { return this._font; }
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ export class PrefixReceivedParser implements IMessageParser
|
||||
private _color: string;
|
||||
private _icon: string;
|
||||
private _effect: string;
|
||||
private _font: string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@@ -15,6 +16,7 @@ export class PrefixReceivedParser implements IMessageParser
|
||||
this._color = '';
|
||||
this._icon = '';
|
||||
this._effect = '';
|
||||
this._font = '';
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -27,6 +29,7 @@ export class PrefixReceivedParser implements IMessageParser
|
||||
this._color = wrapper.readString();
|
||||
this._icon = wrapper.readString();
|
||||
this._effect = wrapper.readString();
|
||||
this._font = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -36,4 +39,5 @@ export class PrefixReceivedParser implements IMessageParser
|
||||
public get color(): string { return this._color; }
|
||||
public get icon(): string { return this._icon; }
|
||||
public get effect(): string { return this._effect; }
|
||||
public get font(): string { return this._font; }
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ export interface IPrefixData
|
||||
color: string;
|
||||
icon: string;
|
||||
effect: string;
|
||||
font: string;
|
||||
active: boolean;
|
||||
}
|
||||
|
||||
@@ -36,6 +37,7 @@ export class UserPrefixesParser implements IMessageParser
|
||||
color: wrapper.readString(),
|
||||
icon: wrapper.readString(),
|
||||
effect: wrapper.readString(),
|
||||
font: wrapper.readString(),
|
||||
active: wrapper.readInt() === 1
|
||||
});
|
||||
|
||||
|
||||
@@ -7,9 +7,16 @@ export class RoomUnitInfoParser implements IMessageParser
|
||||
private _gender: string;
|
||||
private _motto: string;
|
||||
private _achievementScore: number;
|
||||
private _backgroundId: number;
|
||||
private _backgroundId: number;
|
||||
private _standId: number;
|
||||
private _overlayId: number;
|
||||
private _nickIcon: string;
|
||||
private _prefixText: string;
|
||||
private _prefixColor: string;
|
||||
private _prefixIcon: string;
|
||||
private _prefixEffect: string;
|
||||
private _prefixFont: string;
|
||||
private _displayOrder: string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@@ -18,9 +25,16 @@ export class RoomUnitInfoParser implements IMessageParser
|
||||
this._gender = 'M';
|
||||
this._motto = null;
|
||||
this._achievementScore = 0;
|
||||
this._backgroundId = 0;
|
||||
this._backgroundId = 0;
|
||||
this._standId = 0;
|
||||
this._overlayId = 0;
|
||||
this._nickIcon = '';
|
||||
this._prefixText = '';
|
||||
this._prefixColor = '';
|
||||
this._prefixIcon = '';
|
||||
this._prefixEffect = '';
|
||||
this._prefixFont = '';
|
||||
this._displayOrder = 'icon-prefix-name';
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -34,9 +48,16 @@ export class RoomUnitInfoParser implements IMessageParser
|
||||
this._gender = wrapper.readString().toLocaleUpperCase();
|
||||
this._motto = wrapper.readString();
|
||||
this._achievementScore = wrapper.readInt();
|
||||
this._backgroundId = wrapper.readInt();
|
||||
this._backgroundId = wrapper.readInt();
|
||||
this._standId = wrapper.readInt();
|
||||
this._overlayId = wrapper.readInt();
|
||||
this._overlayId = wrapper.readInt();
|
||||
this._nickIcon = (wrapper.bytesAvailable ? wrapper.readString() : '');
|
||||
this._prefixText = (wrapper.bytesAvailable ? wrapper.readString() : '');
|
||||
this._prefixColor = (wrapper.bytesAvailable ? wrapper.readString() : '');
|
||||
this._prefixIcon = (wrapper.bytesAvailable ? wrapper.readString() : '');
|
||||
this._prefixEffect = (wrapper.bytesAvailable ? wrapper.readString() : '');
|
||||
this._prefixFont = (wrapper.bytesAvailable ? wrapper.readString() : '');
|
||||
this._displayOrder = (wrapper.bytesAvailable ? wrapper.readString() : 'icon-prefix-name');
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -80,4 +101,39 @@ export class RoomUnitInfoParser implements IMessageParser
|
||||
{
|
||||
return this._overlayId;
|
||||
}
|
||||
}
|
||||
|
||||
public get nickIcon(): string
|
||||
{
|
||||
return this._nickIcon;
|
||||
}
|
||||
|
||||
public get prefixText(): string
|
||||
{
|
||||
return this._prefixText;
|
||||
}
|
||||
|
||||
public get prefixColor(): string
|
||||
{
|
||||
return this._prefixColor;
|
||||
}
|
||||
|
||||
public get prefixIcon(): string
|
||||
{
|
||||
return this._prefixIcon;
|
||||
}
|
||||
|
||||
public get prefixEffect(): string
|
||||
{
|
||||
return this._prefixEffect;
|
||||
}
|
||||
|
||||
public get prefixFont(): string
|
||||
{
|
||||
return this._prefixFont;
|
||||
}
|
||||
|
||||
public get displayOrder(): string
|
||||
{
|
||||
return this._displayOrder;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,13 @@ export class RoomUnitParser implements IMessageParser
|
||||
user.figure = figure;
|
||||
user.activityPoints = wrapper.readInt();
|
||||
user.isModerator = wrapper.readBoolean();
|
||||
user.nickIcon = wrapper.readString();
|
||||
user.prefixText = wrapper.readString();
|
||||
user.prefixColor = wrapper.readString();
|
||||
user.prefixIcon = wrapper.readString();
|
||||
user.prefixEffect = wrapper.readString();
|
||||
user.prefixFont = wrapper.readString();
|
||||
user.displayOrder = wrapper.readString();
|
||||
}
|
||||
|
||||
else if(type === 2)
|
||||
|
||||
@@ -13,6 +13,13 @@ export class UserMessageData
|
||||
private _sex: string = '';
|
||||
private _figure: string = '';
|
||||
private _custom: string = '';
|
||||
private _nickIcon: string = '';
|
||||
private _prefixText: string = '';
|
||||
private _prefixColor: string = '';
|
||||
private _prefixIcon: string = '';
|
||||
private _prefixEffect: string = '';
|
||||
private _prefixFont: string = '';
|
||||
private _displayOrder: string = 'icon-prefix-name';
|
||||
private _activityPoints: number = 0;
|
||||
private _background: number = 0;
|
||||
private _stand: number = 0;
|
||||
@@ -437,6 +444,97 @@ export class UserMessageData
|
||||
return this._isModerator;
|
||||
}
|
||||
|
||||
public get nickIcon(): string
|
||||
{
|
||||
return this._nickIcon;
|
||||
}
|
||||
|
||||
public set nickIcon(k: string)
|
||||
{
|
||||
if(!this._isReadOnly)
|
||||
{
|
||||
this._nickIcon = k;
|
||||
}
|
||||
}
|
||||
|
||||
public get prefixText(): string
|
||||
{
|
||||
return this._prefixText;
|
||||
}
|
||||
|
||||
public set prefixText(k: string)
|
||||
{
|
||||
if(!this._isReadOnly)
|
||||
{
|
||||
this._prefixText = k;
|
||||
}
|
||||
}
|
||||
|
||||
public get prefixColor(): string
|
||||
{
|
||||
return this._prefixColor;
|
||||
}
|
||||
|
||||
public set prefixColor(k: string)
|
||||
{
|
||||
if(!this._isReadOnly)
|
||||
{
|
||||
this._prefixColor = k;
|
||||
}
|
||||
}
|
||||
|
||||
public get prefixIcon(): string
|
||||
{
|
||||
return this._prefixIcon;
|
||||
}
|
||||
|
||||
public set prefixIcon(k: string)
|
||||
{
|
||||
if(!this._isReadOnly)
|
||||
{
|
||||
this._prefixIcon = k;
|
||||
}
|
||||
}
|
||||
|
||||
public get prefixEffect(): string
|
||||
{
|
||||
return this._prefixEffect;
|
||||
}
|
||||
|
||||
public set prefixEffect(k: string)
|
||||
{
|
||||
if(!this._isReadOnly)
|
||||
{
|
||||
this._prefixEffect = k;
|
||||
}
|
||||
}
|
||||
|
||||
public get prefixFont(): string
|
||||
{
|
||||
return this._prefixFont;
|
||||
}
|
||||
|
||||
public set prefixFont(k: string)
|
||||
{
|
||||
if(!this._isReadOnly)
|
||||
{
|
||||
this._prefixFont = k;
|
||||
}
|
||||
}
|
||||
|
||||
public get displayOrder(): string
|
||||
{
|
||||
return this._displayOrder;
|
||||
}
|
||||
|
||||
public set displayOrder(k: string)
|
||||
{
|
||||
if(!this._isReadOnly)
|
||||
{
|
||||
this._displayOrder = k;
|
||||
}
|
||||
}
|
||||
|
||||
public set isModerator(k: boolean)
|
||||
{
|
||||
if(!this._isReadOnly)
|
||||
|
||||
@@ -13,6 +13,9 @@ export class RoomUnitChatParser implements IMessageParser
|
||||
private _prefixColor: string;
|
||||
private _prefixIcon: string;
|
||||
private _prefixEffect: string;
|
||||
private _prefixFont: string;
|
||||
private _nickIcon: string;
|
||||
private _displayOrder: string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@@ -27,6 +30,9 @@ export class RoomUnitChatParser implements IMessageParser
|
||||
this._prefixColor = '';
|
||||
this._prefixIcon = '';
|
||||
this._prefixEffect = '';
|
||||
this._prefixFont = '';
|
||||
this._nickIcon = '';
|
||||
this._displayOrder = 'icon-prefix-name';
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -48,6 +54,9 @@ export class RoomUnitChatParser implements IMessageParser
|
||||
this._prefixColor = wrapper.readString();
|
||||
this._prefixIcon = wrapper.readString();
|
||||
this._prefixEffect = wrapper.readString();
|
||||
this._prefixFont = wrapper.readString();
|
||||
this._nickIcon = wrapper.readString();
|
||||
this._displayOrder = (wrapper.bytesAvailable ? wrapper.readString() : 'icon-prefix-name');
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -124,4 +133,19 @@ export class RoomUnitChatParser implements IMessageParser
|
||||
{
|
||||
return this._prefixEffect;
|
||||
}
|
||||
|
||||
public get prefixFont(): string
|
||||
{
|
||||
return this._prefixFont;
|
||||
}
|
||||
|
||||
public get nickIcon(): string
|
||||
{
|
||||
return this._nickIcon;
|
||||
}
|
||||
|
||||
public get displayOrder(): string
|
||||
{
|
||||
return this._displayOrder;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export interface ITranslationLanguageData
|
||||
{
|
||||
code: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export class TranslationLanguagesParser implements IMessageParser
|
||||
{
|
||||
private _success: boolean;
|
||||
private _errorMessage: string;
|
||||
private _languages: ITranslationLanguageData[];
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._success = false;
|
||||
this._errorMessage = '';
|
||||
this._languages = [];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._success = wrapper.readBoolean();
|
||||
this._errorMessage = wrapper.readString();
|
||||
this._languages = [];
|
||||
|
||||
const totalLanguages = wrapper.readInt();
|
||||
|
||||
for(let index = 0; index < totalLanguages; index++)
|
||||
{
|
||||
this._languages.push({
|
||||
code: wrapper.readString(),
|
||||
name: wrapper.readString()
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get success(): boolean
|
||||
{
|
||||
return this._success;
|
||||
}
|
||||
|
||||
public get errorMessage(): string
|
||||
{
|
||||
return this._errorMessage;
|
||||
}
|
||||
|
||||
public get languages(): ITranslationLanguageData[]
|
||||
{
|
||||
return this._languages;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
||||
|
||||
export class TranslationResultParser implements IMessageParser
|
||||
{
|
||||
private _requestId: number;
|
||||
private _success: boolean;
|
||||
private _errorMessage: string;
|
||||
private _originalText: string;
|
||||
private _translatedText: string;
|
||||
private _detectedLanguage: string;
|
||||
private _targetLanguage: string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._requestId = 0;
|
||||
this._success = false;
|
||||
this._errorMessage = '';
|
||||
this._originalText = '';
|
||||
this._translatedText = '';
|
||||
this._detectedLanguage = '';
|
||||
this._targetLanguage = '';
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._requestId = wrapper.readInt();
|
||||
this._success = wrapper.readBoolean();
|
||||
this._errorMessage = wrapper.readString();
|
||||
this._originalText = wrapper.readString();
|
||||
this._translatedText = wrapper.readString();
|
||||
this._detectedLanguage = wrapper.readString();
|
||||
this._targetLanguage = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get requestId(): number
|
||||
{
|
||||
return this._requestId;
|
||||
}
|
||||
|
||||
public get success(): boolean
|
||||
{
|
||||
return this._success;
|
||||
}
|
||||
|
||||
public get errorMessage(): string
|
||||
{
|
||||
return this._errorMessage;
|
||||
}
|
||||
|
||||
public get originalText(): string
|
||||
{
|
||||
return this._originalText;
|
||||
}
|
||||
|
||||
public get translatedText(): string
|
||||
{
|
||||
return this._translatedText;
|
||||
}
|
||||
|
||||
public get detectedLanguage(): string
|
||||
{
|
||||
return this._detectedLanguage;
|
||||
}
|
||||
|
||||
public get targetLanguage(): string
|
||||
{
|
||||
return this._targetLanguage;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from './TranslationLanguagesParser';
|
||||
export * from './TranslationResultParser';
|
||||
@@ -19,6 +19,13 @@ export class UserProfileParser implements IMessageParser
|
||||
private _backgroundId: number;
|
||||
private _standId: number;
|
||||
private _overlayId: number;
|
||||
private _nickIcon: string;
|
||||
private _prefixText: string;
|
||||
private _prefixColor: string;
|
||||
private _prefixIcon: string;
|
||||
private _prefixEffect: string;
|
||||
private _prefixFont: string;
|
||||
private _displayOrder: string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
@@ -38,6 +45,13 @@ export class UserProfileParser implements IMessageParser
|
||||
this._backgroundId = 0;
|
||||
this._standId = 0;
|
||||
this._overlayId = 0;
|
||||
this._nickIcon = '';
|
||||
this._prefixText = '';
|
||||
this._prefixColor = '';
|
||||
this._prefixIcon = '';
|
||||
this._prefixEffect = '';
|
||||
this._prefixFont = '';
|
||||
this._displayOrder = 'icon-prefix-name';
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -71,6 +85,21 @@ export class UserProfileParser implements IMessageParser
|
||||
this._backgroundId = wrapper.readInt();
|
||||
this._standId = wrapper.readInt();
|
||||
this._overlayId = wrapper.readInt();
|
||||
|
||||
if(wrapper.bytesAvailable)
|
||||
{
|
||||
this._nickIcon = wrapper.readString();
|
||||
|
||||
if(wrapper.bytesAvailable)
|
||||
{
|
||||
this._prefixText = wrapper.readString();
|
||||
this._prefixColor = wrapper.readString();
|
||||
this._prefixIcon = wrapper.readString();
|
||||
this._prefixEffect = wrapper.readString();
|
||||
this._prefixFont = wrapper.readString();
|
||||
this._displayOrder = wrapper.readString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -155,4 +184,39 @@ export class UserProfileParser implements IMessageParser
|
||||
{
|
||||
return this._overlayId;
|
||||
}
|
||||
|
||||
public get nickIcon(): string
|
||||
{
|
||||
return this._nickIcon;
|
||||
}
|
||||
|
||||
public get prefixText(): string
|
||||
{
|
||||
return this._prefixText;
|
||||
}
|
||||
|
||||
public get prefixColor(): string
|
||||
{
|
||||
return this._prefixColor;
|
||||
}
|
||||
|
||||
public get prefixIcon(): string
|
||||
{
|
||||
return this._prefixIcon;
|
||||
}
|
||||
|
||||
public get prefixEffect(): string
|
||||
{
|
||||
return this._prefixEffect;
|
||||
}
|
||||
|
||||
public get prefixFont(): string
|
||||
{
|
||||
return this._prefixFont;
|
||||
}
|
||||
|
||||
public get displayOrder(): string
|
||||
{
|
||||
return this._displayOrder;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user