UNPKG

@ginstone/nga-api

Version:

73 lines (72 loc) 2.06 kB
import { NukeFuncParam } from "./NukeParams"; import { ItemType } from "../enums/ItemType"; import { ItemUseType } from "../enums/ItemUseType"; /** * 道具参数公共部分 */ export declare class BaseItemParam extends NukeFuncParam { readonly act: string; constructor(act: string); } /** * * 17.3 获得指定道具的信息 * <a href="https://bbs.nga.cn/read.php?pid=130386150">文档</a> */ export declare class ItemInfoParam extends BaseItemParam { readonly types: string; constructor(types: string[]); } /** * 购买道具参数 */ export declare class ItemBuyParam extends BaseItemParam { readonly id: number; readonly count: number; constructor(id: number, count: number); } /** * 查询自己的道具库存 */ export declare class ItemInventoryParam extends BaseItemParam { readonly page: number; constructor(page: number); } /** * 查询商店里的道具列表 */ export declare class ItemStoreParam extends BaseItemParam { readonly page: number; readonly type: ItemType; readonly sub_type: string | undefined; constructor(page: number, type: ItemType, subTypes?: number[]); } /** * 使用道具 */ export declare class ItemUseParam extends BaseItemParam { /** * type 为 USE_INVENTORY 时表示 库存中的道具id,否则表示商店中的道具id */ readonly id: number; /** * 参数 */ readonly arg: string; constructor(type: ItemUseType, id: number, arg: string); /** * 对用户使用 * @param type 使用类型 * @param id 道具id * @param userId 目标用户id */ static useToUser: (type: ItemUseType, id: number, userId: number) => ItemUseParam; /** * 对回复使用 * @param type 使用类型 * @param id 道具id * @param topicId 主题id * @param replyId 回复id * @param recommend 1 = 支持 -1 = 反对 0 = 中立 */ static useToReply: (type: ItemUseType, id: number, topicId: number, replyId: number, recommend: 0 | 1 | -1) => ItemUseParam; }