Ignore:
Timestamp:
Aug 4, 2009, 7:21:15 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Zobrazení souboru realmlist.wtf pro servery.
  • Opraveno: Třídy pro zpracování realmů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/model/realm.php

    r57 r58  
    8585    }
    8686    // Lookup nearest database with full import
    87     $DbResult = $this->Database->query('SELECT * FROM `Database` WHERE (`Emulator` <> 0) AND (`Revision` <= '.$this->Server['Database']['Revision'].') AND (`SourceFileName` <> "") ORDER BY `Revision` DESC');
     87    $DbResult = $this->Database->query('SELECT * FROM `Database` WHERE (`Emulator` <> 0) AND (`Revision` <= '.$this->Realm['Database']['Revision'].') AND (`SourceFileName` <> "") ORDER BY `Revision` DESC');
    8888    $Database = $DbResult->fetch_assoc();
    8989   
     
    9999    $this->Task->Add('Inicializace databáze', $CommandList);
    100100   
    101     if($Database['Id'] != $this->Server['Database']['Id'])
    102     {
    103       $NewDatabaseId = $this->Server['Database']['Id'];
    104       $this->Server['Database']['Id'] = $Database['Id'];
     101    if($Database['Id'] != $this->Data['Database']['Id'])
     102    {
     103      $NewDatabaseId = $this->Data['Database']['Id'];
     104      $this->Data['Database']['Id'] = $Database['Id'];
    105105      $this->Update($NewDatabaseId, false, false);
    106106    }
     
    221221    $EmulatorConfig->ParameterList['WorldServerPort'] = $this->Data['NetworkPortWorldd'];
    222222    $EmulatorConfig->ParameterList['Motd'] = $this->Data['Motd'];
    223     print_r($this->Data);
    224223    $EmulatorConfig->ParameterList['DataDir'] = 'wowclient/'.$this->Data['Database']['Emulator']['Client']['Version'];
    225     $EmulatorConfig->ParameterList['LogsDir'] = 'server/'.$this->Id.'/log';
     224    $EmulatorConfig->ParameterList['LogsDir'] = 'realm/'.$this->Id.'/log';
    226225    $EmulatorConfig->ParameterList['LogLevel'] = 1;
    227226    $EmulatorConfig->ParameterList['PlayerLimit'] = $Config['MaxOnlinePlayerCountPerServer'];
     
    261260     'php www/shell.php RealmLock '.$this->Id,
    262261    );
    263     $DbResult = $this->Database->query('SELECT `Revision` FROM `Database` WHERE `Id` = '.$this->Server['Database']['Id']);
     262    $DbResult = $this->Database->query('SELECT `Revision` FROM `Database` WHERE `Id` = '.$this->Data['Database']['Id']);
    264263    $DbRow = $DbResult->fetch_assoc();
    265264    $DatabaseRevisionStart = $DbRow['Revision'];
     
    308307  {
    309308    $Output = array();
    310     if(isset($this->Server['Database']['Emulator']['Id']))
    311       exec('ps -aux|grep "emulator/'.$this->Server['Database']['Emulator']['Id'].'/bin/mangos-worldd -c realm/'.$this->Id.'/etc/mangosd.conf"| grep -v grep', $Output);
     309    if(isset($this->Data['Database']['Emulator']['Id']))
     310      exec('ps -aux|grep "emulator/'.$this->Data['Database']['Emulator']['Id'].'/bin/mangos-worldd -c realm/'.$this->Id.'/etc/mangosd.conf"| grep -v grep', $Output);
    312311    if(count($Output) > 0)
    313312    {
Note: See TracChangeset for help on using the changeset viewer.