mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-15 07:41:00 +00:00
Update db_MYSQL.php
This commit is contained in:
@@ -567,16 +567,17 @@ class MYSQL_DB {
|
|||||||
return mysql_query($q, $this->connection);
|
return mysql_query($q, $this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function modifyOasisLoyalty($wref) {
|
public function modifyOasisLoyalty($wref) {
|
||||||
if($this->isVillageOases($wref) != 0) {
|
if($this->isVillageOases($wref) != 0) {
|
||||||
$OasisInfo = $this->getOasisInfo($wref);
|
$OasisInfo = $this->getOasisInfo($wref);
|
||||||
if($OasisInfo['conqured'] != 0) {
|
if($OasisInfo['conqured'] != 0) {
|
||||||
$LoyaltyAmendment = floor(100 / min(3,(4-$this->VillageOasisCount($OasisInfo['conqured']))));
|
$LoyaltyAmendment = floor(100 / min(3,(4-$this->VillageOasisCount($OasisInfo['conqured']))));
|
||||||
$q = "UPDATE `".TB_PREFIX."odata` SET loyalty=loyalty-$LoyaltyAmendment, lastupdated=".time()." WHERE wref=$wref";
|
$q = "UPDATE `".TB_PREFIX."odata` SET loyalty=loyalty-$LoyaltyAmendment, lastupdated=".time()." WHERE wref=$wref";
|
||||||
return mysql_query($q, $this->connection);
|
$result=mysql_query($q, $this->connection);
|
||||||
}
|
return $OasisInfo['loyalty']-$LoyaltyAmendment;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function populateOasis() {
|
function populateOasis() {
|
||||||
$q = "SELECT * FROM " . TB_PREFIX . "wdata where oasistype != 0";
|
$q = "SELECT * FROM " . TB_PREFIX . "wdata where oasistype != 0";
|
||||||
|
|||||||
Reference in New Issue
Block a user