修复 切账号问题

This commit is contained in:
aozhiwei 2024-05-16 19:30:53 +08:00
parent 4ac37781d6
commit 03cce06564

View File

@ -237,6 +237,7 @@ class DynData extends BaseModel {
private static function internalGetV($x, $y, $defVal = 0) private static function internalGetV($x, $y, $defVal = 0)
{ {
self::checkLastUser();
$key = self::calcKey($x, $y); $key = self::calcKey($x, $y);
if (!is_null(self::$dynData)) { if (!is_null(self::$dynData)) {
if (isset(self::$dynData[$key])) { if (isset(self::$dynData[$key])) {
@ -270,7 +271,19 @@ class DynData extends BaseModel {
} }
} }
private static $dynData = null; private static function checkLastUser()
{
if (!empty(self::$lastAccountId)) {
if (self::$lastAccountId != myself()->_getAccountId()) {
self::$lastAccountId = myself()->_getAccountId();
self::$dynData = null;
self::$hitCount = 0;
}
}
}
private static $lastAccountId = '';
private static $dynData = nulla;
private static $hitCount = 0; private static $hitCount = 0;
} }