#pragma once
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dlfcn.h>
#include <execinfo.h>
#include <elf.h>

#define PADALIGN(x, mask) ((x + mask) & (~(x % mask)))

#define Ver 1
// #define Patch 2

__BEGIN_DECLS

typedef int (*fnPacketGuard)(void *pInst);

typedef int (*fnaddServerHackCnt)(void *pCHackAnalyzer, void *pCUserCharacInfo, int HackType, int Cnt, int a5, int a6);

typedef int (*fnParsing)(void *pUser, int nSize);

typedef int (*fnput_header)(void *pInterfacePacketBuf, int Type, int Cmd);

typedef void (*fnLeninsert_user)(void *Area, void *CUser);

typedef void (*fnLenGameWorld_move_position)(void *GameWorld, void *CUser, int a3, int a4, int a5, short a6);

typedef int (*fnLenGetTimerMess)(void *TimerQueue, void *TimerEntry);

typedef int (*fnLengetareauseridlist)(int a1, int a2);

typedef int (*fnInter_LoadGeolocation_dispatch_sig)(void *A, void *B, char *C);

typedef int (*fnLenDispatcher_New_Gmdebug_Command)(void *Command, void *CUser, void *PacketBuf);

typedef int (*fnIsRoutingItem)(void *pItem);

typedef int (*fnsetCharacInfoDetail)(void *pUser, int a2, int a3, void *pCHARAC_DATA);

typedef void *(*fnGetVectorUserCharacInfo)(void *pUser, int a2);

typedef int (*fnIsGameMasterMode)(void *pUser);

typedef int (*fnisGMUser)(void *pUser);

typedef int (*fnGetPvPTeamCount)(void *pDataManager);

typedef int (*fnisGM)(void *pGMAccounts, unsigned int a2);

typedef int (*fnisGM1)(void *pGM_Manager);

typedef void *(*fnset_add_info)(void *pInven_Item, int a2);

typedef int (*fndoDispatch)(void *pPacketDispatcher, void *pUser, int a3, int a4, void *src, int a6, int a7, int a8);

typedef void **(*fnget_dispatcher)(void *pPacketDispatcher, int a2);

typedef int (*fnisSocketAvatar)(void *pAvatarItemMgr1, void *pAvatarItemMgr2);

typedef int (*fndispatch_template)(void *pInst, void *pUser, void *pPacketBuf);

typedef int (*fnreach_game_world)(void *pThis, void *a2);

typedef int (*fnInter_LoadEtc_dispatch_sig)(void *pThis, void *pUser, char *a3);

typedef int (*CUserCharacInfo_getCurCharacNo)(void *pUser);

typedef char *(*CUserCharacInfo_getCurCharacName)(void *pUser);

typedef int (*fnselect)(int __nfds, fd_set *__restrict __readfds,
						fd_set *__restrict __writefds,
						fd_set *__restrict __exceptfds,
						struct timeval *__restrict __timeout);

typedef int (*fnusleep)(__useconds_t __useconds);

typedef void *(*fnmalloc)(size_t __size);

// 发送邮件
typedef int (*fnReqDBSendNewSystemMultiMail)(char *src, int a2, unsigned int a3, int a4, int a5, char *a6, int a7, int a8, int a9, char a10);

// 发送道具
typedef int (*fnAddItem)(void *CUser, int a2, int a3, int a4, int *a5, int a6);

// 首次创建角色送契约
typedef int (*fnInterSelectMobileAuthReward)(void *InterSelect, void *CUser, char *a3);

// 创建角色创建技能
typedef int (*fnCreateSkill)(int a1, int a2);
// 创建角色创建装备
typedef int (*fnCreateEquip)(void *a1, unsigned int a2, void *a3);

typedef int (*fnInitSkill)(int a1, int a2, int a3);

// 游戏事件
typedef int (*fnHistory_Log)(int a1, char *format, ...);

typedef int (*fnUseGlod)(void *CUser, int a1, int a3, int a4);

// 通过副本
typedef void (*fnBossDieCheckSend)(void *a1, void *a2, void *a3);

// 放弃副本
typedef void (*fnGiveup_Game)(void *CParty, void *CUser, bool a3, bool a4, bool a5);

__END_DECLS