예제 #1
0
void MQ2NavigationPlugin::Plugin_SetGameState(DWORD GameState)
{
	if (!m_initialized)
	{
		if (m_retryHooks) {
			m_retryHooks = false;
			Plugin_Initialize();
		}
		return;
	}

	if (GameState == GAMESTATE_INGAME) {
		UpdateCurrentZone();
	}

	for (const auto& m : m_modules)
	{
		m.second->SetGameState(GameState);
	}
}
예제 #2
0
파일: netscape.cpp 프로젝트: kangaroo/moon
NPError
NP_Initialize (NPNetscapeFuncs* mozilla_funcs, NPPluginFuncs* plugin_funcs)
{
	LOG_PLUGIN ("[%i shocker] NP_Initialize\n", getpid ());

	Dl_info dl_info;
	// Prevent firefox from unloading us
	if (dladdr ((void *) &NP_Initialize, &dl_info) != 0) {
		void *handle = dlopen (dl_info.dli_fname, RTLD_LAZY | RTLD_NOLOAD);
		if (handle == NULL)
			printf ("[%i shocker] tried to open a handle to libshocker.so, but: '%s' (rare crashes might occur).\n", getpid (), dlerror ());
	} else {
		printf ("[%i shocker] could not get path of libshocker.so: '%s' (rare crashes might occur).\n", getpid (), dlerror ());
	}
	
	Browser_Initialize (mozilla_funcs);
	Plugin_Initialize (plugin_funcs);
	Shocker_Initialize ();

	return NPERR_NO_ERROR;
}