mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-30 03:00:51 +01:00
Add rarity level to stuff data
This commit is contained in:
parent
f3d633458a
commit
380087cc8b
@ -7,10 +7,11 @@ export interface IObjectData
|
|||||||
isUnique: boolean;
|
isUnique: boolean;
|
||||||
uniqueNumber: number;
|
uniqueNumber: number;
|
||||||
uniqueSeries: number;
|
uniqueSeries: number;
|
||||||
|
rarityLevel: number;
|
||||||
flags: number;
|
flags: number;
|
||||||
parseWrapper(wrapper: IMessageDataWrapper): void;
|
parseWrapper(wrapper: IMessageDataWrapper): void;
|
||||||
initializeFromRoomObjectModel(model: IRoomObjectModel): void;
|
initializeFromRoomObjectModel(model: IRoomObjectModel): void;
|
||||||
writeRoomObjectModel(model: IRoomObjectModel): void;
|
writeRoomObjectModel(model: IRoomObjectModel): void;
|
||||||
getLegacyString(): string;
|
getLegacyString(): string;
|
||||||
compare(data: IObjectData): boolean;
|
compare(data: IObjectData): boolean;
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,11 @@ export class ObjectDataBase implements IObjectData
|
|||||||
return this._uniqueSeries;
|
return this._uniqueSeries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get rarityLevel(): number
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
public get flags(): number
|
public get flags(): number
|
||||||
{
|
{
|
||||||
return this._flags;
|
return this._flags;
|
||||||
@ -81,4 +86,4 @@ export class ObjectDataBase implements IObjectData
|
|||||||
{
|
{
|
||||||
this._flags = flags;
|
this._flags = flags;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,17 @@ export class MapDataType extends ObjectDataBase
|
|||||||
return this._data[key];
|
return this._data[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get rarityLevel(): number
|
||||||
|
{
|
||||||
|
if(!this._data || !this._data.length) return -1;
|
||||||
|
|
||||||
|
const state = this._data[MapDataType.RARITY];
|
||||||
|
|
||||||
|
if(state === undefined || state === null) return -1;
|
||||||
|
|
||||||
|
return parseInt(state);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: How to get the keys?
|
// TODO: How to get the keys?
|
||||||
public get data()
|
public get data()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user