|
12精币
有会写GOM插件的吗?我这个读取执行脚本这里会卡死M2不知道什么原因,Get是空的没啥用(引擎没给东西)
ScriptCondition OldScriptConditionCmd;
// 实现导出函数.
const char* __stdcall Init(int AppHande, int MsgProc, int FindProc, int SetProc, int FindOBj) {
LoadDLL();
InitPlug();
return sPlugName;
}
void __stdcall UnInit() {
SetHookLoadQuestConditionCmd(OldScriptConditionCmd);
UnloadDLL();
}
void InitPlug() {
OldScriptConditionCmd = GetHookLoadQuestConditionCmd();
SetHookLoadQuestConditionCmd(HookScriptConditionCmd);
}
int HookScriptConditionCmd(const char* pszCmd) {
int nCmd = -1;
return nCmd;
}
typedef int(*ScriptCondition)(const char*);
typedef void(__stdcall* SetScriptCondition)(ScriptCondition);
void SetHookLoadQuestConditionCmd(ScriptCondition Value) {
SetScriptCondition P;
P = reinterpret_cast<SetScriptCondition>(GetProcAddress(hDll, "SetHookLoadQuestConditionCmd"));
if (P != nullptr) {
P(Value);
}
}
ScriptCondition GetHookLoadQuestConditionCmd() {
ScriptCondition P;
P = reinterpret_cast<ScriptCondition>(GetProcAddress(hDll, "GetHookLoadQuestConditionCmd"));
if (P != nullptr) {
return P;
}
}
|
|