This commit is contained in:
Putoo
2026-05-27 18:26:50 +08:00
parent 36a7575990
commit 0d5443ef36
28 changed files with 1043 additions and 25 deletions

View File

@@ -30,4 +30,12 @@ export class MapService {
static async GetAutoMapPath(toMap: string) {
return await ApiService.Request("get", "/Map/Map/GetAutoMapPath", { toMap });
}
/**
* 获取NPC相关信息
* GET /Map/Map/GetNpcInfo
*/
static async GetNpcInfo(npcId: number) {
return await ApiService.Request("get", "/Map/Map/GetNpcInfo", { npcId });
}
}

View File

@@ -0,0 +1,41 @@
export class StoreService {
/**
* 获取npc商店信息
* GET /Map/Store/GetNpcStore
*/
static async GetNpcStore(npcId: number, page: number) {
return await ApiService.Request("get", "/Map/Store/GetNpcStore", { npcId, page });
}
/**
* 购买物品
* POST /Map/Store/Buy
* @param npcId body
* @param storeId body
* @param count body
*/
static async Buy(npcId: number, storeId: string, count: number) {
return await ApiService.Request("post", "/Map/Store/Buy", { npcId, storeId, count });
}
/**
* 出售物品
* GET /Map/Store/GetNpcSale
*/
static async GetNpcSale(npcId: number, type: number, query: string, page: number) {
return await ApiService.Request("get", "/Map/Store/GetNpcSale", { npcId, type, query, page });
}
/**
* 出售物品
* POST /Map/Store/Sale
* @param npcId body
* @param count body
* @param search body
* @param type body
* @param id body
*/
static async Sale(npcId: number, count: number, search: string, type: number, id: string) {
return await ApiService.Request("post", "/Map/Store/Sale", { npcId, count, search, type, id });
}
}