From 4c116aefea77be9687769b0f24e2671a5cf343d3 Mon Sep 17 00:00:00 2001 From: Shadow <1140613+Shadowss@users.noreply.github.com> Date: Mon, 6 May 2019 09:18:20 +0300 Subject: [PATCH] update --- GameEngine/Automation.php | 38 ++-------------------- GameEngine/Building.php | 35 +++++++++++++++++--- GameEngine/Database.php | 52 ++++++++++++++++++++---------- GameEngine/Market.php | 2 +- GameEngine/Technology.php | 23 ++++++------- README.md | 57 +++++++++++++-------------------- Templates/Ajax/quest_core25.tpl | 2 +- var/db/struct.sql | 3 +- 8 files changed, 104 insertions(+), 108 deletions(-) diff --git a/GameEngine/Automation.php b/GameEngine/Automation.php index fa6c5a7b..9f591bd7 100644 --- a/GameEngine/Automation.php +++ b/GameEngine/Automation.php @@ -104,7 +104,7 @@ class Automation { if($building) $popTot += $this->buildingPOP($building, $lvl); } - $this->recountCP($vid); + Building::recountCP($database, $vid); $q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid"; mysqli_query($database->dblink, $q); $owner = $database->getVillageField($vid, "owner"); @@ -113,27 +113,6 @@ class Automation { return $popTot; } - function recountCP($vid){ - global $database; - - $vid = (int) $vid; - $fdata = $database->getResourceLevel($vid); - $popTot = 0; - - for ($i = 1; $i <= 40; $i++) { - $lvl = $fdata["f".$i]; - $building = $fdata["f".$i."t"]; - if($building){ - $popTot += $this->buildingCP($building,$lvl); - } - } - - $q = "UPDATE ".TB_PREFIX."vdata set cp = $popTot where wref = $vid"; - mysqli_query($database->dblink,$q); - - return $popTot; - } - function buildingPOP($f, $lvl){ $name = "bid".$f; global $$name; @@ -147,19 +126,6 @@ class Automation { return $popT; } - function buildingCP($f, $lvl){ - $name = "bid".$f; - global $$name; - - $popT = 0; - $dataarray = $$name; - - for ($i = 0; $i <= $lvl; $i++) { - $popT += ((isset($dataarray[$i]) && isset($dataarray[$i]['cp'])) ? $dataarray[$i]['cp'] : 0); - } - return $popT; - } - private function loyaltyRegeneration() { global $database; @@ -2642,7 +2608,7 @@ class Automation { if($data['from'] == 0){ $DefenderID = $database->getVillageField($data['to'], "owner"); - $database->addEnforce($data); + $database->addEnforce(['from' => $data['from'], 'to' => $data['to'], 't1' => 0, 't2' => 0, 't3' => 0, 't4' => 0, 't5' => 0, 't6' => 0, 't7' => 0, 't8' => 0, 't9' => 0, 't10' => 0, 't11' => 0]); $reinf = $database->getEnforce($data['to'], $data['from']); $database->modifyEnforce($reinf['id'], 31, 1, 1); $data_fail = '0,0,4,1,0,0,0,0,0,0,0,0,0,0'; diff --git a/GameEngine/Building.php b/GameEngine/Building.php index 46c345b9..ad386b21 100755 --- a/GameEngine/Building.php +++ b/GameEngine/Building.php @@ -329,7 +329,7 @@ class Building { } private function removeBuilding($d) { - global $database, $village; + global $database, $village, $session; foreach($this->buildArray as $jobs) { if($jobs['id'] == $d) { $uprequire = $this->resourceRequired($jobs['field'], $jobs['type']); @@ -537,10 +537,10 @@ class Building { case 37: return $this->getTypeLevel(15) >= 3 && $this->getTypeLevel(16) >= 1 && !$isBuilt; // great warehouse can only be built with artefact or in Natar villages - case 38: return $this->getTypeLevel(15) >= 10 && (!$isBuilt || $this->getTypeLevel($id) == 20) && ($village->natar == 1 || count($database->getOwnUniqueArtefactInfo2($village->wid, 6, 1, 0)) || count($database->getOwnUniqueArtefactInfo2($session->uid, 6, 2, 0))); + case 38: return $this->getTypeLevel(15) >= 10 && (!$isBuilt || $this->getTypeLevel($id) == 20) && ($village->natar == 1 || count($database->getOwnUniqueArtefactInfo2($village->wid, 6, 1, 1)) || count($database->getOwnUniqueArtefactInfo2($session->uid, 6, 2, 0))); // great granary can only be built with artefact or in Natar villages - case 39: return $this->getTypeLevel(15) >= 10 && (!$isBuilt || $this->getTypeLevel($id) == 20) && ($village->natar == 1 || count($database->getOwnUniqueArtefactInfo2($village->wid, 6, 1, 0)) || count($database->getOwnUniqueArtefactInfo2($session->uid, 6, 2, 0))); + case 39: return $this->getTypeLevel(15) >= 10 && (!$isBuilt || $this->getTypeLevel($id) == 20) && ($village->natar == 1 || count($database->getOwnUniqueArtefactInfo2($village->wid, 6, 1, 1)) || count($database->getOwnUniqueArtefactInfo2($session->uid, 6, 2, 0))); case 40: return $this->allowWwUpgrade(); case 41: return $this->getTypeLevel(16) >= 10 && $this->getTypeLevel(20) == 20 && $session->tribe == 1 && !$isBuilt; @@ -749,7 +749,6 @@ class Building { if (!isset($exclude_master) && $database->query($q) && ($enought_res == 1 || $jobs['master'] == 0)) { $database->modifyPop($jobs['wid'],$resource['pop'],0); - $database->addCP($jobs['wid'],$resource['cp']); $deletIDs[] = (int) $jobs['id']; if($jobs['type'] == 18) { $owner = $database->getVillageField($jobs['wid'],"owner"); @@ -796,10 +795,38 @@ class Building { } } + self::recountCP($database, $village->wid); + header("Location: ".($redirect_url ? $redirect_url : $session->referrer)); exit; } + public static function recountCP($database, $vid){ + $vid = (int) $vid; + $fdata = $database->getResourceLevel($vid); + $cpTot = 0; + + for ($i = 1; $i <= 40; $i++) { + $lvl = $fdata["f".$i]; + $building = $fdata["f".$i."t"]; + if($building){ + $cpTot += self::buildingCP($building,$lvl); + } + } + + $q = "UPDATE ".TB_PREFIX."vdata set cp = $cpTot where wref = $vid"; + mysqli_query($database->dblink,$q); + } + + public static function buildingCP($f, $lvl){ + $name = "bid".$f; + global $$name; + + $dataarray = $$name; + + return ((isset($dataarray[$lvl]) && isset($dataarray[$lvl]['cp'])) ? $dataarray[$lvl]['cp'] : 0); + } + public function resourceRequired($id, $tid, $plus = 1) { $name = "bid".$tid; global $$name, $village, $bid15, $database; diff --git a/GameEngine/Database.php b/GameEngine/Database.php index a0dd69dd..e244372e 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -785,9 +785,13 @@ class MYSQLi_DB implements IDbConnection { // no need to cache this method public function hasBeginnerProtection($vid) { - list($vid) = $this->escape_input($vid); - - $q = "SELECT u.protect FROM ".TB_PREFIX."users u,".TB_PREFIX."vdata v,".TB_PREFIX."odata o WHERE (u.id = v.owner AND v.wref = ".(int) $vid.") OR (u.id = o.owner AND o.wref = ".(int) $vid.") LIMIT 1"; + list($vid) = $this->escape_input((int) $vid); + $q = "SELECT u.protect + FROM ". TB_PREFIX ."users u + JOIN ". TB_PREFIX ."vdata v ON u.id = v.owner + JOIN ". TB_PREFIX ."odata o ON u.id = o.owner + WHERE v.wref = ". $vid ." OR o.wref = ". $vid . " + LIMIT 1"; $result = mysqli_query($this->dblink,$q); $dbarray = mysqli_fetch_array($result); @@ -1289,7 +1293,7 @@ class MYSQLi_DB implements IDbConnection { $daysPassedFromStart = ($time - strtotime(START_DATE) - strtotime(date('d.m.Y')) + strtotime(START_TIME)) / 86400; $radiusMin = min(round(pow(2 * ($daysPassedFromStart / 5 * SPEED), 2)), round(pow(WORLD_MAX * 0.8, 2)) + round(pow(WORLD_MAX * 0.8, 2))); - $radiusMax = min(round(pow(4 * ($daysPassedFromStart / 5 * SPEED), 2)), pow(WORLD_MAX, 2) + pow(WORLD_MAX, 2)); + $radiusMax = min(round(pow(4 * ($daysPassedFromStart / 5 * SPEED), 2)) + pow($count, 2), pow(WORLD_MAX, 2) + pow(WORLD_MAX, 2)); break; case 1: @@ -1320,19 +1324,19 @@ class MYSQLi_DB implements IDbConnection { } switch($sector){ - case 1: $sector = "x <= 0 AND y >= 0"; break; // - | + - case 2: $sector = "x >= 0 AND y >= 0"; break; // + | + - case 3: $sector = "x <= 0 AND y <= 0"; break; // - | - - default: $sector = "x >= 0 AND y <= 0"; // + | - + case 1: $newSector = "x <= 0 AND y >= 0"; break; // - | + + case 2: $newSector = "x >= 0 AND y >= 0"; break; // + | + + case 3: $newSector = "x <= 0 AND y <= 0"; break; // - | - + default: $newSector = "x >= 0 AND y <= 0"; // + | - } //Choose villages beetween two circumferences, by using their formula (x^2 + y^2 = r^2) - $q = "SELECT id FROM ".TB_PREFIX."wdata WHERE fieldtype = 3 AND ($sector) AND (POWER(x, 2) + POWER(y, 2) >= $radiusMin AND POWER(x, 2) + POWER(y, 2) <= $radiusMax) AND occupied = 0 ORDER BY RAND() LIMIT $numberOfVillages"; + $q = "SELECT id FROM ".TB_PREFIX."wdata WHERE fieldtype = 3 AND ($newSector) AND (POWER(x, 2) + POWER(y, 2) >= $radiusMin AND POWER(x, 2) + POWER(y, 2) <= $radiusMax) AND occupied = 0 ORDER BY RAND() LIMIT $numberOfVillages"; $result = mysqli_query($this->dblink, $q); - + //Prevent an infinite loop $resultedRows = mysqli_num_rows($result); - if($resultedRows == 0 && $count >= 20) break; + if($resultedRows == 0 && $count >= WORLD_MAX * 2) break; //Fill the villages array $villages = array_merge($villages, $this->mysqli_fetch_all($result)); @@ -1343,7 +1347,7 @@ class MYSQLi_DB implements IDbConnection { //If there are no more free cells in that sector, it have to be changed //This instruction will be used only (in the next cicle(s)) if not all wids have been generated yet - $sector = rand(1, 4); + if ($count > intval(WORLD_MAX / 10)) $sector = rand(1, 4); } foreach($villages as $village) $wids[] = $village['id']; @@ -4727,12 +4731,12 @@ References: User ID/Message ID, Mode $time = time(); $newTime = $loopTime = 0; if(empty($fieldsArray)) $fieldsArray = $this->getResourceLevel($wid); - $jobs = $this->getJobs($wid); + $jobs = $this->getJobsOrderByID($wid); //Search the job which needs to be deleted foreach($jobs as $job){ //We need to modify waiting loop orders - if(!empty($jobToDelete) && $job['loopcon'] == 1 && ($tribe != 1 || $tribe == 1 && (($jobToDelete['field'] <= 18 && $job['field'] <= 18) || ($jobToDelete['field'] >= 19 && $job['field'] >= 19)))){ + if(!empty($jobToDelete) && $job['loopcon'] == 1 && ($tribe != 1 || ($tribe == 1 && (($jobToDelete['field'] <= 18 && $job['field'] <= 18) || ($jobToDelete['field'] >= 19 && $job['field'] >= 19))))){ //Does this job have the same field of the deleted one? $sameBuilding = $jobToDelete['field'] == $job['field'] ? 1 : 0; @@ -5261,7 +5265,7 @@ References: User ID/Message ID, Mode else mysqli_query($this->dblink, $q = "UPDATE " .TB_PREFIX. "bdata SET level = level - $levels[1] + $levels[0] WHERE wid = $wid AND field = $field"); } - private function getBData($wid, $use_cache = true) { + private function getBData($wid, $use_cache = true, $orderByID = false) { $wid = (int) $wid; // first of all, check if we should be using cache and whether the field @@ -5272,7 +5276,7 @@ References: User ID/Message ID, Mode return self::$buildingsUnderConstructionCache[$wid]; } - $q = "SELECT * FROM " . TB_PREFIX . "bdata where wid = $wid order by master,timestamp ASC"; + $q = "SELECT * FROM " . TB_PREFIX . "bdata where wid = $wid order by ".(!$orderByID ? "master,timestamp" : "id")." ASC"; $result = $this->mysqli_fetch_all(mysqli_query($this->dblink,$q)); self::$buildingsUnderConstructionCache[$wid] = $result; @@ -5283,6 +5287,10 @@ References: User ID/Message ID, Mode function getJobs($wid) { return $this->getBData($wid, false); } + + function getJobsOrderByID($wid) { + return $this->getBData($wid, false, true); + } function FinishWoodcutter($wid) { $bdata = $this->getBData($wid); @@ -7781,7 +7789,12 @@ References: User ID/Message ID, Mode function addSlotFarm($lid, $towref, $x, $y, $distance, $t1, $t2, $t3, $t4, $t5, $t6) { list($lid, $towref, $x, $y, $distance, $t1, $t2, $t3, $t4, $t5, $t6) = $this->escape_input($lid, $towref, $x, $y, $distance, $t1, $t2, $t3, $t4, $t5, $t6); - + + for($i = 1; $i <= 6; $i++) { + if (${'t'.$i} == '') { + ${'t'.$i} = 0; + } + } $q = "INSERT INTO " . TB_PREFIX . "raidlist (`lid`, `towref`, `x`, `y`, `distance`, `t1`, `t2`, `t3`, `t4`, `t5`, `t6`) VALUES ('$lid', '$towref', '$x', '$y', '$distance', '$t1', '$t2', '$t3', '$t4', '$t5', '$t6')"; return mysqli_query($this->dblink,$q); } @@ -7789,6 +7802,11 @@ References: User ID/Message ID, Mode function editSlotFarm($eid, $lid, $oldLid, $owner, $wref, $x, $y, $dist, $t1, $t2, $t3, $t4, $t5, $t6) { list($eid, $lid, $oldLid, $owner, $wref, $x, $y, $dist, $t1, $t2, $t3, $t4, $t5, $t6) = $this->escape_input((int) $eid, $lid, $oldLid, $owner, $wref, $x, $y, $dist, $t1, $t2, $t3, $t4, $t5, $t6); + for($i = 1; $i <= 6; $i++) { + if (${'t'.$i} == '') { + ${'t'.$i} = 0; + } + } $q = "UPDATE " . TB_PREFIX . "raidlist SET lid = '$lid', towref = '$wref', x = '$x', y = '$y', t1 = '$t1', t2 = '$t2', t3 = '$t3', t4 = '$t4', t5 = '$t5', t6 = '$t6' WHERE id = $eid AND lid = $oldLid AND EXISTS(SELECT 1 FROM " . TB_PREFIX . "farmlist WHERE id = $lid AND owner = $owner) AND EXISTS(SELECT 1 FROM " . TB_PREFIX . "farmlist WHERE id = $oldLid AND owner = $owner)"; return mysqli_query($this->dblink,$q); } diff --git a/GameEngine/Market.php b/GameEngine/Market.php index 175a9e88..db084410 100755 --- a/GameEngine/Market.php +++ b/GameEngine/Market.php @@ -242,7 +242,7 @@ class Market } // We don't have enough resources - if($infoarray['wamt'] > ([$village->awood, $village->aclay, $village->airon, $village->acrop])[$infoarray['wtype']]) + if($infoarray['wamt'] > ([$village->awood, $village->aclay, $village->airon, $village->acrop])[$infoarray['wtype'] - 1]) { header("Location: build.php?id=".$get['id']."&t=1&e1"); exit; diff --git a/GameEngine/Technology.php b/GameEngine/Technology.php index de1d31c0..94b82c78 100755 --- a/GameEngine/Technology.php +++ b/GameEngine/Technology.php @@ -252,7 +252,7 @@ class Technology { } } if($mode == 0){ - $enforceoasis = $database->getOasisEnforce($base, 0, $useCache); + $enforceoasis = $database->getOasisEnforce($base, 1, $useCache); if(count($enforceoasis) > 0){ foreach($enforceoasis as $enforce){ for($i = 1; $i <= 50; $i++){ @@ -261,15 +261,6 @@ class Technology { $ownunit['hero'] += $enforce['hero']; } } - $enforceoasis1 = $database->getOasisEnforce($base, 1, $useCache); - if(count($enforceoasis1) > 0){ - foreach($enforceoasis1 as $enforce){ - for($i = 1; $i <= 50; $i++){ - $ownunit['u' . $i] += $enforce['u' . $i]; - } - $ownunit['hero'] += $enforce['hero']; - } - } $prisoners = $database->getPrisoners($base, 1, $useCache); if(!empty($prisoners)){ @@ -504,10 +495,14 @@ class Technology { $each = round(($bid19[$building->getTypeLevel(36)]['attri'] / 100) * ${'u'.$unit}['time'] / SPEED); } if($unit % 10 == 0 || $unit % 10 == 9 && $unit != 99) { - $slots = $database->getAvailableExpansionTraining(); - if($unit % 10 == 0 && $slots['settlers'] <= $amt) $amt = $slots['settlers']; - if($unit % 10 == 9 && $slots['chiefs'] <= $amt) $amt = $slots['chiefs']; - } else { + if($this->maxUnit($unit, $great) < $amt) $amt = 0; + else + { + $slots = $database->getAvailableExpansionTraining(); + if($unit % 10 == 0 && $slots['settlers'] <= $amt) $amt = $slots['settlers']; + if($unit % 10 == 9 && $slots['chiefs'] <= $amt) $amt = $slots['chiefs']; + } + }else{ if($unit != 99){ if($this->maxUnit($unit, $great) < $amt) $amt = 0; }else{ diff --git a/README.md b/README.md index 0123cc7f..f08228ee 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,38 @@ -[![Code Triagers Badge](https://www.codetriage.com/shadowss/travianz/badges/users.svg)](https://www.codetriage.com/shadowss/travianz) -[![Maintenance](https://img.shields.io/maintenance/yes/2018.svg)](https://github.com/Shadowss/TravianZ) -[![GitHub Release](https://img.shields.io/github/release/Shadowss/TravianZ/all.svg)](https://github.com/Shadowss/TravianZ) -[![Github All Releases](https://img.shields.io/github/downloads/atom/atom/total.svg)](https://github.com/Shadowss/TravianZ) -[![GitHub contributors](https://img.shields.io/github/contributors/Shadowss/TravianZ.svg)](https://github.com/Shadowss/TravianZ) -[![license](https://img.shields.io/github/license/Shadowss/TravianZ.svg)](https://github.com/Shadowss/TravianZ) -[![GitHub last commit](https://img.shields.io/github/last-commit/Shadowss/TravianZ.svg)](https://github.com/Shadowss/TravianZ) -[![Proudly Coded in PHPStorm](https://img.shields.io/badge/coded%20in-PHPStorm-BD5CF3.svg)](https://www.jetbrains.com/buy/opensource/?product=phpstorm) -[![Donate to this project on LiberaPay](https://img.shields.io/badge/LiberaPay-donate-F6C915.svg)](https://liberapay.com/Shadowss/donate) -[![Join the chat at https://gitter.im/TravianZ-V8/Lobby](https://badges.gitter.im/TravianZ-V8/Lobby.svg)](https://gitter.im/TravianZ-V8/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Join the our Discord](https://user-images.githubusercontent.com/7288322/34429152-141689f8-ecb9-11e7-8003-b5a10a5fcb29.png)](https://discord.gg/2PufRFH) +[![Maintenance](https://img.shields.io/maintenance/yes/2018.svg)](https://github.com/iopietro/TravianZ) +[![GitHub Release](https://img.shields.io/github/release/iopietro/TravianZ/all.svg)](https://github.com/iopietro/TravianZ) +[![Github All Releases](https://img.shields.io/github/downloads/atom/atom/total.svg)](https://github.com/iopietro/TravianZ) +[![GitHub contributors](https://img.shields.io/github/contributors/iopietro/TravianZ.svg)](https://github.com/iopietro/TravianZ) +[![license](https://img.shields.io/github/license/iopietro/TravianZ.svg)](https://github.com/iopietro/TravianZ) +[![GitHub last commit](https://img.shields.io/github/last-commit/iopietro/TravianZ.svg)](https://github.com/iopietro/TravianZ) [![Watch how this was made on YouTube](https://img.shields.io/badge/The%20making%20of...-YouTube-FF0000.svg)](https://www.youtube.com/watch?v=1XiHhpGUmQg&list=PLzV5avt1FFHorlIeoL9YX0pdb9bj-FO84) ====== -[![GitHub forks](https://img.shields.io/github/forks/badges/shields.svg?style=social&label=Fork)](https://github.com/Shadowss/TravianZ) -[![GitHub stars](https://img.shields.io/github/stars/badges/shields.svg?style=social&label=Stars)](https://github.com/Shadowss/TravianZ) -[![GitHub watchers](https://img.shields.io/github/watchers/badges/shields.svg?style=social&label=Watch)](https://github.com/Shadowss/TravianZ) -[![GitHub followers](https://img.shields.io/github/followers/espadrine.svg?style=social&label=Follow)](https://github.com/Shadowss/TravianZ) +[![GitHub forks](https://img.shields.io/github/forks/badges/shields.svg?style=social&label=Fork)](https://github.com/iopietro/TravianZ) +[![GitHub stars](https://img.shields.io/github/stars/badges/shields.svg?style=social&label=Stars)](https://github.com/iopietro/TravianZ) +[![GitHub watchers](https://img.shields.io/github/watchers/badges/shields.svg?style=social&label=Watch)](https://github.com/iopietro/TravianZ) +[![GitHub followers](https://img.shields.io/github/followers/espadrine.svg?style=social&label=Follow)](https://github.com/iopietro/TravianZ) [![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/cata7007) ====== TravianZ Version **v.8.3.4** ====== + +**THIS VERSION WILL BECOME "LEGACY" AS WE ARE REWRITING SCRIPT FROM SCRATCH - PLEASE JOIN OUR DISCORD TO GET MORE INFO** + **Note:** this game is still in a pre-release state, although at this point it is very playable, tested and found to be fairly stable **WARNING:** please note that ***this is in no way an upgrade*** from the old 8.3.2 version, so please ***do not try to just copy your files over***, since the installer logic has changed and you would just crash your old version **Quick links:** -* [Download and Updates](https://github.com/Shadowss/TravianZ) »» https://github.com/Shadowss/TravianZ -* [Wiki](https://github.com/Shadowss/TravianZ/wiki) +* [Download and Updates](https://github.com/iopietro/TravianZ) »» https://github.com/iopietro/TravianZ +* [Wiki](https://github.com/iopietro/TravianZ/wiki) * [Game Mechanics](http://travian.wikia.com/wiki/Travian_Wiki) -* [The Making Of](https://www.youtube.com/watch?v=1XiHhpGUmQg&list=PLzV5avt1FFHorlIeoL9YX0pdb9bj-FO84) - YouTube Videos about this project -* [Donate to TravianZ](https://www.paypal.me/cata7007) **Minimum requirements:** * [PHP](http://php.net/) 7.0.0+ * [MySQL Community Server](https://dev.mysql.com/downloads/mysql/) 5.5+ * or alternatively, [MariaDB](https://downloads.mariadb.org/) 5.5+ - * please see also the compatibility notes on [this Wiki page](https://github.com/Shadowss/TravianZ/wiki/Known-Bugs) + * please see also the compatibility notes on [this Wiki page](https://github.com/iopietro/TravianZ/wiki/Known-Bugs) **Dedicated or shared hosting?** @@ -46,18 +44,14 @@ with a big enough player base. **Support & Bug reports** -We are usually available to chat at our [Gitter channel](https://gitter.im/TravianZ-V8/Lobby), if you like to ask +We are usually available to chat at our [Discord](https://discord.gg/2PufRFH), if you like to ask any questions or just talk to the developers about how great their day is today :) As for bug reports, please use -the [Issues tab](https://github.com/Shadowss/TravianZ/issues) and create new issue, whether it's an error in game +the [Issues tab](https://github.com/iopietro/TravianZ/issues) and create new issue, whether it's an error in game or you have a feature request to be included in the play. **The team** -* [Shadowss](https://github.com/Shadowss) - project owner and an occasional developer / tester -* [iopietro](https://github.com/iopietro) - lead developer -* [AL-Kateb](https://github.com/AL-Kateb) - developer -* [martinambrus](https://github.com/martinambrus) - alumni developer -* [Vladyslav](https://github.com/velhbxtyrj) - rigorous game tester -* [phaze1G](https://github.com/phaze1G) - game designer / css support +* [Dzoki](https://github.com/idzoki) - Project Owner & Lead Developer +* [iopietro](https://github.com/iopietro) - Project Owner & Lead Developer **Thanks** @@ -67,11 +61,6 @@ own servers. This includes [ZZJHONS](https://github.com/ZZJHONS), [DracoMilesX]( [phaze1G](https://github.com/phaze1G) and many others who were too shy to let us know that they use and enjoy running this game :) -Also, our thanks go to all both, the original and occasional developers, especially [yi12345](https://github.com/yi12345/), -[advocaite](https://github.com/advocaite/), [brainiacX](https://github.com/brainiacX/), [ronix](https://github.com/ronix/), -[MisterX](https://github.com/MisterX/), [Elio](https://github.com/eliopinho/) and many others who were part of this +Also, our thanks go to all both, the original and occasional developers, especially [Shadowss](https://github.com/Shadowss), [yi12345](https://github.com/yi12345/), [advocaite](https://github.com/advocaite/), [brainiacX](https://github.com/brainiacX/), [ronix](https://github.com/ronix/), +[MisterX](https://github.com/MisterX/), [Elio](https://github.com/eliopinho/), [Vladyslav](https://github.com/velhbxtyrj), [martinambrus](https://github.com/martinambrus), [AL-Kateb](https://github.com/AL-Kateb) and many others who were part of this project's history. - -Last but not least, our thanks go to [JetBrains](https://www.jetbrains.com/) for lending us a one-year full-featured -[open-source PHPStorm](https://www.jetbrains.com/buy/opensource/?product=phpstorm) (and other products) license! -Thanks guys, you're awesome :) diff --git a/Templates/Ajax/quest_core25.tpl b/Templates/Ajax/quest_core25.tpl index c0c2a34d..1d9bd56b 100644 --- a/Templates/Ajax/quest_core25.tpl +++ b/Templates/Ajax/quest_core25.tpl @@ -454,7 +454,7 @@ if ($cropL<1){?> //Check the village name is changed or is default name -$vName=str_replace(''', "'", $village->vname); +$vName=rtrim(str_replace(''', "'", $village->vname)); if ($vName==$session->userinfo['username']."'s village"){?> {"markup":"\n\t\t

\"\"<\/h1>
”<\/i>

<\/div>
<\/span><\/div>\n\t\t

<\/div>\n\t\t","number":"-3","reward":false,"qgsrc":"q_luserinfo['tribe'];?>","msrc":"","altstep":99} diff --git a/var/db/struct.sql b/var/db/struct.sql index a4394ed6..366da1d3 100644 --- a/var/db/struct.sql +++ b/var/db/struct.sql @@ -1180,7 +1180,8 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%odata` ( KEY `crop` (`crop`), KEY `loyalty` (`loyalty`), KEY `maxcrop` (`maxcrop`), - KEY `maxstore` (`maxstore`) + KEY `maxstore` (`maxstore`), + KEY `owner` (`owner`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --