Fixed minor bugs

Updated redesign

Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
Gregory PLANCHAT 2012-05-02 23:06:18 +02:00
commit 4b2167c133
67 changed files with 323 additions and 1044 deletions

View file

@ -36,7 +36,7 @@ require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) { if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
includeLang('admin'); includeLang('admin');
if ($_GET['cmd'] == 'sort') { if (isset($_GET['cmd']) && isset($_GET['type']) && $_GET['cmd'] == 'sort') {
$TypeSort = $_GET['type']; $TypeSort = $_GET['type'];
} else { } else {
$TypeSort = "id"; $TypeSort = "id";
@ -45,14 +45,14 @@ if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERA
$PageTPL = gettemplate('admin/overview_body'); $PageTPL = gettemplate('admin/overview_body');
$RowsTPL = gettemplate('admin/overview_rows'); $RowsTPL = gettemplate('admin/overview_rows');
$parse = $lang; $parse = $lang;
$parse['dpath'] = $dpath; $parse['version'] = VERSION;
$parse['mf'] = $mf;
$parse['adm_ov_data_yourv'] = colorRed(VERSION);
$Last15Mins = doquery("SELECT * FROM {{table}} WHERE `onlinetime` >= '". (time() - 15 * 60) ."' ORDER BY `". $TypeSort ."` ASC;", 'users'); $Last15Mins = doquery("SELECT * FROM {{table}} WHERE `onlinetime` >= '". (time() - 15 * 60) ."' ORDER BY `". $TypeSort ."` ASC;", 'users');
$Count = 0; $Count = 0;
$Color = "lime"; $Color = "lime";
$PrevIP = '';
$parse['adm_ov_data_table'] = '';
while ($TheUser = $Last15Mins->fetch(PDO::FETCH_ASSOC) ) { while ($TheUser = $Last15Mins->fetch(PDO::FETCH_ASSOC) ) {
if ($PrevIP != "") { if ($PrevIP != "") {
if ($PrevIP == $TheUser['user_lastip']) { if ($PrevIP == $TheUser['user_lastip']) {
@ -63,7 +63,6 @@ if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERA
} }
$UserPoints = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '" . $TheUser['id'] . "';", 'statpoints', true); $UserPoints = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '" . $TheUser['id'] . "';", 'statpoints', true);
$Bloc['dpath'] = $dpath;
$Bloc['adm_ov_altpm'] = $lang['adm_ov_altpm']; $Bloc['adm_ov_altpm'] = $lang['adm_ov_altpm'];
$Bloc['adm_ov_wrtpm'] = $lang['adm_ov_wrtpm']; $Bloc['adm_ov_wrtpm'] = $lang['adm_ov_wrtpm'];
$Bloc['adm_ov_data_id'] = $TheUser['id']; $Bloc['adm_ov_data_id'] = $TheUser['id'];

View file

@ -205,11 +205,10 @@ class Legacies_Empire_Model_Planet_Building_Shipyard_Builder
$prices = Wootook_Empire_Helper_Config_Prices::getSingleton(); $prices = Wootook_Empire_Helper_Config_Prices::getSingleton();
Math::setPrecision(50); Math::setPrecision(50);
$buildingTime = Math::mul($prices[$shipId][Legacies_Empire::BASE_BUILDING_TIME], $qty); $buildingTime = Math::mul($prices[$shipId][Legacies_Empire::BASE_BUILDING_TIME], intval($qty));
$speedFactor = Wootook::getGameConfig('game/speed/ships') / 1000;
$baseTime = ($buildingTime / 5000) * 3600 / $speedFactor / $this->getSpeedEnhancement();
$speedFactor = Wootook::getGameConfig('game/speed/general') / 1000;
$baseTime = Math::mul(Math::div($buildingTime, 5000), Math::mul($speedFactor, $this->getSpeedEnhancement()));
Math::setPrecision(); Math::setPrecision();
$event = Wootook::dispatchEvent('planet.shipyard.building-time', array( $event = Wootook::dispatchEvent('planet.shipyard.building-time', array(

View file

@ -344,6 +344,8 @@ CREATE TABLE IF NOT EXISTS {$this->getTableName('planets')} (
`destructor` DECIMAL(65,0) NOT NULL DEFAULT 0, `destructor` DECIMAL(65,0) NOT NULL DEFAULT 0,
`dearth_star` DECIMAL(65,0) NOT NULL DEFAULT 0, `dearth_star` DECIMAL(65,0) NOT NULL DEFAULT 0,
`battleship` DECIMAL(65,0) NOT NULL DEFAULT 0, `battleship` DECIMAL(65,0) NOT NULL DEFAULT 0,
`supernova` DECIMAL(65,0) NOT NULL DEFAULT 0,
`ore_miner` DECIMAL(65,0) NOT NULL DEFAULT 0,
`misil_launcher` DECIMAL(65,0) NOT NULL DEFAULT 0, `misil_launcher` DECIMAL(65,0) NOT NULL DEFAULT 0,
`small_laser` DECIMAL(65,0) NOT NULL DEFAULT 0, `small_laser` DECIMAL(65,0) NOT NULL DEFAULT 0,
`big_laser` DECIMAL(65,0) NOT NULL DEFAULT 0, `big_laser` DECIMAL(65,0) NOT NULL DEFAULT 0,
@ -479,6 +481,7 @@ CREATE TABLE IF NOT EXISTS {$this->getTableName('users')} (
`intergalactic_tech` TINYINT UNSIGNED NOT NULL, -- FIXME `intergalactic_tech` TINYINT UNSIGNED NOT NULL, -- FIXME
`expedition_tech` TINYINT UNSIGNED NOT NULL, -- FIXME `expedition_tech` TINYINT UNSIGNED NOT NULL, -- FIXME
`graviton_tech` TINYINT UNSIGNED NOT NULL, -- FIXME `graviton_tech` TINYINT UNSIGNED NOT NULL, -- FIXME
`ore_mining_tech` TINYINT UNSIGNED NOT NULL, -- FIXME
`ally_id` BIGINT UNSIGNED NOT NULL, `ally_id` BIGINT UNSIGNED NOT NULL,
`ally_name` VARCHAR(32) NULL, -- FIXME `ally_name` VARCHAR(32) NULL, -- FIXME
`ally_request` BOOL NOT NULL DEFAULT FALSE, -- FIXME `ally_request` BOOL NOT NULL DEFAULT FALSE, -- FIXME
@ -486,25 +489,9 @@ CREATE TABLE IF NOT EXISTS {$this->getTableName('users')} (
`ally_register_time` TIMESTAMP NOT NULL, -- FIXME `ally_register_time` TIMESTAMP NOT NULL, -- FIXME
`ally_rank_id` BIGINT UNSIGNED NOT NULL, -- FIXME `ally_rank_id` BIGINT UNSIGNED NOT NULL, -- FIXME
`current_luna` INT NOT NULL, -- FIXME `current_luna` INT NOT NULL, -- FIXME
`kolorminus` VARCHAR(11) NOT NULL DEFAULT 'red', `kolorminus` VARCHAR(11) NOT NULL DEFAULT 'red',
`kolorplus` VARCHAR(11) NOT NULL DEFAULT '#00FF00', `kolorplus` VARCHAR(11) NOT NULL DEFAULT '#00FF00',
`kolorpoziom` VARCHAR(11) NOT NULL DEFAULT 'yellow', `kolorpoziom` VARCHAR(11) NOT NULL DEFAULT 'yellow',
`rpg_geologue` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_amiral` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_ingenieur` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_technocrate` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_espion` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_constructeur` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_scientifique` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_commandant` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_points` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_stockeur` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_defenseur` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_destructeur` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_general` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_bunker` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_raideur` TINYINT UNSIGNED NOT NULL, -- FIXME
`rpg_empereur` TINYINT UNSIGNED NOT NULL, -- FIXME
`lvl_minier` BIGINT UNSIGNED NOT NULL, -- FIXME `lvl_minier` BIGINT UNSIGNED NOT NULL, -- FIXME
`lvl_raid` BIGINT UNSIGNED NOT NULL, -- FIXME `lvl_raid` BIGINT UNSIGNED NOT NULL, -- FIXME
`xpraid` BIGINT UNSIGNED NOT NULL, -- FIXME `xpraid` BIGINT UNSIGNED NOT NULL, -- FIXME

View file

@ -1,70 +0,0 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/agpl-3.0.txt
* @see http://wootook.org/
*
* Copyright (c) 2011-Present, Grégory PLANCHAT <g.planchat@gmail.com>
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* --> NOTICE <--
* This file is part of the core development branch, changing its contents will
* make you unable to use the automatic updates manager. Please refer to the
* documentation for further information about customizing Wootook.
*
*/
/**
*
* Enter description here ...
* @author Greg
*
*/
class Legacies_Officers_Model_Observer
{
public static function planetUpdateListener($eventData)
{
if (isset($eventData['planet'])) {
$planet = $eventData['planet'];
$player = $planet->getPlayer();
$level = floor(sqrt($player->getData('xpminier') / 500));
if ($player->getData('lvl_minier') < $level) {
$difference = $level - $player->getData('lvl_minier');
if ($difference == 1) {
Wootook::getSession(Wootook_Player_Model_Entity::SESSION_KEY)
->addInfo('You gained 1 miner level.');
} else {
Wootook::getSession(Wootook_Player_Model_Entity::SESSION_KEY)
->addInfo('You gained %1$d miner level.', (int) $difference);
}
}
$level = floor(sqrt($player->getData('xpraid')));
if ($player->getData('lvl_raid') < $level) {
$difference = $level - $player->getData('lvl_raid');
if ($difference == 1) {
Wootook::getSession(Wootook_Player_Model_Entity::SESSION_KEY)
->addInfo('You gained 1 raider level.');
} else {
Wootook::getSession(Wootook_Player_Model_Entity::SESSION_KEY)
->addInfo('You gained %1$d raider level.', (int) $difference);
}
}
}
}
}

View file

@ -3,5 +3,42 @@
class Legacies_Stats_Block_View class Legacies_Stats_Block_View
extends Wootook_Core_Block_Template extends Wootook_Core_Block_Template
{ {
protected $_statData = array();
} public function getStatData($type)
{
if (empty($this->_statData)) {
$readAdapter = Wootook_Core_Database_ConnectionManager::getSingleton()->getConnection('core_read');
$statement = $readAdapter->select()
->from($readAdapter->getTable('statpoints'))
->where('stat_type', $type)
->prepare()
;
$statement->execute();
$this->_statData = $statement->fetchAll();
}
return $this->_statData;
}
public function getPlayerStatData($type)
{
if (empty($this->_statData)) {
$playerId = Wootook_Player_Model_Session::getSingleton()->getPlayerId();
$readAdapter = Wootook_Core_Database_ConnectionManager::getSingleton()->getConnection('core_read');
$statement = $readAdapter->select()
->from($readAdapter->getTable('statpoints'))
->where('stat_type', $type)
->where('id_owner', $playerId)
->prepare()
;
$statement->execute();
$this->_statData = $statement->fetchAll();
}
return $this->_statData;
}
}

View file

@ -513,6 +513,9 @@ class Wootook_Core_Model_Layout
public function getPackage() public function getPackage()
{ {
if ($this->_package === null) {
$this->_package = self::DEFAULT_PACKAGE;
}
return $this->_package; return $this->_package;
} }
@ -525,6 +528,9 @@ class Wootook_Core_Model_Layout
public function getTheme() public function getTheme()
{ {
if ($this->_theme === null) {
$this->_theme = self::DEFAULT_THEME;
}
return $this->_theme; return $this->_theme;
} }

View file

@ -1,6 +1,6 @@
<?php return array( <?php return array(
'admin' => array( 'admin' => array(
'update' => '1column', 'update' => array('1column'),
'reference' => array( 'reference' => array(
'header' => array( 'header' => array(
'children' => array( 'children' => array(
@ -241,7 +241,7 @@
) )
), ),
'admin.grid' => array( 'admin.grid' => array(
'update' => 'admin', 'update' => array('admin'),
'reference' => array( 'reference' => array(
'content' => array( 'content' => array(
'children' => array( 'children' => array(
@ -264,7 +264,7 @@
) )
), ),
'admin.user.grid' => array( 'admin.user.grid' => array(
'update' => 'admin.grid', 'update' => array('admin.grid'),
'reference' => array( 'reference' => array(
'grid' => array( 'grid' => array(
'actions' => array( 'actions' => array(

View file

@ -40,6 +40,12 @@
<action method="addCss"> <action method="addCss">
<param name="stylesheet">css/base.css</param> <param name="stylesheet">css/base.css</param>
</action> </action>
<action method="addCss">
<param name="stylesheet">css/deprecated/default.css</param>
</action>
<action method="addCss">
<param name="stylesheet">css/deprecated/formate.css</param>
</action>
<action method="addJs"> <action method="addJs">
<param name="script">scripts/jquery/jquery-1.6.4.js</param> <param name="script">scripts/jquery/jquery-1.6.4.js</param>
</action> </action>
@ -74,4 +80,4 @@
<block name="message" type="core/template" template="page/html/no-route.phtml" /> <block name="message" type="core/template" template="page/html/no-route.phtml" />
</reference> </reference>
</handle> </handle>
</layout> </layout>

View file

@ -1,35 +1,35 @@
<br><br> <h2><?php echo $this->__('Overview')?></h2>
<h2><?php echo $this->getData('adm_ov_title')?></h2>
<table width="600"> <table width="600">
<tr> <tr>
<td class="c" colspan="2"><?php echo $this->getData('adm_ov_infos')?></td> <td class="c" colspan="2"><?php echo $this->__('General information')?></td>
</tr><tr> </tr>
<td class="b" style="color:#FFFFFF"><?php echo $this->getData('adm_ov_yourv')?>: <strong><?php echo $this->getData('adm_ov_data_yourv')?></strong></td> <tr>
<td class="b" style="color:#FFFFFF"><?php echo $this->getData('adm_ov_lastv')?>: <b><a style="color:orange;" href="http://wootook.org/"><?php echo $this->getData('adm_ov_here')?></a></b></td> <td class="b"><?php echo $this->__('Your version:')?><span class="version"><?php echo $this->getData('version')?></span></td>
</tr> <td class="b"><a class="downloads" href="http://wootook.org/downloads"><?php echo $this->__('Latest version avalaiable at Wootook.org')?></a></td>
</tr>
</table> </table>
<br>
<table width="600"> <table width="600">
<tr> <tr>
<td class="c" colspan="13"><?php echo $this->getData('adm_ov_onlin')?></td> <td class="c" colspan="13"><?php echo $this->__('Online players')?></td>
</tr> </tr>
<tr> <tr>
<th><a href="?cmd=sort&type=id"><?php echo $this->getData('adm_ul_id')?></a></th> <th><a href="?cmd=sort&type=id"><?php echo $this->getData('adm_ul_id')?></a></th>
<th><a href="?cmd=sort&type=username"><?php echo $this->getData('adm_ul_name')?></a></th> <th><a href="?cmd=sort&type=username"><?php echo $this->getData('adm_ul_name')?></a></th>
<th><a href="?cmd=sort&type=user_lastip"><?php echo $this->getData('adm_ul_adip')?></a></th> <th><a href="?cmd=sort&type=user_lastip"><?php echo $this->getData('adm_ul_adip')?></a></th>
<th><a href="?cmd=sort&type=ally_name"><?php echo $this->getData('adm_ov_ally')?></a></th> <th><a href="?cmd=sort&type=ally_name"><?php echo $this->getData('adm_ov_ally')?></a></th>
<th><?php echo $this->getData('adm_ov_point')?></th> <th><?php echo $this->getData('adm_ov_point')?></th>
<th><a href="?cmd=sort&type=onlinetime"><?php echo $this->getData('adm_ov_activ')?></a></th> <th><a href="?cmd=sort&type=onlinetime"><?php echo $this->getData('adm_ov_activ')?></a></th>
<th><?php echo $this->getData('usr_email')?></th> <th><?php echo $this->getData('usr_email')?></th>
<th><?php echo $this->getData('xp_raid')?></th> <th><?php echo $this->getData('xp_raid')?></th>
<th><?php echo $this->getData('xp_min')?></th> <th><?php echo $this->getData('xp_min')?></th>
<th><?php echo $this->getData('lang_vacancy')?></th> <th><?php echo $this->getData('lang_vacancy')?></th>
<th><?php echo $this->getData('banned_lang')?></th> <th><?php echo $this->getData('banned_lang')?></th>
<th><?php echo $this->getData('usr_current_planet')?></th> <th><?php echo $this->getData('usr_current_planet')?></th>
<th><?php echo $this->getData('usr_current_page')?></th> <th><?php echo $this->getData('usr_current_page')?></th>
</tr> </tr>
<?php echo $this->getData('adm_ov_data_table')?> <?php echo $this->getData('adm_ov_data_table')?>
<tr> <tr>
<th class="b" colspan="13"><?php echo $this->getData('adm_ov_count')?>: <?php echo $this->getData('adm_ov_data_count')?></th> <th class="b" colspan="13"><?php echo $this->getData('adm_ov_count')?>: <?php echo $this->getData('adm_ov_data_count')?></th>
</tr> </tr>
</table> </table>

View file

@ -97,12 +97,6 @@
<param name="title">Empire</param> <param name="title">Empire</param>
<param name="uri">imperium.php</param> <param name="uri">imperium.php</param>
</action> </action>
<action method="addStaticLink">
<param name="name">account/officers</param>
<param name="label">Officers</param>
<param name="title">Officers</param>
<param name="uri">officier.php</param>
</action>
<action method="addStaticLink"> <action method="addStaticLink">
<param name="name">account/alliance</param> <param name="name">account/alliance</param>
<param name="label">My Alliance</param> <param name="label">My Alliance</param>
@ -251,6 +245,14 @@
<update name="empire" /> <update name="empire" />
<reference name="content"> <reference name="content">
<block name="queue" type="legacies-empire/planet.shipyard.queue" template="empire/planet/shipyard/queue.phtml">
<action method="setItemTemplate">
<param name="template">empire/planet/shipyard/queue/item.phtml</param>
</action>
<action method="setItemBlockType">
<param name="blockType">legacies-empire/planet.shipyard.queue.item</param>
</action>
</block>
<block name="item-list" type="legacies-empire/planet.shipyard" template="empire/planet/shipyard.phtml"> <block name="item-list" type="legacies-empire/planet.shipyard" template="empire/planet/shipyard.phtml">
<block name="item-list.items" type="core/concat" /> <block name="item-list.items" type="core/concat" />
<action method="setItemTemplate"> <action method="setItemTemplate">
@ -260,14 +262,6 @@
<param name="blockType">legacies-empire/planet.shipyard.item</param> <param name="blockType">legacies-empire/planet.shipyard.item</param>
</action> </action>
</block> </block>
<block name="queue" type="legacies-empire/planet.shipyard.queue" template="empire/planet/shipyard/queue.phtml">
<action method="setItemTemplate">
<param name="template">empire/planet/shipyard/queue/item.phtml</param>
</action>
<action method="setItemBlockType">
<param name="blockType">legacies-empire/planet.shipyard.queue.item</param>
</action>
</block>
</reference> </reference>
</handle> </handle>

View file

@ -0,0 +1,7 @@
<div id="overview:stats" class="item-container">
<h2><?php echo $this->escape($this->getPlanetName())?></h2>
<h3><?php echo $this->escape($this->getPlanetCoords())?></h3>
<p class="image">
<img src="<?php echo $this->getSkinUrl($this->getPlanetImage())?>" />
</p>
</div>

View file

@ -11,8 +11,7 @@
'register.success' => array(), 'register.success' => array(),
'planet.update' => array( 'planet.update' => array(
array('Wootook_Empire_Model_Planet', 'planetUpdateListener'), array('Wootook_Empire_Model_Planet', 'planetUpdateListener'),
array('Legacies_Empire_Model_Planet_Building_Shipyard', 'planetUpdateListener'), array('Legacies_Empire_Model_Planet_Building_Shipyard', 'planetUpdateListener')
array('Legacies_Officers_Model_Observer', 'planetUpdateListener')
), ),
'user.init' => array(), 'user.init' => array(),
'planet.init' => array( 'planet.init' => array(

View file

@ -41,6 +41,7 @@
Legacies_Empire::ID_RESEARCH_INTERGALACTIC_RESEARCH_NETWORK => "intergalactic_tech", Legacies_Empire::ID_RESEARCH_INTERGALACTIC_RESEARCH_NETWORK => "intergalactic_tech",
Legacies_Empire::ID_RESEARCH_EXPEDITION_TECHNOLOGY => "expedition_tech", Legacies_Empire::ID_RESEARCH_EXPEDITION_TECHNOLOGY => "expedition_tech",
Legacies_Empire::ID_RESEARCH_GRAVITON_TECHNOLOGY => "graviton_tech", Legacies_Empire::ID_RESEARCH_GRAVITON_TECHNOLOGY => "graviton_tech",
Legacies_Empire::ID_RESEARCH_ORE_MINING => "ore_mining_tech",
// }}} // }}}
// //
@ -61,6 +62,7 @@
Legacies_Empire::ID_SHIP_DEATH_STAR => "dearth_star", Legacies_Empire::ID_SHIP_DEATH_STAR => "dearth_star",
Legacies_Empire::ID_SHIP_BATTLECRUISER => "battleship", Legacies_Empire::ID_SHIP_BATTLECRUISER => "battleship",
Legacies_Empire::ID_SHIP_SUPERNOVA => "supernova", Legacies_Empire::ID_SHIP_SUPERNOVA => "supernova",
Legacies_Empire::ID_SHIP_ORE_MININER => "ore_miner",
// //
// //
@ -78,24 +80,4 @@
Legacies_Empire::ID_SPECIAL_ANTIBALLISTIC_MISSILE => "interceptor_misil", Legacies_Empire::ID_SPECIAL_ANTIBALLISTIC_MISSILE => "interceptor_misil",
Legacies_Empire::ID_SPECIAL_INTERPLANETARY_MISSILE => "interplanetary_misil", Legacies_Empire::ID_SPECIAL_INTERPLANETARY_MISSILE => "interplanetary_misil",
// }}} // }}}
//
// Officers
// {{{
601 => "rpg_geologue",
602 => "rpg_amiral",
603 => "rpg_ingenieur",
604 => "rpg_technocrate",
605 => "rpg_constructeur",
606 => "rpg_scientifique",
607 => "rpg_stockeur",
608 => "rpg_defenseur",
609 => "rpg_bunker",
610 => "rpg_espion",
611 => "rpg_commandant",
612 => "rpg_destructeur",
613 => "rpg_general",
614 => "rpg_raideur",
615 => "rpg_empereur"
// }}}
); );

View file

@ -28,25 +28,25 @@
Legacies_Empire::ID_BUILDING_FUSION_REACTOR => array( Legacies_Empire::ID_BUILDING_FUSION_REACTOR => array(
'name' => 'Réacteur à fusion nucléaire', 'name' => 'Réacteur à fusion nucléaire',
'description' => '', 'description' => "<p>Fruit de longues décénnies de recherche, le <strong>réacteur à fusion nucléaire</strong> est désormais une source d'énergie rentable.</p><p>Nourrie par l'énergie engendrée par la fusion des isotopes d'hydrogène, cette centrale génère plus d'énergie que toutes les autres sources d'énergie. La contrepartie à cette surgénération d'énergie, est son côut en deutérium.</p>",
'image' => 'medias/klore/images/building/fusion-reactor.jpg' 'image' => 'medias/klore/images/building/fusion-reactor.jpg'
), ),
Legacies_Empire::ID_BUILDING_ROBOTIC_FACTORY => array( Legacies_Empire::ID_BUILDING_ROBOTIC_FACTORY => array(
'name' => 'Usine de robots', 'name' => 'Usine de robots',
'description' => '', 'description' => "<p>L'<strong>usine de robots</strong> permet à votre empire de se développer plus rapidement en accélarant la fabrication et l'évolution de vos structures.</p>",
'image' => 'medias/klore/images/building/robotic-factory.jpg' 'image' => 'medias/klore/images/building/robotic-factory.jpg'
), ),
Legacies_Empire::ID_BUILDING_NANITE_FACTORY => array( Legacies_Empire::ID_BUILDING_NANITE_FACTORY => array(
'name' => 'Usine de nanites', 'name' => 'Usine de nanites',
'description' => '', 'description' => "<p>Fruit de la recherche des nano-technologies, l'<strong>usine de nanites</strong> produit en masse nano-robots capable de s'assembler pour former vos futures structures.</p>",
'image' => 'medias/klore/images/building/nanite-factory.jpg' 'image' => 'medias/klore/images/building/nanite-factory.jpg'
), ),
Legacies_Empire::ID_BUILDING_SHIPYARD => array( Legacies_Empire::ID_BUILDING_SHIPYARD => array(
'name' => 'Chantier spatial', 'name' => 'Chantier spatial',
'description' => '', 'description' => "<p>Elément central de la construction de vaisseaux spaciaux et de systèmes de défenses, le <strong>chantier spatial</strong> permettra à votre empire de s'étendre et d'asseaoir sa suprématie.</p>",
'image' => 'medias/klore/images/building/shipyard.jpg' 'image' => 'medias/klore/images/building/shipyard.jpg'
), ),
@ -99,19 +99,19 @@
Legacies_Empire::ID_BUILDING_LUNAR_BASE => array( Legacies_Empire::ID_BUILDING_LUNAR_BASE => array(
'name' => 'Base lunaire', 'name' => 'Base lunaire',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/lunar-base.jpg' 'image' => 'medias/klore/images/ship/lunar-base.jpg'
), ),
Legacies_Empire::ID_BUILDING_SENSOR_PHALANX => array( Legacies_Empire::ID_BUILDING_SENSOR_PHALANX => array(
'name' => 'Phalange de capteur', 'name' => 'Phalange de capteur',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/sensor-phalanx.jpg' 'image' => 'medias/klore/images/ship/sensor-phalanx.jpg'
), ),
Legacies_Empire::ID_BUILDING_JUMP_GATE => array( Legacies_Empire::ID_BUILDING_JUMP_GATE => array(
'name' => 'Porte de saut spatial', 'name' => 'Porte de saut spatial',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/jump-gate.jpg' 'image' => 'medias/klore/images/ship/jump-gate.jpg'
), ),
// }}} // }}}
@ -228,112 +228,112 @@
'name' => 'Transporteur T5', 'name' => 'Transporteur T5',
'class' => 'Etalon', 'class' => 'Etalon',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/light-transport.jpg' 'image' => 'medias/klore/images/ship/light-transport.jpg'
), ),
Legacies_Empire::ID_SHIP_LARGE_TRANSPORT => array( Legacies_Empire::ID_SHIP_LARGE_TRANSPORT => array(
'name' => 'Transporteur T25', 'name' => 'Transporteur T25',
'class' => 'Buffle', 'class' => 'Buffle',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/large-transport.jpg' 'image' => 'medias/klore/images/ship/large-transport.jpg'
), ),
Legacies_Empire::ID_SHIP_LIGHT_FIGHTER => array( Legacies_Empire::ID_SHIP_LIGHT_FIGHTER => array(
'name' => 'Chasseur C50', 'name' => 'Chasseur C50',
'class' => 'Guêpe', 'class' => 'Guêpe',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/light-fighter.jpg' 'image' => 'medias/klore/images/ship/light-fighter.jpg'
), ),
Legacies_Empire::ID_SHIP_HEAVY_FIGHTER => array( Legacies_Empire::ID_SHIP_HEAVY_FIGHTER => array(
'name' => 'Chasseur C150', 'name' => 'Chasseur C150',
'class' => 'Frelon', 'class' => 'Frelon',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/heavy-fighter.jpg' 'image' => 'medias/klore/images/ship/heavy-fighter.jpg'
), ),
Legacies_Empire::ID_SHIP_CRUISER => array( Legacies_Empire::ID_SHIP_CRUISER => array(
'name' => 'Croiseur V400', 'name' => 'Croiseur V400',
'class' => 'Aigle', 'class' => 'Aigle',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/cruiser.jpg' 'image' => 'medias/klore/images/ship/cruiser.jpg'
), ),
Legacies_Empire::ID_SHIP_BATTLESHIP => array( Legacies_Empire::ID_SHIP_BATTLESHIP => array(
'name' => 'Vaisseau de bataille V1000', 'name' => 'Vaisseau de bataille V1000',
'class' => 'Faucon', 'class' => 'Faucon',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/battleship.jpg' 'image' => 'medias/klore/images/ship/battleship.jpg'
), ),
Legacies_Empire::ID_SHIP_COLONY_SHIP => array( Legacies_Empire::ID_SHIP_COLONY_SHIP => array(
'name' => 'Vaisseau de colonisation', 'name' => 'Vaisseau de colonisation',
'class' => 'Romulus', 'class' => 'Romulus',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/colony-ship.jpg' 'image' => 'medias/klore/images/ship/colony-ship.jpg'
), ),
Legacies_Empire::ID_SHIP_RECYCLER => array( Legacies_Empire::ID_SHIP_RECYCLER => array(
'name' => 'Recycleur', 'name' => 'Recycleur',
'class' => 'Goule', 'class' => 'Goule',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/recycler.jpg' 'image' => 'medias/klore/images/ship/recycler.jpg'
), ),
Legacies_Empire::ID_SHIP_SPY_DRONE => array( Legacies_Empire::ID_SHIP_SPY_DRONE => array(
'name' => 'Sonde d\'espionnage', 'name' => 'Sonde d\'espionnage',
'class' => 'Moustique', 'class' => 'Moustique',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/spy-drone.jpg' 'image' => 'medias/klore/images/ship/spy-drone.jpg'
), ),
Legacies_Empire::ID_SHIP_BOMBER => array( Legacies_Empire::ID_SHIP_BOMBER => array(
'name' => 'Bombarider', 'name' => 'Bombarider',
'class' => 'Vengeur', 'class' => 'Vengeur',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/terraformer.jpg' 'image' => 'medias/klore/images/ship/bomber.jpg'
), ),
Legacies_Empire::ID_SHIP_SOLAR_SATELLITE => array( Legacies_Empire::ID_SHIP_SOLAR_SATELLITE => array(
'name' => 'Satellite solaire', 'name' => 'Satellite solaire',
'class' => 'Râ', 'class' => 'Râ',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/terraformer.jpg' 'image' => 'medias/klore/images/ship/solar-satellite.jpg'
), ),
Legacies_Empire::ID_SHIP_DESTRUCTOR => array( Legacies_Empire::ID_SHIP_DESTRUCTOR => array(
'name' => 'Vaisseau de bataille V2000', 'name' => 'Vaisseau de bataille V2000',
'class' => 'Destructeur', 'class' => 'Destructeur',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/terraformer.jpg' 'image' => 'medias/klore/images/ship/destructor.jpg'
), ),
Legacies_Empire::ID_SHIP_DEATH_STAR => array( Legacies_Empire::ID_SHIP_DEATH_STAR => array(
'name' => 'Vaisseau mère M1', 'name' => 'Vaisseau mère M1',
'class' => 'Vengeur', 'class' => 'Vengeur',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/terraformer.jpg' 'image' => 'medias/klore/images/ship/death-star.jpg'
), ),
Legacies_Empire::ID_SHIP_BATTLECRUISER => array( Legacies_Empire::ID_SHIP_BATTLECRUISER => array(
'name' => 'Vaisseau de bataille V700', 'name' => 'Vaisseau de bataille V700',
'class' => 'Dagon', 'class' => 'Dragon',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/terraformer.jpg' 'image' => 'medias/klore/images/ship/battlecruiser.jpg'
), ),
Legacies_Empire::ID_SHIP_SUPERNOVA => array( Legacies_Empire::ID_SHIP_SUPERNOVA => array(
'name' => 'Vaisseau mère M5', 'name' => 'Vaisseau mère M5',
'class' => 'Annihilateur', 'class' => 'Annihilateur',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/terraformer.jpg' 'image' => 'medias/klore/images/ship/supernova.jpg'
), ),
Legacies_Empire::ID_SHIP_ORE_MININER => array( Legacies_Empire::ID_SHIP_ORE_MININER => array(
'name' => 'Vaisseau d\'exploitation', 'name' => 'Vaisseau d\'exploitation',
'class' => 'Onyx', 'class' => 'Onyx',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/units/terraformer.jpg' 'image' => 'medias/klore/images/ship/ore-miner.jpg'
), ),
// }}} // }}}
@ -391,7 +391,7 @@
Legacies_Empire::ID_DEFENSE_LARGE_SHIELD_DOME => array( Legacies_Empire::ID_DEFENSE_LARGE_SHIELD_DOME => array(
'name' => 'Grand bouclier planétaire', 'name' => 'Grand bouclier planétaire',
'class' => 'Protecteur', 'class' => 'Gaia',
'description' => '', 'description' => '',
'image' => 'medias/klore/images/defense/large-shield-dome.jpg' 'image' => 'medias/klore/images/defense/large-shield-dome.jpg'
), ),

View file

@ -5,7 +5,6 @@
'player' => array('Wootook_Player_Block_' => 'Wootook/Player/Block'), 'player' => array('Wootook_Player_Block_' => 'Wootook/Player/Block'),
'legacies-core' => array('Legacies_Core_Block_' => 'Legacies/Core/Block'), 'legacies-core' => array('Legacies_Core_Block_' => 'Legacies/Core/Block'),
'legacies-empire' => array('Legacies_Empire_Block_' => 'Legacies/Empire/Block'), 'legacies-empire' => array('Legacies_Empire_Block_' => 'Legacies/Empire/Block'),
'legacies-officers' => array('Legacies_Officers_Block_' => 'Legacies/Officers/Block'),
'legacies-stats' => array('Legacies_Stats_Block_' => 'Legacies/Stats/Block') 'legacies-stats' => array('Legacies_Stats_Block_' => 'Legacies/Stats/Block')
) )
); );

View file

@ -31,7 +31,7 @@
"You have %1$d unread messages.","Vous avez %1$d messages non lus." "You have %1$d unread messages.","Vous avez %1$d messages non lus."
"Idle.","Inactif." "Idle.","Inactif."
"Level %d","Niveau %d" "Level %d","Niveau %d"
"Current count: %s","Quantité actuelle : %s" "Current count: %s","Disponible : %s"
"Build max (%s)","Construire le max (%s)" "Build max (%s)","Construire le max (%s)"
"Build next level (%s)","Construire au niveau %s" "Build next level (%s)","Construire au niveau %s"
"Building time: %s","Temps de construction : %s" "Building time: %s","Temps de construction : %s"
@ -137,6 +137,8 @@
"Success","Succès" "Success","Succès"
"Colony","Colonie" "Colony","Colonie"
"Moon","Lune" "Moon","Lune"
"Class %s","Classe %s"
"Build","Construire"
"Game data successfully initialized.","Game data successfully initialized." "Game data successfully initialized.","Game data successfully initialized."
"Passwords does not match.","Les mots de passe ne correpsondent pas." "Passwords does not match.","Les mots de passe ne correpsondent pas."
"Both e-mails does not match.","Les emails ne correpsondent pas." "Both e-mails does not match.","Les emails ne correpsondent pas."

Can't render this file because it contains an unexpected character in line 119 and column 51.

View file

@ -72,11 +72,11 @@ function walka ($CurrentSet, $TargetSet, $CurrentTechno, $TargetTechno) {
if (!is_null($CurrentSet)) { if (!is_null($CurrentSet)) {
foreach($CurrentSet as $a => $b) { foreach($CurrentSet as $a => $b) {
$CurrentSet[$a]["obrona"] = $CurrentSet[$a]['count'] * ($pricelist[$a]['metal'] + $pricelist[$a]['crystal']) / 10 * (1 + (0.1 * ($CurrentTechno["defence_tech"]) + (0.05 * $user['rpg_amiral']))); $CurrentSet[$a]["obrona"] = $CurrentSet[$a]['count'] * ($pricelist[$a]['metal'] + $pricelist[$a]['crystal']) / 10 * (1 + (0.1 * $CurrentTechno["defence_tech"]));
$rand = rand(80, 120) / 100; $rand = rand(80, 120) / 100;
$CurrentSet[$a]["tarcza"] = $CurrentSet[$a]['count'] * $CombatCaps[$a]['shield'] * (1 + (0.1 * $CurrentTechno["shield_tech"]) + (0.05 * $user['rpg_amiral'])) * $rand; $CurrentSet[$a]["tarcza"] = $CurrentSet[$a]['count'] * $CombatCaps[$a]['shield'] * (1 + (0.1 * $CurrentTechno["shield_tech"])) * $rand;
$atak_statku = $CombatCaps[$a]['attack']; $atak_statku = $CombatCaps[$a]['attack'];
$technologie = (1 + (0.1 * $CurrentTechno["military_tech"]+(0.05 * $user['rpg_amiral']))); $technologie = (1 + (0.1 * $CurrentTechno["military_tech"]));
$rand = rand(80, 120) / 100; $rand = rand(80, 120) / 100;
$ilosc = $CurrentSet[$a]['count']; $ilosc = $CurrentSet[$a]['count'];
$CurrentSet[$a]["atak"] = $ilosc * $atak_statku * $technologie * $rand; $CurrentSet[$a]["atak"] = $ilosc * $atak_statku * $technologie * $rand;
@ -91,11 +91,11 @@ function walka ($CurrentSet, $TargetSet, $CurrentTechno, $TargetTechno) {
if (!is_null($TargetSet)) { if (!is_null($TargetSet)) {
foreach($TargetSet as $a => $b) { foreach($TargetSet as $a => $b) {
$TargetSet[$a]["obrona"] = $TargetSet[$a]['count'] * ($pricelist[$a]['metal'] + $pricelist[$a]['crystal']) / 10 * (1 + (0.1 * ($TargetTechno["defence_tech"]) + (0.05 * $user['rpg_amiral']))); $TargetSet[$a]["obrona"] = $TargetSet[$a]['count'] * ($pricelist[$a]['metal'] + $pricelist[$a]['crystal']) / 10 * (1 + (0.1 * $TargetTechno["defence_tech"]));
$rand = rand(80, 120) / 100; $rand = rand(80, 120) / 100;
$TargetSet[$a]["tarcza"] = $TargetSet[$a]['count'] * $CombatCaps[$a]['shield'] * (1 + (0.1 * $TargetTechno["shield_tech"])+ (0.05 * $user['rpg_amiral'])) * $rand; $TargetSet[$a]["tarcza"] = $TargetSet[$a]['count'] * $CombatCaps[$a]['shield'] * (1 + (0.1 * $TargetTechno["shield_tech"])) * $rand;
$atak_statku = $CombatCaps[$a]['attack']; $atak_statku = $CombatCaps[$a]['attack'];
$technologie = (1 + (0.1 * $TargetTechno["military_tech"]) + (0.05 * $user['rpg_amiral'])); $technologie = (1 + (0.1 * $TargetTechno["military_tech"]));
$rand = rand(80, 120) / 100; $rand = rand(80, 120) / 100;
$ilosc = $TargetSet[$a]['count']; $ilosc = $TargetSet[$a]['count'];
$TargetSet[$a]["atak"] = $ilosc * $atak_statku * $technologie * $rand; $TargetSet[$a]["atak"] = $ilosc * $atak_statku * $technologie * $rand;

View file

@ -1,551 +0,0 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* Copyright (c) 2009-Present, Wootook Support Team <http://wootook.org>
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* --> NOTICE <--
* This file is part of the core development branch, changing its contents will
* make you unable to use the automatic updates manager. Please refer to the
* documentation for further information about customizing Wootook.
*
*/
$QryTableAks = "CREATE TABLE `{{table}}` ( ";
$QryTableAks .= "`id` bigint(20) unsigned NOT NULL auto_increment, ";
$QryTableAks .= "`name` varchar(50) collate latin1_general_ci default NULL, ";
$QryTableAks .= "`teilnehmer` text collate latin1_general_ci, ";
$QryTableAks .= "`flotten` text collate latin1_general_ci, ";
$QryTableAks .= "`ankunft` int(32) default NULL, ";
$QryTableAks .= "`galaxy` int(2) default NULL, ";
$QryTableAks .= "`system` int(4) default NULL, ";
$QryTableAks .= "`planet` int(2) default NULL, ";
$QryTableAks .= "`eingeladen` int(11) default NULL, ";
$QryTableAks .= "PRIMARY KEY (`id`) ";
$QryTableAks .= ") ENGINE=MyISAM;";
// Table annonce
$QryTableAnnonce = "CREATE TABLE `{{table}}` ( ";
$QryTableAnnonce .= "`id` int(11) NOT NULL auto_increment, ";
$QryTableAnnonce .= "`user` text collate latin1_general_ci NOT NULL, ";
$QryTableAnnonce .= "`galaxie` int(11) NOT NULL, ";
$QryTableAnnonce .= "`systeme` int(11) NOT NULL, ";
$QryTableAnnonce .= "`metala` bigint(11) NOT NULL, ";
$QryTableAnnonce .= "`cristala` bigint(11) NOT NULL, ";
$QryTableAnnonce .= "`deuta` bigint(11) NOT NULL, ";
$QryTableAnnonce .= "`metals` bigint(11) NOT NULL, ";
$QryTableAnnonce .= "`cristals` bigint(11) NOT NULL, ";
$QryTableAnnonce .= "`deuts` bigint(11) NOT NULL, ";
$QryTableAnnonce .= "PRIMARY KEY (`id`) ";
$QryTableAnnonce .= ") ENGINE=MyISAM;";
// Table alliance
$QryTableAlliance = "CREATE TABLE `{{table}}` ( ";
$QryTableAlliance .= "`id` bigint(11) NOT NULL auto_increment, ";
$QryTableAlliance .= "`ally_name` varchar(32) character set latin1 default '', ";
$QryTableAlliance .= "`ally_tag` varchar(8) character set latin1 default '', ";
$QryTableAlliance .= "`ally_owner` int(11) NOT NULL default '0', ";
$QryTableAlliance .= "`ally_register_time` int(11) NOT NULL default '0', ";
$QryTableAlliance .= "`ally_description` text character set latin1, ";
$QryTableAlliance .= "`ally_web` varchar(255) character set latin1 default '', ";
$QryTableAlliance .= "`ally_text` text character set latin1, ";
$QryTableAlliance .= "`ally_image` varchar(255) character set latin1 default '', ";
$QryTableAlliance .= "`ally_request` text character set latin1, ";
$QryTableAlliance .= "`ally_request_waiting` text character set latin1, ";
$QryTableAlliance .= "`ally_request_notallow` tinyint(4) NOT NULL default '0', ";
$QryTableAlliance .= "`ally_owner_range` varchar(32) character set latin1 default '', ";
$QryTableAlliance .= "`ally_ranks` text character set latin1, ";
$QryTableAlliance .= "`ally_members` int(11) NOT NULL default '0', ";
$QryTableAlliance .= "PRIMARY KEY (`id`) ";
$QryTableAlliance .= ") ENGINE=MyISAM;";
// Table banned
$QryTableBanned = "CREATE TABLE `{{table}}` ( ";
$QryTableBanned .= "`id` bigint(11) NOT NULL auto_increment, ";
$QryTableBanned .= "`who` varchar(11) character set latin1 NOT NULL default '', ";
$QryTableBanned .= "`theme` text character set latin1 NOT NULL, ";
$QryTableBanned .= "`who2` varchar(11) character set latin1 NOT NULL default '', ";
$QryTableBanned .= "`time` int(11) NOT NULL default '0', ";
$QryTableBanned .= "`longer` int(11) NOT NULL default '0', ";
$QryTableBanned .= "`author` varchar(11) character set latin1 NOT NULL default '', ";
$QryTableBanned .= "`email` varchar(20) character set latin1 NOT NULL default '', ";
$QryTableBanned .= "KEY `ID` (`id`) ";
$QryTableBanned .= ") ENGINE=MyISAM;";
// Table buddy
$QryTableBuddy = "CREATE TABLE `{{table}}` ( ";
$QryTableBuddy .= "`id` bigint(11) NOT NULL auto_increment, ";
$QryTableBuddy .= "`sender` int(11) NOT NULL default '0', ";
$QryTableBuddy .= "`owner` int(11) NOT NULL default '0', ";
$QryTableBuddy .= "`active` tinyint(3) NOT NULL default '0', ";
$QryTableBuddy .= "`text` text character set latin1, ";
$QryTableBuddy .= "PRIMARY KEY (`id`) ";
$QryTableBuddy .= ") ENGINE=MyISAM;";
// Table chat
$QryTableChat = "CREATE TABLE `{{table}}` ( ";
$QryTableChat .= "`messageid` int(5) unsigned NOT NULL auto_increment, ";
$QryTableChat .= "`user` varchar(255) NOT NULL default '', ";
$QryTableChat .= "`message` text NOT NULL, ";
$QryTableChat .= "`timestamp` int(11) NOT NULL default '0', ";
$QryTableChat .= "PRIMARY KEY (`messageid`) ";
$QryTableChat .= ") ENGINE=MyISAM;";
// Table config
$QryTableConfig = "CREATE TABLE `{{table}}` ( ";
$QryTableConfig .= "`config_name` varchar(64) character set latin1 NOT NULL default '', ";
$QryTableConfig .= "`config_value` text character set latin1 NOT NULL ";
$QryTableConfig .= ") ENGINE=MyISAM;";
// Valeurs de base de la config
$QryInsertConfig = "INSERT INTO `{{table}}` ";
$QryInsertConfig .= "(`config_name` , `config_value`) VALUES ";
$QryInsertConfig .= "('users_amount' , '0'), ";
$QryInsertConfig .= "('game_speed' , '2500'), ";
$QryInsertConfig .= "('fleet_speed' , '2500'), ";
$QryInsertConfig .= "('resource_multiplier' , '1'), ";
$QryInsertConfig .= "('Fleet_Cdr' , '30'), ";
$QryInsertConfig .= "('Defs_Cdr' , '30'), ";
$QryInsertConfig .= "('initial_fields' , '163'), ";
$QryInsertConfig .= "('COOKIE_NAME' , 'Wootook Legacies'), ";
$QryInsertConfig .= "('game_name' , 'Wootook Legacies'), ";
$QryInsertConfig .= "('game_disable' , '1'), ";
$QryInsertConfig .= "('close_reason' , 'Le jeu est clos pour le moment!'), ";
$QryInsertConfig .= "('metal_basic_income' , '20'), ";
$QryInsertConfig .= "('crystal_basic_income' , '10'), ";
$QryInsertConfig .= "('deuterium_basic_income', '0'), ";
$QryInsertConfig .= "('energy_basic_income' , '0'), ";
$QryInsertConfig .= "('BuildLabWhileRun' , '0'), ";
$QryInsertConfig .= "('LastSettedGalaxyPos' , '1'), ";
$QryInsertConfig .= "('LastSettedSystemPos' , '8'), ";
$QryInsertConfig .= "('LastSettedPlanetPos' , '3'), ";
$QryInsertConfig .= "('urlaubs_modus_erz' , '1'), ";
$QryInsertConfig .= "('noobprotection' , '1'), ";
$QryInsertConfig .= "('noobprotectiontime' , '5000'), ";
$QryInsertConfig .= "('noobprotectionmulti' , '5'), ";
$QryInsertConfig .= "('forum_url' , 'http://board.xnova-ng.org/' ), ";
$QryInsertConfig .= "('OverviewNewsFrame' , '1' ), ";
$QryInsertConfig .= "('OverviewNewsText' , 'Bienvenue sur le nouveau serveur Wootook Legacies' ), ";
$QryInsertConfig .= "('OverviewExternChat' , '0' ), ";
$QryInsertConfig .= "('OverviewExternChatCmd' , '' ), ";
$QryInsertConfig .= "('OverviewBanner' , '0' ), ";
$QryInsertConfig .= "('OverviewClickBanner' , '' ), ";
$QryInsertConfig .= "('ExtCopyFrame' , '0' ), ";
$QryInsertConfig .= "('ExtCopyOwner' , '' ), ";
$QryInsertConfig .= "('ExtCopyFunct' , '' ), ";
$QryInsertConfig .= "('ForumBannerFrame' , '0' ), ";
$QryInsertConfig .= "('stat_settings' , '1000' ), ";
$QryInsertConfig .= "('link_enable' , '0' ), ";
$QryInsertConfig .= "('link_name' , '' ), ";
$QryInsertConfig .= "('link_url' , '' ), ";
$QryInsertConfig .= "('enable_announces' , '1' ), ";
$QryInsertConfig .= "('enable_marchand' , '1'), ";
$QryInsertConfig .= "('enable_notes' , '1'), ";
$QryInsertConfig .= "('bot_name' , 'XNoviana Reali'), ";
$QryInsertConfig .= "('bot_adress' , 'xnova@xnova-ng.org' ), ";
$QryInsertConfig .= "('banner_source_post' , '../images/bann.png' ), ";
$QryInsertConfig .= "('ban_duration' , '30' ), ";
$QryInsertConfig .= "('enable_bot' , '0' ), ";
$QryInsertConfig .= "('enable_bbcode' , '1' ), ";
$QryInsertConfig .= "('debug' , '0') ";
$QryInsertConfig .= ";";
// Table declared (multicomptes)
$QryTabledeclared = "CREATE TABLE `{{table}}` ( ";
$QryTabledeclared .= "`declarator`TEXT NOT NULL, ";
$QryTabledeclared .= "`declared_1`TEXT NOT NULL, ";
$QryTabledeclared .= "`declared_2`TEXT NOT NULL, ";
$QryTabledeclared .= "`declared_3`TEXT NOT NULL, ";
$QryTabledeclared .= "`reason`TEXT NOT NULL, ";
$QryTabledeclared .= "`declarator_name`TEXT NOT NULL ";
$QryTabledeclared .= ") ENGINE=MyISAM;";
// Table errors
$QryTableErrors = "CREATE TABLE `{{table}}` ( ";
$QryTableErrors .= "`error_id` bigint(11) NOT NULL auto_increment, ";
$QryTableErrors .= "`error_sender` varchar(32) character set latin1 NOT NULL default '0', ";
$QryTableErrors .= "`error_time` int(11) NOT NULL default '0', ";
$QryTableErrors .= "`error_type` varchar(32) character set latin1 NOT NULL default 'unknown', ";
$QryTableErrors .= "`error_text` text character set latin1, ";
$QryTableErrors .= "PRIMARY KEY (`error_id`) ";
$QryTableErrors .= ") ENGINE=MyISAM;";
// Table fleets
$QryTableFleets = "CREATE TABLE `{{table}}` ( ";
$QryTableFleets .= "`fleet_id` bigint(11) NOT NULL auto_increment, ";
$QryTableFleets .= "`fleet_owner` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_mission` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_amount` bigint(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_array` text character set latin1, ";
$QryTableFleets .= "`fleet_start_time` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_start_galaxy` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_start_system` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_start_planet` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_start_type` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_end_time` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_end_stay` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_end_galaxy` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_end_system` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_end_planet` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_end_type` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_taget_owner` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_resource_metal` bigint(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_resource_crystal` bigint(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_resource_deuterium` bigint(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_target_owner` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`fleet_group` int (11) NOT NULL DEFAULT '0', ";
$QryTableFleets .= "`fleet_mess` int(11) NOT NULL default '0', ";
$QryTableFleets .= "`start_time` int(11) default NULL, ";
$QryTableFleets .= "PRIMARY KEY (`fleet_id`) ";
$QryTableFleets .= ") ENGINE=MyISAM;";
// Table galaxy
$QryTableGalaxy = "CREATE TABLE `{{table}}` ( ";
$QryTableGalaxy .= "`galaxy` int(2) NOT NULL default '0', ";
$QryTableGalaxy .= "`system` int(3) NOT NULL default '0', ";
$QryTableGalaxy .= "`planet` int(2) NOT NULL default '0', ";
$QryTableGalaxy .= "`id_planet` int(11) NOT NULL default '0', ";
$QryTableGalaxy .= "`metal` bigint(11) NOT NULL default '0', ";
$QryTableGalaxy .= "`crystal` bigint(11) NOT NULL default '0', ";
$QryTableGalaxy .= "`id_luna` int(11) NOT NULL default '0', ";
$QryTableGalaxy .= "`luna` int(2) NOT NULL default '0', ";
$QryTableGalaxy .= "KEY `galaxy` (`galaxy`), ";
$QryTableGalaxy .= "KEY `system` (`system`), ";
$QryTableGalaxy .= "KEY `planet` (`planet`) ";
$QryTableGalaxy .= ") ENGINE=MyISAM;";
// Table iraks
$QryTableIraks = "CREATE TABLE `{{table}}` ( ";
$QryTableIraks .= "`id` bigint(20) unsigned NOT NULL auto_increment, ";
$QryTableIraks .= "`zeit` int(32) default NULL, ";
$QryTableIraks .= "`galaxy` int(2) default NULL, ";
$QryTableIraks .= "`system` int(4) default NULL, ";
$QryTableIraks .= "`planet` int(2) default NULL, ";
$QryTableIraks .= "`galaxy_angreifer` int(2) default NULL, ";
$QryTableIraks .= "`system_angreifer` int(4) default NULL, ";
$QryTableIraks .= "`planet_angreifer` int(2) default NULL, ";
$QryTableIraks .= "`owner` int(32) default NULL, ";
$QryTableIraks .= "`zielid` int(32) default NULL, ";
$QryTableIraks .= "`anzahl` int(32) default NULL, ";
$QryTableIraks .= "`primaer` int(32) default NULL, ";
$QryTableIraks .= "PRIMARY KEY (`id`) ";
$QryTableIraks .= ") ENGINE=MyISAM;";
// Table lunas
$QryTableLunas = "CREATE TABLE `{{table}}` ( ";
$QryTableLunas .= "`id` bigint(11) NOT NULL auto_increment, ";
$QryTableLunas .= "`id_luna` int(11) NOT NULL default '0', ";
$QryTableLunas .= "`name` varchar(11) character set latin1 NOT NULL default 'Lune', ";
$QryTableLunas .= "`image` varchar(11) character set latin1 NOT NULL default 'mond', ";
$QryTableLunas .= "`destruyed` int(11) NOT NULL default '0', ";
$QryTableLunas .= "`id_owner` int(11) default NULL, ";
$QryTableLunas .= "`galaxy` int(11) default NULL, ";
$QryTableLunas .= "`system` int(11) default NULL, ";
$QryTableLunas .= "`lunapos` int(11) default NULL, ";
$QryTableLunas .= "`temp_min` int(11) NOT NULL default '0', ";
$QryTableLunas .= "`temp_max` int(11) NOT NULL default '0', ";
$QryTableLunas .= "`diameter` int(11) NOT NULL default '0', ";
$QryTableLunas .= "PRIMARY KEY (`id`) ";
$QryTableLunas .= ") ENGINE=MyISAM;";
// Table messages
$QryTableMessages = "CREATE TABLE `{{table}}` ( ";
$QryTableMessages .= "`message_id` bigint(11) NOT NULL auto_increment, ";
$QryTableMessages .= "`message_owner` int(11) NOT NULL default '0', ";
$QryTableMessages .= "`message_sender` int(11) NOT NULL default '0', ";
$QryTableMessages .= "`message_time` int(11) NOT NULL default '0', ";
$QryTableMessages .= "`message_type` int(11) NOT NULL default '0', ";
$QryTableMessages .= "`message_from` varchar(48) character set latin1 default NULL, ";
$QryTableMessages .= "`message_subject` varchar(48) character set latin1 default NULL, ";
$QryTableMessages .= "`message_text` text character set latin1, ";
$QryTableMessages .= "PRIMARY KEY (`message_id`) ";
$QryTableMessages .= ") ENGINE=MyISAM;";
// Table notes
$QryTableNotes = "CREATE TABLE `{{table}}` ( ";
$QryTableNotes .= "`id` bigint(11) NOT NULL auto_increment, ";
$QryTableNotes .= "`owner` int(11) default NULL, ";
$QryTableNotes .= "`time` int(11) default NULL, ";
$QryTableNotes .= "`priority` tinyint(1) default NULL, ";
$QryTableNotes .= "`title` varchar(32) character set latin1 default NULL, ";
$QryTableNotes .= "`text` text character set latin1, ";
$QryTableNotes .= "PRIMARY KEY (`id`) ";
$QryTableNotes .= ") ENGINE=MyISAM;";
// Table planets
$QryTablePlanets = "CREATE TABLE `{{table}}` ( ";
$QryTablePlanets .= "`id` bigint(11) NOT NULL auto_increment, ";
$QryTablePlanets .= "`name` varchar(255) character set latin1 default NULL, ";
$QryTablePlanets .= "`id_owner` int(11) default NULL, ";
$QryTablePlanets .= "`id_level` int(11) default NULL, ";
$QryTablePlanets .= "`galaxy` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`system` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`planet` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`last_update` int(11) default NULL, ";
$QryTablePlanets .= "`planet_type` int(11) NOT NULL default '1', ";
$QryTablePlanets .= "`destruyed` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`b_building` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`b_building_id` text character set latin1 NOT NULL, ";
$QryTablePlanets .= "`b_tech` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`b_tech_id` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`b_hangar` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`b_hangar_id` text character set latin1 NOT NULL, ";
$QryTablePlanets .= "`b_hangar_plus` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`image` varchar(32) character set latin1 NOT NULL default 'normaltempplanet01', ";
$QryTablePlanets .= "`diameter` int(11) NOT NULL default '12800', ";
$QryTablePlanets .= "`points` bigint(20) default '0', ";
$QryTablePlanets .= "`ranks` bigint(20) default '0', ";
$QryTablePlanets .= "`field_current` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`field_max` int(11) NOT NULL default '163', ";
$QryTablePlanets .= "`temp_min` int(3) NOT NULL default '-17', ";
$QryTablePlanets .= "`temp_max` int(3) NOT NULL default '23', ";
$QryTablePlanets .= "`metal` double(132,8) NOT NULL default '0.00000000', ";
$QryTablePlanets .= "`metal_perhour` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`metal_max` bigint(20) default '100000', ";
$QryTablePlanets .= "`crystal` double(132,8) NOT NULL default '0.00000000', ";
$QryTablePlanets .= "`crystal_perhour` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`crystal_max` bigint(20) default '100000', ";
$QryTablePlanets .= "`deuterium` double(132,8) NOT NULL default '0.00000000', ";
$QryTablePlanets .= "`deuterium_perhour` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`deuterium_max` bigint(20) default '100000', ";
$QryTablePlanets .= "`energy_used` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`energy_max` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`metal_mine` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`crystal_mine` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`deuterium_sintetizer` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`solar_plant` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`fusion_plant` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`robot_factory` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`nano_factory` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`hangar` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`metal_store` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`crystal_store` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`deuterium_store` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`laboratory` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`terraformer` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`ally_deposit` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`silo` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`small_ship_cargo` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`big_ship_cargo` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`light_hunter` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`heavy_hunter` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`crusher` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`battle_ship` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`colonizer` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`recycler` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`spy_sonde` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`bomber_ship` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`solar_satelit` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`destructor` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`dearth_star` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`battleship` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`supernova` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`misil_launcher` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`small_laser` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`big_laser` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`gauss_canyon` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`ionic_canyon` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`buster_canyon` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`small_protection_shield` enum('0', '1') NOT NULL default '0', ";
$QryTablePlanets .= "`big_protection_shield` enum('0', '1') NOT NULL default '0', ";
$QryTablePlanets .= "`interceptor_misil` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`interplanetary_misil` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "`metal_mine_porcent` int(11) NOT NULL default '10', ";
$QryTablePlanets .= "`crystal_mine_porcent` int(11) NOT NULL default '10', ";
$QryTablePlanets .= "`deuterium_sintetizer_porcent` int(11) NOT NULL default '10', ";
$QryTablePlanets .= "`solar_plant_porcent` int(11) NOT NULL default '10', ";
$QryTablePlanets .= "`fusion_plant_porcent` int(11) NOT NULL default '10', ";
$QryTablePlanets .= "`solar_satelit_porcent` int(11) NOT NULL default '10', ";
$QryTablePlanets .= "`mondbasis` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`phalanx` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`sprungtor` bigint(11) NOT NULL default '0', ";
$QryTablePlanets .= "`last_jump_time` int(11) NOT NULL default '0', ";
$QryTablePlanets .= "PRIMARY KEY (`id`) ";
$QryTablePlanets .= ") ENGINE=MyISAM;";
// Table rw
$QryTableRw = "CREATE TABLE `{{table}}` ( ";
$QryTableRw .= "`id_owner1` int(11) NOT NULL default '0', ";
$QryTableRw .= "`id_owner2` int(11) NOT NULL default '0', ";
$QryTableRw .= "`rid` varchar(72) character set latin1 NOT NULL, ";
$QryTableRw .= "`raport` text character set latin1 NOT NULL, ";
$QryTableRw .= "`a_zestrzelona` tinyint(3) unsigned NOT NULL default '0', ";
$QryTableRw .= "`time` int(10) unsigned NOT NULL default '0', ";
$QryTableRw .= "UNIQUE KEY `rid` (`rid`), ";
$QryTableRw .= "KEY `id_owner1` (`id_owner1`,`rid`), ";
$QryTableRw .= "KEY `id_owner2` (`id_owner2`,`rid`), ";
$QryTableRw .= "KEY `time` (`time`), ";
$QryTableRw .= "FULLTEXT KEY `raport` (`raport`) ";
$QryTableRw .= ") ENGINE=MyISAM;";
// Table statpoints
$QryTableStatPoints = "CREATE TABLE `{{table}}` ( ";
$QryTableStatPoints .= "`id_owner` int(11) NOT NULL, ";
$QryTableStatPoints .= "`id_ally` int(11) NOT NULL, ";
$QryTableStatPoints .= "`stat_type` int(2) NOT NULL, ";
$QryTableStatPoints .= "`stat_code` int(11) NOT NULL, ";
$QryTableStatPoints .= "`tech_rank` int(11) NOT NULL, ";
$QryTableStatPoints .= "`tech_old_rank` int(11) NOT NULL, ";
$QryTableStatPoints .= "`tech_points` bigint(20) NOT NULL, ";
$QryTableStatPoints .= "`tech_count` int(11) NOT NULL, ";
$QryTableStatPoints .= "`build_rank` int(11) NOT NULL, ";
$QryTableStatPoints .= "`build_old_rank` int(11) NOT NULL, ";
$QryTableStatPoints .= "`build_points` bigint(20) NOT NULL, ";
$QryTableStatPoints .= "`build_count` int(11) NOT NULL, ";
$QryTableStatPoints .= "`defs_rank` int(11) NOT NULL, ";
$QryTableStatPoints .= "`defs_old_rank` int(11) NOT NULL, ";
$QryTableStatPoints .= "`defs_points` bigint(20) NOT NULL, ";
$QryTableStatPoints .= "`defs_count` int(11) NOT NULL, ";
$QryTableStatPoints .= "`fleet_rank` int(11) NOT NULL, ";
$QryTableStatPoints .= "`fleet_old_rank` int(11) NOT NULL, ";
$QryTableStatPoints .= "`fleet_points` bigint(20) NOT NULL, ";
$QryTableStatPoints .= "`fleet_count` int(11) NOT NULL, ";
$QryTableStatPoints .= "`total_rank` int(11) NOT NULL, ";
$QryTableStatPoints .= "`total_old_rank` int(11) NOT NULL, ";
$QryTableStatPoints .= "`total_points` bigint(20) NOT NULL, ";
$QryTableStatPoints .= "`total_count` int(11) NOT NULL, ";
$QryTableStatPoints .= "`stat_date` int(11) NOT NULL, ";
$QryTableStatPoints .= "KEY `TECH` (`tech_points`), ";
$QryTableStatPoints .= "KEY `BUILDS` (`build_points`), ";
$QryTableStatPoints .= "KEY `DEFS` (`defs_points`), ";
$QryTableStatPoints .= "KEY `FLEET` (`fleet_points`), ";
$QryTableStatPoints .= "KEY `TOTAL` (`total_points`) ";
$QryTableStatPoints .= ") ENGINE=MyISAM;";
// Table users
$QryTableUsers = "CREATE TABLE `{{table}}` ( ";
$QryTableUsers .= "`id` bigint(11) unsigned NOT NULL auto_increment PRIMARY KEY, ";
$QryTableUsers .= "`username` varchar(64) character set latin1 NOT NULL default '', ";
$QryTableUsers .= "`password` varchar(64) character set latin1 NOT NULL default '', ";
$QryTableUsers .= "`email` varchar(64) character set latin1 NOT NULL default '', ";
$QryTableUsers .= "`email_2` varchar(64) character set latin1 NOT NULL default '', ";
$QryTableUsers .= "`lang` varchar(8) character set latin1 NOT NULL default 'fr', ";
$QryTableUsers .= "`authlevel` tinyint(4) NOT NULL default '0', ";
$QryTableUsers .= "`sex` char(1) character set latin1 default NULL, ";
$QryTableUsers .= "`avatar` varchar(255) character set latin1 NOT NULL default '', ";
$QryTableUsers .= "`sign` text character set latin1, ";
$QryTableUsers .= "`id_planet` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`galaxy` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`system` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`planet` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`current_planet` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`user_lastip` varchar(16) character set latin1 NOT NULL default '', ";
$QryTableUsers .= "`ip_at_reg` varchar(16) character set latin1 NOT NULL default '', ";
$QryTableUsers .= "`user_agent` text character set latin1 NOT NULL, ";
$QryTableUsers .= "`current_page` text character set latin1 NOT NULL, ";
$QryTableUsers .= "`register_time` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`onlinetime` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`dpath` varchar(255) character set latin1 NOT NULL default '', ";
$QryTableUsers .= "`design` tinyint(4) NOT NULL default '1', ";
$QryTableUsers .= "`noipcheck` tinyint(4) NOT NULL default '1', ";
$QryTableUsers .= "`planet_sort` tinyint(1) NOT NULL default '0', ";
$QryTableUsers .= "`planet_sort_order` tinyint(1) NOT NULL default '0', ";
$QryTableUsers .= "`spio_anz` tinyint(4) NOT NULL default '1', ";
$QryTableUsers .= "`settings_tooltiptime` tinyint(4) NOT NULL default '5', ";
$QryTableUsers .= "`settings_fleetactions` tinyint(4) NOT NULL default '0', ";
$QryTableUsers .= "`settings_allylogo` tinyint(4) NOT NULL default '0', ";
$QryTableUsers .= "`settings_esp` tinyint(4) NOT NULL default '1', ";
$QryTableUsers .= "`settings_wri` tinyint(4) NOT NULL default '1', ";
$QryTableUsers .= "`settings_bud` tinyint(4) NOT NULL default '1', ";
$QryTableUsers .= "`settings_mis` tinyint(4) NOT NULL default '1', ";
$QryTableUsers .= "`settings_rep` tinyint(4) NOT NULL default '0', ";
$QryTableUsers .= "`urlaubs_modus` tinyint(4) NOT NULL default '0', ";
$QryTableUsers .= "`urlaubs_until` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`db_deaktjava` tinyint(4) NOT NULL default '0', ";
$QryTableUsers .= "`new_message` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`fleet_shortcut` text character set latin1, ";
$QryTableUsers .= "`b_tech_planet` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`spy_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`computer_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`military_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`defence_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`shield_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`energy_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`hyperspace_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`combustion_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`impulse_motor_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`hyperspace_motor_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`laser_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`ionic_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`buster_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`intergalactic_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`expedition_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`graviton_tech` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`ally_id` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`ally_name` varchar(32) character set latin1 default '', ";
$QryTableUsers .= "`ally_request` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`ally_request_text` text character set latin1, ";
$QryTableUsers .= "`ally_register_time` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`ally_rank_id` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`current_luna` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`kolorminus` varchar(11) character set latin1 NOT NULL default 'red', ";
$QryTableUsers .= "`kolorplus` varchar(11) character set latin1 NOT NULL default '#00FF00', ";
$QryTableUsers .= "`kolorpoziom` varchar(11) character set latin1 NOT NULL default 'yellow', ";
$QryTableUsers .= "`rpg_geologue` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_amiral` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_ingenieur` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_technocrate` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_espion` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_constructeur` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_scientifique` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_commandant` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_points` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_stockeur` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_defenseur` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_destructeur` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_general` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_bunker` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_raideur` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`rpg_empereur` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`lvl_minier` int(11) NOT NULL default '1', ";
$QryTableUsers .= "`lvl_raid` int(11) NOT NULL default '1', ";
$QryTableUsers .= "`xpraid` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`xpminier` int(11) NOT NULL default '0', ";
$QryTableUsers .= "`raids` bigint(20) NOT NULL default '0', ";
$QryTableUsers .= "`p_infligees` bigint(20) NOT NULL default '0', ";
$QryTableUsers .= "`mnl_alliance` INT( 11 ) NOT NULL , ";
$QryTableUsers .= "`mnl_joueur` INT( 11 ) NOT NULL , ";
$QryTableUsers .= "`mnl_attaque` INT( 11 ) NOT NULL , ";
$QryTableUsers .= "`mnl_spy` INT( 11 ) NOT NULL , ";
$QryTableUsers .= "`mnl_exploit` INT( 11 ) NOT NULL , ";
$QryTableUsers .= "`mnl_transport` INT( 11 ) NOT NULL , ";
$QryTableUsers .= "`mnl_expedition` INT( 11 ) NOT NULL , ";
$QryTableUsers .= "`mnl_general` INT( 11 ) NOT NULL , ";
$QryTableUsers .= "`mnl_buildlist` INT (11) NOT NULL , ";
$QryTableUsers .= "`bana` int(11) default NULL , ";
$QryTableUsers .= "`multi_validated` int(11) default NULL , ";
$QryTableUsers .= "`banaday` int(11) default NULL , ";
$QryTableUsers .= "`raids1` int(11) default NULL , ";
$QryTableUsers .= "`raidswin` int(11) default NULL , ";
$QryTableUsers .= "`raidsloose` int(11) default NULL ";
$QryTableUsers .= ") ENGINE=MyISAM;";
// Multi
$QryTableMulti = "CREATE TABLE `{{table}}` ( ";
$QryTableMulti .= "`id` int(11) NOT NULL auto_increment, ";
$QryTableMulti .= "`player` bigint(11) unsigned NOT NULL, ";
$QryTableMulti .= "`sharer` bigint(11) unsigned NOT NULL, ";
$QryTableMulti .= "`reason` text character set latin1 NOT NULL, ";
$QryTableMulti .= "PRIMARY KEY (`id`) ";
$QryTableMulti .= ") ENGINE=MyISAM;";
?>

View file

@ -0,0 +1,137 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* Copyright (c) 2009-Present, Wootook Support Team <http://wootook.org>
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* --> NOTICE <--
* This file is part of the core development branch, changing its contents will
* make you unable to use the automatic updates manager. Please refer to the
* documentation for further information about customizing Wootook.
*
*/
/**
*
* @deprecated
* @param unknown_type $fleet
*/
function MissionCaseExploit($fleet)
{
global $lang;
$prices = Wootook_Empire_Helper_Config_Prices::getSingleton();
$player = Wootook_Player_Model_Session::getSingleton()->getPlayer();
$writeAdapter = Wootook_Core_Database_ConnectionManager::getSingleton()->getConnection('core_write');
$userId = $fleet['fleet_owner'];
$MessSender = $lang['sys_mess_qg'];
$MessTitle = $lang['sys_expe_report'];
if ($fleet['fleet_mess'] == 0) {
if ($fleet['fleet_end_stay'] < time()) {
$stayDuration = ($fleet['fleet_end_stay'] - $fleet['fleet_start_time']);
$shipList = array();
$fleetCapacity = array();
$storageShips = array(
Legacies_Empire::ID_SHIP_ORE_MININER,
Legacies_Empire::ID_SHIP_DEATH_STAR,
Legacies_Empire::ID_SHIP_LIGHT_TRANSPORT,
Legacies_Empire::ID_SHIP_LARGE_TRANSPORT,
Legacies_Empire::ID_SHIP_SUPERNOVA,
);
foreach (explode(";", $fleet['fleet_array']) as $shipData) {
if ($shipData) {
$shipData = explode(',', $shipData);
if (count($shipData) != 2) {
continue;
}
$shipList[$shipData[0]] = $shipData[1];
if (in_array($shipData[0], $storageShips) && isset($prices[$shipData[0]]) && isset($prices[$shipData[0]]['capacity'])) {
$fleetCapacity += $prices[$shipData[0]]['capacity'];
}
}
}
if (!isset($shipList[Legacies_Empire::ID_SHIP_ORE_MININER])) {
return;
}
$fleetSentResources = $fleet['fleet_resource_metal'] + $fleet['fleet_resource_crystal'] + $fleet['fleet_resource_deuterium'];
$fleetAvailableCapacity = $fleetCapacity - $fleetSentResources;
$minerCount = $shipList[Legacies_Empire::ID_SHIP_ORE_MININER];
mt_srand();
$miningAmount = Math::mul(Math::mul($minerCount, $stayDuration), Math::pow(1.2, $player->getElement(Legacies_Empire::ID_RESEARCH_ORE_MINING)));
$random = mt_rand(1, 10000);
$metalOreAmount = Math::mul($miningAmount, Math::div($random, 10000));
$random = mt_rand(1, 10000);
$cristalOreAmount = Math::mul($miningAmount, Math::div($random, 10000));
$totalOreAmount = Math::add($metalOreAmount, $cristalOreAmount);
if (Math::comp($totalOreAmount, $fleetAvailableCapacity) > 0) {
$ratio = Math::div($fleetAvailableCapacity, $totalOreAmount);
$metalOreAmount = Math::mul($metalOreAmount, $ratio);
$cristalOreAmount = Math::mul($cristalOreAmount, $ratio);
}
$statement = $writeAdapter->update()
->into($writeAdapter->getTable('fleets'))
->set('fleet_resource_metal', Math::add($fleet['fleet_resource_metal'], $metalOreAmount))
->set('fleet_resource_crystal', Math::add($fleet['fleet_resource_crystal'], $cristalOreAmount))
->prepare()
;
$statement->execute();
}
} else {
// La Flotte est de retour a quai
if ($fleet['fleet_end_time'] < time()) {
$coords = array(
'galaxy' => $fleet['fleet_start_galaxy'],
'system' => $fleet['fleet_start_system'],
'position' => $fleet['fleet_start_planet']
);
$planet = Wootook_Empire_Model_Planet::factoryFromCoords($coords, $fleet['fleet_start_type']);
if (!$planet->getId() || $planet->getPlayerId() != $player->getId())
foreach (explode(";", $fleet['fleet_array']) as $shipData) {
if ($shipData) {
$shipData = explode(',', $shipData);
if (count($shipData) != 2) {
continue;
}
$planet->setElement($shipData[0], Math::add($planet->getElement($shipData[0]), $shipData[1]));
}
}
$planet->save();
SendSimpleMessage($userId, '', $fleet['fleet_end_time'], 15, $MessSender, $MessTitle, $lang['sys_expe_back_home']);
$writeAdapter->delete()->from($writeAdapter->getTable('fleets'))->where('fleet_id', $fleet['fleet_id']);
}
}
}

View file

@ -1,157 +0,0 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* Copyright (c) 2009-Present, Wootook Support Team <http://wootook.org>
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* --> NOTICE <--
* This file is part of the core development branch, changing its contents will
* make you unable to use the automatic updates manager. Please refer to the
* documentation for further information about customizing Wootook.
*
*/
$QryMigrate = array(
"ALTER TABLE `{{prefix}}fleets` ADD COLUMN `fleet_end_stay` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}fleets` ADD COLUMN `fleet_target_owner` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}fleets` ADD COLUMN `fleet_group` int (11) NOT NULL DEFAULT '0';",
"ALTER TABLE `{{prefix}}messages` MODIFY `message_from` varchar(48) character set latin1 default NULL;",
"ALTER TABLE `{{prefix}}messages` MODIFY `message_subject` varchar(48) character set latin1 default NULL;",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `mnl_buildlist` INT (11) NOT NULL;",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `expedition_tech` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `mnl_expedition` INT( 11 ) NOT NULL;",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_geologue` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_amiral` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_ingenieur` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_technocrate` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_espion` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_constructeur` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_scientifique` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_commandant` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_stockeur` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_defenseur` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_destructeur` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_general` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_bunker` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_raideur` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_empereur` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `rpg_points` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `lvl_minier` int(11) NOT NULL default '1';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `lvl_raid` int(11) NOT NULL default '1';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `xpraid` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `xpminier` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `banaday` int(11) default NULL;",
"ALTER TABLE `{{prefix}}users` ADD COLUMN `user_agent` text character set latin1 NOT NULL;",
"ALTER TABLE `{{prefix}}users` MODIFY `lang` varchar(8) character set latin1 NOT NULL default 'fr';",
"CREATE TABLE `{{prefix}}annonce` (
`id` int(11) NOT NULL auto_increment,
`user` text collate latin1_general_ci NOT NULL,
`galaxie` int(11) NOT NULL,
`systeme` int(11) NOT NULL,
`metala` bigint(11) NOT NULL,
`cristala` bigint(11) NOT NULL,
`deuta` bigint(11) NOT NULL,
`metals` bigint(11) NOT NULL,
`cristals` bigint(11) NOT NULL,
`deuts` bigint(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci AUTO_INCREMENT=5;",
"ALTER TABLE `{{prefix}}planets` ADD COLUMN `last_jump_time` int(11) NOT NULL default '0';",
"ALTER TABLE `{{prefix}}planets` ADD COLUMN `id_level` int(11) default NULL;",
"ALTER TABLE `{{prefix}}planets` MODIFY `b_building_id` text character set latin1 NOT NULL;",
"CREATE TABLE `{{prefix}}statpoints` (
`id_owner` int(11) NOT NULL,
`id_ally` int(11) NOT NULL,
`stat_type` int(2) NOT NULL,
`stat_code` int(11) NOT NULL,
`tech_rank` int(11) NOT NULL,
`tech_old_rank` int(11) NOT NULL,
`tech_points` bigint(20) NOT NULL,
`tech_count` int(11) NOT NULL,
`build_rank` int(11) NOT NULL,
`build_old_rank` int(11) NOT NULL,
`build_points` bigint(20) NOT NULL,
`build_count` int(11) NOT NULL,
`defs_rank` int(11) NOT NULL,
`defs_old_rank` int(11) NOT NULL,
`defs_points` bigint(20) NOT NULL,
`defs_count` int(11) NOT NULL,
`fleet_rank` int(11) NOT NULL,
`fleet_old_rank` int(11) NOT NULL,
`fleet_points` bigint(20) NOT NULL,
`fleet_count` int(11) NOT NULL,
`total_rank` int(11) NOT NULL,
`total_old_rank` int(11) NOT NULL,
`total_points` bigint(20) NOT NULL,
`total_count` int(11) NOT NULL,
`stat_date` int(11) NOT NULL,
KEY `TECH` (`tech_points`),
KEY `BUILDS` (`build_points`),
KEY `DEFS` (`defs_points`),
KEY `FLEET` (`fleet_points`),
KEY `TOTAL` (`total_points`)
) ENGINE=MyISAM;",
"CREATE TABLE `{{prefix}}chat` (
`messageid` int(5) unsigned NOT NULL auto_increment,
`user` varchar(255) NOT NULL default '',
`message` text NOT NULL,
`timestamp` int(11) NOT NULL default '0',
PRIMARY KEY (`messageid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;",
"INSERT INTO `{{prefix}}config` (`config_name`, `config_value`) VALUES
('Fleet_Cdr', '30'),
('Defs_Cdr', '30'),
('game_disable', '0'),
('close_reason', ''),
('BuildLabWhileRun', '0'),
('LastSettedGalaxyPos', '1'),
('LastSettedSystemPos', '9'),
('LastSettedPlanetPos', '1'),
('urlaubs_modus_erz', '1'),
('forum_url', 'http://board.xnova-ng.org/'),
('OverviewNewsFrame', '1'),
('OverviewNewsText', 'Vous avez correctement mis votre serveur UGamela sous Wootook!'),
('OverviewExternChat', '0'),
('OverviewExternChatCmd', ''),
('OverviewBanner', '0'),
('OverviewClickBanner', ''),
('ExtCopyFrame', '0'),
('ExtCopyOwner', ''),
('ExtCopyFunct', ''),
('ForumBannerFrame', '0');",
"UPDATE `{{prefix}}config` SET `config_value`='Wootook' WHERE `config_name`='COOKIE_NAME';",
"UPDATE `{{prefix}}config` SET `config_value`='Wootook' WHERE `config_name`='game_name';",
"CREATE TABLE `{{prefix}}multi` (
`id` int(11) NOT NULL auto_increment,
`player` bigint(11) unsigned NOT NULL default '0',
`sharer` bigint(11) unsigned NOT NULL default '0',
`reason` text character set latin1 NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
?>

View file

@ -133,8 +133,6 @@ function GetFleetConsumption ($FleetArray, $SpeedFactor, $MissionDuration, $Miss
$consumption = 0; $consumption = 0;
$basicConsumption = 0; $basicConsumption = 0;
var_dump($FleetArray, $SpeedFactor, $MissionDuration, $MissionDistance, $FleetMaxSpeed);
foreach ($FleetArray as $Ship => $Count) { foreach ($FleetArray as $Ship => $Count) {
if ($Ship > 0) { if ($Ship > 0) {
$ShipSpeed = GetFleetMaxSpeed ( "", $Ship, $Player ); $ShipSpeed = GetFleetMaxSpeed ( "", $Ship, $Player );

View file

@ -90,10 +90,10 @@ function ShowProductionTable ($CurrentUser, $CurrentPlanet, $BuildID, $Template)
$BuildLevel = ($CurrentBuildtLvl > 0) ? $CurrentBuildtLvl : 1; $BuildLevel = ($CurrentBuildtLvl > 0) ? $CurrentBuildtLvl : 1;
$multiplier = Wootook::getGameConfig('game/resource/multiplier'); $multiplier = Wootook::getGameConfig('game/resource/multiplier');
$Prod[1] = (floor(eval($ProdGrid[$BuildID]['formule']['metal']) * $multiplier) * (1 + ($CurrentUser['rpg_geologue'] * 0.05))); $Prod[1] = (floor(eval($ProdGrid[$BuildID]['formule']['metal']) * $multiplier));
$Prod[2] = (floor(eval($ProdGrid[$BuildID]['formule']['crystal']) * $multiplier) * (1 + ($CurrentUser['rpg_geologue'] * 0.05))); $Prod[2] = (floor(eval($ProdGrid[$BuildID]['formule']['crystal']) * $multiplier));
$Prod[3] = (floor(eval($ProdGrid[$BuildID]['formule']['deuterium']) * $multiplier) * (1 + ($CurrentUser['rpg_geologue'] * 0.05))); $Prod[3] = (floor(eval($ProdGrid[$BuildID]['formule']['deuterium']) * $multiplier));
$Prod[4] = (floor(eval($ProdGrid[$BuildID]['formule']['energy']) * $multiplier) * (1 + ($CurrentUser['rpg_ingenieur'] * 0.05))); $Prod[4] = (floor(eval($ProdGrid[$BuildID]['formule']['energy']) * $multiplier));
$BuildLevel = ""; $BuildLevel = "";
$ActualProd = floor($Prod[$BuildID]); $ActualProd = floor($Prod[$BuildID]);
@ -111,10 +111,10 @@ function ShowProductionTable ($CurrentUser, $CurrentPlanet, $BuildID, $Template)
$ProdFirst = 0; $ProdFirst = 0;
for ( $BuildLevel = $BuildStartLvl; $BuildLevel < $BuildStartLvl + 10; $BuildLevel++ ) { for ( $BuildLevel = $BuildStartLvl; $BuildLevel < $BuildStartLvl + 10; $BuildLevel++ ) {
if ($BuildID != 42) { if ($BuildID != 42) {
$Prod[1] = (floor(eval($ProdGrid[$BuildID]['formule']['metal']) * $multiplier) * (1 + ($CurrentUser['rpg_geologue'] * 0.05))); $Prod[1] = (floor(eval($ProdGrid[$BuildID]['formule']['metal']) * $multiplier));
$Prod[2] = (floor(eval($ProdGrid[$BuildID]['formule']['crystal']) * $multiplier) * (1 + ($CurrentUser['rpg_geologue'] * 0.05))); $Prod[2] = (floor(eval($ProdGrid[$BuildID]['formule']['crystal']) * $multiplier));
$Prod[3] = (floor(eval($ProdGrid[$BuildID]['formule']['deuterium']) * $multiplier) * (1 + ($CurrentUser['rpg_geologue'] * 0.05))); $Prod[3] = (floor(eval($ProdGrid[$BuildID]['formule']['deuterium']) * $multiplier));
$Prod[4] = (floor(eval($ProdGrid[$BuildID]['formule']['energy']) * $multiplier) * (1 + ($CurrentUser['rpg_ingenieur'] * 0.05))); $Prod[4] = (floor(eval($ProdGrid[$BuildID]['formule']['energy']) * $multiplier));
$bloc['build_lvl'] = ($CurrentBuildtLvl == $BuildLevel) ? "<font color=\"#ff0000\">".$BuildLevel."</font>" : $BuildLevel; $bloc['build_lvl'] = ($CurrentBuildtLvl == $BuildLevel) ? "<font color=\"#ff0000\">".$BuildLevel."</font>" : $BuildLevel;
if ($ProdFirst > 0) { if ($ProdFirst > 0) {

View file

@ -214,6 +214,27 @@ case 'install':
'global' => array( 'global' => array(
'resource' => array() 'resource' => array()
), ),
'backend' => array(
'web' => array(
'url' => array(
'base' => $request->getPost('url_path'),
'link' => $request->getPost('url_path') . 'admin/',
'skin' => $request->getPost('url_path') . 'skin/',
'js' => $request->getPost('url_path') . 'js/',
'css' => $request->getPost('url_path') . 'css/',
)
),
'system' => array(
'path' => array(
'base' => ROOT_PATH,
'skin' => ROOT_PATH . 'skin' . DIRECTORY_SEPARATOR,
'design' => ROOT_PATH . 'application' . DIRECTORY_SEPARATOR . 'design' . DIRECTORY_SEPARATOR,
),
'date' => array(
'timezone' => $request->getPost('timezone')
)
),
),
'frontend' => array( 'frontend' => array(
'web' => array( 'web' => array(
'url' => array( 'url' => array(

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Before After
Before After

View file

@ -1,118 +0,0 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* Copyright (c) 2009-Present, Wootook Support Team <http://wootook.org>
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* --> NOTICE <--
* This file is part of the core development branch, changing its contents will
* make you unable to use the automatic updates manager. Please refer to the
* documentation for further information about customizing Wootook.
*
*/
define('INSIDE' , true);
define('INSTALL' , false);
require_once dirname(__FILE__) .'/application/bootstrap.php';
function ShowOfficierPage ( &$CurrentUser ) {
global $lang, $resource, $reslist, $_GET;
includeLang('officier');
// Vérification que le joueur n'a pas un nombre de points négatif
if ($CurrentUser['rpg_points'] < 0) {
doquery("UPDATE {{table}} SET `rpg_points` = '0' WHERE `id` = '". $CurrentUser['id'] ."';", 'users');
}
// Si recrutement d'un officier
if ($_GET['mode'] == 2) {
if ($CurrentUser['rpg_points'] > 0) {
$Selected = $_GET['offi'];
if ( in_array($Selected, $reslist['officier']) ) {
$Result = IsOfficierAccessible ( $CurrentUser, $Selected );
if ( $Result == 1 ) {
$CurrentUser[$resource[$Selected]] += 1;
$CurrentUser['rpg_points'] -= 1;
if ($Selected == 610) {
$CurrentUser['spy_tech'] += 5;
} elseif ($Selected == 611) {
$CurrentUser['computer_tech'] += 3;
}
$QryUpdateUser = "UPDATE {{table}} SET ";
$QryUpdateUser .= "`rpg_points` = '". $CurrentUser['rpg_points'] ."', ";
$QryUpdateUser .= "`spy_tech` = '". $CurrentUser['spy_tech'] ."', ";
$QryUpdateUser .= "`computer_tech` = '". $CurrentUser['computer_tech'] ."', ";
$QryUpdateUser .= "`".$resource[$Selected]."` = '". $CurrentUser[$resource[$Selected]] ."' ";
$QryUpdateUser .= "WHERE ";
$QryUpdateUser .= "`id` = '". $CurrentUser['id'] ."';";
doquery( $QryUpdateUser, 'users' );
$Message = $lang['OffiRecrute'];
} elseif ( $Result == -1 ) {
$Message = $lang['Maxlvl'];
} elseif ( $Result == 0 ) {
$Message = $lang['Noob'];
}
}
} else {
$Message = $lang['NoPoints'];
}
$MessTPL = gettemplate('message_body');
$parse['title'] = $lang['Officier'];
$parse['mes'] = $Message;
$page = parsetemplate( $MessTPL, $parse);
} else {
// Pas de recrutement d'officier
$PageTPL = gettemplate('officier_body');
$RowsTPL = gettemplate('officier_rows');
$parse['off_points'] = $lang['off_points'];
$parse['alv_points'] = $CurrentUser['rpg_points'];
$parse['disp_off_tbl'] = "";
for ( $Officier = 601; $Officier <= 615; $Officier++ ) {
$Result = IsOfficierAccessible ( $CurrentUser, $Officier );
if ( $Result != 0 ) {
$bloc['off_id'] = $Officier;
$bloc['off_tx_lvl'] = $lang['off_tx_lvl'];
$bloc['off_lvl'] = $CurrentUser[$resource[$Officier]];
$bloc['off_desc'] = $lang['Desc'][$Officier];
if ($Result == 1) {
$bloc['off_link'] = "<a href=\"officier.php?mode=2&offi=".$Officier."\"><font color=\"#00ff00\">". $lang['link'][$Officier]."</font>";
} else {
$bloc['off_link'] = $lang['Maxlvl'];
}
$parse['disp_off_tbl'] .= parsetemplate( $RowsTPL, $bloc );
}
}
$page = parsetemplate( $PageTPL, $parse);
}
return $page;
}
$page = ShowOfficierPage ( $user );
display($page, $lang['officier']);
// -----------------------------------------------------------------------------------------------------------
// History version
// 1.0 - Version originelle (Tom1991)
// 1.1 - Réécriture Chlorel pour integration complete dans Wootook
?>

View file

@ -69,19 +69,20 @@ input[type=submit],input[type=button] {height:2em;border:#58939f 0 solid;border-
.global .content .item-list .item {width:200px;margin:0 10px;border:0;box-shadow:none;border-radius:0;} .global .content .item-list .item {width:200px;margin:0 10px;border:0;box-shadow:none;border-radius:0;}
.global .content .item-list .item h2,.global .content .item-list .item h3 {text-decoration:none;} .global .content .item-list .item h2,.global .content .item-list .item h3 {text-decoration:none;}
.global .content .item-list .item h2 {margin-bottom:0;} .global .content .item-list .item h2 {margin-bottom:0;}
.global .content .item-list .item h3.class {margin-top:0;margin-bottom:0;font-size:1em;font-weight:bold;}
.global .content .item-list .item h3.level,.global .content .item-list .item h3.count {margin-top:0;} .global .content .item-list .item h3.level,.global .content .item-list .item h3.count {margin-top:0;}
.global .content .item-list .item h2,.global .content .item-list .item h2 * {font-size:1.3em;} .global .content .item-list .item h2,.global .content .item-list .item h2 * {font-size:1.2em;}
.global .content .item-list .item h3.level,.global .content .item-list .item h3.count {font-size:1em;color:#58939f;font-weight:bold;} .global .content .item-list .item h3.level,.global .content .item-list .item h3.count {font-size:1em;color:#58939f;font-weight:bold;}
.global .content .item-list .item .image {margin:0 auto;width:120px;display:block;overflow:hidden;border:1px solid #58939f;} .global .content .item-list .item .image {margin:0 auto;width:120px;display:block;overflow:hidden;border:1px solid #58939f;}
.global .content .item-list .item .image img {margin:0;border:none;} .global .content .item-list .item .image img {margin:0;border:none;}
.global .content .item-list .item,.global .content .item-list .item * {color:#000;} .global .content .item-list .item,.global .content .item-list .item * {color:#000;}
.global .content .item-list .item .buy,.global .content .item-list .item .max,.global .content .item-list .item .qty {border:1px solid #000;border-radius:3px;height:20px;margin:20px 25px;background:#666;cursor:pointer;} .global .content .item-list .item .buy,.global .content .item-list .item .max,.global .content .item-list .item .qty {border:1px solid #000;border-radius:3px;height:20px;margin:20px 10px;background:#666;cursor:pointer;}
.global .content .item-list .item .buy p,.global .content .item-list .item .buy p *,.global .content .item-list .item .max p,.global .content .item-list .item .max p * {margin:4px 0;text-align:center;font-size:1em;color:#FFF;text-decoration:none;} .global .content .item-list .item .buy p,.global .content .item-list .item .buy p *,.global .content .item-list .item .max p,.global .content .item-list .item .max p * {margin:4px 0;text-align:center;font-size:1em;color:#FFF;text-decoration:none;}
.global .content .item-list .item .buy:hover,.global .content .item-list .item .buy.hover,.global .content .item-list .item .max:hover,.global .content .item-list .item .max.hover,.global .content .item-list .item .qty:hover,.global .content .item-list .item .qty.hover {background-color:#58939f;} .global .content .item-list .item .buy:hover,.global .content .item-list .item .buy.hover,.global .content .item-list .item .max:hover,.global .content .item-list .item .max.hover,.global .content .item-list .item .qty:hover,.global .content .item-list .item .qty.hover {background-color:#58939f;}
.global .content .item-list .item .unavailable,.global .content .item-list .item .unavailable:hover {background:#933;border-color:#D00;} .global .content .item-list .item .unavailable,.global .content .item-list .item .unavailable:hover {background:#933;border-color:#D00;}
.global .content .item-list .item .unavailable p {color:#CCC;} .global .content .item-list .item .unavailable p {color:#CCC;}
.global .content .item-list .item .qty p {margin:0 auto;} .global .content .item-list .item .qty p {margin:0 auto;}
.global .content .item-list .item .qty p input {border:none;height:20px;margin:0 10px;color:#FFF;padding:0 10px;width:128px;text-align:center;font-weight:bold;font-size:1.1em;} .global .content .item-list .item .qty p input {border:none;height:20px;margin:0 10px;color:#FFF;padding:0 10px;width:158px;text-align:center;font-weight:bold;font-size:1.1em;}
.global .content .item-list .item .details {padding:5px 10px;border-radius:5px;width:300px;background:#FFF;z-index:999;display:none;position:relative;left:-30px;top:-10px;border:3px solid #58939f;border-left-width:15px;} .global .content .item-list .item .details {padding:5px 10px;border-radius:5px;width:300px;background:#FFF;z-index:999;display:none;position:relative;left:-30px;top:-10px;border:3px solid #58939f;border-left-width:15px;}
.global .content .item-list .item .details ul {list-style:square inside;color:#58939f;padding-left:5px;} .global .content .item-list .item .details ul {list-style:square inside;color:#58939f;padding-left:5px;}
.global .content .item-list .item .details ul li .cost {font-weight:bold;color:darkgreen;} .global .content .item-list .item .details ul li .cost {font-weight:bold;color:darkgreen;}
@ -89,6 +90,7 @@ input[type=submit],input[type=button] {height:2em;border:#58939f 0 solid;border-
.global .content .item-list .item .details ul li .capped {color:darkred;} .global .content .item-list .item .details ul li .capped {color:darkred;}
.global .content .item-list .item .details .time {color:gray;} .global .content .item-list .item .details .time {color:gray;}
.global .content .item-list .clear {clear:left;height:50px;} .global .content .item-list .clear {clear:left;height:50px;}
.global .content .item-list input[type=submit] {margin:30px 220px 0;width:300px;height:45px;background:#F7A90F;border-radius:10px;font-weight:bold;font-family:Arial,sans-serif;font-variant:small-caps;font-style:oblique;border:2px solid #263D43;box-shadow:0 -8px 10px #D5640E inset, 0 2px 7px #58939F;color:#08335B;font-size:2em;text-align:center;}
.global .content form.form {background:#FFF;width:300px;margin:10px auto;padding:10px 0;border-radius:20px;box-shadow:0 -4px 8px #58939f inset, 20px 20px 40px #58939f, -20px 20px 40px #58939f, 0 -20px 40px #58939f;} .global .content form.form {background:#FFF;width:300px;margin:10px auto;padding:10px 0;border-radius:20px;box-shadow:0 -4px 8px #58939f inset, 20px 20px 40px #58939f, -20px 20px 40px #58939f, 0 -20px 40px #58939f;}
.global .content form.form h1 {font-size:2em;} .global .content form.form h1 {font-size:2em;}