fix bug of culture points when found village

This commit is contained in:
unknown
2012-06-17 21:42:26 +03:00
parent 6c7db3420d
commit 00706f6709
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -2162,7 +2162,7 @@ class Automation {
$varray1 = count($database->getProfileVillages($from['owner']));
$mode = CP;
$cp_mode = $GLOBALS['cp'.$mode];
$need_cps = $cp_mode[$varray1];
$need_cps = $cp_mode[$varray1+1];
$user_cps = $database->getUserField($from['owner'],"cp",0);
//kijken of laatste dorp is, of hoofddorp
if($user_cps >= $need_cps){
+1 -1
View File
@@ -473,7 +473,7 @@ class Units {
if($session->access != BANNED){
$mode = CP;
$total = count($database->getProfileVillages($session->uid));
$need_cps = ${'cp'.$mode}[$total];
$need_cps = ${'cp'.$mode}[$total+1];
$cps = $session->cp;
$rallypoint = $database->getResourceLevel($village->wid);
if($rallypoint['f39'] > 0){
+1 -1
View File
@@ -460,7 +460,7 @@ if($type==18 or $type==19 or $type==20 or $type==21){
<td class="none"><?php
$mode = CP;
$total = count($database->getProfileVillages($session->uid));
$need_cps = ${'cp'.$mode}[$total];
$need_cps = ${'cp'.$mode}[$total+1];
$cps = floor($database->getUserField($session->uid, 'cp',0));
if($cps >= $need_cps) {
+1 -1
View File
@@ -71,7 +71,7 @@ echo '</pre>';
<?php
$mode = CP;
$total = count($database->getProfileVillages($session->uid));
$need_cps = ${'cp'.$mode}[$total];
$need_cps = ${'cp'.$mode}[$total+1];
$cps = $session->cp;
if($cps >= $need_cps) {