Реализация ChatMessageDTO.
This commit is contained in:
@@ -1,25 +1,28 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
if($ple['file_finish']=='bloodring2_end' && $this->users[$i]['team'] == $this->info['team_win'])
|
||||
{
|
||||
if($this->info['razdel'] == 5) {
|
||||
$i1k = 0;
|
||||
if($ple['x'] > 6) {
|
||||
$ple['x'] = 6;
|
||||
}
|
||||
while($i1k < $ple['x']) {
|
||||
$u->addItem(3136,$this->users[$i]['id'],'|sudba='.$this->users[$i]['login']);
|
||||
$i1k++;
|
||||
}
|
||||
if($ple['x'] > 1) {
|
||||
$ple['xz'] = ' (x'.$ple['x'].')';
|
||||
}else{
|
||||
$ple['xz'] = '';
|
||||
}
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$this->users[$i]['city']."','0','','".$this->users[$i]['login']."','Вы получили предмет "<b>Кровавый Рубин</b>".$ple['xz'].""','-1','6','0')");
|
||||
}
|
||||
if ($ple['file_finish'] == 'bloodring2_end' && $this->users[$i]['team'] == $this->info['team_win']) {
|
||||
if ($this->info['razdel'] == 5) {
|
||||
$i1k = 0;
|
||||
if ($ple['x'] > 6) {
|
||||
$ple['x'] = 6;
|
||||
}
|
||||
while ($i1k < $ple['x']) {
|
||||
$u->addItem(3136, $this->users[$i]['id'], '|sudba=' . $this->users[$i]['login']);
|
||||
$i1k++;
|
||||
}
|
||||
if ($ple['x'] > 1) {
|
||||
$ple['xz'] = ' (x' . $ple['x'] . ')';
|
||||
} else {
|
||||
$ple['xz'] = '';
|
||||
}
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($this->users[$i]['city']);
|
||||
$cmsg->setTo($this->users[$i]['login']);
|
||||
$cmsg->setText("Вы получили предмет "<b>Кровавый Рубин</b>{$ple['xz']}".");
|
||||
$cmsg->setType(6);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user