fix: hero movements got screwed up while doing DB caching stuff...

#313
This commit is contained in:
Martin Ambrus
2017-11-17 23:46:01 +01:00
parent bfc7a2b28a
commit 2041ad750e
3 changed files with 8 additions and 12 deletions
+2 -2
View File
@@ -5169,14 +5169,14 @@ class MYSQLi_DB implements IDbConnection {
// first of all, check if we should be using cache and whether the field
// required is already cached
if ($use_cache && ($cachedValue = self::returnCachedContent(self::$heroFieldCache, $uid.$field)) && !is_null($cachedValue)) {
return $cachedValue;
return $cachedValue[$field];
}
$q = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = $uid AND dead = 0";
$result = mysqli_query($this->dblink,$q);
self::$heroFieldCache[$uid.$field] = $this->mysqli_fetch_all($result);
return self::$heroFieldCache[$uid.$field];
return self::$heroFieldCache[$uid.$field][$field];
}
function modifyHero($column,$value,$heroid,$mode=0) {