game/_incl_data/class/priem/250.php

76 lines
2.5 KiB
PHP
Raw Normal View History

2023-03-31 18:42:06 +00:00
<?php
2022-06-06 21:30:34 +00:00
if(!defined('GAME')) {
die();
}
/*
2023-01-10 16:29:32 +00:00
Прием: Заземление: Ноль
2022-06-06 21:30:34 +00:00
*/
$pvr = array();
$pvr['x5'] = mysql_fetch_array(mysql_query('SELECT `id`,`x` FROM `eff_users` WHERE `uid` = "'.$this->ue['id'].'" AND `v2` = 250 AND `delete` = 0 LIMIT 1'));
if( $pvr['x5']['x'] < 5 ) {
$prv['x'] = '';
if( $pvr['x5']['x'] > 0 ) {
2022-12-19 18:26:14 +00:00
$prv['x'] = ' x'.($pvr['x5']['x']+1).'';
2022-06-06 21:30:34 +00:00
}
//
$this->addEffPr($pl,$id);
//
$prv['effx'] = '';
if( $pvr['x5']['x'] > 0 ) {
2022-12-19 18:26:14 +00:00
$prv['eff'] = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id` = "'.$pvr['x5']['id'].'" LIMIT 1'));
2022-06-06 21:30:34 +00:00
if( isset($prv['eff']['id']) ) {
2023-01-10 16:29:32 +00:00
//Разбираем дату $prv['eff']['data']
2022-06-06 21:30:34 +00:00
$prv['eda'] = $prv['eff']['data'];
}
}else{
2023-01-10 16:29:32 +00:00
//Разбираем дату $pl['date3']
2022-06-06 21:30:34 +00:00
$prv['eda'] = $pl['date3'];
}
//
if( isset($prv['eda']) ) {
$prv['d'] = \Core\ConversionHelper::dataStringToArray($prv['eda']);
$prv['j'] = \Core\ConversionHelper::dataStringToArray($this->redate($prv['eda'],$u->info['id']));
2023-01-10 16:29:32 +00:00
$prv['v'] = $u->lookKeys($this->redate($prv['eda'],$u->info['id']),0); // ключи 2
2022-06-06 21:30:34 +00:00
$prv['i'] = 0; $prv['inf'] = '';
while($prv['i']<count($prv['v'])) {
2022-12-19 18:26:14 +00:00
//$prv['j'][$prv['v'][$prv['i']]] += $prv['j'][$prv['v'][$prv['i']]];
2022-06-06 21:30:34 +00:00
$prv['vi'] = str_replace('add_','',$prv['v'][$prv['i']]);
if($u->is[$prv['vi']]!='') {
if($prv['j'][$prv['v'][$prv['i']]]>0) {
$prv['inf'] .= $u->is[$prv['vi']].': +'.($prv['j'][$prv['v'][$prv['i']]]*(1+$pvr['x5']['x'])).', ';
}elseif($prv['j'][$prv['v'][$prv['i']]]<0){
$prv['inf'] .= $u->is[$prv['vi']].': '.($prv['j'][$prv['v'][$prv['i']]]*(1+$prv['x5']['x'])).', ';
}
}
$prv['i']++;
}
$prv['effx'] = rtrim($prv['inf'],', ');
}
//
if( $prv['effx'] != '' ) {
$prv['effx'] = ' ('.$prv['effx'].')';
}
//
$prv['color2'] = '000000';
$prv['text'] = $btl->addlt(1 , 19 , $btl->users[$btl->uids[$u->info['id']]]['sex'] , NULL);
$prv['text2'] = '{tm1} '.$prv['text'].'.'.$prv['effx'];
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $this->ue['id'],
2023-01-10 16:29:32 +00:00
'<font color^^^^#'.$prv['color2'].'>Заземление: Ноль'.$prv['x'].'</font>',
2022-06-06 21:30:34 +00:00
$prv['text2'],
($btl->hodID + 0)
);
2023-01-10 16:29:32 +00:00
//Добавляем прием
2022-06-06 21:30:34 +00:00
//$this->addEffPr($pl,$id);
2023-01-10 16:29:32 +00:00
//$this->addPriem($this->ue['id'],$pl['id'],'atgm='.floor($pvr['hp']/10).'',0,77,-1,$u->info['id'],5,'цельводы',0,0,1);
2022-06-06 21:30:34 +00:00
2023-01-10 16:29:32 +00:00
//Отнимаем тактики
2022-06-06 21:30:34 +00:00
//$this->mintr($pl);
}else{
$cup = true;
2023-01-10 16:29:32 +00:00
echo '<font color=red><b>На пероснаже достигнуто максиальное колличество заземлений</b></font>';
2022-06-06 21:30:34 +00:00
}
unset($pvr);
?>