mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-12 23:56:08 +00:00
fix forum link + fix send resouces by village name + fix details in attack window for natars
This commit is contained in:
@@ -318,6 +318,16 @@
|
||||
$database->insertAlliNotice($session->alliance, '<a href="spieler.php?uid=' . $session->uid . '">' . $session->username . '</a> kicked <a href="spieler.php?uid=' . $post['a_user'] . '">' . $UserData['username'] . '</a>.');
|
||||
//header("Location: build.php?id=".$post['id']);
|
||||
}
|
||||
}
|
||||
/*****************************************
|
||||
Function to set forum link
|
||||
*****************************************/
|
||||
public function setForumLink($post) {
|
||||
global $database, $session;
|
||||
if(isset($post['f_link'])){
|
||||
$database->setAlliForumLink($session->alliance, $post['f_link']);
|
||||
header("Location: allianz.php?s=5");
|
||||
}
|
||||
}
|
||||
/*****************************************
|
||||
Function to quit from alliance
|
||||
|
||||
@@ -1075,7 +1075,7 @@
|
||||
References:
|
||||
*****************************************/
|
||||
function createAlliance($tag, $name, $uid, $max) {
|
||||
$q = "INSERT into " . TB_PREFIX . "alidata values (0,'$name','$tag',$uid,0,0,0,'','',$max,'','','','','','','','')";
|
||||
$q = "INSERT into " . TB_PREFIX . "alidata values (0,'$name','$tag',$uid,0,0,0,'','',$max,'','','','','','','','','')";
|
||||
mysql_query($q, $this->connection);
|
||||
return mysql_insert_id($this->connection);
|
||||
}
|
||||
@@ -1285,6 +1285,11 @@
|
||||
return mysql_query($q, $this->connection);
|
||||
}
|
||||
|
||||
function setAlliForumLink($aid, $link) {
|
||||
$q = "UPDATE " . TB_PREFIX . "alidata SET `forumlink` = '$link' WHERE id = $aid";
|
||||
return mysql_query($q, $this->connection);
|
||||
}
|
||||
|
||||
function getUserAlliance($id) {
|
||||
$q = "SELECT " . TB_PREFIX . "alidata.tag from " . TB_PREFIX . "users join " . TB_PREFIX . "alidata where " . TB_PREFIX . "users.alliance = " . TB_PREFIX . "alidata.id and " . TB_PREFIX . "users.id = $id";
|
||||
$result = mysql_query($q, $this->connection);
|
||||
@@ -1485,7 +1490,7 @@
|
||||
}
|
||||
|
||||
function removeNotice($id) {
|
||||
$q = "UPDATE " . TB_PREFIX . "ndata set del = 1 where id = $id";
|
||||
$q = "UPDATE " . TB_PREFIX . "ndata set del = 1,viewed = 1 where id = $id";
|
||||
return mysql_query($q, $this->connection);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,13 +95,12 @@ class Market {
|
||||
$reqMerc = ceil((array_sum($resource)-0.1)/$this->maxcarry);
|
||||
|
||||
if($this->merchantAvail() != 0 && $reqMerc <= $this->merchantAvail()) {
|
||||
if(isset($post['dname']) && $post['dname'] != "") {
|
||||
$id = $database->getVillageByName($post['dname']);
|
||||
$coor = $database->getCoor($id);
|
||||
}
|
||||
if(isset($post['x']) && isset($post['y']) && $post['x'] != "" && $post['y'] != "") {
|
||||
$coor = array('x'=>$post['x'], 'y'=>$post['y']);
|
||||
$id = $generator->getBaseID($coor['x'],$coor['y']);
|
||||
}else if(isset($post['dname']) && $post['dname'] != "") {
|
||||
$id = $database->getVillageByName($post['dname']);
|
||||
$coor = $database->getCoor($id);
|
||||
}
|
||||
if($database->getVillageState($id)) {
|
||||
$timetaken = $generator->procDistanceTime($coor,$village->coor,$session->tribe,0);
|
||||
@@ -243,8 +242,9 @@ class Market {
|
||||
|
||||
private function tradeResource($post) {
|
||||
global $session,$database,$village;
|
||||
for($i = 1; $i <= 40; $i++){
|
||||
$wwvillage = $database->getResourceLevel($village->wid);
|
||||
if($wwvillage['f99t']!=40){
|
||||
if($wwvillage['f99t']!=40 and $wwvillage['f'.$i.'t']!=40){
|
||||
if($session->userinfo['gold'] >= 3) {
|
||||
//kijken of ze niet meer gs invoeren dan ze hebben
|
||||
if($session->access == BANNED){
|
||||
@@ -264,6 +264,7 @@ class Market {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
$market = new Market;
|
||||
|
||||
Reference in New Issue
Block a user