Fix bad cached numbers in technology unlocking

This commit is contained in:
nemunaire 2020-11-17 23:42:08 +01:00
parent e441bfc57e
commit 1e8c022806
4 changed files with 32 additions and 32 deletions

View File

@ -482,28 +482,28 @@ class dBatiments implements Donnees
0,
0,
array(
array("technologies", 2,3, 9)
array("technologies", 2,3)
),
array(
array("technologies", 2,4, 17)
array("technologies", 2,4)
),
0,
0,
array(
array("technologies", 1,12, 4096)
array("technologies", 1,12)
),
0,
array(
array("technologies", 3,8, 256)
array("technologies", 3,8)
),
array(
array("technologies", 7,12, 4096)
array("technologies", 7,12)
),
array(
array("technologies", 3,6, 64)
array("technologies", 3,6)
),
array(
array("technologies", 3,7, 128)
array("technologies", 3,7)
),
0
);

View File

@ -52,7 +52,7 @@ class dDonnees{
return false;
break;
case 'technologies':
if (((int)$planete->technologies[$need[1]]& $need[3]) != $need[3])
if (((int)$planete->technologies[$need[1]]& dTechnologies::idToBit($need[2])) == 0)
return false;
break;
case 'casernes':
@ -100,7 +100,7 @@ class dDonnees{
$return .= ucfirst($LANG[$race]["batiments"]["noms_sing"][$need[1]]).' < niveau '.($need[2]+1).' (batiment)<br />';
break;
case 'technologies':
if (((int)$planete->technologies[$need[1]]& $need[3]) != $need[3])
if (((int)$planete->technologies[$need[1]]& dTechnologies::idToBit($need[2])) == 0)
$return .= '<span class="lack">'.$LANG[$race]["technologies"]["noms_sing"][$need[1]][$need[2]].' (technologie)</span><br />';
else
$return .= $LANG[$race]["technologies"]["noms_sing"][$need[1]][$need[2]].' (technologie)<br />';

View File

@ -347,60 +347,60 @@ class dSpatial implements Donnees
array(
array(
array('batiments', 8, 1),
array('technologies', 0,3, 8)
array('technologies', 0,3)
),
array(
array('batiments', 8, 5),
array('technologies', 0,3, 8),
array('technologies', 1,6, 64)
array('technologies', 0,3),
array('technologies', 1,6)
),
array(
array('batiments', 8, 5),
array('technologies', 8,0, 1)
array('technologies', 8,0)
),
array(
array('batiments', 8, 5),
array('technologies', 7,4, 16)
array('technologies', 7,4)
),
array(
array('batiments', 8, 5),
array('technologies', 7,0, 1)
array('technologies', 7,0)
),
array(
array('batiments', 8, 3),
array('technologies', 7,1, 2)
array('technologies', 7,1)
),
array(
array('batiments', 8, 5),
array('technologies', 7,2, 4)
array('technologies', 7,2)
),
array(
array('batiments', 8, 1),
array('technologies', 7,3, 8)
array('technologies', 7,3)
),
array(
array('batiments', 8, 3),
array('technologies', 7,5, 32)
array('technologies', 7,5)
),
array(
array('batiments', 8, 6),
array('technologies', 7,6, 64)
array('technologies', 7,6)
),
array(
array('batiments', 8, 6),
array('technologies', 7,1, 128)
array('technologies', 7,1)
),
array(
array('batiments', 8, 8),
array('technologies', 7,8, 256)
array('technologies', 7,8)
),
array(
array('batiments', 8, 10),
array('technologies', 7,9, 512)
array('technologies', 7,9)
),
array(
array('batiments', 8, 10),
array('technologies', 7,10, 1024)
array('technologies', 7,10)
)
);

View File

@ -436,35 +436,35 @@ class dTerrestre implements Donnees
//Défenses
array(
array('batiments', 7, 1),
array('technologies', 6, 0, 1)
array('technologies', 6, 0)
),
array(
array('batiments', 7, 3),
array('technologies', 6, 3, 8)
array('technologies', 6, 3)
),
array(
array('batiments', 7, 4),
array('technologies', 6, 1, 2)
array('technologies', 6, 1)
),
array(
array('batiments', 7, 4),
array('technologies', 6, 4, 16)
array('technologies', 6, 4)
),
array(
array('batiments', 7, 8),
array('technologies', 6, 2, 4)
array('technologies', 6, 2)
),
array(
array('batiments', 7, 8),
array('technologies', 6, 5, 32)
array('technologies', 6, 5)
),
array(
array('batiments', 7, 8),
array('technologies', 6, 6, 64)
array('technologies', 6, 6)
),
array(
array('batiments', 7, 10),
array('technologies', 7, 11, 2048)
array('technologies', 7, 11)
)
);