Реализация ChatMessageDTO.

This commit is contained in:
2023-01-28 04:24:37 +02:00
parent d9ec810f7f
commit 99b90a198b
105 changed files with 11492 additions and 10578 deletions
+17 -2
View File
@@ -873,7 +873,15 @@ class Quests
//Отправляем сообщение в чат
mysql_query('UPDATE `actions` SET `vals` = "win" , `time` = "' . time() . '" WHERE `id` = "' . $action['id'] . '" AND `vals` = "go" LIMIT 1');
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $u->info['city'] . "','" . $u->info['room'] . "','','" . $u->info['login'] . "','" . $r . "','-1','5','0')");
$chatDto = new ChatMessage();
$chatDto->setCity($u->info['city']);
$chatDto->setRoom($u->info['room']);
$chatDto->setTo($u->info['login']);
$chatDto->setText($r);
$chatDto->setType(5);
$chatDto->setTime(-1);
(new Chat())->sendMsg($chatDto);
return $r;
}
@@ -989,7 +997,14 @@ class Quests
}
$r = '<small>' . $r . '</small>';
//Отправляем сообщение в чат
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $u->info['city'] . "','" . $u->info['room'] . "','','" . $u->info['login'] . "','" . $r . "','-1','5','0')");
$chatDto = new ChatMessage();
$chatDto->setCity($u->info['city']);
$chatDto->setRoom($u->info['room']);
$chatDto->setTo($u->info['login']);
$chatDto->setText($r);
$chatDto->setType(5);
$chatDto->setTime(-1);
(new Chat())->sendMsg($chatDto);
}
}