mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-15 09:06:08 +00:00
more updates
This commit is contained in:
@@ -206,6 +206,7 @@ class Automation {
|
||||
$this->checkInvitedPlayes();
|
||||
$this->updateStore();
|
||||
$this->procClimbers();
|
||||
$this->CheckBan();
|
||||
}
|
||||
|
||||
private function loyaltyRegeneration() {
|
||||
@@ -3834,8 +3835,8 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
|
||||
}
|
||||
}
|
||||
|
||||
private function procClimbers() {
|
||||
global $database, $ranking;
|
||||
private function procClimbers() {
|
||||
global $database, $ranking;
|
||||
$users = "SELECT * FROM " . TB_PREFIX . "users WHERE access < " . (INCLUDE_ADMIN ? "10" : "8") . "";
|
||||
$array = $database->query_return($users);
|
||||
$ranking->procRankArray();
|
||||
@@ -3890,7 +3891,19 @@ $crannyimg = "<img src=\"".GP_LOCATE."img/g/g23.gif\" height=\"20\" width=\"15\"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function checkBan() {
|
||||
global $database;
|
||||
$time = time();
|
||||
$q = "SELECT * FROM ".TB_PREFIX."banlist WHERE active = 1 and end < $time";
|
||||
$array = $database->query_return($q);
|
||||
foreach($array as $banlist) {
|
||||
mysql_query("UPDATE ".TB_PREFIX."banlist SET active = 0 WHERE id = ".$banlist['id']."");
|
||||
mysql_query("UPDATE ".TB_PREFIX."users SET access = 2 WHERE id = ".$banlist['uid']."");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$automation = new Automation;
|
||||
?>
|
||||
@@ -312,6 +312,7 @@ class Building {
|
||||
}
|
||||
}
|
||||
$level = $database->getResourceLevel($village->wid);
|
||||
if($session->access!=BANNED){
|
||||
if($database->addBuilding($village->wid,$id,$village->resarray['f'.$id.'t'],$loop,$time+($loop==1?ceil(60/SPEED):0),0,$level['f'.$id] + 1 + count($database->getBuildingByField($village->wid,$id)))) {
|
||||
$database->modifyResource($village->wid,$uprequire['wood'],$uprequire['clay'],$uprequire['iron'],$uprequire['crop'],0);
|
||||
$logging->addBuildLog($village->wid,$this->procResType($village->resarray['f'.$id.'t']),($village->resarray['f'.$id]+($loopsame>0?2:1)),0);
|
||||
@@ -322,6 +323,9 @@ class Building {
|
||||
header("Location: dorf1.php");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,11 +356,15 @@ class Building {
|
||||
$time = $this->buildArray[0]['timestamp'] + round($dataarray[$village->resarray['f'.$id]-1]['time'] / 4);
|
||||
}
|
||||
}
|
||||
if($session->access!=BANNED){
|
||||
$level = $database->getResourceLevel($village->wid);
|
||||
if($database->addBuilding($village->wid,$id,$village->resarray['f'.$id.'t'],$loop,$time,0,0,$level['f'.$id] + 1 + count($database->getBuildingByField($village->wid,$id)))) {
|
||||
$logging->addBuildLog($village->wid,$this->procResType($village->resarray['f'.$id.'t']),($village->resarray['f'.$id]-1),2);
|
||||
header("Location: dorf2.php");
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,12 +391,16 @@ class Building {
|
||||
}
|
||||
}
|
||||
if($this->meetRequirement($tid)) {
|
||||
if($session->access!=BANNED){
|
||||
$level = $database->getResourceLevel($village->wid);
|
||||
if($database->addBuilding($village->wid,$id,$tid,$loop,$time,0,$level['f'.$id] + 1 + count($database->getBuildingByField($village->wid,$id)))) {
|
||||
$logging->addBuildLog($village->wid,$this->procResType($tid),($village->resarray['f'.$id]+1),1);
|
||||
$database->modifyResource($village->wid,$uprequire['wood'],$uprequire['clay'],$uprequire['iron'],$uprequire['crop'],0);
|
||||
header("Location: dorf2.php");
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,6 +250,7 @@ class Units {
|
||||
header("Location: a2b.php");
|
||||
} else {
|
||||
|
||||
if($session->access != BANNED){
|
||||
|
||||
if($session->tribe == 1){ $u = ""; } elseif($session->tribe == 2){ $u = "1"; } elseif($session->tribe == 3){ $u = "2"; }elseif($session->tribe == 4){ $u = "3"; }else {$u = "4"; }
|
||||
|
||||
@@ -334,11 +335,14 @@ class Units {
|
||||
}
|
||||
header("Location: build.php?id=39");
|
||||
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}}
|
||||
|
||||
private function sendTroopsBack($post) {
|
||||
global $form, $database, $village, $generator, $session, $technology;
|
||||
|
||||
if($session->access != BANNED){
|
||||
$enforce=$database->getEnforceArray($post['ckey'],0);
|
||||
if(($enforce['from']==$village->wid) || ($enforce['vref']==$village->wid)){
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
@@ -459,6 +463,9 @@ class Units {
|
||||
header("Location: a2b.php");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
}
|
||||
|
||||
public function Settlers($post) {
|
||||
|
||||
Reference in New Issue
Block a user