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); }