Changeset 230


Ignore:
Timestamp:
Jul 2, 2009, 7:24:10 PM (15 years ago)
Author:
maron
Message:

export lua a dbc podle verze

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/export.php

    r200 r230  
    284284        echo($Group['Name'].'... ');
    285285    $DBCFile = new DBCFile();
    286     $DBCFile->OpenFile('../source/'.$Config['Web']['GameVersion'].'/dbc/'.$Group['DBCFileName'].'.dbc', $Group['DBCColumns']);
     286    $DBCFile->OpenFile('../source/'.$Setting['Version'].'/dbc/'.$Group['DBCFileName'].'.dbc', GetDBCColumns($Setting['Version'],$Group['DBCFileName']));
    287287    $DBCFile2 = new DBCFile();
    288     $DBCFile2->CreateFile($TempDir.$Group['DBCFileName'].'.dbc', $Group['DBCColumns']);
     288    $DBCFile2->CreateFile($TempDir.$Group['DBCFileName'].'.dbc', GetDBCColumns($Setting['Version'],$Group['DBCFileName']));
    289289        $Count = $DBCFile->GetRecordCount();
    290290        //if($Group['DBCFileName'] == 'Spell') $Count = 1000;
     
    294294    {
    295295      $Line = $DBCFile->GetLine($I);
    296           $Query = 'SELECT * FROM (SELECT * FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$WhereLang.' AND '.$WhereUsers.' AND (entry='.$Line[0].') ORDER BY FIELD(User, '.$SelectedUsers.')) AS T GROUP BY T.entry';       
     296          $Query = 'SELECT * FROM (SELECT * FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$WhereLang.' AND '.$WhereUsers.' AND (entry='.$Line[0].')  AND VersionStart <= '.GetBuildNumber($Setting['Version']).' AND VersionEnd >= '.GetBuildNumber($Setting['Version']).' ORDER BY FIELD(User, '.$SelectedUsers.')) AS T GROUP BY T.entry';       
    297297          $DbResult = $Database->SQLCommand($Query);
    298298          if(mysql_num_rows($DbResult) > 0)
     
    356356        echo($Group['Name'].'... ');
    357357    $File = new FileStream();
    358     $File->OpenFile('../source/'.$Config['Web']['GameVersion'].'/lua/'.$Group['LuaFileName'].'.lua');
     358    $File->OpenFile('../source/'.$Setting['Version'].'/lua/'.$Group['LuaFileName'].'.lua');
    359359    $File2 = new FileStream();
    360     $File2->CreateFile($TempDir.$Group['LuaMPQFolder'].'/'.$Group['LuaFileName'].'.lua');
     360    $File2->CreateFile($TempDir.''.$Group['LuaFileName'].'.lua');
    361361
    362362    while(!$File->EOF())
     
    371371                $Value['Comment'] = addslashes(substr(trim($LineParts[1]), 3));
    372372
    373             $Query = 'SELECT * FROM (SELECT * FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$WhereLang.' AND '.$WhereUsers.' AND (ShortCut="'.$Value['ShortCut'].'") ORDER BY FIELD(User, '.$SelectedUsers.')) AS T GROUP BY T.entry';
     373            $Query = 'SELECT * FROM (SELECT * FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$WhereLang.' AND '.$WhereUsers.' AND (ShortCut="'.$Value['ShortCut'].'") AND VersionStart <= '.GetBuildNumber($Setting['Version']).' AND VersionEnd >= '.GetBuildNumber($Setting['Version']).' ORDER BY FIELD(User, '.$SelectedUsers.')) AS T GROUP BY T.entry';
    374374                //echo($Query);
    375375            $DbResult = $Database->SQLCommand($Query);
Note: See TracChangeset for help on using the changeset viewer.