mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-02-17 02:22:36 +01:00
cleaned pet parsers
This commit is contained in:
parent
8fb1ff898a
commit
56c60c3e29
@ -0,0 +1,34 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class NestBreedingSuccessParser implements IMessageParser
|
||||
{
|
||||
private _rarityCategory: number;
|
||||
private _petId: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._petId = -1;
|
||||
this._rarityCategory = -1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(k: IMessageDataWrapper): boolean
|
||||
{
|
||||
this._petId = k.readInt();
|
||||
this._rarityCategory = k.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get rarityCategory(): number
|
||||
{
|
||||
return this._rarityCategory;
|
||||
}
|
||||
|
||||
public get petId(): number
|
||||
{
|
||||
return this._petId;
|
||||
}
|
||||
}
|
@ -1,21 +1,21 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class _Str_7523 implements IMessageParser
|
||||
export class PetBreedingMessageParser implements IMessageParser
|
||||
{
|
||||
public static _Str_8664: number = 1;
|
||||
public static _Str_9186: number = 2;
|
||||
public static _Str_22195: number = 3;
|
||||
public static STATE_CANCEL: number = 1;
|
||||
public static STATE_ACCEPT: number = 2;
|
||||
public static STATE_REQUEST: number = 3;
|
||||
|
||||
private _state: number;
|
||||
private _Str_6614: number;
|
||||
private _Str_6649: number;
|
||||
private _ownPetId: number;
|
||||
private _otherPetId: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._state = 0;
|
||||
this._Str_6614 = 0;
|
||||
this._Str_6649 = 0;
|
||||
this._ownPetId = 0;
|
||||
this._otherPetId = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -25,8 +25,8 @@ export class _Str_7523 implements IMessageParser
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._state = wrapper.readInt();
|
||||
this._Str_6614 = wrapper.readInt();
|
||||
this._Str_6649 = wrapper.readInt();
|
||||
this._ownPetId = wrapper.readInt();
|
||||
this._otherPetId = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -36,13 +36,13 @@ export class _Str_7523 implements IMessageParser
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public get _Str_7440(): number
|
||||
public get ownPetId(): number
|
||||
{
|
||||
return this._Str_6614;
|
||||
return this._ownPetId;
|
||||
}
|
||||
|
||||
public get _Str_7663(): number
|
||||
public get otherPetId(): number
|
||||
{
|
||||
return this._Str_6649;
|
||||
return this._otherPetId;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class _Str_9220 implements IMessageParser
|
||||
{
|
||||
private _Str_5792: number;
|
||||
private _Str_2388: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._Str_2388 = -1;
|
||||
this._Str_5792 = -1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(k: IMessageDataWrapper): boolean
|
||||
{
|
||||
this._Str_2388 = k.readInt();
|
||||
this._Str_5792 = k.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get _Str_16731(): number
|
||||
{
|
||||
return this._Str_5792;
|
||||
}
|
||||
|
||||
public get _Str_2508(): number
|
||||
{
|
||||
return this._Str_2388;
|
||||
}
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
export * from './NestBreedingSuccessParser';
|
||||
export * from './PetAddedToInventoryParser';
|
||||
export * from './PetBoughtNotificationMessageParser';
|
||||
export * from './PetBreedingMessageParser';
|
||||
export * from './PetData';
|
||||
export * from './PetFigureDataParser';
|
||||
export * from './PetInventoryParser';
|
||||
@ -7,5 +9,3 @@ export * from './PetRemovedFromInventoryParser';
|
||||
export * from './_Str_6256';
|
||||
export * from './_Str_6719';
|
||||
export * from './_Str_7486';
|
||||
export * from './_Str_7523';
|
||||
export * from './_Str_9220';
|
||||
|
@ -3,26 +3,26 @@ import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionNestBreedingSuccessEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSPFUE_NEST_BREEDING_SUCCESS: string = 'RSPFUE_NEST_BREEDING_SUCCESS';
|
||||
public static NEST_BREEDING_SUCCESS: string = 'RSPFUE_NEST_BREEDING_SUCCESS';
|
||||
|
||||
private _rarityCategory: number;
|
||||
private _petId: number;
|
||||
|
||||
constructor(k: IRoomSession, _arg_2: number, _arg_3: number)
|
||||
{
|
||||
super(RoomSessionNestBreedingSuccessEvent.RSPFUE_NEST_BREEDING_SUCCESS, k);
|
||||
super(RoomSessionNestBreedingSuccessEvent.NEST_BREEDING_SUCCESS, k);
|
||||
|
||||
this._petId = _arg_2;
|
||||
this._rarityCategory = _arg_3;
|
||||
}
|
||||
|
||||
public get _Str_16731(): number
|
||||
public get rarityCategory(): number
|
||||
{
|
||||
return this._rarityCategory;
|
||||
}
|
||||
|
||||
public get _Str_2508(): number
|
||||
public get petId(): number
|
||||
{
|
||||
return this._petId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPetBreedingEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSPFUE_PET_BREEDING: string = 'RSPFUE_PET_BREEDING';
|
||||
public static PET_BREEDING: string = 'RSPFUE_PET_BREEDING';
|
||||
|
||||
private _state: number;
|
||||
private _ownPetId: number;
|
||||
@ -11,7 +11,7 @@ export class RoomSessionPetBreedingEvent extends RoomSessionEvent
|
||||
|
||||
constructor(k: IRoomSession, _arg_2: number, _arg_3: number, _arg_4: number)
|
||||
{
|
||||
super(RoomSessionPetBreedingEvent.RSPFUE_PET_BREEDING, k);
|
||||
super(RoomSessionPetBreedingEvent.PET_BREEDING, k);
|
||||
|
||||
this._state = _arg_2;
|
||||
this._ownPetId = _arg_3;
|
||||
@ -23,13 +23,13 @@ export class RoomSessionPetBreedingEvent extends RoomSessionEvent
|
||||
return this._state;
|
||||
}
|
||||
|
||||
public get _Str_7440(): number
|
||||
public get ownPetId(): number
|
||||
{
|
||||
return this._ownPetId;
|
||||
}
|
||||
|
||||
public get _Str_7663(): number
|
||||
public get otherPetId(): number
|
||||
{
|
||||
return this._otherPetId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,20 +3,20 @@ import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPetLevelUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSPLUE_PET_LEVEL_UPDATE: string = 'RSPLUE_PET_LEVEL_UPDATE';
|
||||
public static PET_LEVEL_UPDATE: string = 'RSPLUE_PET_LEVEL_UPDATE';
|
||||
|
||||
private _petId: number;
|
||||
private _level: number;
|
||||
|
||||
constructor(k: IRoomSession, _arg_2: number, _arg_3: number)
|
||||
{
|
||||
super(RoomSessionPetLevelUpdateEvent.RSPLUE_PET_LEVEL_UPDATE, k);
|
||||
super(RoomSessionPetLevelUpdateEvent.PET_LEVEL_UPDATE, k);
|
||||
|
||||
this._petId = _arg_2;
|
||||
this._level = _arg_3;
|
||||
}
|
||||
|
||||
public get _Str_2508(): number
|
||||
public get petId(): number
|
||||
{
|
||||
return this._petId;
|
||||
}
|
||||
@ -25,4 +25,4 @@ export class RoomSessionPetLevelUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
return this._level;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import { RoomSessionEvent } from './RoomSessionEvent';
|
||||
|
||||
export class RoomSessionPetStatusUpdateEvent extends RoomSessionEvent
|
||||
{
|
||||
public static RSPFUE_PET_STATUS_UPDATE: string = 'RSPFUE_PET_STATUS_UPDATE';
|
||||
public static PET_STATUS_UPDATE: string = 'RSPFUE_PET_STATUS_UPDATE';
|
||||
|
||||
private _petId: number;
|
||||
private _canBreed: boolean;
|
||||
@ -13,7 +13,7 @@ export class RoomSessionPetStatusUpdateEvent extends RoomSessionEvent
|
||||
|
||||
constructor(k: IRoomSession, _arg_2: number, _arg_3: boolean, _arg_4: boolean, _arg_5: boolean, _arg_6: boolean)
|
||||
{
|
||||
super(RoomSessionPetStatusUpdateEvent.RSPFUE_PET_STATUS_UPDATE, k);
|
||||
super(RoomSessionPetStatusUpdateEvent.PET_STATUS_UPDATE, k);
|
||||
|
||||
this._petId = _arg_2;
|
||||
this._canBreed = _arg_3;
|
||||
@ -22,28 +22,28 @@ export class RoomSessionPetStatusUpdateEvent extends RoomSessionEvent
|
||||
this._hasBreedingPermission = _arg_6;
|
||||
}
|
||||
|
||||
public get _Str_2508(): number
|
||||
public get petId(): number
|
||||
{
|
||||
return this._petId;
|
||||
}
|
||||
|
||||
public get _Str_2934(): boolean
|
||||
public get canBreed(): boolean
|
||||
{
|
||||
return this._canBreed;
|
||||
}
|
||||
|
||||
public get _Str_3068(): boolean
|
||||
public get canHarvest(): boolean
|
||||
{
|
||||
return this._canHarvest;
|
||||
}
|
||||
|
||||
public get _Str_2898(): boolean
|
||||
public get canRevive(): boolean
|
||||
{
|
||||
return this._canRevive;
|
||||
}
|
||||
|
||||
public get _Str_2921(): boolean
|
||||
public get hasBreedingPermission(): boolean
|
||||
{
|
||||
return this._hasBreedingPermission;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user