#include "CResFile.h" #include "T2TenantPlugin.h" T2TenantPlugin::T2TenantPlugin(DWORD type, T2PluginSpecifier& specifier) : T2EquipPlugin(type, specifier) { } /*virtual*/ T2TenantPlugin::~T2TenantPlugin() { } BOOL T2TenantPlugin::TestLoadAllDefRsrcPlugin() { return true; } BOOL T2TenantPlugin::LoadAllTemplatePlugin(T2WorldDef* worldDef, T2TemplatePluginDB*) { LoadT2TenantDef(worldDef); return true; } DWORD T2TenantPlugin::GetShopPluginType() { return 0; } typedef T2TemplatePlugin *(MSVC_STDCALL* ConstructTemplatePluginType) (T2PluginSpecifier *, CResFile *, T2WorldDef *, T2TenantPlugin *); void T2TenantPlugin::LoadT2TenantDef(T2WorldDef* worldDef) { ConstructTemplatePluginType theFunc = (ConstructTemplatePluginType) GetProcAddress((HMODULE) mModuleHandle, "ConstructTemplatePlugin"); #line 41 _ASSERT(theFunc); CResFile resFile; resFile.OpenResource(mModuleHandle, 1, 'TnDf'); T2TemplatePlugin *theDef = theFunc(&mSpecifier, &resFile, worldDef, this); resFile.End(); mTemplatePlugin = theDef; }