From 00c76de9d5c85fdd1ef28206b71693e6b3a4de54 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Wed, 1 Feb 2023 12:14:21 +0200 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=BA=D0=B0=D0=B7=D1=8B=D0=B2=D0=B0?= =?UTF-8?q?=D0=B5=D1=82=D1=81=D1=8F=20time(-1)=20=3D=20time().?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _incl_data/class/ChatMessage.php | 5 +++-- _incl_data/class/GameDealer.php | 1 - _incl_data/class/Quests.php | 2 -- _incl_data/class/magic/off_hpVinos.php | 1 - interrpaykassa.php | 2 -- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/_incl_data/class/ChatMessage.php b/_incl_data/class/ChatMessage.php index f912d33e..d1214b0f 100644 --- a/_incl_data/class/ChatMessage.php +++ b/_incl_data/class/ChatMessage.php @@ -395,8 +395,9 @@ class ChatMessage { $params = json_decode($json, true); foreach ($params as $param => $value) { - if (property_exists($this, $param)) { - $this->$param = $value; + $method = 'set' . ucfirst($param); + if (method_exists(self::class, $method)) { + $this->$method($value); } } } diff --git a/_incl_data/class/GameDealer.php b/_incl_data/class/GameDealer.php index 97bd3765..b1363db6 100644 --- a/_incl_data/class/GameDealer.php +++ b/_incl_data/class/GameDealer.php @@ -211,7 +211,6 @@ class GameDealer $chatDto->setTo($user['login']); $chatDto->setText($r); $chatDto->setType(5); - $chatDto->setTime(-1); (new Chat())->sendMsg($chatDto); } else { $this->BACK = [['gdanswer', [['status', '-1'], ['desc', 'У пользователя отсутствует банк'], ['id', $this->c['id']]]]]; diff --git a/_incl_data/class/Quests.php b/_incl_data/class/Quests.php index 221876f8..a101fcb2 100644 --- a/_incl_data/class/Quests.php +++ b/_incl_data/class/Quests.php @@ -880,7 +880,6 @@ class Quests $chatDto->setTo($u->info['login']); $chatDto->setText($r); $chatDto->setType(5); - $chatDto->setTime(-1); (new Chat())->sendMsg($chatDto); return $r; @@ -1003,7 +1002,6 @@ class Quests $chatDto->setTo($u->info['login']); $chatDto->setText($r); $chatDto->setType(5); - $chatDto->setTime(-1); (new Chat())->sendMsg($chatDto); } } diff --git a/_incl_data/class/magic/off_hpVinos.php b/_incl_data/class/magic/off_hpVinos.php index 253b57f4..68dba5d8 100644 --- a/_incl_data/class/magic/off_hpVinos.php +++ b/_incl_data/class/magic/off_hpVinos.php @@ -41,7 +41,6 @@ if ($u->info['login'] == $usr['login']) { $chatDto->setTo($usr['login']); $chatDto->setText("Персонаж {$u->info['login']} украл у вас эффект {$eff['name']}."); $chatDto->setType(6); - $chatDto->setTime(-1); (new Chat())->sendMsg($chatDto); $chatDto = new ChatMessage(); diff --git a/interrpaykassa.php b/interrpaykassa.php index a2b9bbad..dbee3665 100644 --- a/interrpaykassa.php +++ b/interrpaykassa.php @@ -76,7 +76,6 @@ if ($needle == $sign) { $chatDto->setRoom($user['room']); $chatDto->setTo($user['login']); $chatDto->setText($r); - $chatDto->setTime(-1); $chatDto->setType(5); (new Chat())->sendMsg($chatDto); @@ -103,7 +102,6 @@ if ($needle == $sign) { $chatDto->setRoom($referal['room']); $chatDto->setTo($referal['login']); $chatDto->setText($r); - $chatDto->setTime(-1); $chatDto->setType(5); (new Chat())->sendMsg($chatDto); }