mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-13 08:06:06 +00:00
fix bug of culture points when found village
This commit is contained in:
@@ -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){
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user