mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
refactor: alliance and Embassy mechanics refactoring, stage 2 of 3
Everything is now prepared for the last stage, where the code to handle Embassy destruction during a battle will be added and tested :) A few Embassy-demolition-related issues have been ironed-out in this commit as well.
This commit is contained in:
@@ -1996,6 +1996,7 @@ class Automation {
|
||||
}
|
||||
if ($tbgid==18){
|
||||
$this->updateMax($database->getVillageField($data['to'],'owner'));
|
||||
//$p_alliance = $database->getUserField($data['to'],"alliance",0);
|
||||
}
|
||||
if ($isoasis == 0) {
|
||||
$pop=$this->recountPop($data['to']);
|
||||
@@ -4750,7 +4751,7 @@ $wallimg = "<img src=\"".GP_LOCATE."img/g/g3".$targettribe."Icon.gif\" height=\"
|
||||
}
|
||||
}
|
||||
|
||||
private function updateMax($leader) {
|
||||
public function updateMax($leader) {
|
||||
global $bid18, $database;
|
||||
$q = mysqli_query($GLOBALS['link'],"SELECT * FROM " . TB_PREFIX . "alidata where leader = ". (int) $leader);
|
||||
if(mysqli_num_rows($q) > 0){
|
||||
|
||||
Reference in New Issue
Block a user