private IntPtr CreateBossDb()
{
IntPtr ptrBossDb = IntPtr.Zero;
UInt32 uintClientGameId = 0;
switch (GameMode.ModeId)
{
case "Oblivion":
uintClientGameId = 1;
break;
case "Fallout3":
uintClientGameId = 4;
break;
case "FalloutNV":
uintClientGameId = 5;
break;
case "Nehrim":
uintClientGameId = 2;
break;
case "Skyrim":
uintClientGameId = 3;
break;
case "Morrowind":
uintClientGameId = 6;
break;
default:
throw new BossException(String.Format("Unsupported game: {0} ({1})", GameMode.Name, GameMode.ModeId));
}
UInt32 uintStatus = m_dlgCreateBossDb(ref ptrBossDb, uintClientGameId, GameMode.InstallationPath);
HandleStatusCode(uintStatus);
if (ptrBossDb == IntPtr.Zero)
throw new BossException("Could not create BOSS DB.");
return ptrBossDb;
}