vue [BUG] Université
Kommunauty
Connexion
Inscription

[BUG] Université


jeraii Messages : 88

Je ne sais pas si quelqu'un l'a remarqué, mais l'université ne fonctionne pas... Aucun bonus de réduction de 8% est appliquée. Je sais que le problème vient du fichier getbuildingtime, mais est-ce que quelqu'un a corriger ce bug ?

vendredi 10 mai 2013

Homer Messages : 1925

Oui, je l'ai corriger, je te le met le corrigé dans la soirée

dimanche 12 mai 2013

jeraii Messages : 88

Ok merci

dimanche 12 mai 2013

Homer Messages : 1925

Dans la page GetBuildingTime.php, modifier dans le elseif (in_array($Element, $reslist['tech'])) en remplaçant, dans les formule de calcul de temps, la variable $PLANET[$resource[31]] par $Level (Il y a 7 ligne impactées au total)

dimanche 12 mai 2013 (Dernière édition dimanche 12 mai 2013)

jeraii Messages : 88

Hmm, il n'y a pas de différence, la variable $Level remplace $PLANET[$resource[31]]. On a donc, toujours le même problème.

Voici mon fichier getbuldingtime:

<?php

if(!defined('INSIDE')) die('Hacking attempt!');

function GetBuildingTime ($USER, $PLANET, $Element, $Destroy = false)
{
global $pricelist, $resource, $reslist, $requeriments;

$CONF = getConfig($USER['universe']);
$level = isset($PLANET[$resource[$Element]]) ? $PLANET[$resource[$Element]] : $USER[$resource[$Element]];

$Cost   = floor($pricelist[$Element]['metal'] * pow($pricelist[$Element]['factor'], $level)) + floor($pricelist[$Element]['crystal'] * pow($pricelist[$Element]['factor'], $level));

if (in_array($Element, $reslist['build'])) {

if($USER['commander'] >= 1 xor $USER['raza'] == 0) {
$tiempo = $Cost / ($CONF['game_speed'] * (1 + $PLANET[$resource[14]])) * pow(0.5, $PLANET[$resource[15]]);
$porcentaje = $tiempo * 10/100;
$time = $tiempo - $porcentaje;
} elseif($USER['commander'] >= 1 and $USER['raza'] == 0) {
$tiempo = $Cost / ($CONF['game_speed'] * (1 + $PLANET[$resource[14]])) * pow(0.5, $PLANET[$resource[15]]);
$porcentaje = $tiempo * 20/100;
$time = $tiempo - $porcentaje;
} else {
$time = $Cost / ($CONF['game_speed'] * (1 + $PLANET[$resource[14]])) * pow(0.5, $PLANET[$resource[15]]);
} } elseif (in_array($Element, $reslist['fleet'])) {
if($USER['commander'] >= 1 xor $USER['raza'] == 1) {
@$tiempo = $Cost / ($CONF['game_speed'] * (1 + ($PLANET[$resource[21]] + $PLANET[$resource[14]]))) * pow(0.5, $PLANET[$resource[15]]);
$porcentaje = $tiempo * 10/100;
$time = $tiempo - $porcentaje;
} elseif($USER['commander'] >= 1 and $USER['raza'] == 1) {
@$tiempo = $Cost / ($CONF['game_speed'] * (1 + ($PLANET[$resource[21]] + $PLANET[$resource[14]]))) * pow(0.5, $PLANET[$resource[15]]);
$porcentaje = $tiempo * 20/100;
$time = $tiempo - $porcentaje;
} else {
@$time = $Cost / ($CONF['game_speed'] * (1 + ($PLANET[$resource[21]] + $PLANET[$resource[14]]))) * pow(0.5, $PLANET[$resource[15]]);
} }elseif (in_array($Element, $reslist['defense'])) {
if($USER['commander'] >= 1) {
@$tiempo= $Cost / ($CONF['game_speed'] * (1 + ($PLANET[$resource[21]] + $PLANET[$resource[14]]))) * pow(0.5, $PLANET[$resource[15]]);
$porcentaje = $tiempo * 10/100;
$time = $tiempo - $porcentaje;
} else {
@$time= $Cost / ($CONF['game_speed'] * (1 + ($PLANET[$resource[21]] + $PLANET[$resource[14]]))) * pow(0.5, $PLANET[$resource[15]]);
} } elseif (in_array($Element, $reslist['tech']))
{
if(is_array($PLANET[$resource[31].'_inter']))
{
$Level = 0;
foreach($PLANET[$resource[31].'_inter'] as $Levels)
{
if($Levels >= $requeriments[$Element][31])
$Level += $Levels;
}
} else{
$Level = $PLANET[$resource[31]];
}

if($USER['commander'] >= 1 and $USER['technocratic'] >= 1) {
#Nuevo valor de prueba, hay que ver si ahora resulta.
$tiempo = $Cost / ($CONF['game_speed'] * (1 + $Level)) * pow(0.5, $PLANET[$resource[6]]) + (0.3 - $comandante_tecnos);
$porcentaje = $tiempo * 35/100;
$time = $tiempo - $porcentaje;
} elseif($USER['commander'] >= 1 and $USER['technocratic'] <= 0) {
$tiempo = $Cost / ($CONF['game_speed'] * (1 + $Level)) * pow(0.5, $PLANET[$resource[6]]) + (0.3 - $comandante_tecnos);
$porcentaje = $tiempo * 10/100;
$time = $tiempo - $porcentaje;
}elseif($USER['commander'] <= 0 and $USER['technocratic'] >= 1) {
$tiempo = $Cost / ($CONF['game_speed'] * (1 + $Level)) * pow(0.5, $PLANET[$resource[6]]) + (0.3 - $comandante_tecnos);
$porcentaje = $tiempo * 25/100;
$time = $tiempo - $porcentaje;
} elseif($USER['commander'] >= 1 and $USER['technocratic'] >= 1 and $USER['raza'] == 1) {
$tiempo = $Cost / ($CONF['game_speed'] * (1 + $Level)) * pow(0.5, $PLANET[$resource[6]]) + (0.3 - $comandante_tecnos);
$porcentaje = $tiempo * 45/100;
$time = $tiempo - $porcentaje;
} elseif($USER['commander'] >= 1 and $USER['technocratic'] <= 0 and $USER['raza'] == 1) {
$tiempo = $Cost / ($CONF['game_speed'] * (1 + $Level)) * pow(0.5, $PLANET[$resource[6]]) + (0.3 - $comandante_tecnos);
$porcentaje = $tiempo * 20/100;
$time = $tiempo - $porcentaje;
}elseif($USER['commander'] <= 0 and $USER['technocratic'] >= 1 and $USER['raza'] == 1) {
$tiempo = $Cost / ($CONF['game_speed'] * (1 + $Level)) * pow(0.5, $PLANET[$resource[6]]) + (0.3 - $comandante_tecnos);
$porcentaje = $tiempo * 35/100;
$time = $tiempo - $porcentaje;
} else { #Nuevo valor de prueba, hay que ver si ahora resulta (Sin comandante).
$time = $Cost / ($CONF['game_speed'] * (1 + $Level)) * pow(0.5, $PLANET[$resource[6]]) + (0.3 - $comandante_tecnos);
}
        }

if(!$Destroy)
$time = floor($time * 3600);
else
$time = floor($time * 1300);

if($Element>100 && $Element < 200)
            $time = $time/6;

return max($time, $CONF['min_build_time']);
}

