mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
16 lines
780 B
TypeScript
16 lines
780 B
TypeScript
import { GOnHookPets } from "../../../extensions/ngame/assets/ngame/message/proto";
|
|
import { app } from "../App";
|
|
import { PlayerPetOV, RData, RProto } from "./API";
|
|
import { GActionType } from "./GActionType";
|
|
|
|
export const GAPI = {
|
|
|
|
/************** 无限模式接口 ********************/
|
|
//生成野怪
|
|
GOnHookSpawnCreeps : async () => RProto(await app.api.get(`/game/mode/onHook/onSpawnCreeps`,{responseType:'arraybuffer'}),GActionType.GOnHookPets) as GOnHookPets,
|
|
//捕捉野怪
|
|
GOnHookCatchCreeps : async (creepId) => RData(await app.api.post(`/game/mode/onHook/onCatchCreeps/${creepId}`)) as PlayerPetOV,
|
|
//出售野怪
|
|
GOnHookSellCreeps : async (creepId) => RData(await app.api.post(`/game/mode/onHook/onSellCreeps/${creepId}`)) as boolean,
|
|
|
|
} |