Реализация ChatMessageDTO.
This commit is contained in:
@@ -57,7 +57,14 @@ if (!isset($u->info['room']) OR !isset($u->info['id']) OR $toUser == '') {
|
||||
if ($upd_d) $dngo = true;
|
||||
if ($u->info['sex'] == 1) $sx = 'а'; else $sx = '';
|
||||
$rtxt = '[img[items/teleport-cometome.gif]] ' . $rang . ' "' . $u->info['cast_login'] . '" телепортировал' . $sx . ' персонажа "' . $uu['login'] . '" к себе в ' . ($action == 'to-fight' ? "поединок" . ($dngo == true ? " и пещеру." : "") : ($action == 'to-dungeon' ? "подземелье" : "комнату")) . '.';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'" . $u->info['city'] . "','" . $u->info['room'] . "','','','" . $rtxt . "','" . time() . "','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
$uer = 'Вы успешно телепортировали к себе персонажа "' . $uu['login'] . '" в <b>' . ($action == 'to-fight' ? "поединок" : ($action == 'to-dungeon' ? "подземелье" : "комнату")) . '</b>.';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user