BOOL CNBUnitDevice::GetCommandAbility(int nID) { switch(nID) { case IDM_TOOL_BIND: return TRUE; case IDM_TOOL_UNBIND: return FALSE; case IDM_TOOL_ADDMIRROR: // Should be single logical device return FALSE; case IDM_TOOL_MIGRATE: // Should be single logical device return FALSE; case IDM_TOOL_REPLACE_DEVICE: return FALSE; case IDM_TOOL_REPLACE_UNIT_DEVICE: return FALSE; case IDM_TOOL_SINGLE: return (IsHDD() && IsOperatable()); case IDM_TOOL_SPAREADD: return FALSE; case IDM_TOOL_SPAREREMOVE: return (IsFaultTolerant() && IsSpare() && m_pLogicalDevice->IsOperatableAll()); default: return TRUE; } }
int Game::SpareBonus(int frameIndex) { if (IsSpare(frameIndex)) return _frames[frameIndex + 2]; return 0; }