@xmobitea/gn-server
Version:
GearN Server by XmobiTea (Pro)
60 lines (59 loc) • 2.49 kB
TypeScript
import * as mongoDB from "mongodb";
import { DataItem } from "./DataItem";
import { DataObjectBase } from "./DataObjectBase";
import { OwnerItem } from "./OwnerItem";
import { RemoveStatusItem } from "./RemoveStatusItem";
import { StatisticsItem } from "./StatisticsItem";
import { DataValueType } from "./type/DataValueType";
import { CurrencyItem } from "./CurrencyItem";
import { InventoryItem } from "./InventoryItem";
export declare class TradeInventory extends DataObjectBase {
private static readonly _tradeId;
private static readonly _tradeItems;
private static readonly _owner;
private static readonly _buyer;
private static readonly _tsBuy;
private static readonly _prices;
private static readonly _itemDatas;
private static readonly _itemStatistics;
private static readonly _removeStatus;
private readonly tradeId;
private tradeItems;
private owner;
private buyer;
private tsBuy;
private prices;
private itemDatas;
private itemStatistics;
private removeStatus;
constructor(result: mongoDB.WithId<mongoDB.Document>, collection: mongoDB.Collection<mongoDB.Document>);
private setDocumentTradeInventory;
getTradeId(): string;
getAllTradeItems(): Array<InventoryItem>;
hasTradeItem(itemId: string): boolean;
getTradeItem(itemId: string): InventoryItem;
setTradeItem(itemId: string, catalogId: string, classId: string): void;
removeTradeItem(itemId: string): void;
getOwner(): OwnerItem;
setOwner(ownerId: string, ownerType: number): void;
getBuyer(): OwnerItem;
setBuyer(buyerId: string, buyerType: number): void;
setTsBuy(tsBuy: number): void;
getAllItemDatas(): Array<DataItem>;
hasItemData(key: string): boolean;
getItemData(key: string): DataItem;
setItemData(key: string, value: DataValueType): void;
removeItemData(key: string): void;
getAllItemStatistics(): Map<string, StatisticsItem>;
hasItemStatistics(key: string): boolean;
getItemStatistics(key: string): StatisticsItem;
changeItemStatistics(key: string, value: number, tsLastUpdate: number): void;
removeItemStatistics(key: string): void;
getRemoveStatus(): RemoveStatusItem;
setRemoveStatus(tsRemove: number, reason?: string): void;
getAllPrices(): Map<string, CurrencyItem>;
hasPrice(key: string): boolean;
getPrice(key: string): CurrencyItem;
setPrice(key: string, value: number): void;
removePrice(key: string): void;
}