?>
vendredi 17 mai 2013

Homer Messages : 1925

tiens, y'avais déjà un topic sur le sujet : http://www.kommunauty.fr/forum/16264-reseau-de-recherche-intergalactique-bug/1/

vendredi 17 mai 2013

jeraii Messages : 88

ça ne fixe pas l'université Le temps reste le même. A vrai dire, je crois qu'il n'y a aucun script concernant le bonus de l'université...

samedi 18 mai 2013

Homer Messages : 1925

Ah merde j'ai confondu les 2 effectivement

Je regarderai pour l'université

samedi 18 mai 2013

jeraii Messages : 88

Voici un vieux code, mais il contient un script d'université. Ça pourrait fonctionner ? Si oui, tu pourrait l'adapter ?

elseif (in_array($Element, $reslist['tech']))
{
if(is_array($PLANET[$resource[31].'_inter']))
{
$Level = 0;
foreach($PLANET[$resource[31].'_inter'] as $Levels)
{
if($Levels >= $requeriments[$Element][31])
$Level += $Levels;
}
}
else
$Level = $PLANET[$resource[31]];

#$time   = $Cost / (1000 * ($Level * 2)) / ($CONF['game_speed']) * pow(1 - UNIVERISTY_RESEARCH_REDUCTION, $PLANET[$resource[6]]);
                           $time = $Cost / ($technocratic * $SkillZ * $CONF['game_speed'] * (50 * $Level)) * pow(1 - UNIVERISTY_RESEARCH_REDUCTION / 100, $PLANET[$resource[6]]);                         
                                }
samedi 18 mai 2013

Homer Messages : 1925

y'a plus simple, l'université doit réduire de 8% les recherche, donc dans la formule de calcule de temps, tu met un truc du genre :


$time = time*($PLANET[$ressources[université]]*8/100)
samedi 18 mai 2013

Page suivante »