Ejemplo n.º 1
0
void CLuaScriptVarList::Init()
{
	LoadSchema();
	
	CHashString PName = GetParentName();
	SETTABLEVALUEPARAMS stv;
	for( unsigned int i = 0; i < m_Variables.size(); i++ )
	{
		CHashString hsKey(m_Variables[i].GetName());
		CHashString hsValue(m_Variables[i].GetValueAsString());
		CHashString hsType(m_Variables[i].GetType());
		stv.TableKey = &hsKey;
		stv.TableValue = &hsValue;
		stv.TableType = &hsType;
		static DWORD msgHash_SetPropertyTableValue = CHashString("SetPropertyTableValue" ).GetUniqueID();
		m_ToolBox->SendMessage(msgHash_SetPropertyTableValue, sizeof(stv), &stv, &PName );
	}
}
Ejemplo n.º 2
0
string Hearthstone::LogPath() {
#ifdef Q_WS_MAC
  QString homeLocation = QDesktopServices::storageLocation( QDesktopServices::HomeLocation );
  QString logPath = homeLocation + "/Library/Logs/Unity/Player.log";
#elif defined Q_WS_WIN
  QSettings hsKey( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Hearthstone", QSettings::NativeFormat );
  QString hsPath = hsKey.value( "InstallLocation" ).toString();
  if( hsPath.isEmpty() ) {
    LOG( "LogPath Fallback" );
    QString programFiles( getenv( "PROGRAMFILES(X86)" ) );
    if( programFiles.isEmpty() ) {
      programFiles = getenv( "PROGRAMFILES" );
    }
    hsPath = programFiles + "\\Hearthstone";
  }
  QString logPath = hsPath + "\\Hearthstone_Data\\output_log.txt";
#endif
  return logPath.toStdString();
}
Ejemplo n.º 3
0
QString Hearthstone::LogPath( const QString& fileName ) const {
  QString hsPath = ReadAgentAttribute( "install_dir" );

#ifdef Q_OS_WIN
  if( hsPath.isEmpty() ) {
    LOG( "Registry fallback for path" );

    QSettings hsKey( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Hearthstone", QSettings::NativeFormat );
    hsPath = hsKey.value( "InstallLocation" ).toString();
  }
#endif

  if( hsPath.isEmpty() ) {
    ERR( "Hearthstone path not found" );
    return QString();
 }

  return QString( "%1/Logs/%2" ).arg( hsPath ).arg( fileName );
}