Changeset 44 for trunk/www/server.php


Ignore:
Timestamp:
Jun 16, 2009, 9:08:11 PM (15 years ago)
Author:
george
Message:
  • Přidáno: Možnost upravit některé podrobné volby samotného emulátoru.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/server.php

    r41 r44  
    219219  function SetupConfigurationFiles()
    220220  {
     221    global $Config;
     222   
    221223    $EmulatorEtcDir = '../emulator/'.$this->Server['Database']['Emulator']['Id'].'/etc/';
    222224    $ServerEtcDir = '../server/'.$this->Id.'/etc/';
     
    226228   
    227229    // mangosd.conf
    228     $Config = new MangosConfigurationFile($this->Database);
    229     $Config->Load($EmulatorEtcDir.'mangosd.conf.dist');
    230     $Config->ParameterList['LoginDatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_realmd';
    231     $Config->ParameterList['WorldDatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_mangos';
    232     $Config->ParameterList['CharacterDatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_characters';
    233     $Config->ParameterList['ScriptDev2DatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_scriptdev2';
    234     $Config->ParameterList['WorldServerPort'] = $this->Server['NetworkPortWorldd'];
    235     $Config->ParameterList['Motd'] = $this->Server['Motd'];
    236     $Config->ParameterList['DataDir'] = 'wowclient/'.$this->Server['Database']['Emulator']['Client']['Version'];
    237     $Config->ParameterList['LogsDir'] = 'server/'.$this->Id.'/log';
    238     $Config->ParameterList['LogLevel'] = 1;
    239     $Config->ParameterList['LogSQL'] = 0;
     230    $EmulatorConfig = new MangosConfigurationFile($this->Database);
     231    $EmulatorConfig->Load($EmulatorEtcDir.'mangosd.conf.dist');
     232    $EmulatorConfig->ParameterList['LoginDatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_realmd';
     233    $EmulatorConfig->ParameterList['WorldDatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_mangos';
     234    $EmulatorConfig->ParameterList['CharacterDatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_characters';
     235    $EmulatorConfig->ParameterList['ScriptDev2DatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_scriptdev2';
     236    $EmulatorConfig->ParameterList['WorldServerPort'] = $this->Server['NetworkPortWorldd'];
     237    $EmulatorConfig->ParameterList['Motd'] = $this->Server['Motd'];
     238    $EmulatorConfig->ParameterList['DataDir'] = 'wowclient/'.$this->Server['Database']['Emulator']['Client']['Version'];
     239    $EmulatorConfig->ParameterList['LogsDir'] = 'server/'.$this->Id.'/log';
     240    $EmulatorConfig->ParameterList['LogLevel'] = 1;
     241    $EmulatorConfig->ParameterList['PlayerLimit'] = $Config['MaxOnlinePlayerCountPerServer'];
     242    $EmulatorConfig->ParameterList['PlayerSaveInterval'] = 300000;   
     243    $EmulatorConfig->ParameterList['LogSQL'] = 0;
    240244    $ServerTypes = array(0 => 0, 1 => 1, 2 => 6, 3 => 8);
    241     $Config->ParameterList['GameType'] = $ServerTypes[$this->Server['Type']];
    242     $Config->Save($ServerEtcDir.'mangosd.conf');
     245    $EmulatorConfig->ParameterList['GameType'] = $ServerTypes[$this->Server['Type']];
     246    $EmulatorConfig->Save($ServerEtcDir.'mangosd.conf');
    243247   
    244248    // realmd.conf
    245     $Config = new MangosConfigurationFile($this->Database);
    246     $Config->Load($EmulatorEtcDir.'realmd.conf.dist');
    247     $Config->ParameterList['LoginDatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_realmd';
    248     $Config->ParameterList['RealmServerPort'] = $this->Server['NetworkPortRealmd'];
    249     $Config->ParameterList['LogsDir'] = 'server/'.$this->Id.'/log';
    250     $Config->Save($ServerEtcDir.'realmd.conf');
     249    $EmulatorConfig = new MangosConfigurationFile($this->Database);
     250    $EmulatorConfig->Load($EmulatorEtcDir.'realmd.conf.dist');
     251    $EmulatorConfig->ParameterList['LoginDatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_realmd';
     252    $EmulatorConfig->ParameterList['RealmServerPort'] = $this->Server['NetworkPortRealmd'];
     253    $EmulatorConfig->ParameterList['LogsDir'] = 'server/'.$this->Id.'/log';
     254    $EmulatorConfig->Save($ServerEtcDir.'realmd.conf');
    251255   
    252256    // scriptdev2.conf
    253     $Config = new MangosConfigurationFile($this->Database);
    254     $Config->Load($EmulatorEtcDir.'scriptdev2.conf');
    255     $Config->ParameterList['ScriptDev2DatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_scriptdev2';
    256     $Config->Save($ServerEtcDir.'scriptdev2.conf'); 
     257    $EmulatorConfig = new MangosConfigurationFile($this->Database);
     258    $EmulatorConfig->Load($EmulatorEtcDir.'scriptdev2.conf');
     259    $EmulatorConfig->ParameterList['ScriptDev2DatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_scriptdev2';
     260    $EmulatorConfig->Save($ServerEtcDir.'scriptdev2.conf'); 
    257261  }
    258262 
Note: See TracChangeset for help on using the changeset viewer.