WIP: Info class

This commit is contained in:
Ivor Barhansky 2024-01-06 17:30:34 +02:00
parent a2c658166d
commit 4a7535d67d
44 changed files with 1713 additions and 919 deletions

File diff suppressed because it is too large Load Diff

View File

@ -4,5 +4,552 @@ namespace Battle;
class Fighter class Fighter
{ {
private int $id;
private string $login;
private string $login2;
private int $online;
private int $admin;
private string $align;
private int $clan;
private int $level;
} public function __construct() {}
}
/*
/app/_incl_data/class/Battle.php:471:
array (size=126)
'zag' => string '' (length=0)
'id' => int 27205347
'login' => string 'Merlin' (length=6)
'login2' => string '' (length=0)
'online' => int 1704494746
'admin' => int 1
'city' => string 'capitalcity' (length=11)
'cityreg' => string 'capitalcity' (length=11)
'align' => string '1.99' (length=4)
'align_lvl' => int 0
'align_exp' => int 0
'clan' => int 0
'level' => int 8
'money' => float 62531.5
'money3' => float 30
'money2' => float 15
'money4' => float 40
'battle' => int 466011
'sex' => int 0
'obraz' => string '78.gif' (length=6)
'win' => int 0
'win_t' => int 0
'lose' => int 4
'lose_t' => int 0
'nich' => int 16
'timeMain' => int 1704494746
'invis' => int 0
'bot_id' => int 0
'animal' => int 0
'type_pers' => int 0
'notrhod' => int -1
'bot_room' => int 0
'inUser' => int 0
'inTurnir' => int 0
'inTurnirnew' => int 0
'stopexp' => int 0
'real' => int 1
'stats' => string 's1=3|s2=3|s3=3|s4=250|rinv=40|m9=5|m6=10|s7="0"|a1=0|a2=0|a3=0|a4=0|a5=0|mg1=0|mg2=0|mg3=0|mg4=0|mg5=0|mg6=0|mg7=0|s5=0|s6=0|a6=0|s8=0|s9=0|s10=0|s11=0|s12=0|s13=0|s14=0|s15=0' (length=175)
's1' => int 0
's2' => int 0
's3' => int 0
's4' => int 0
's5' => int 0
's6' => int 0
's7' => int 0
'a1' => int 0
'a2' => int 0
'a3' => int 0
'a4' => int 0
'mg1' => int 0
'mg2' => int 0
'mg3' => int 0
'mg4' => int 0
'hpNow' => int 1132
'mpNow' => int 0
'enNow' => int 0
'hpAll' => int 2130
'mpAll' => int 0
'regHP' => int 1704492966
'regMP' => int 1704492966
'showmenu' => string '1|1|1|1|1|1|1|1' (length=15)
'prmenu' => string '0|1|2|3|4|5|6|7' (length=15)
'ability' => int 78
'skills' => int 9
'sskills' => int 0
'nskills' => int 0
'exp' => int 250
'minHP' => int 15
'minMP' => int 8
'zv' => int 0
'dn' => int 0
'dnow' => int 0
'team' => int 1
'battle_yron' => int 0
'battle_exp' => int 0
'enemy' => int 27319397
'last_a' => int 0
'last_b' => int 0
'battle_text' => string '' (length=0)
'upLevel' => int 57
'wipe' => int 0
'bagStats' => string '0' (length=1)
'timeGo' => int 1704297684
'timeGoL' => int 1704297679
'nextAct' => string '64e9f79e15fca80055d7eabb26f390a4' (length=32)
'active' => string '' (length=0)
'bot' => int 0
'lastAlign' => string '' (length=0)
'tactic1' => int 0
'tactic2' => int 0
'tactic3' => int 0
'tactic4' => int 7
'tactic5' => int 0
'tactic6' => float 0
'tactic7' => float 20
'x' => int 3
'y' => int 4
's' => int 1
'battleEnd' => int 0
'priemslot' => int 10
'priems' => string '0|2|3|0|0|138|235|213|140|4|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0' (length=87)
'priems_z' => string '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0' (length=101)
'bet' => int 0
'clone' => int 0
'atack' => int 0
'bbexp' => int 0
'ref_data' => string '' (length=0)
'res_x' => int 0
'res_y' => int 0
'res_s' => int 1
'bn_capitalcity' => int 0
'bn_demonscity' => int 0
'smena' => int 3
'last_hp' => int -20
'last_pr' => int 0
'transfers' => int 65000
'btl_cof' => int 381
'dieline' => int 0
'lider' => int 462716
'old_battle' => int 10
'alog' => int 0
'mlog' => int 0
'seff' => null
'upexpdate' => int 1671486569
'expstopu' => int 0
'repexp' => int 35
/app/_incl_data/class/Battle.php:471:
array (size=102)
'a1' => int 0
'a2' => int 0
'a3' => int 0
'a4' => int 0
'a5' => int 0
'aall' => int 0
'm1' => int 15
'm10' => int 90
'm11' => int 0
'm14' => int 0
'm15' => int 0
'm18' => int 0
'm19' => int 0
'm2' => int 15
'm3' => int 0
'm4' => int 15
'm5' => int 15
'm6' => int 10
'm7' => int 0
'm8' => int 0
'm9' => int 5
'mall' => int 0
'mg1' => int 0
'mg2' => int 0
'mg3' => int 0
'mg4' => int 0
'mg7' => int 0
'pa1' => int 0
'pa2' => int 0
'pa3' => int 0
'pa4' => int 0
'pm1' => int 0
'pm2' => int 0
'pm3' => int 0
'pm4' => int 0
'pm7' => int 0
's1' => int 3
's2' => int 3
's3' => int 3
's4' => int 250
's5' => int 0
's6' => int 0
's7' => int 0
'za' => int 375
'za1' => int 375
'za2' => int 375
'za3' => int 375
'za4' => int 375
'zm' => int 125
'zm1' => int 125
'zm2' => int 125
'zm3' => int 125
'zm4' => int 125
'zona' => int 2
'zonb' => int 2
'levels' =>
array (size=17)
'upLevel' => int 57
'nextLevel' => int 8
'exp' => int 200000
'money' => int 0
'money_bonus1' => int 0
'money_bonus2' => int 0
'ability' => int 0
'skills' => int 0
'nskills' => int 0
'sskills' => int 0
'expBtlMax' => int 5000
'bprice' => int 2300
'hpRegen' => int 250
'mpRegen' => int 250
'money2' => float 0.5
'duh' => int 0
'vinos' => int 0
'id' => int 27205347
'login' => string 'Merlin' (length=6)
'hpNow' => int 1132
'mpNow' => int 0
'items' =>
array (size=5)
0 =>
array (size=14)
'type' => int 1
'data' => string '' (length=0)
'inOdet' => int 1
'item_id' => int 391
'inslot' => int 1
'useInBattle' => int 0
'btl_zd' => int 0
'iznosNOW' => float 0.7
'iznosMAX' => float 30
'magic_inci' => string '' (length=0)
'name' => string 'Серый Шлем' (length=19)
'id' => int 75917766
'img' => string 'helmet77.gif' (length=12)
'2h' => int 0
1 =>
array (size=14)
'type' => int 26
'data' => string 'tr_lvl=4|sv_yron_min=5|sv_yron_max=10|tya1=20|tya3=80' (length=53)
'inOdet' => int 3
'item_id' => int 631
'inslot' => int 3
'useInBattle' => int 0
'btl_zd' => int 0
'iznosNOW' => float 0.55
'iznosMAX' => float 110
'magic_inci' => string '' (length=0)
'name' => string 'Укрепленный Костыль ' (length=38)
'id' => int 75917784
'img' => string 'kostyl2.gif' (length=11)
'2h' => int 0
2 =>
array (size=14)
'type' => int 29
'data' => string '' (length=0)
'inOdet' => int 54
'item_id' => int 1032
'inslot' => int 53
'useInBattle' => int 1
'btl_zd' => int 0
'iznosNOW' => float 0
'iznosMAX' => float 3
'magic_inci' => string '446' (length=3)
'name' => string 'Живая Вода' (length=19)
'id' => int 75917747
'img' => string 'invoke_kar3_lifew.gif' (length=21)
'2h' => int 0
3 =>
array (size=14)
'type' => int 29
'data' => string '' (length=0)
'inOdet' => int 53
'item_id' => int 1034
'inslot' => int 53
'useInBattle' => int 1
'btl_zd' => int 0
'iznosNOW' => float 0
'iznosMAX' => float 3
'magic_inci' => string '449' (length=3)
'name' => string 'Сушеный Мухомор' (length=29)
'id' => int 75917742
'img' => string 'invoke_kar3_mush.gif' (length=20)
'2h' => int 0
4 =>
array (size=14)
'type' => int 18
'data' => string 'tr_lvl=8|tr_s2=30|tr_s3=30|tr_s1=15|tr_s4=30|tr_a1=9|add_m4=40|add_s2=1|add_s3=2|sv_yron_min=5|sv_yron_max=15|add_m5=30|add_m1=30|add_m9=15|complect=106|tya1=75|tya3=25||fromshop=1' (length=180)
'inOdet' => int 14
'item_id' => int 6473
'inslot' => int 3
'useInBattle' => int 0
'btl_zd' => int 0
'iznosNOW' => float 0.7
'iznosMAX' => float 25
'magic_inci' => string '' (length=0)
'name' => string 'Кинжал Злодеяний [8]' (length=35)
'id' => int 75917776
'img' => string 'knife76.gif' (length=11)
'2h' => int 0
'effects' =>
array (size=1)
0 =>
array (size=41)
'id' => int 106916938
'id_eff' => int 31
'uid' => int 27205347
'name' => string 'Касание Хаоса' (length=25)
'data' => string 'nofastfinisheff=1' (length=17)
'overType' => int 0
'timeUse' => int 1704492685
'timeAce' => int 0
'user_use' => string '' (length=0)
'delete' => int 0
'v1' => string '0' (length=1)
'v2' => int 0
'img2' => string '' (length=0)
'x' => int 1
'hod' => int -1
'bj' => string '0' (length=1)
'sleeptime' => int 0
'no_Ace' => int 0
'file_finish' => string '' (length=0)
'tr_life_user' => int 0
'deactiveTime' => int 0
'deactiveLast' => int 0
'mark' => int 0
'bs' => int 0
'id2' => int 31
'mname' => string 'Касание Хаоса' (length=25)
'type1' => int 21
'img' => string 'survival_timeout.gif' (length=20)
'mdata' => string 'nofastfinisheff=1' (length=17)
'actionTime' => int 86400
'type2' => int 6
'type3' => int 6
'onlyOne' => int 1
'oneType' => int 0
'noAce' => int 0
'see' => int 1
'info' => string 'Вы слишком близко приблизились к центру Излома Хаоса' (length=97)
'overch' => int 0
'bp' => int 1
'noch' => int 0
'minfo' => string '' (length=0)
'vip' => null
'rinv' => int 40
'mg5' => int 0
'mg6' => int 0
'a6' => int 0
's8' => int 0
's9' => int 0
's10' => int 0
's11' => int 0
's12' => int 0
's13' => int 0
's14' => int 0
's15' => int 0
'wp1id' => int 0
'reting' => int 3
'wp3id' => int 1
'wp54id' => int 2
'wp53id' => int 3
'wp14id' => int 4
'set_pog' =>
array (size=0)
empty
'set_pog2' =>
array (size=0)
empty
'ozash' =>
array (size=4)
1 =>
array (size=2)
0 => int 0
1 => int 0
2 =>
array (size=2)
0 => int 0
1 => int 0
3 =>
array (size=2)
0 => int 0
1 => int 0
4 =>
array (size=2)
0 => int 0
1 => int 0
'ozmsh' =>
array (size=4)
1 =>
array (size=2)
0 => int 0
1 => int 0
2 =>
array (size=2)
0 => int 0
1 => int 0
3 =>
array (size=2)
0 => int 0
1 => int 0
4 =>
array (size=2)
0 => int 0
1 => int 0
'weapon1' => int 1
'weapon2' => int 1
'sheld1' => int 0
'sv_' =>
array (size=57)
'a1' => int 0
'a2' => int 0
'a3' => int 0
'a4' => int 0
'a5' => int 0
'aall' => int 0
'hpall' => int 0
'm1' => int 0
'm10' => int 0
'm11' => int 0
'm14' => int 0
'm15' => int 0
'm18' => int 0
'm19' => int 0
'm2' => int 0
'm3' => int 0
'm4' => int 0
'm5' => int 0
'm6' => int 0
'm7' => int 0
'm8' => int 0
'm9' => int 0
'mall' => int 0
'mg1' => int 0
'mg2' => int 0
'mg3' => int 0
'mg4' => int 0
'mg7' => int 0
'mpall' => int 0
'pa1' => int 0
'pa2' => int 0
'pa3' => int 0
'pa4' => int 0
'pm1' => int 0
'pm2' => int 0
'pm3' => int 0
'pm4' => int 0
'pm7' => int 0
's1' => int 0
's2' => int 0
's3' => int 0
's4' => int 0
's5' => int 0
's6' => int 0
's7' => int 0
'za' => int 0
'za1' => int 0
'za2' => int 0
'za3' => int 0
'za4' => int 0
'zm' => int 0
'zm1' => int 0
'zm2' => int 0
'zm3' => int 0
'zm4' => int 0
'zona' => int 0
'zonb' => int 0
'sv_i' =>
array (size=57)
'a1' => int 0
'a2' => int 0
'a3' => int 0
'a4' => int 0
'a5' => int 0
'aall' => int 0
'hpall' => int 0
'm1' => int 0
'm10' => int 0
'm11' => int 0
'm14' => int 0
'm15' => int 0
'm18' => int 0
'm19' => int 0
'm2' => int 0
'm3' => int 0
'm4' => int 0
'm5' => int 0
'm6' => int 0
'm7' => int 0
'm8' => int 0
'm9' => int 0
'mall' => int 0
'mg1' => int 0
'mg2' => int 0
'mg3' => int 0
'mg4' => int 0
'mg7' => int 0
'mpall' => int 0
'pa1' => int 0
'pa2' => int 0
'pa3' => int 0
'pa4' => int 0
'pm1' => int 0
'pm2' => int 0
'pm3' => int 0
'pm4' => int 0
'pm7' => int 0
's1' => int 0
's2' => int 0
's3' => int 0
's4' => int 0
's5' => int 0
's6' => int 0
's7' => int 0
'za' => int 0
'za1' => int 0
'za2' => int 0
'za3' => int 0
'za4' => int 0
'zm' => int 0
'zm1' => int 0
'zm2' => int 0
'zm3' => int 0
'zm4' => int 0
'zona' => int 0
'zonb' => int 0
'dom' =>
array (size=0)
empty
'prsu' =>
array (size=0)
empty
'x' => int 3
'y' => int 4
's' => int 1
'maxves' => int 100
'speed_dungeon' => int 500
'speedhp' => int 500
'this_animal' => int 0
'lvl' => int 8
'hpAll' => int 2130
'mpAll' => int 0
*/

View File

@ -31,30 +31,30 @@ class Finish
$this->battle = $battle; $this->battle = $battle;
} }
public function finishBattle(?array $t, ?array $v, ?int $nl): void public function finishBattle(?array $t = null, ?array $v = null, ?int $nl = null): void
{ {
global $u; global $u;
$injuryName = [1 => 'легкую', 2 => 'среднюю', 3 => 'тяжелую', 4 => 'неизлечимую',]; $injuryName = [1 => 'легкую', 2 => 'среднюю', 3 => 'тяжелую', 4 => 'неизлечимую',];
$dnr = 0; //??? $dnr = 0; //???
$chat = new Chat(); $chat = new Chat();
$test = Db::getRow('select id, team_win, testfinish from battle where id = ? and team_win != -1', [$this->battle->info['id']]); $test = Db::getRow('select id, team_win, testfinish from battle where id = ? and team_win != -1', [$this->battle->i->id]);
if ($test['testfinish'] == -1) { if ($test['testfinish'] == -1) {
sleep(2); sleep(2);
} else { } else {
Db::sql('update battle set testfinish = -1 where id = ?', [$this->battle->info['id']]); Db::sql('update battle set testfinish = -1 where id = ?', [$this->battle->i->id]);
if ($nl != 10 && $this->battle->info['team_win'] == -1) { if ($nl != 10 && $this->battle->i->getTeamwin() == -1) {
$this->battle->info['team_win'] = 0; $this->battle->i->setTeamWin();
if (is_array($v) && is_array($t)) { if (is_array($v) && is_array($t)) {
foreach ($v as $vs) { foreach ($v as $vs) {
if ($vs < 1 || $t[$vs] <= 0) { if ($vs < 1 || $t[$vs] <= 0) {
continue; continue;
} }
$this->battle->info['team_win'] = $vs; $this->battle->i->setTeamWin($vs);
} }
} }
} }
//данные о игроках в бою //данные о игроках в бою
$t = Db::getRows( $t = Db::getRows(
@ -71,7 +71,7 @@ class Finish
if(login2 = '',login,login2) as login2 if(login2 = '',login,login2) as login2
from users from users
left join stats on users.id = stats.id left join stats on users.id = stats.id
where battle = ?", [$this->battle->info['id']] where battle = ?", [$this->battle->i->id]
); );
foreach ($t as $userInBattle) { foreach ($t as $userInBattle) {
@ -86,13 +86,13 @@ class Finish
$this->battle->stats[key($this->battle->users)] = $u->getStats(uid: $userInBattle['id'], minimal: true); $this->battle->stats[key($this->battle->users)] = $u->getStats(uid: $userInBattle['id'], minimal: true);
} }
if ($this->battle->info['time_over'] == 0) { if ($this->battle->i->timeover == 0) {
$tststrt = Db::getRow('select * from battle where id = ? and time_over = 0', [$this->battle->info['id']]); $tststrt = Db::getRow('select * from battle where id = ? and time_over = 0', [$this->battle->i->id]);
if (isset($tststrt['id'])) { if (isset($tststrt['id'])) {
if ($this->battle->info['inTurnir'] == 0 || $this->battle->info['type'] == 500) { if ($this->battle->i->inturnir == 0 || $this->battle->i->type == 500) {
Db::sql('update battle set time_over = unix_timestamp(), team_win = ? where id = ?', [$this->battle->info['team_win'], $this->battle->info['id']]); Db::sql('update battle set time_over = unix_timestamp(), team_win = ? where id = ?', [$this->battle->i->getTeamwin(), $this->battle->i->id]);
} }
//Заносим данные о завершении боя //Заносим данные о завершении боя
$queryValues = ''; $queryValues = '';
@ -104,7 +104,7 @@ class Finish
[ [
$user['login'], $user['login'],
$user['city'], $user['city'],
$this->battle->info['id'], $this->battle->i->id,
$user['id'], $user['id'],
$user['team'], $user['team'],
$user['level'], $user['level'],
@ -119,27 +119,28 @@ class Finish
); );
$queryValues .= "('$inner',unix_timestamp()),"; $queryValues .= "('$inner',unix_timestamp()),";
if ($user['team'] == $this->battle->info['team_win'] && $this->battle->info['team_win'] > 0) { if ($user['team'] == $this->battle->i->getTeamwin() && $this->battle->i->getTeamwin() > 0) {
$vtvl .= '<strong>' . $user['login'] . '</strong>, '; $vtvl .= '<strong>' . $user['login'] . '</strong>, ';
} }
} }
$this->battle->info['players_c'] = Db::getValue("select count(id) from users where login not like '%(зверь%' and battle = ?", [$this->battle->info['id']]); $this->battle->i->setPlayerC();
Db::sql('update battle set players_c = ? where id = ?', [$this->battle->info['players_c'], $this->battle->info['id']]);
Db::sql('update battle set players_c = ? where id = ?', [$this->battle->i->getPlayersC(), $this->battle->i->id]);
if (!empty($vtvl)) { if (!empty($vtvl)) {
$vtvl = rtrim($vtvl, ', '); $vtvl = rtrim($vtvl, ', ');
$vtvl = str_replace('"', '\\\\\"', $vtvl); $vtvl = str_replace('"', '\\\\\"', $vtvl);
$logtext = "Бой закончен, победа за $vtvl."; $logtext = "Бой закончен, победа за $vtvl.";
} else { } else {
$this->battle->info['players_cc'] = $this->battle->info['players_cc2'] = 0; $this->battle->i->setDraw();
$logtext = 'Бой закончен, ничья.'; $logtext = 'Бой закончен, ничья.';
} }
$this->battle->hodID++; $this->battle->hodID++;
Log::add( Log::add(
[ [
'battle' => $this->battle->info['id'], 'battle' => $this->battle->i->id,
'id_hod' => $this->battle->hodID, 'id_hod' => $this->battle->hodID,
'text' => $logtext, 'text' => $logtext,
'vars' => 'time1=' . time(), 'vars' => 'time1=' . time(),
@ -149,9 +150,9 @@ class Finish
unset($logtext); unset($logtext);
$this->saveLogs(); $this->saveLogs();
if ($this->battle->info['type'] == 99) { if ($this->battle->i->type == 99) {
$logarray = [ $logarray = [
'battle' => $this->battle->info['id'], 'battle' => $this->battle->i->id,
'id_hod' => $this->battle->hodID, 'id_hod' => $this->battle->hodID,
'text' => 'И победители стали калечить проигравших...', 'text' => 'И победители стали калечить проигравших...',
'vars' => 'time1=' . time(), 'vars' => 'time1=' . time(),
@ -161,7 +162,7 @@ class Finish
$vtvl = ''; $vtvl = '';
foreach ($this->battle->users as $userToInjure) { foreach ($this->battle->users as $userToInjure) {
if ($userToInjure['team'] == $this->battle->info['team_win']) { if ($userToInjure['team'] == $this->battle->i->getTeamwin()) {
continue; continue;
} }
$injuryCaster = Db::getRow('select id, v1 from eff_users where id_eff = 4 and uid = ? order by v1 desc limit 1'); $injuryCaster = Db::getRow('select id, v1 from eff_users where id_eff = 4 and uid = ? order by v1 desc limit 1');
@ -169,13 +170,13 @@ class Finish
continue; continue;
} }
$a = $userToInjure['sex'] == 1 ? 'а' : ''; $a = $userToInjure['sex'] == 1 ? 'а' : '';
$injuryType = $this->battle->info['smert'] == 1 ? 4 : mt_rand(1, 3); $injuryType = $this->battle->i->smert == 1 ? 4 : mt_rand(1, 3);
if (!empty($injuryCaster['id'])) { if (!empty($injuryCaster['id'])) {
$injuryType = mt_rand($injuryCaster['v1'] + 1, 3); $injuryType = mt_rand($injuryCaster['v1'] + 1, 3);
} }
$vtvl = "<strong>{$userToInjure['login']}</strong> получил$a повреждение:" . $vtvl = "<strong>{$userToInjure['login']}</strong> получил$a повреждение:" .
" <span style='color: crimson;'>$injuryName[$injuryType]</span>.<br>$vtvl"; " <span style='color: crimson;'>$injuryName[$injuryType]</span>.<br>$vtvl";
$this->battle->addTravm($userToInjure['id'], $injuryType, rand(3, 5)); Effects::addInjury($userToInjure['id'], $injuryType, rand(3, 5));
} }
$logarray['text'] = $vtvl; $logarray['text'] = $vtvl;
@ -188,12 +189,12 @@ class Finish
} }
Db::sql( Db::sql(
'insert into battle_end (battle_id, city, time, team_win) values (?,?,?,?)', 'insert into battle_end (battle_id, city, time, team_win) values (?,?,?,?)',
[$this->battle->info['id'], $this->battle->info['city'], $this->battle->info['time_start'], $this->battle->info['team_win']] [$this->battle->i->id, $this->battle->i->city, $this->battle->i->timeStart, $this->battle->i->getTeamwin()]
); );
} }
$logarray = [ $logarray = [
'battle' => $this->battle->info['id'], 'battle' => $this->battle->i->id,
'id_hod' => $this->battle->hodID, 'id_hod' => $this->battle->hodID,
'vars' => 'time1=' . time(), 'vars' => 'time1=' . time(),
'type' => '1', 'type' => '1',
@ -201,7 +202,7 @@ class Finish
$vtvl = ''; $vtvl = '';
foreach ($this->battle->users as $userToInjure) { foreach ($this->battle->users as $userToInjure) {
if ($userToInjure['team'] == $this->battle->info['team_win'] || $this->battle->info['team_win'] == 0) { if ($userToInjure['team'] == $this->battle->i->getTeamwin() || $this->battle->i->getTeamwin() == 0) {
continue; continue;
} }
$injuryCaster = Db::getRow("select id, v1, data, user_use from eff_users where v1 = 'priem' and v2 = 292 and uid = ? limit 1"); $injuryCaster = Db::getRow("select id, v1, data, user_use from eff_users where v1 = 'priem' and v2 = 292 and uid = ? limit 1");
@ -217,11 +218,11 @@ class Finish
$vtvl = "<strong>{$userToInjure['login']}</strong> получил$a повреждение" . $vtvl = "<strong>{$userToInjure['login']}</strong> получил$a повреждение" .
" (Искалечить, автор: <strong>$injuryCasterLogin</strong>):" . " (Искалечить, автор: <strong>$injuryCasterLogin</strong>):" .
" <span style='color: crimson;'>$injuryName[$injuryType]</span>.<br>$vtvl"; " <span style='color: crimson;'>$injuryName[$injuryType]</span>.<br>$vtvl";
$this->battle->addTravm($userToInjure['id'], $injuryType, rand(3, 5)); Effects::addInjury($userToInjure['id'], $injuryType, rand(3, 5));
} }
if (!empty($vtvl)) { if (!empty($vtvl)) {
if ($this->battle->info['type'] != 99) { if ($this->battle->i->type != 99) {
$logarray['text'] = 'И победители стали калечить проигравших...'; $logarray['text'] = 'И победители стали калечить проигравших...';
Log::add($logarray); Log::add($logarray);
} }
@ -231,9 +232,9 @@ class Finish
//Турнир БС //Турнир БС
if ($this->battle->info['inTurnir'] > 0 && $this->battle->info['dungeon'] != 15 && $u->info['room'] != 413) { if ($this->battle->i->inturnir > 0 && $this->battle->i->dungeon != 15 && $u->info['room'] != 413) {
$bs = mysql_fetch_array( $bs = mysql_fetch_array(
mysql_query('SELECT * FROM `bs_turnirs` WHERE `id` = "' . $this->battle->info['inTurnir'] . '" LIMIT 1') mysql_query('SELECT * FROM `bs_turnirs` WHERE `id` = "' . $this->battle->i->inturnir . '" LIMIT 1')
); );
$i = 0; $i = 0;
$j = 0; $j = 0;
@ -320,7 +321,7 @@ class Finish
} }
//Награда за события //Награда за события
if ($this->battle->info['type'] == 500 && isset($tststrt['id'])) { if ($this->battle->i->type == 500 && isset($tststrt['id'])) {
//Предметы которые выпадают в центр //Предметы которые выпадают в центр
$i = 0; $i = 0;
@ -335,7 +336,7 @@ class Finish
) )
); );
if (isset($mon['id'])) { if (isset($mon['id'])) {
if ($this->battle->info['team_win'] == 0) { if ($this->battle->i->getTeamwin() == 0) {
//Ничья //Ничья
mysql_query( mysql_query(
'UPDATE `stats` SET `hpNow` = "' . $this->battle->stats[$i]['hpAll'] . '",`mpNow` = "' . $this->battle->stats[$i]['mpAll'] . '" WHERE `id` = "' . $this->battle->users[$i]['id'] . '" LIMIT 1' 'UPDATE `stats` SET `hpNow` = "' . $this->battle->stats[$i]['hpAll'] . '",`mpNow` = "' . $this->battle->stats[$i]['mpAll'] . '" WHERE `id` = "' . $this->battle->users[$i]['id'] . '" LIMIT 1'
@ -348,7 +349,7 @@ class Finish
) )
); );
$chat->sendMsg($cmsg); $chat->sendMsg($cmsg);
} elseif ($this->battle->info['team_win'] != $this->battle->users[$i]['team']) { } elseif ($this->battle->i->getTeamwin() != $this->battle->users[$i]['team']) {
//Выиграли //Выиграли
$j = 0; $j = 0;
$usrwin = ''; $usrwin = '';
@ -421,7 +422,7 @@ class Finish
if (isset($tststrt['id'])) { if (isset($tststrt['id'])) {
while ($i < count($this->battle->users)) { while ($i < count($this->battle->users)) {
//Тут выкидываем юзеров из Призавого хаота //Тут выкидываем юзеров из Призавого хаота
if ($this->battle->info['type'] == 33) { if ($this->battle->i->type == 33) {
$plde = mysql_fetch_array( $plde = mysql_fetch_array(
mysql_query('SELECT * FROM `users` WHERE `id` = "' . $this->battle->users[$i]['id'] . '" LIMIT 1') mysql_query('SELECT * FROM `users` WHERE `id` = "' . $this->battle->users[$i]['id'] . '" LIMIT 1')
); );
@ -438,7 +439,7 @@ class Finish
'UPDATE `users_achiv` SET `pg`= `pg`+1 WHERE `id` = "' . $pld['id'] . '" LIMIT 1' 'UPDATE `users_achiv` SET `pg`= `pg`+1 WHERE `id` = "' . $pld['id'] . '" LIMIT 1'
); );
if ($this->battle->users[$i]['team'] == $this->battle->info['team_win'] && rand(1, 100) <= 5) { if ($this->battle->users[$i]['team'] == $this->battle->i->getTeamwin() && rand(1, 100) <= 5) {
ItemsModel::addItem(10020, $pld['id'], ''); ItemsModel::addItem(10020, $pld['id'], '');
$pld['battle_text'] .= ' За Героическое Сражение вы получаете <strong>Жетон Успеха</strong>. '; $pld['battle_text'] .= ' За Героическое Сражение вы получаете <strong>Жетон Успеха</strong>. ';
} }
@ -494,9 +495,9 @@ class Finish
} }
if ($this->battle->users[$i]['clone'] > 0 && $this->battle->users[$i]['bot'] > 0 && isset($this->battle->users[$this->battle->uids[$this->battle->users[$i]['clone']]]['id']) && $this->battle->users[$this->battle->uids[$this->battle->users[$i]['clone']]]['team'] != $this->battle->users[$i]['team']) { if ($this->battle->users[$i]['clone'] > 0 && $this->battle->users[$i]['bot'] > 0 && isset($this->battle->users[$this->battle->uids[$this->battle->users[$i]['clone']]]['id']) && $this->battle->users[$this->battle->uids[$this->battle->users[$i]['clone']]]['team'] != $this->battle->users[$i]['team']) {
//Добавляем что клон побежден //Добавляем что клон побежден
if ($this->battle->users[$this->battle->uids[$this->battle->users[$i]['clone']]]['team'] == $this->battle->info['team_win']) { if ($this->battle->users[$this->battle->uids[$this->battle->users[$i]['clone']]]['team'] == $this->battle->i->getTeamwin()) {
$u->addAction(time(), 'win_bot_clone', '', $this->battle->users[$i]['clone']); $u->addAction(time(), 'win_bot_clone', '', $this->battle->users[$i]['clone']);
} elseif ($this->battle->info['team_win'] == 0) { } elseif ($this->battle->i->getTeamwin() == 0) {
$u->addAction(time(), 'nich_bot_clone', '', $this->battle->users[$i]['clone']); $u->addAction(time(), 'nich_bot_clone', '', $this->battle->users[$i]['clone']);
} else { } else {
$u->addAction(time(), 'lose_bot_clone', '', $this->battle->users[$i]['clone']); $u->addAction(time(), 'lose_bot_clone', '', $this->battle->users[$i]['clone']);
@ -506,7 +507,7 @@ class Finish
$j = 0; $j = 0;
while ($j < count($this->battle->users)) { while ($j < count($this->battle->users)) {
if ($this->battle->users[$j]['bot'] == 0 && $this->battle->users[$j]['team'] != $this->battle->users[$i]['team']) { if ($this->battle->users[$j]['bot'] == 0 && $this->battle->users[$j]['team'] != $this->battle->users[$i]['team']) {
if ($this->battle->users[$j]['team'] == $this->battle->info['team_win']) { // if($this->battle->users[$j]['team']==$this->battle->info['team_win']){ if ($this->battle->users[$j]['team'] == $this->battle->i->getTeamwin()) { // if($this->battle->users[$j]['team']==$this->battle->i->getTeamwin()){
$u->addAction( $u->addAction(
time(), 'win_bot_' . $this->battle->users[$i]['bot_id'], '', time(), 'win_bot_' . $this->battle->users[$i]['bot_id'], '',
$this->battle->users[$j]['id'] $this->battle->users[$j]['id']
@ -519,7 +520,7 @@ class Finish
LIMIT 1' LIMIT 1'
); );
// //
} elseif ($this->battle->info['team_win'] == 0) { } elseif ($this->battle->i->getTeamwin() == 0) {
$u->addAction( $u->addAction(
time(), 'nich_bot_' . $this->battle->users[$i]['bot_id'], '', time(), 'nich_bot_' . $this->battle->users[$i]['bot_id'], '',
$this->battle->users[$j]['id'] $this->battle->users[$j]['id']
@ -539,11 +540,11 @@ class Finish
} }
//Из бота падают предметы //Из бота падают предметы
if ($nl != 10 && $this->battle->info['dungeon'] > 0) { if ($nl != 10 && $this->battle->i->dungeon > 0) {
if ($this->battle->info['team_win'] == $u->info['team'] && $this->battle->info['dungeon'] == 102) { if ($this->battle->i->getTeamwin() == $u->info['team'] && $this->battle->i->dungeon == 102) {
$j1 = mysql_fetch_array( $j1 = mysql_fetch_array(
mysql_query( mysql_query(
'SELECT * FROM `laba_obj` WHERE `type` = 2 AND `lib` = "' . $this->battle->info['dn_id'] . '" AND `x` = "' . $this->battle->info['x'] . '" AND `y` = "' . $this->battle->info['y'] . '" LIMIT 1' 'SELECT * FROM `laba_obj` WHERE `type` = 2 AND `lib` = "' . $this->battle->i->dnId . '" AND `x` = "' . $this->battle->i->x . '" AND `y` = "' . $this->battle->i->y . '" LIMIT 1'
) )
); );
if (isset($j1['id'])) { if (isset($j1['id'])) {
@ -555,14 +556,14 @@ class Finish
)' )'
); );
} }
} elseif ($this->battle->info['team_win'] == $u->info['team']) { } elseif ($this->battle->i->getTeamwin() == $u->info['team']) {
//выйграли люди, выкидываем предметы из мобов //выйграли люди, выкидываем предметы из мобов
$j1 = mysql_query( $j1 = mysql_query(
'SELECT * FROM `dungeon_bots` WHERE `dn` = "' . $this->battle->info['dn_id'] . '" AND `for_dn` = "0" AND `x` = "' . $this->battle->info['x'] . '" AND `delete` = "0" AND `y`= "' . $this->battle->info['y'] . '" LIMIT 100' 'SELECT * FROM `dungeon_bots` WHERE `dn` = "' . $this->battle->i->dnId . '" AND `for_dn` = "0" AND `x` = "' . $this->battle->i->x . '" AND `delete` = "0" AND `y`= "' . $this->battle->i->y . '" LIMIT 100'
); );
while ($tbot = mysql_fetch_array($j1)) { while ($tbot = mysql_fetch_array($j1)) {
$cmsg = new ChatMessage(); $cmsg = new ChatMessage();
$cmsg->setDn($this->battle->info['dn_id']); $cmsg->setDn($this->battle->i->dnId);
$cmsg->setRoom($this->battle->users[0]['room']); $cmsg->setRoom($this->battle->users[0]['room']);
$cmsg->setType(6); $cmsg->setType(6);
$cmsg->setTypeTime(1); $cmsg->setTypeTime(1);
@ -606,12 +607,12 @@ class Finish
mysql_query( mysql_query(
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES ( 'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES (
"' . $this->battle->info['dn_id'] . '", "' . $this->battle->i->dnId . '",
"' . $tou . '", "' . $tou . '",
"' . $itmz[0] . '", "' . $itmz[0] . '",
"' . time() . '", "' . time() . '",
"' . $this->battle->info['x'] . '", "' . $this->battle->i->x . '",
"' . $this->battle->info['y'] . '")' "' . $this->battle->i->y . '")'
); );
if (!isset($questDrop['id'])) { if (!isset($questDrop['id'])) {
$testdrop = 1; //ТУТ drop-drop //quest $testdrop = 1; //ТУТ drop-drop //quest
@ -629,7 +630,7 @@ class Finish
date('m') == 9 && date('m') == 9 &&
date('d') < 15 && date('d') < 15 &&
!Helper::getChanse(99) && !Helper::getChanse(99) &&
($this->battle->info['dungeon'] == 12 || $this->battle->info['dungeon'] == 101) ($this->battle->i->dungeon == 12 || $this->battle->i->dungeon == 101)
) { ) {
$tou = 0; //какому юзеру предназначено $tou = 0; //какому юзеру предназначено
/* выделяем случайного юзера из команды */ /* выделяем случайного юзера из команды */
@ -645,12 +646,12 @@ class Finish
mysql_query( mysql_query(
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES ( 'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES (
"' . $this->battle->info['dn_id'] . '", "' . $this->battle->i->dnId . '",
"' . $tou . '", "' . $tou . '",
"' . $itmz[0] . '", "' . $itmz[0] . '",
"' . time() . '", "' . time() . '",
"' . $this->battle->info['x'] . '", "' . $this->battle->i->x . '",
"' . $this->battle->info['y'] . '")' "' . $this->battle->i->y . '")'
); );
} }
// //
@ -661,10 +662,10 @@ class Finish
} }
if ( if (
$this->battle->info['dungeon'] == 12 || $this->battle->info['dungeon'] == 3 || $this->battle->i->dungeon == 12 || $this->battle->i->dungeon == 3 ||
$this->battle->info['dungeon'] == 101 || $this->battle->info['dungeon'] == 16 || $this->battle->i->dungeon == 101 || $this->battle->i->dungeon == 16 ||
$this->battle->info['dungeon'] == 9 || $this->battle->info['dungeon'] == 10 || $this->battle->i->dungeon == 9 || $this->battle->i->dungeon == 10 ||
$this->battle->info['dungeon'] == 13 || $this->battle->info['dungeon'] == 106 $this->battle->i->dungeon == 13 || $this->battle->i->dungeon == 106
) { ) {
$tou = 0; //какому юзеру предназначено $tou = 0; //какому юзеру предназначено
// выделяем случайного юзера из команды // выделяем случайного юзера из команды
@ -676,25 +677,25 @@ class Finish
mysql_query( mysql_query(
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES ( 'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES (
"' . $this->battle->info['dn_id'] . '", "' . $this->battle->i->dnId . '",
"' . $tou . '", "' . $tou . '",
"' . $itmz . '", "' . $itmz . '",
"' . time() . '", "' . time() . '",
"' . $this->battle->info['x'] . '", "' . $this->battle->i->x . '",
"' . $this->battle->info['y'] . '")' "' . $this->battle->i->y . '")'
); );
} }
} }
mysql_query( mysql_query(
'UPDATE `dungeon_bots` SET `delete` = "' . time( 'UPDATE `dungeon_bots` SET `delete` = "' . time(
) . '" AND `inBattle` = "' . $this->battle->info['id'] . '" WHERE `dn` = "' . $this->battle->info['dn_id'] . '" AND `for_dn` = "0" AND `delete` = "0" ' ) . '" AND `inBattle` = "' . $this->battle->i->id . '" WHERE `dn` = "' . $this->battle->i->dnId . '" AND `for_dn` = "0" AND `delete` = "0" '
); );
} else { } else {
//выкидываем всех игроков в клетку RESTART //выкидываем всех игроков в клетку RESTART
$dnr = 1; $dnr = 1;
if ($this->battle->info['dungeon'] != 102) { if ($this->battle->i->dungeon != 102) {
mysql_query( mysql_query(
'UPDATE `dungeon_bots` SET `inBattle` = "0" WHERE `dn` = "' . $this->battle->info['dn_id'] . '" AND `for_dn` = "0" AND `x` = "' . $this->battle->info['x'] . '" AND `y`= "' . $this->battle->info['y'] . '"' 'UPDATE `dungeon_bots` SET `inBattle` = "0" WHERE `dn` = "' . $this->battle->i->dnId . '" AND `for_dn` = "0" AND `x` = "' . $this->battle->i->x . '" AND `y`= "' . $this->battle->i->y . '"'
); );
} }
} }
@ -711,7 +712,7 @@ class Finish
//завершаем поединок //завершаем поединок
$i = $this->battle->uids[$u->info['id']]; $i = $this->battle->uids[$u->info['id']];
if ($this->battle->info['team_win'] >= 0) { if ($this->battle->i->getTeamwin() >= 0) {
$cmsg = new ChatMessage(); $cmsg = new ChatMessage();
$cmsg->setRoom($this->battle->users[$i]['room']); $cmsg->setRoom($this->battle->users[$i]['room']);
$cmsg->setType(6); $cmsg->setType(6);
@ -721,7 +722,7 @@ class Finish
$this->expCoef += $this->battle->stats[$i]['pbe']; $this->expCoef += $this->battle->stats[$i]['pbe'];
} }
if ($this->battle->info['razdel'] == 5 && (Config::get('m') >= 6 && Config::get('m') <= 8 || Config::get('w') == 0 || Config::get('w') == 6)) { if ($this->battle->i->razdel == 5 && (Config::get('m') >= 6 && Config::get('m') <= 8 || Config::get('w') == 0 || Config::get('w') == 6)) {
$this->expCoef += 5; $this->expCoef += 5;
} }
@ -736,17 +737,17 @@ class Finish
$act01 = 0; $act01 = 0;
$this->battle->users[$i]['battle_exp'] = round( $this->battle->users[$i]['battle_exp'] = round(
$this->battle->users[$i]['battle_exp'] + ($this->battle->users[$i]['battle_exp'] / 100 * (1 + $this->battle->info['addExp'] + $this->battle->stats[$i]['exp'])) $this->battle->users[$i]['battle_exp'] + ($this->battle->users[$i]['battle_exp'] / 100 * (1 + $this->battle->i->getAddexp() + $this->battle->stats[$i]['exp']))
); );
if ($this->battle->info['type'] == 564) { if ($this->battle->i->type == 564) {
//Бой с копией //Бой с копией
$this->battle->users[$i]['battle_exp'] = 0; $this->battle->users[$i]['battle_exp'] = 0;
} }
if ($this->battle->info['dungeon'] == 104) { if ($this->battle->i->dungeon == 104) {
$this->battle->users[$i]['battle_exp'] = ($u->info['level'] * 2) * (count($this->battle->uids) - 1); $this->battle->users[$i]['battle_exp'] = ($u->info['level'] * 2) * (count($this->battle->uids) - 1);
} elseif ($this->battle->info['dungeon'] > 0 && $this->battle->users[$i]['dnow'] != 0 && $this->battle->info['dungeon'] != 1 && $this->battle->users[$i]['team'] == $this->battle->info['team_win']) { } elseif ($this->battle->i->dungeon > 0 && $this->battle->users[$i]['dnow'] != 0 && $this->battle->i->dungeon != 1 && $this->battle->users[$i]['team'] == $this->battle->i->getTeamwin()) {
$dun_limitForLevel = [ $dun_limitForLevel = [
4 => 750, 4 => 750,
5 => 1500, 5 => 1500,
@ -779,32 +780,32 @@ class Finish
unset($rep); unset($rep);
} }
if (!isset($dun_exp[$this->battle->info['dungeon']])) { if (!isset($dun_exp[$this->battle->i->dungeon])) {
$dun_exp[$this->battle->info['dungeon']] = 0; $dun_exp[$this->battle->i->dungeon] = 0;
} }
if (!isset($dun_limitForLevel[(int)$this->battle->users[$i]['level']])) { // Если лимит не задан, опыт не даем. if (!isset($dun_limitForLevel[(int)$this->battle->users[$i]['level']])) { // Если лимит не задан, опыт не даем.
$this->battle->users[$i]['battle_exp'] = 0; $this->battle->users[$i]['battle_exp'] = 0;
} elseif ( } elseif (
isset($dun_exp[$this->battle->info['dungeon']]) && isset($dun_exp[$this->battle->i->dungeon]) &&
$dun_exp[$this->battle->info['dungeon']] >= $dun_limitForLevel[(int)$this->battle->users[$i]['level']] $dun_exp[$this->battle->i->dungeon] >= $dun_limitForLevel[(int)$this->battle->users[$i]['level']]
) { // Если лимит уже достигнут, опыт не даем. ) { // Если лимит уже достигнут, опыт не даем.
$this->battle->users[$i]['battle_exp'] = 0; $this->battle->users[$i]['battle_exp'] = 0;
} elseif ( } elseif (
isset($dun_exp[$this->battle->info['dungeon']]) && isset($dun_exp[$this->battle->i->dungeon]) &&
$dun_limitForLevel[(int)$this->battle->users[$i]['level']] > $dun_exp[$this->battle->info['dungeon']] $dun_limitForLevel[(int)$this->battle->users[$i]['level']] > $dun_exp[$this->battle->i->dungeon]
) { // Если текущая репутация не достигла лимита. ) { // Если текущая репутация не достигла лимита.
if (($dun_exp[$this->battle->info['dungeon']] + $this->battle->users[$i]['battle_exp']) > $dun_limitForLevel[(int)$this->battle->users[$i]['level']]) { if (($dun_exp[$this->battle->i->dungeon] + $this->battle->users[$i]['battle_exp']) > $dun_limitForLevel[(int)$this->battle->users[$i]['level']]) {
// Если опыта набрано достаточно, для достижения лимита. // Если опыта набрано достаточно, для достижения лимита.
$this->battle->users[$i]['battle_exp'] = abs( $this->battle->users[$i]['battle_exp'] = abs(
$this->battle->users[$i]['battle_exp'] - abs( $this->battle->users[$i]['battle_exp'] - abs(
$dun_limitForLevel[(int)$this->battle->users[$i]['level']] - ($this->battle->users[$i]['battle_exp'] + $dun_exp[$this->battle->info['dungeon']]) $dun_limitForLevel[(int)$this->battle->users[$i]['level']] - ($this->battle->users[$i]['battle_exp'] + $dun_exp[$this->battle->i->dungeon])
) )
); );
$dun_exp[$this->battle->info['dungeon']] += $this->battle->users[$i]['battle_exp']; $dun_exp[$this->battle->i->dungeon] += $this->battle->users[$i]['battle_exp'];
} elseif ($dun_limitForLevel[(int)$this->battle->users[$i]['level']] > ($dun_exp[$this->battle->info['dungeon']] + $this->battle->users[$i]['battle_exp'])) { } elseif ($dun_limitForLevel[(int)$this->battle->users[$i]['level']] > ($dun_exp[$this->battle->i->dungeon] + $this->battle->users[$i]['battle_exp'])) {
// Если опыта недостаточно, для достижения лимита. // Если опыта недостаточно, для достижения лимита.
$dun_exp[$this->battle->info['dungeon']] += $this->battle->users[$i]['battle_exp']; $dun_exp[$this->battle->i->dungeon] += $this->battle->users[$i]['battle_exp'];
} else { } else {
$this->battle->users[$i]['battle_exp'] = 0; $this->battle->users[$i]['battle_exp'] = 0;
} }
@ -813,7 +814,7 @@ class Finish
} }
if ($this->battle->users[$i]['battle_exp'] > 0 && isset($dun_exp[$this->battle->info['dungeon']]) && $dun_exp[$this->battle->info['dungeon']] > 0) { if ($this->battle->users[$i]['battle_exp'] > 0 && isset($dun_exp[$this->battle->i->dungeon]) && $dun_exp[$this->battle->i->dungeon] > 0) {
$dunexp = []; $dunexp = [];
foreach ($dun_exp as $key => $val) { foreach ($dun_exp as $key => $val) {
$dunexp[$key] = $key . '=' . $val; // текущий лимит опыта в подземке $dunexp[$key] = $key . '=' . $val; // текущий лимит опыта в подземке
@ -834,31 +835,31 @@ class Finish
); );
} }
if ($this->battle->info['team_win'] == 0 && $this->battle->info['type'] != 564) { if ($this->battle->i->getTeamwin() == 0 && $this->battle->i->type != 564) {
if ($this->battle->users[$i]['level'] <= 1) { if ($this->battle->users[$i]['level'] <= 1) {
$this->battle->users[$i]['battle_exp'] = floor($this->battle->users[$i]['battle_exp'] * 0.50); $this->battle->users[$i]['battle_exp'] = floor($this->battle->users[$i]['battle_exp'] * 0.50);
} else { } else {
$this->battle->users[$i]['battle_exp'] = ceil($this->battle->users[$i]['battle_exp'] * 0.10); $this->battle->users[$i]['battle_exp'] = ceil($this->battle->users[$i]['battle_exp'] * 0.10);
} }
$this->battle->users[$i]['nich'] += 1; $this->battle->users[$i]['nich'] += 1;
} elseif ($this->battle->users[$i]['team'] == $this->battle->info['team_win'] && $this->battle->info['type'] != 564) { } elseif ($this->battle->users[$i]['team'] == $this->battle->i->getTeamwin() && $this->battle->i->type != 564) {
$gm[$i] = $this->battle->info['money']; $gm[$i] = $this->battle->i->money;
$gms[$i] = $this->battle->info['money3']; $gms[$i] = $this->battle->i->money3;
$this->battle->users[$i]['win'] += 1; $this->battle->users[$i]['win'] += 1;
$act01 = 1; $act01 = 1;
} elseif ($this->battle->info['type'] != 564) { } elseif ($this->battle->i->type != 564) {
if ($this->battle->users[$i]['level'] <= 1) { if ($this->battle->users[$i]['level'] <= 1) {
$this->battle->users[$i]['battle_exp'] = ceil($this->battle->users[$i]['battle_exp'] * 0.33); $this->battle->users[$i]['battle_exp'] = ceil($this->battle->users[$i]['battle_exp'] * 0.33);
} else { } else {
$this->battle->users[$i]['battle_exp'] = ceil($this->battle->users[$i]['battle_exp'] * 0.10); $this->battle->users[$i]['battle_exp'] = ceil($this->battle->users[$i]['battle_exp'] * 0.10);
} }
$bm[$i] = $this->battle->info['money']; $bm[$i] = $this->battle->i->money;
$bms[$i] = $this->battle->info['money3']; $bms[$i] = $this->battle->i->money3;
$this->battle->users[$i]['lose'] += 1; $this->battle->users[$i]['lose'] += 1;
$act01 = 2; $act01 = 2;
} }
//Рассчитываем кол-во выигрышных сумм и кто сколько получил (для екр.) //Рассчитываем кол-во выигрышных сумм и кто сколько получил (для екр.)
if ($this->battle->info['money3'] > 0 && isset($gms[$i]) && $this->battle->info['type'] != 564) { if ($this->battle->i->money3 > 0 && isset($gms[$i]) && $this->battle->i->type != 564) {
$mn = [ $mn = [
'l' => 0, //сколько проигравших игроков 'l' => 0, //сколько проигравших игроков
'w' => 0, //сколько выигрывших игроков 'w' => 0, //сколько выигрывших игроков
@ -867,17 +868,17 @@ class Finish
if ($act01 == 1) { if ($act01 == 1) {
$mn['l'] = mysql_fetch_array( $mn['l'] = mysql_fetch_array(
mysql_query( mysql_query(
'SELECT COUNT(`id`) FROM `battle_users` WHERE `battle` = "' . $this->battle->info['id'] . '" AND `team` != "' . $this->battle->users[$i]['team'] . '" LIMIT 1' 'SELECT COUNT(`id`) FROM `battle_users` WHERE `battle` = "' . $this->battle->i->id . '" AND `team` != "' . $this->battle->users[$i]['team'] . '" LIMIT 1'
) )
); );
$mn['l'] = $mn['l'][0]; $mn['l'] = $mn['l'][0];
$mn['w'] = mysql_fetch_array( $mn['w'] = mysql_fetch_array(
mysql_query( mysql_query(
'SELECT COUNT(`id`) FROM `battle_users` WHERE `battle` = "' . $this->battle->info['id'] . '" AND `team` = "' . $this->battle->users[$i]['team'] . '" LIMIT 1' 'SELECT COUNT(`id`) FROM `battle_users` WHERE `battle` = "' . $this->battle->i->id . '" AND `team` = "' . $this->battle->users[$i]['team'] . '" LIMIT 1'
) )
); );
$mn['w'] = $mn['w'][0]; $mn['w'] = $mn['w'][0];
$mn['m'] = round(($mn['l'] * $this->battle->info['money3']) / 100 * 87, 2); $mn['m'] = round(($mn['l'] * $this->battle->i->money3) / 100 * 87, 2);
$gms[$i] = round(($mn['m'] / $mn['w']), 2); $gms[$i] = round(($mn['m'] / $mn['w']), 2);
} }
} }
@ -897,7 +898,7 @@ class Finish
$lom = 0.05; $lom = 0.05;
} }
$nlom = [0 => rand(0, 18), 1 => rand(0, 18), 2 => rand(0, 18), 3 => rand(0, 18)]; $nlom = [0 => rand(0, 18), 1 => rand(0, 18), 2 => rand(0, 18), 3 => rand(0, 18)];
if ($this->battle->info['type'] == 564 || $this->battle->stats[$i]['silver']) { if ($this->battle->i->type == 564 || $this->battle->stats[$i]['silver']) {
$lom = 0; $lom = 0;
} }
@ -911,10 +912,10 @@ class Finish
} }
if ($this->battle->users[$i]['animal'] > 0) { if ($this->battle->users[$i]['animal'] > 0) {
$ulan = $u->testAction( $ulan = $u->testAction(
'`uid` = "' . $this->battle->users[$i]['id'] . '" AND `vars` = "animal_use' . $this->battle->info['id'] . '" LIMIT 1', '`uid` = "' . $this->battle->users[$i]['id'] . '" AND `vars` = "animal_use' . $this->battle->i->id . '" LIMIT 1',
1 1
); );
if (isset($ulan['id']) && $this->battle->users[$i]['team'] == $this->battle->info['team_win'] && $this->battle->users[$i]['level'] > $ulan['vals']) { if (isset($ulan['id']) && $this->battle->users[$i]['team'] == $this->battle->i->getTeamwin() && $this->battle->users[$i]['level'] > $ulan['vals']) {
$a004 = mysql_fetch_array( $a004 = mysql_fetch_array(
mysql_query( mysql_query(
'SELECT `max_exp`,`name` FROM `users_animal` WHERE `uid` = "' . $this->battle->users[$i]['id'] . '" AND `id` = "' . $this->battle->users[$i]['animal'] . '" AND `pet_in_cage` = "0" AND `delete` = "0" LIMIT 1' 'SELECT `max_exp`,`name` FROM `users_animal` WHERE `uid` = "' . $this->battle->users[$i]['id'] . '" AND `id` = "' . $this->battle->users[$i]['animal'] . '" AND `pet_in_cage` = "0" AND `delete` = "0" LIMIT 1'
@ -936,52 +937,49 @@ class Finish
); );
if ($upd) { if ($upd) {
$this->battle->users[$i]['battle_exp'] = round($this->battle->users[$i]['battle_exp'] / 100 * 67); $this->battle->users[$i]['battle_exp'] = round($this->battle->users[$i]['battle_exp'] / 100 * 67);
$this->battle->info['addExp'] -= 33.333; $this->battle->i->modifyAddExp(-33.333);
} }
} }
} }
$prsusers = mysql_fetch_array( $prsusers = mysql_fetch_array(
mysql_query( mysql_query(
'SELECT SUM(`price1`) FROM `battle_users` WHERE `battle` = "' . $this->battle->info['id'] . '" LIMIT 1' 'SELECT SUM(`price1`) FROM `battle_users` WHERE `battle` = "' . $this->battle->i->id . '" LIMIT 1'
) )
); );
$this->btlstatus = Battle::getType($prsusers[0]); $this->btlstatus = Battle::getType($prsusers[0]);
if ($this->battle->info['smert'] == 1) { if ($this->battle->i->smert == 1) {
$this->btlstatus = [150, 150, 'Жесточайшее Сражение', 'Жесточайшее Сражение']; $this->btlstatus = [150, 150, 'Жесточайшее Сражение', 'Жесточайшее Сражение'];
} }
// //
if ($this->battle->stats[$i]['clanpos'] > 0 && ($this->battle->stats[$i]['clanpos'] == 1 || $this->battle->stats[$i]['clanpos'] == 2 || $this->battle->stats[$i]['clanpos'] == 3)) {
$this->battle->info['addExp'] += 0;
}
unset($r1); unset($r1);
//Статусная битва //Статусная битва
if ($this->btlstatus[0] > 0) { if ($this->btlstatus[0] > 0) {
if ($this->battle->info['type'] == 99) { if ($this->battle->i->type == 99) {
$this->battle->info['addExp'] += $this->btlstatus[1]; $this->battle->i->modifyAddExp($this->btlstatus[1]);
} else { } else {
$this->battle->info['addExp'] += $this->btlstatus[0]; $this->battle->i->modifyAddExp($this->btlstatus[0]);
} }
} }
if ($this->battle->users[$i]['align'] == 2 || $this->battle->users[$i]['haos'] > time()) { if ($this->battle->users[$i]['align'] == 2 || $this->battle->users[$i]['haos'] > time()) {
$this->battle->stats[$i]['exp'] = -($this->battle->info['addExp'] + 50); $this->battle->stats[$i]['exp'] = -($this->battle->i->getAddexp() + 50);
} }
if ($this->battle->info['addExp'] + $this->battle->stats[$i]['exp'] != 0) { if ($this->battle->i->getAddexp() + $this->battle->stats[$i]['exp'] != 0) {
$prc = ' (' . (100 + $this->battle->info['addExp'] + $this->battle->stats[$i]['exp']) . '%)'; $prc = ' (' . (100 + $this->battle->i->getAddexp() + $this->battle->stats[$i]['exp']) . '%)';
} }
if ($this->battle->info['money'] > 0) { if ($this->battle->i->money > 0) {
if (isset($gm[$i])) { if (isset($gm[$i])) {
$prc .= ' Вы выйграли <strong>' . $gm[$i] . ' кр.</strong> за этот бой.'; $prc .= ' Вы выйграли <strong>' . $gm[$i] . ' кр.</strong> за этот бой.';
Delo::add( Delo::add(
4, 4,
'System.battle', 'System.battle',
$this->battle->users[$i]['id'], $this->battle->users[$i]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж выйграл <strong>' . $gm[$i] . ' кр.</strong> (В бою №' . $this->battle->info['id'] . ').', '&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж выйграл <strong>' . $gm[$i] . ' кр.</strong> (В бою №' . $this->battle->i->id . ').',
); );
$this->battle->users[$i]['money'] += $gm[$i]; $this->battle->users[$i]['money'] += $gm[$i];
} elseif (isset($bm[$i])) { } elseif (isset($bm[$i])) {
@ -990,12 +988,12 @@ class Finish
4, 4,
'System.battle', 'System.battle',
$this->battle->users[$i]['id'], $this->battle->users[$i]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж <i>проиграл</i> <strong>' . $gm[$i] . ' кр.</strong> (В бою №' . $this->battle->info['id'] . ').', '&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж <i>проиграл</i> <strong>' . $gm[$i] . ' кр.</strong> (В бою №' . $this->battle->i->id . ').',
); );
$this->battle->users[$i]['money'] -= $bm[$i]; $this->battle->users[$i]['money'] -= $bm[$i];
} }
} }
if (Config::get('money_haot') && $this->battle->users[$i]['exp'] <= 200000000 && $act01 == 1 && $this->battle->info['razdel'] == 5 && $this->battle->users[$i]['level'] >= 8) { if (Config::get('money_haot') && $this->battle->users[$i]['exp'] <= 200000000 && $act01 == 1 && $this->battle->i->razdel == 5 && $this->battle->users[$i]['level'] >= 8) {
//Сколько нужно опыта набить //Сколько нужно опыта набить
$trexp = [ $trexp = [
8 => 1200, 8 => 1200,
@ -1047,26 +1045,26 @@ class Finish
if ($this->battle->users[$i]['battle_exp'] < $trexp) { if ($this->battle->users[$i]['battle_exp'] < $trexp) {
$prc .= ', Награда <strong>0 ЕКР</strong> за этот бой (Мало опыта набили).'; $prc .= ', Награда <strong>0 ЕКР</strong> за этот бой (Мало опыта набили).';
} elseif ($admn > 0) { } elseif ($admn > 0) {
if ($this->battle->info['type'] != 33) { if ($this->battle->i->type != 33) {
$prc .= ', Награда <strong>' . $admn . ' ЕКР</strong> за этот бой.'; $prc .= ', Награда <strong>' . $admn . ' ЕКР</strong> за этот бой.';
} }
Delo::add( Delo::add(
4, 4,
'System.battle', 'System.battle',
$this->battle->users[$i]['id'], $this->battle->users[$i]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж получил <strong>' . $admn . ' ЕКР</strong> (В бою №' . $this->battle->info['id'] . ').', '&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж получил <strong>' . $admn . ' ЕКР</strong> (В бою №' . $this->battle->i->id . ').',
); );
$this->battle->users[$i]['money2'] += $admn; $this->battle->users[$i]['money2'] += $admn;
} }
} }
if ($this->battle->info['money3'] > 0) { if ($this->battle->i->money3 > 0) {
if (isset($gms[$i])) { if (isset($gms[$i])) {
$prc .= ' Вы выйграли <strong>' . $gms[$i] . ' $.</strong> за этот бой.'; $prc .= ' Вы выйграли <strong>' . $gms[$i] . ' $.</strong> за этот бой.';
Delo::add( Delo::add(
4, 4,
'System.battle', 'System.battle',
$this->battle->users[$i]['id'], $this->battle->users[$i]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж выйграл <strong>' . $gms[$i] . ' $.</strong> (В бою №' . $this->battle->info['id'] . ').', '&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж выйграл <strong>' . $gms[$i] . ' $.</strong> (В бою №' . $this->battle->i->id . ').',
); );
$this->battle->users[$i]['money3'] += $gms[$i]; $this->battle->users[$i]['money3'] += $gms[$i];
mysql_query( mysql_query(
@ -1078,7 +1076,7 @@ class Finish
4, 4,
'System.battle', 'System.battle',
$this->battle->users[$i]['id'], $this->battle->users[$i]['id'],
'&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж <i>проиграл</i> <strong>' . $gms[$i] . ' $.</strong> (В бою №' . $this->battle->info['id'] . ').', '&quot;<span style="color: olive; ">System.battle</span>&quot;: Персонаж <i>проиграл</i> <strong>' . $gms[$i] . ' $.</strong> (В бою №' . $this->battle->i->id . ').',
); );
$this->battle->users[$i]['money3'] -= $bms[$i]; $this->battle->users[$i]['money3'] -= $bms[$i];
mysql_query( mysql_query(
@ -1126,30 +1124,30 @@ class Finish
unset($lime); unset($lime);
if ($this->btlstatus[0] > 0) { if ($this->btlstatus[0] > 0) {
if ($this->battle->info['type'] == 99) { if ($this->battle->i->type == 99) {
$prc .= ' (' . $this->btlstatus[3] . ')'; $prc .= ' (' . $this->btlstatus[3] . ')';
} else { } else {
$prc .= ' (' . $this->btlstatus[2] . ')'; $prc .= ' (' . $this->btlstatus[2] . ')';
} }
} }
if ($this->battle->info['dungeon'] == 1 && $this->battle->users[$i]['team'] == $this->battle->info['team_win']) { if ($this->battle->i->dungeon == 1 && $this->battle->users[$i]['team'] == $this->battle->i->getTeamwin()) {
//канализация лимит //канализация лимит
$rep = mysql_fetch_array( $rep = mysql_fetch_array(
mysql_query( mysql_query(
'SELECT `dl1`,`id` FROM `rep` WHERE `id` = "' . $this->battle->users[$i]['id'] . '" LIMIT 1' 'SELECT `dl1`,`id` FROM `rep` WHERE `id` = "' . $this->battle->users[$i]['id'] . '" LIMIT 1'
) )
); );
if ($rep['dl' . $this->battle->info['dungeon']] > 0) { if ($rep['dl' . $this->battle->i->dungeon] > 0) {
$this->battle->users[$i]['battle_exp'] += 3 * count($this->battle->users); $this->battle->users[$i]['battle_exp'] += 3 * count($this->battle->users);
if ($rep['dl' . $this->battle->info['dungeon']] > $this->battle->users[$i]['battle_exp']) { if ($rep['dl' . $this->battle->i->dungeon] > $this->battle->users[$i]['battle_exp']) {
$rep['dl' . $this->battle->info['dungeon']] -= $this->battle->users[$i]['battle_exp']; $rep['dl' . $this->battle->i->dungeon] -= $this->battle->users[$i]['battle_exp'];
} else { } else {
$this->battle->users[$i]['battle_exp'] = $rep['dl' . $this->battle->info['dungeon']]; $this->battle->users[$i]['battle_exp'] = $rep['dl' . $this->battle->i->dungeon];
$rep['dl' . $this->battle->info['dungeon']] = 0; $rep['dl' . $this->battle->i->dungeon] = 0;
} }
mysql_query( mysql_query(
'UPDATE `rep` SET `dl' . $this->battle->info['dungeon'] . '` = "' . $rep['dl' . $this->battle->info['dungeon']] . '" WHERE `id` = "' . $rep['id'] . '" LIMIT 1' 'UPDATE `rep` SET `dl' . $this->battle->i->dungeon . '` = "' . $rep['dl' . $this->battle->i->dungeon] . '" WHERE `id` = "' . $rep['id'] . '" LIMIT 1'
); );
} else { } else {
$this->battle->users[$i]['battle_exp'] = 0; $this->battle->users[$i]['battle_exp'] = 0;
@ -1163,9 +1161,9 @@ class Finish
if ( if (
$this->battle->users[$i]['battle_exp'] < 1 && $this->battle->users[$i]['battle_exp'] < 1 &&
$this->battle->users[$i]['twink'] == 0 && $this->battle->users[$i]['twink'] == 0 &&
$this->battle->info['money'] == 0 && $this->battle->i->money == 0 &&
$this->battle->info['money3'] == 0 && $this->battle->i->money3 == 0 &&
$this->battle->info['kingfight'] == 0 && $this->battle->i->kingfight == 0 &&
(!isset($admnb) || $admnb == 0) (!isset($admnb) || $admnb == 0)
) { ) {
$prc = ''; $prc = '';
@ -1194,14 +1192,14 @@ class Finish
} }
//------------------------------------- //-------------------------------------
if ($this->battle->info['type'] != 33) { if ($this->battle->i->type != 33) {
$this->battle->users[$i]['battle_text'] = 'Бой закончен. Всего вами нанесено урона: <strong>' . floor( $this->battle->users[$i]['battle_text'] = 'Бой закончен. Всего вами нанесено урона: <strong>' . floor(
$this->battle->users[$i]['battle_yron'] $this->battle->users[$i]['battle_yron']
) . ' HP</strong>. Получено опыта: <strong>' . (0 + $this->battle->users[$i]['battle_exp']) . '</strong>' . $prc . '.' . $sinf; //stats ) . ' HP</strong>. Получено опыта: <strong>' . (0 + $this->battle->users[$i]['battle_exp']) . '</strong>' . $prc . '.' . $sinf; //stats
} }
//Снижение времени Право на подвиг Титул за победу в хаоте //Снижение времени Право на подвиг Титул за победу в хаоте
if ($this->battle->info['dungeon'] == 0 && $this->battle->info['razdel'] == 5 && $this->battle->users[$i]['team'] == $this->battle->info['team_win']) { if ($this->battle->i->dungeon == 0 && $this->battle->i->razdel == 5 && $this->battle->users[$i]['team'] == $this->battle->i->getTeamwin()) {
//ТУТ2 //ТУТ2
StatsModel::addRepexpById($this->battle->users[$i]['id'], 2); //Репутация за поб в хаоте +2 StatsModel::addRepexpById($this->battle->users[$i]['id'], 2); //Репутация за поб в хаоте +2
$check = mysql_fetch_array( $check = mysql_fetch_array(
@ -1234,7 +1232,7 @@ class Finish
} }
//Награда за клан вар //Награда за клан вар
if ($this->battle->info['dungeon'] == 0 && $this->battle->info['type'] == 250 && $this->battle->users[$i]['team'] == $this->battle->info['team_win']) { if ($this->battle->i->dungeon == 0 && $this->battle->i->type == 250 && $this->battle->users[$i]['team'] == $this->battle->i->getTeamwin()) {
mysql_query( mysql_query(
'UPDATE `users_achiv` SET `kw`= `kw`+1 WHERE `id` = "' . $this->battle->users[$i]['id'] . '" LIMIT 1' 'UPDATE `users_achiv` SET `kw`= `kw`+1 WHERE `id` = "' . $this->battle->users[$i]['id'] . '" LIMIT 1'
); );
@ -1244,16 +1242,16 @@ class Finish
} }
//Награда за клан вар //Награда за клан вар
if ( if (
$this->battle->info['dungeon'] == 0 && $this->battle->i->dungeon == 0 &&
$this->battle->info['type'] == 99 && $this->battle->i->type == 99 &&
$this->battle->users[$i]['team'] == $this->battle->info['team_win'] && $this->battle->users[$i]['team'] == $this->battle->i->getTeamwin() &&
(date('w') == 0 || date('w') == 6 || date('w') == 5) (date('w') == 0 || date('w') == 6 || date('w') == 5)
) { ) {
StatsModel::addRepexpById($this->battle->users[$i]['id'], 10); //Кровавые войны(победа) 10 StatsModel::addRepexpById($this->battle->users[$i]['id'], 10); //Кровавые войны(победа) 10
} }
//Новая выдача на трупожора //Новая выдача на трупожора
if ($this->battle->info['dungeon'] == 0 && $this->battle->info['type'] == 500 && $this->battle->users[$i]['team'] == $this->battle->info['team_win'] && $this->battle->users[$i]['no_ip'] != 'trupojor' && $this->battle->users[$i]['bot'] == 0) { if ($this->battle->i->dungeon == 0 && $this->battle->i->type == 500 && $this->battle->users[$i]['team'] == $this->battle->i->getTeamwin() && $this->battle->users[$i]['no_ip'] != 'trupojor' && $this->battle->users[$i]['bot'] == 0) {
if ($this->battle->users[$i]['level'] > 9) { if ($this->battle->users[$i]['level'] > 9) {
$mid = 903093; $mid = 903093;
} else { } else {
@ -1322,7 +1320,7 @@ class Finish
} }
if ( if (
($this->battle->info['razdel'] == 5 || $this->battle->info['razdel'] == 4) && ($this->battle->i->razdel == 5 || $this->battle->i->razdel == 4) &&
(date('d.m') == '31.10' || (date('m') == 11 && date('d') < 7)) (date('d.m') == '31.10' || (date('m') == 11 && date('d') < 7))
) { ) {
//Хэллоуин 4504 //Хэллоуин 4504
@ -1333,8 +1331,8 @@ class Finish
//Добавляем воинственность //Добавляем воинственность
if ( if (
$this->battle->info['dungeon'] == 0 && $this->battle->i->dungeon == 0 &&
$this->battle->info['razdel'] == 5 && $this->battle->i->razdel == 5 &&
$this->battle->users[$i]['exp'] >= 1500 && $this->battle->users[$i]['exp'] >= 1500 &&
$this->battle->users[$i]['battle_exp'] > 100 * $this->battle->users[$i]['level'] $this->battle->users[$i]['battle_exp'] > 100 * $this->battle->users[$i]['level']
) { ) {
@ -1356,7 +1354,7 @@ class Finish
$rzbvo = 250; $rzbvo = 250;
} }
if ($this->battle->info['type'] != 33) { if ($this->battle->i->type != 33) {
$this->battle->users[$i]['battle_text'] .= ' Вы получили ' . $rzbvo . ' воинственности за этот бой.'; $this->battle->users[$i]['battle_text'] .= ' Вы получили ' . $rzbvo . ' воинственности за этот бой.';
} }
mysql_query( mysql_query(
@ -1371,13 +1369,13 @@ class Finish
if ($this->battle->stats[$i]['hpNow'] >= 1) { if ($this->battle->stats[$i]['hpNow'] >= 1) {
$this->battle->stats[$i]['test_heal'] = mysql_fetch_array( $this->battle->stats[$i]['test_heal'] = mysql_fetch_array(
mysql_query( mysql_query(
'SELECT SUM(`yrn`) FROM `battle_stat` WHERE `uid2` = "' . $this->battle->users[$i]['id'] . '" AND `battle` = "' . $this->battle->info['id'] . '" LIMIT 1' 'SELECT SUM(`yrn`) FROM `battle_stat` WHERE `uid2` = "' . $this->battle->users[$i]['id'] . '" AND `battle` = "' . $this->battle->i->id . '" LIMIT 1'
) )
); );
$this->battle->stats[$i]['test_heal'] = $this->battle->stats[$i]['test_heal'][0]; $this->battle->stats[$i]['test_heal'] = $this->battle->stats[$i]['test_heal'][0];
$this->battle->stats[$i]['test_start'] = mysql_fetch_array( $this->battle->stats[$i]['test_start'] = mysql_fetch_array(
mysql_query( mysql_query(
'SELECT `hpStart` FROM `battle_users` WHERE `uid` = "' . $this->battle->users[$i]['id'] . '" AND `battle` = "' . $this->battle->info['id'] . '" LIMIT 1' 'SELECT `hpStart` FROM `battle_users` WHERE `uid` = "' . $this->battle->users[$i]['id'] . '" AND `battle` = "' . $this->battle->i->id . '" LIMIT 1'
) )
); );
$this->battle->stats[$i]['test_start'] = $this->battle->stats[$i]['test_start']['hpStart']; $this->battle->stats[$i]['test_start'] = $this->battle->stats[$i]['test_start']['hpStart'];
@ -1392,7 +1390,7 @@ class Finish
unset($this->battle->stats[$i]['test_heal']); unset($this->battle->stats[$i]['test_heal']);
$this->battle->users[$i]['last_b'] = $this->battle->info['id']; //stats $this->battle->users[$i]['last_b'] = $this->battle->i->id; //stats
$this->battle->users[$i]['last_a'] = $act01; $this->battle->users[$i]['last_a'] = $act01;
$this->battle->users[$i]['battle'] = -1; //users $this->battle->users[$i]['battle'] = -1; //users
$this->battle->users[$i]['battle_yron'] = 0; //stats $this->battle->users[$i]['battle_yron'] = 0; //stats
@ -1403,9 +1401,9 @@ class Finish
if ($this->battle->users[$i]['clan'] > 0) { if ($this->battle->users[$i]['clan'] > 0) {
$cpr = 1; $cpr = 1;
if ($this->battle->info['typeBattle'] == 9) { if ($this->battle->i->typebattle == 9) {
$cpr = 25; $cpr = 25;
} elseif ($this->battle->info['typeBattle'] == 50) { } elseif ($this->battle->i->typebattle == 50) {
$cpr = 65; $cpr = 65;
} }
if ($this->battle->stats[$i]['silver'] >= 5) { if ($this->battle->stats[$i]['silver'] >= 5) {
@ -1420,7 +1418,7 @@ class Finish
$this->battle->users[$i]['battle_exp'] = 0; //stats $this->battle->users[$i]['battle_exp'] = 0; //stats
if ($this->battle->users[$i]['team'] == $this->battle->info['team_win']) { if ($this->battle->users[$i]['team'] == $this->battle->i->getTeamwin()) {
$r = new Reputation($this->battle->users[$i]['id']); $r = new Reputation($this->battle->users[$i]['id']);
$r->addRep('n_capitalcity', $this->battle->users[$i]['bn_capitalcity']); $r->addRep('n_capitalcity', $this->battle->users[$i]['bn_capitalcity']);
$r->addRep('n_demonscity', $this->battle->users[$i]['bn_demonscity']); $r->addRep('n_demonscity', $this->battle->users[$i]['bn_demonscity']);
@ -1437,7 +1435,7 @@ class Finish
$this->dieInDungeon($dnr, $i, $u, $cmsg, $chat); $this->dieInDungeon($dnr, $i, $u, $cmsg, $chat);
Db::sql('update users set login2 = default where battle = ?', [$this->battle->info['id']]); Db::sql('update users set login2 = default where battle = ?', [$this->battle->i->id]);
Db::sql( Db::sql(
'update users set login2 = default, money = ?, money2 = ?, win = ?, lose = ?, nich = ?, battle = -1 where id = ?', 'update users set login2 = default, money = ?, money2 = ?, win = ?, lose = ?, nich = ?, battle = -1 where id = ?',
[ [
@ -1465,21 +1463,21 @@ class Finish
$this->battle->users[$i]['exp'], $this->battle->users[$i]['exp'],
$this->battle->users[$i]['battle_exp'], $this->battle->users[$i]['battle_exp'],
$this->battle->users[$i]['battle_text'], $this->battle->users[$i]['battle_text'],
$this->battle->info['id'], $this->battle->i->id,
$this->battle->users[$i]['id'], $this->battle->users[$i]['id'],
] ]
); );
if ($this->battle->info['turnir'] == 0) { if ($this->battle->i->turnir == 0) {
//пишем в чат //пишем в чат
$cmsg->setTo($this->battle->users[$i]['login']); $cmsg->setTo($this->battle->users[$i]['login']);
$cmsg->setText($this->battle->users[$i]['battle_text']); $cmsg->setText($this->battle->users[$i]['battle_text']);
$chat->sendMsg($cmsg); $chat->sendMsg($cmsg);
} else { } else {
Db::sql('update turnirs set winner = ? where id = ?', [$this->battle->info['team_win'], $this->battle->info['turnir']]); Db::sql('update turnirs set winner = ? where id = ?', [$this->battle->i->getTeamwin(), $this->battle->i->turnir]);
} }
//завершаем сам бой //завершаем сам бой
Db::sql('update battle set time_over = unix_timestamp(), team_win = ? where id = ?', [$this->battle->info['team_win'], $this->battle->info['id']]); Db::sql('update battle set time_over = unix_timestamp(), team_win = ? where id = ?', [$this->battle->i->getTeamwin(), $this->battle->i->id]);
// Жрать хочет // Жрать хочет
if ($this->battle->users[$i]['animal'] > 0) { if ($this->battle->users[$i]['animal'] > 0) {
@ -1512,7 +1510,7 @@ class Finish
} }
} }
} }
mysql_query('UPDATE `battle` SET `testfinish` = "0" WHERE `id` = "' . $this->battle->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `battle` SET `testfinish` = "0" WHERE `id` = "' . $this->battle->i->id . '" LIMIT 1');
} }
@ -1593,11 +1591,11 @@ class Finish
{ {
Db::sql( Db::sql(
'insert into battle_logs_save select id, time, battle, id_hod, text, vars, zona1, zonb1, zona2, zonb2, type from battle_logs where battle = ? and id_hod <= ?', 'insert into battle_logs_save select id, time, battle, id_hod, text, vars, zona1, zonb1, zona2, zonb2, type from battle_logs where battle = ? and id_hod <= ?',
[$this->battle->info['id'], $this->battle->hodID] [$this->battle->i->id, $this->battle->hodID]
); );
Db::sql('delete from battle_logs where battle = ?', [$this->battle->info['id']]); Db::sql('delete from battle_logs where battle = ?', [$this->battle->i->id]);
Db::sql('delete from battle_stat where battle < ?', [$this->battle->info['id'] - 100]); Db::sql('delete from battle_stat where battle < ?', [$this->battle->i->id - 100]);
Db::sql('delete from battle_actions where btl = ?', [$this->battle->info['id']]); Db::sql('delete from battle_actions where btl = ?', [$this->battle->i->id]);
} }
private function dieInDungeon(int $dnr, int $i, User $u, ChatMessage $cmsg, Chat $chat): void private function dieInDungeon(int $dnr, int $i, User $u, ChatMessage $cmsg, Chat $chat): void
@ -1622,7 +1620,7 @@ class Finish
$la = $this->battle->users[$i]['sex'] == 1 ? 'ла' : ''; $la = $this->battle->users[$i]['sex'] == 1 ? 'ла' : '';
if ($dies < 2 || $this->battle->info['dungeon'] == 15) { if ($dies < 2 || $this->battle->i->dungeon == 15) {
$shaibaItemId = Db::getValue('select id from items_users where uid = ? and item_id = 4910 limit 1', [$this->battle->users[$i]['id']]); $shaibaItemId = Db::getValue('select id from items_users where uid = ? and item_id = 4910 limit 1', [$this->battle->users[$i]['id']]);
@ -1633,7 +1631,7 @@ class Finish
"insert into dungeon_obj (name, dn, x, y, img, action, w, h, os1, os2, os3, date) "insert into dungeon_obj (name, dn, x, y, img, action, w, h, os1, os2, os3, date)
values ('Шайба',?,?,?,'shaiba.png','fileact:15/shaiba',120,220,5,8,12,?)", values ('Шайба',?,?,?,'shaiba.png','fileact:15/shaiba',120,220,5,8,12,?)",
[ [
$this->battle->info['dn_id'], $this->battle->i->dnId,
$this->battle->users[$i]['x'], $this->battle->users[$i]['x'],
$this->battle->users[$i]['y'], $this->battle->users[$i]['y'],
"{use:'takeit',rt1:69,rl1:-47,rt2:74,rl2:126,rt3:76,rl3:140,rt4:80,rl4:150}", "{use:'takeit',rt1:69,rl1:-47,rt2:74,rl2:126,rt3:76,rl3:140,rt4:80,rl4:150}",
@ -1651,7 +1649,7 @@ class Finish
$reviveRoomName = $this->battle->users[$i]['room'] == 370 ? 'начале лабиринта' : "комнате «{$roomName}»"; $reviveRoomName = $this->battle->users[$i]['room'] == 370 ? 'начале лабиринта' : "комнате «{$roomName}»";
$rtxt = "<strong>{$this->battle->users[$i]['login']}</strong> трагически погиб$la и находится в $reviveRoomName"; $rtxt = "<strong>{$this->battle->users[$i]['login']}</strong> трагически погиб$la и находится в $reviveRoomName";
} elseif ($this->battle->info['dungeon'] == 102) { } elseif ($this->battle->i->dungeon == 102) {
$nld = ''; $nld = '';
$lab = Db::getRow('select id, users from laba_now where id = ?', [$this->battle->users[$i]['id']]); $lab = Db::getRow('select id, users from laba_now where id = ?', [$this->battle->users[$i]['id']]);
@ -1689,14 +1687,14 @@ class Finish
} else { } else {
$tinf = mysql_fetch_array( $tinf = mysql_fetch_array(
mysql_query( mysql_query(
'SELECT `uid` FROM `dungeon_now` WHERE `id` = "' . $this->battle->info['dn_id'] . '" LIMIT 1' 'SELECT `uid` FROM `dungeon_now` WHERE `id` = "' . $this->battle->i->dnId . '" LIMIT 1'
) )
); );
$nld = ''; $nld = '';
if ($tinf['uid'] == $this->battle->users[$i]['id']) { if ($tinf['uid'] == $this->battle->users[$i]['id']) {
$tinf = mysql_fetch_array( $tinf = mysql_fetch_array(
mysql_query( mysql_query(
'SELECT `id` FROM `stats` WHERE `dnow` = "' . $this->battle->info['dn_id'] . '" AND `hpNow` >= 1 LIMIT 1' 'SELECT `id` FROM `stats` WHERE `dnow` = "' . $this->battle->i->dnId . '" AND `hpNow` >= 1 LIMIT 1'
) )
); );
if (isset($tinf['id'])) { if (isset($tinf['id'])) {
@ -1707,7 +1705,7 @@ class Finish
); );
$nld .= ', новым лидером становится &quot;' . $tinf['login'] . '&quot;'; $nld .= ', новым лидером становится &quot;' . $tinf['login'] . '&quot;';
mysql_query( mysql_query(
'UPDATE `dungeon_now` SET `uid` = "' . $tinf['id'] . '" WHERE `id` = "' . $this->battle->info['dn_id'] . '" LIMIT 1' 'UPDATE `dungeon_now` SET `uid` = "' . $tinf['id'] . '" WHERE `id` = "' . $this->battle->i->dnId . '" LIMIT 1'
); );
} }
} }
@ -1733,7 +1731,7 @@ class Finish
} }
} }
if (!empty($rtxt)) { if (!empty($rtxt)) {
$cmsg->setDn($this->battle->info['dn_id']); $cmsg->setDn($this->battle->i->dnId);
$cmsg->setText($rtxt); $cmsg->setText($rtxt);
$cmsg->setTypeTime(1); $cmsg->setTypeTime(1);
$chat->sendMsg($cmsg); $chat->sendMsg($cmsg);

View File

@ -0,0 +1,208 @@
<?php
namespace Battle;
use Core\Db;
class Info
{
public readonly int $id;
public readonly string $city;
public readonly int $timeStart;
public readonly int $testFinish;
public readonly string $players;
public readonly int $timeout;
public readonly int $type;
public readonly int $status;
public readonly int $kulak;
public readonly int $invis;
public readonly int $noinc;
public readonly int $travmchance;
public readonly int $typebattle;
private float $addexp;
public readonly float $money;
public readonly float $money3;
public readonly int $timeover;
private int $teamwin;
public readonly string $dungeon;
public readonly int $razdel;
public readonly int $dnId;
public readonly int $x;
public readonly int $y;
public readonly string $fdate;
public readonly int $izlom;
public readonly int $izlomlvl;
private int $izlomround;
private int $start1;
private int $start2;
public readonly int $izlomroundsee;
public readonly int $izlomobr;
public readonly int $izlomobrnow;
public readonly int $turnir;
public readonly int $inturnir;
public readonly int $clone;
private int $playersC;
private int $playersCC;
private int $playersCC2;
public readonly int $fastfight;
public readonly int $nobot;
public readonly int $kingfight;
public readonly int $arand;
public readonly int $noatack;
public readonly int $noeff;
public readonly int $smert;
public readonly int $noart;
public readonly int $zarad;
public readonly int $priz;
public readonly int $otmorozok;
public readonly int $otmorozokUse;
public readonly int $hod;
public readonly int $clan1;
public readonly int $clan2;
public function getAddexp(): float
{
return $this->addexp;
}
public function getTeamwin(): int
{
return $this->teamwin;
}
public function getIzlomround(): int
{
return $this->izlomround;
}
public function getStart1(): int
{
return $this->start1;
}
public function getStart2(): int
{
return $this->start2;
}
public function getPlayersC(): int
{
return $this->playersC;
}
public function getPlayersCC(): int
{
return $this->playersCC;
}
public function getPlayersCC2(): int
{
return $this->playersCC2;
}
/**
* Иноформация о поединке.
* @param int $battleId
*/
public function __construct(int $battleId)
{
$b = Db::getRow('select * from battle where id = ?', [$battleId]);
if (!$b) {
return;
}
$this->id = $b['id'];
$this->city = $b['city'];
$this->timeStart = $b['time_start'];
$this->testFinish = $b['testfinish'];
$this->players = $b['players'];
$this->timeout = $b['timeout'];
$this->type = $b['type'];
$this->status = $b['status'];
$this->kulak = $b['kulak'];
$this->invis = $b['invis'];
$this->noinc = $b['noinc'];
$this->travmchance = $b['travmChance'];
$this->typebattle = $b['typeBattle'];
$this->addexp = $b['addExp'];
$this->money = $b['money'];
$this->money3 = $b['money3'];
$this->timeover = $b['time_over'];
$this->teamwin = $b['team_win'];
$this->dungeon = $b['dungeon'];
$this->razdel = $b['razdel'];
$this->dnId = $b['dn_id'];
$this->x = $b['x'];
$this->y = $b['y'];
$this->fdate = $b['fDate'];
$this->izlom = $b['izlom'];
$this->izlomlvl = $b['izlomLvl'];
$this->izlomround = $b['izlomRound'];
$this->start1 = $b['start1'];
$this->start2 = $b['start2'];
$this->izlomroundsee = $b['izlomRoundSee'];
$this->izlomobr = $b['izlomObr'];
$this->izlomobrnow = $b['izlomObrNow'];
$this->turnir = $b['turnir'];
$this->inturnir = $b['inTurnir'];
$this->clone = $b['clone'];
$this->playersC = $b['players_c'];
$this->fastfight = $b['fastfight'];
$this->nobot = $b['nobot'];
$this->kingfight = $b['kingfight'];
$this->arand = $b['arand'];
$this->noatack = $b['noatack'];
$this->noeff = $b['noeff'];
$this->smert = $b['smert'];
$this->noart = $b['noart'];
$this->zarad = $b['zarad'];
$this->priz = $b['priz'];
$this->otmorozok = $b['otmorozok'];
$this->otmorozokUse = $b['otmorozok_use'];
$this->hod = $b['hod'];
$this->clan1 = $b['clan1'];
$this->clan2 = $b['clan2'];
}
/**
* Ничья
* @return void
*/
public function setDraw(): void
{
$this->playersCC = 0;
$this->playersCC2 = 0;
}
public function setTeamWin(int $team = 0): void
{
$this->teamwin = $team;
}
public function modifyAddExp(int $value): void
{
$this->addexp += $value;
}
public function setStart1(): void
{
$this->start1 = time();
}
public function setStart2(): void
{
$this->start2 = time();
}
public function setIzlomround(int $izlomround): void
{
$this->izlomround = $izlomround;
}
public function setPlayerC(): void
{
$this->playersC =
Db::getValue("select count(id) from users where login not like '%(зверь%' and battle = ?", [$this->id]);
}
}

View File

@ -172,7 +172,7 @@ class Log
self::add( self::add(
[ [
'battle' => $battle->info['id'], 'battle' => $battle->i->id,
'id_hod' => $battle->hodID, 'id_hod' => $battle->hodID,
'text' => "{tm1} <i>Комментатор: $randomcomment</i>", 'text' => "{tm1} <i>Комментатор: $randomcomment</i>",
'vars' => 'time1=' . time(), 'vars' => 'time1=' . time(),

View File

@ -0,0 +1,29 @@
<?php
namespace DTO;
readonly class BattlePriem
{
/**
* @param int $act 1 - когда персонаж получает повреждение
* 2 - когда персонаж наносит удар
*
* @param int $typeOf 1 - уворот
* 2 - крит
* 3 - атака
* 4 - защита
* 5 - прочее
* @param int|null $typeSec
* @param int|null $moment
* @param int|null $momentEnd
*/
public function __construct(
public int $act,
public int $typeOf,
public ?int $typeSec = null,
public ?int $moment = null,
public ?int $momentEnd = null,
) {}
}

View File

@ -685,7 +685,7 @@ class Magic
$u->error = 'Неудалось использовать на мертвых...'; $u->error = 'Неудалось использовать на мертвых...';
} elseif ($u->info['hpNow'] < 1) { } elseif ($u->info['hpNow'] < 1) {
$u->error = 'Неудалось использовать, вы погибли...'; $u->error = 'Неудалось использовать, вы погибли...';
} elseif ($btl->info['noeff'] > 0) { } elseif ($btl->i->noeff > 0) {
$u->error = 'Запрет на использования свитков восстановления'; $u->error = 'Запрет на использования свитков восстановления';
} elseif ($po['magic_hpNow'] < 1 && $po['magic_mpNow'] < 1) { } elseif ($po['magic_hpNow'] < 1 && $po['magic_mpNow'] < 1) {
$u->error = 'Неудалось использовать, в магическом свитке нет магии...'; $u->error = 'Неудалось использовать, в магическом свитке нет магии...';
@ -845,7 +845,7 @@ class Magic
); );
if (isset($bu['id'])) { if (isset($bu['id'])) {
$u->error = 'Нельзя использовать свиток каждый ход...'; $u->error = 'Нельзя использовать свиток каждый ход...';
} elseif ($btl->info['noeff'] > 0) { } elseif ($btl->i->noeff > 0) {
$u->error = 'Запрет на использования свитков восстановления'; $u->error = 'Запрет на использования свитков восстановления';
} elseif (($usr['battle'] == $u->info['battle'] && ($u->info['team'] == $usr['team'] && ($po['magic_hpNow'] > 0 || $po['magic_mpNow'] > 0))) && $usr['hpNow'] > 1 && $u->info['hpNow'] >= 1) { } elseif (($usr['battle'] == $u->info['battle'] && ($u->info['team'] == $usr['team'] && ($po['magic_hpNow'] > 0 || $po['magic_mpNow'] > 0))) && $usr['hpNow'] > 1 && $u->info['hpNow'] >= 1) {
//кастуем //кастуем

View File

@ -1,39 +1,43 @@
<?php <?php
if(!defined('GAME')) if (!defined('GAME')) {
{ die();
die();
} }
$bu = mysql_fetch_array(mysql_query('SELECT * FROM `tactic` WHERE `btl` = "'.$u->info['battle'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1')); $bu = mysql_fetch_array(mysql_query('SELECT * FROM `tactic` WHERE `btl` = "' . $u->info['battle'] . '" AND `uid` = "' . $u->info['id'] . '" LIMIT 1'));
if($u->info['battle']==0) { if ($u->info['battle'] == 0) {
$u->error = 'Использовать можно только в поединке'; $u->error = 'Использовать можно только в поединке';
}elseif(isset($bu['id'])) { } elseif (isset($bu['id'])) {
$u->error = 'Нельзя использовать свиток каждый ход...'; $u->error = 'Нельзя использовать свиток каждый ход...';
}elseif( isset($btl->info['id']) ) { } elseif (isset($btl->i->id)) {
// //
mysql_query('INSERT INTO `tactic` (`btl`,`uid`,`time`,`item_id`,`var`,`hod`) VALUES ("'.$u->info['battle'].'","'.$u->info['id'].'","'.time().'","'.$itm['item_id'].'","'.$itm['name'].'","1")'); mysql_query(
// 'INSERT INTO `tactic` (`btl`,`uid`,`time`,`item_id`,`var`,`hod`) VALUES ("' . $u->info['battle'] . '","' . $u->info['id'] . '","' . time(
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'], ) . '","' . $itm['item_id'] . '","' . $itm['name'] . '","1")'
'', );
'{tm1} {u1} использовал заклятие &quot;<b>'.$itm['name'].'</b>&quot;.', //
($btl->hodID) $btl->priemAddLog(
); $id, 1, 2, $u->info['id'], $u->info['enemy'],
$btl->users[$btl->uids[$u->info['id']]]['tactic1'] += 1; '',
$btl->users[$btl->uids[$u->info['id']]]['tactic2'] += 1; '{tm1} {u1} использовал заклятие &quot;<b>' . $itm['name'] . '</b>&quot;.',
$btl->users[$btl->uids[$u->info['id']]]['tactic3'] += 1; ($btl->hodID)
$btl->users[$btl->uids[$u->info['id']]]['tactic4'] += 1; );
$btl->users[$btl->uids[$u->info['id']]]['tactic5'] += 1; $btl->users[$btl->uids[$u->info['id']]]['tactic1'] += 1;
$btl->users[$btl->uids[$u->info['id']]]['tactic2'] += 1;
mysql_query('UPDATE `stats` SET $btl->users[$btl->uids[$u->info['id']]]['tactic3'] += 1;
`tactic1` = "'.$btl->users[$btl->uids[$u->info['id']]]['tactic1'].'", $btl->users[$btl->uids[$u->info['id']]]['tactic4'] += 1;
`tactic2` = "'.$btl->users[$btl->uids[$u->info['id']]]['tactic2'].'", $btl->users[$btl->uids[$u->info['id']]]['tactic5'] += 1;
`tactic3` = "'.$btl->users[$btl->uids[$u->info['id']]]['tactic3'].'",
`tactic4` = "'.$btl->users[$btl->uids[$u->info['id']]]['tactic4'].'", mysql_query(
`tactic5` = "'.$btl->users[$btl->uids[$u->info['id']]]['tactic5'].'" 'UPDATE `stats` SET
WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); `tactic1` = "' . $btl->users[$btl->uids[$u->info['id']]]['tactic1'] . '",
// `tactic2` = "' . $btl->users[$btl->uids[$u->info['id']]]['tactic2'] . '",
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1'); `tactic3` = "' . $btl->users[$btl->uids[$u->info['id']]]['tactic3'] . '",
$u->error = '‚ы использовали “никальную тактику +1'; `tactic4` = "' . $btl->users[$btl->uids[$u->info['id']]]['tactic4'] . '",
`tactic5` = "' . $btl->users[$btl->uids[$u->info['id']]]['tactic5'] . '"
WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
);
//
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
$u->error = '‚ы использовали “никальную тактику +1';
} }
?>

View File

@ -18,7 +18,7 @@ if( $itm['magic_inci'] == 'dispell' ) {
//Действие при клике //Действие при клике
if( isset($btl->info['id']) ) { if( isset($btl->i->id) ) {
$btl->priemAddLog( $id, 1, 2, $usr['id'], $u->info['enemy'], $btl->priemAddLog( $id, 1, 2, $usr['id'], $u->info['enemy'],
'', '',
'{tm1} {u1} использовал заклятие &quot;<b>'.$itm['name'].'</b>&quot;.', '{tm1} {u1} использовал заклятие &quot;<b>'.$itm['name'].'</b>&quot;.',
@ -56,7 +56,7 @@ if( $itm['magic_inci'] == 'dispell' ) {
$pvr['pl'] = mysql_fetch_array($pvr['sp']); $pvr['pl'] = mysql_fetch_array($pvr['sp']);
if(!isset($pvr['pl']['id'])) { if(!isset($pvr['pl']['id'])) {
$u->error = '<font color=red><b>Не удалось использовать &quot;'.$itm['name'].'&quot;, на вас нет проклятий!</b></font>'; $u->error = '<font color=red><b>Не удалось использовать &quot;'.$itm['name'].'&quot;, на вас нет проклятий!</b></font>';
}elseif( isset($btl->info['id']) ) { }elseif( isset($btl->i->id) ) {
$pvr['pl']['priem'] = mysql_fetch_array(mysql_query('SELECT * FROM `priems` WHERE `id` = "'.$pvr['pl']['v2'].'" LIMIT 1')); $pvr['pl']['priem'] = mysql_fetch_array(mysql_query('SELECT * FROM `priems` WHERE `id` = "'.$pvr['pl']['v2'].'" LIMIT 1'));
//if( isset($pvr['pl']['priem']) ) { //if( isset($pvr['pl']['priem']) ) {
// $btl->delPriem($pvr['pl'],$btl->users[$btl->uids[$u->info['id']]],100); // $btl->delPriem($pvr['pl'],$btl->users[$btl->uids[$u->info['id']]],100);

View File

@ -13,9 +13,9 @@ if( $itm['magic_inci'] == 'esfer' ) {
//Действие при клике //Действие при клике
if( $u->stats['hpNow'] < 1 ) { if( $u->stats['hpNow'] < 1 ) {
$u->error = '<font color=red><b>Вы поглибли и не можете воспользоваться свитком...</b></font>'; $u->error = '<font color=red><b>Вы поглибли и не можете воспользоваться свитком...</b></font>';
}elseif( isset($btl->info['id']) ) { }elseif( isset($btl->i->id) ) {
if( $btl->info['noinc'] > 0 ) { if( $btl->i->noinc > 0 ) {
$u->error = '<font color=red><b>Бой был изолирован ранее</b></font>'; $u->error = '<font color=red><b>Бой был изолирован ранее</b></font>';
}else{ }else{
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'], $btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],
@ -24,7 +24,7 @@ if( $itm['magic_inci'] == 'esfer' ) {
($btl->hodID) ($btl->hodID)
); );
$u->error = '<font color=red><b>Мерцающая сфера отделила всех вас от остального мира... </b></font>'; $u->error = '<font color=red><b>Мерцающая сфера отделила всех вас от остального мира... </b></font>';
mysql_query('UPDATE `battle` SET `noinc` = 1 WHERE `id` = '.$btl->info['id'].' LIMIT 1'); mysql_query('UPDATE `battle` SET `noinc` = 1 WHERE `id` = '.$btl->i->id.' LIMIT 1');
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
} }

View File

@ -11,19 +11,19 @@ if( $itm['magic_inci'] == 'exitbtl' ) {
$pvr = array(); $pvr = array();
//Действие при клике //Действие при клике
if( isset($btl->info['id']) ) { if( isset($btl->i->id) ) {
if( $btl->info['dn_id'] > 0 || $btl->info['izlom'] > 0 ) { if( $btl->i->dnId > 0 || $btl->i->izlom > 0 ) {
$u->error = '<font color=red><b>Магия не действует в пещерах и подобных локациях...</b></font>'; $u->error = '<font color=red><b>Магия не действует в пещерах и подобных локациях...</b></font>';
}elseif( $btl->info['noinc'] > 0 ) { }elseif( $btl->i->noinc > 0 ) {
$u->error = '<font color=red><b>Бой изолирован и вы не можете его покинуть</b></font>'; $u->error = '<font color=red><b>Бой изолирован и вы не можете его покинуть</b></font>';
}elseif( $btl->info['clone'] > 0 ) { }elseif( $btl->i->clone > 0 ) {
$u->error = '<font color=red><b>Невозможно покинуть поединок с клоном</b></font>'; $u->error = '<font color=red><b>Невозможно покинуть поединок с клоном</b></font>';
}elseif( $u->info['hpNow'] < 1 ) { }elseif( $u->info['hpNow'] < 1 ) {
$u->error = '<font color=red><b>Вы умерли и не можете покинуть бой</b></font>'; $u->error = '<font color=red><b>Вы умерли и не можете покинуть бой</b></font>';
}elseif( $btl->info['type'] == 500 || $btl->info['type'] == 33){ }elseif( $btl->i->type == 500 || $btl->i->type == 33){
$u->error = '<font color=red><b>Невозможно покинуть этот поединок!</b></font>'; $u->error = '<font color=red><b>Невозможно покинуть этот поединок!</b></font>';
}elseif( $btl->info['smert'] == 1){ }elseif( $btl->i->smert == 1){
$u->error = '<font color=red><b>Невозможно покинуть этот поединок!</b></font>'; $u->error = '<font color=red><b>Невозможно покинуть этот поединок!</b></font>';
}else{ }else{
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'], $btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],
@ -33,7 +33,7 @@ if( $itm['magic_inci'] == 'exitbtl' ) {
); );
$u->error = '<font color=red><b>Вы сбежали с поля боя и потеряли всю энергию...</b></font>'; $u->error = '<font color=red><b>Вы сбежали с поля боя и потеряли всю энергию...</b></font>';
// //
mysql_query('INSERT INTO `battle_last` (`login`,`city`,`battle_id`,`uid`,`time`,`team`,`lvl`,`align`,`clan`,`exp`,`bot`,`money`,`money2`,`money3`) VALUES ("'.$u->info['login'].'","'.$u->info['city'].'","'.$btl->info['id'].'","'.$u->info['id'].'","'.time().'","'.$btl->info['team_win'].'","'.$u->info['lvl'].'","'.$u->info['align'].'","'.$u->info['clan'].'","0","0","'.$u->info['money'].'","'.$u->info['money2'].'","'.$u->info['money'].'")'); mysql_query('INSERT INTO `battle_last` (`login`,`city`,`battle_id`,`uid`,`time`,`team`,`lvl`,`align`,`clan`,`exp`,`bot`,`money`,`money2`,`money3`) VALUES ("'.$u->info['login'].'","'.$u->info['city'].'","'.$btl->i->id.'","'.$u->info['id'].'","'.time().'","'.$btl->i->getTeamwin().'","'.$u->info['lvl'].'","'.$u->info['align'].'","'.$u->info['clan'].'","0","0","'.$u->info['money'].'","'.$u->info['money2'].'","'.$u->info['money'].'")');
mysql_query('UPDATE `stats` SET `battle_yron` = 0, `battle_exp` = 0,`tactic1` = 0 , `tactic2` = 0 , `tactic3` = 0 , `tactic4` = 0 , `tactic5` = 0 , `tactic6` = 0 , `tactic7` = -1 , `last_pr` = 0 , `last_hp` = -1 , `team` = 0 WHERE `id` = '.$u->info['id'].' LIMIT 1'); mysql_query('UPDATE `stats` SET `battle_yron` = 0, `battle_exp` = 0,`tactic1` = 0 , `tactic2` = 0 , `tactic3` = 0 , `tactic4` = 0 , `tactic5` = 0 , `tactic6` = 0 , `tactic7` = -1 , `last_pr` = 0 , `last_hp` = -1 , `team` = 0 WHERE `id` = '.$u->info['id'].' LIMIT 1');
mysql_query('UPDATE `users` SET `battle` = "0", `lose` = `lose` + 1 WHERE `id` = '.$u->info['id'].' LIMIT 1'); mysql_query('UPDATE `users` SET `battle` = "0", `lose` = `lose` + 1 WHERE `id` = '.$u->info['id'].' LIMIT 1');
// //
@ -41,7 +41,7 @@ if( $itm['magic_inci'] == 'exitbtl' ) {
// //
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1'); mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
// //
mysql_query('INSERT INTO `battle_last` (`login`,`city`,`battle_id`,`uid`,`time`,`team`,`lvl`,`align`,`clan`,`exp`,`bot`,`money`,`money2`,`money3`) VALUES ('.$u->info['login'].','.$u->info['city'].','.$btl->info['id'].','.$u->info['id'].','.time().','.$btl->info['team_win'].','.$u->info['lvl'].','.$u->info['align'].','.$u->info['clan'].',0,0,'.$u->info['money'].','.$u->info['money2'].','.$u->info['money'].')'); mysql_query('INSERT INTO `battle_last` (`login`,`city`,`battle_id`,`uid`,`time`,`team`,`lvl`,`align`,`clan`,`exp`,`bot`,`money`,`money2`,`money3`) VALUES ('.$u->info['login'].','.$u->info['city'].','.$btl->i->id.','.$u->info['id'].','.time().','.$btl->i->getTeamwin().','.$u->info['lvl'].','.$u->info['align'].','.$u->info['clan'].',0,0,'.$u->info['money'].','.$u->info['money2'].','.$u->info['money'].')');
mysql_query('DELETE FROM `battle_act` WHERE `uid1` = "'.$u->info['id'].'" OR `uid2` = "'.$u->info['id'].'"'); mysql_query('DELETE FROM `battle_act` WHERE `uid1` = "'.$u->info['id'].'" OR `uid2` = "'.$u->info['id'].'"');
mysql_query('UPDATE `battle_users` SET `finish` = 1 WHERE `uid` = "'.$u->info['id'].'"'); mysql_query('UPDATE `battle_users` SET `finish` = 1 WHERE `uid` = "'.$u->info['id'].'"');
mysql_query('UPDATE `stats` SET `hpNow`= 1, `mpNow` = 1,`priems_z` = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); mysql_query('UPDATE `stats` SET `hpNow`= 1, `mpNow` = 1,`priems_z` = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');

View File

@ -19,7 +19,7 @@ if( $itm['magic_inci'] == 'undie' ) {
$u->error = '<font color=red><b>Вы поглибли и не можете воспользоваться свитком...</b></font>'; $u->error = '<font color=red><b>Вы поглибли и не можете воспользоваться свитком...</b></font>';
}elseif( $u->info['tactic7'] < $pvr['trs7'] ) { }elseif( $u->info['tactic7'] < $pvr['trs7'] ) {
$u->error = '<font color=red><b>Недостаточно духа, необходимо '.$pvr['trs7'].'...</b></font>'; $u->error = '<font color=red><b>Недостаточно духа, необходимо '.$pvr['trs7'].'...</b></font>';
}elseif( isset($btl->info['id']) ) { }elseif( isset($btl->i->id) ) {
/* /*
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'], $btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],
'', '',

View File

@ -16,7 +16,7 @@ if( $itm['magic_inci'] == 'yarostzvezd' ) {
$u->error = '<font color=red><b>Вы поглибли и не можете воспользоваться свитком...</b></font>'; $u->error = '<font color=red><b>Вы поглибли и не можете воспользоваться свитком...</b></font>';
}elseif( $u->info['tactic7'] < $pvr['trs7'] ) { }elseif( $u->info['tactic7'] < $pvr['trs7'] ) {
$u->error = '<font color=red><b>Недостаточно духа, необходимо '.$pvr['trs7'].'...</b></font>'; $u->error = '<font color=red><b>Недостаточно духа, необходимо '.$pvr['trs7'].'...</b></font>';
}elseif( isset($btl->info['id']) ) { }elseif( isset($btl->i->id) ) {
/* /*
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'], $btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],
'', '',

View File

@ -4,6 +4,7 @@ use Core\Db;
use DarksLight2\Training\TrainingManager; use DarksLight2\Training\TrainingManager;
use Helper\Conversion; use Helper\Conversion;
use Helper\Math; use Helper\Math;
use User\Effects;
/* /*
- доделать добавление приема в $btl->users[]['eff'] после использования, в противном случаи некотрые приемы используются через 1 ход - доделать добавление приема в $btl->users[]['eff'] после использования, в противном случаи некотрые приемы используются через 1 ход
@ -114,7 +115,7 @@ class Priems
$return_main = true; $return_main = true;
$ue = Db::getRow( $ue = Db::getRow(
'select * from users left join stats on (users.id = stats.id) where users.id = ? and battle = ? and hpnow > 0', 'select * from users left join stats on (users.id = stats.id) where users.id = ? and battle = ? and hpnow > 0',
[$eff['uid'], $btl->info['id']] [$eff['uid'], $btl->i->id]
); );
if (!empty($pr['file'])) { if (!empty($pr['file'])) {
@ -249,7 +250,7 @@ class Priems
'||login2=' . $btl->users[$btl->uids[$uen]]['login']; '||login2=' . $btl->users[$btl->uids[$uen]]['login'];
$mas1 = [ $mas1 = [
'time' => time(), 'time' => time(),
'battle' => $btl->info['id'], 'battle' => $btl->i->id,
'id_hod' => ($btl->hodID + 1), 'id_hod' => ($btl->hodID + 1),
'text' => '', 'text' => '',
'vars' => $vLog, 'vars' => $vLog,
@ -349,7 +350,7 @@ class Priems
$pm[2] = $s2['antm11']; $pm[2] = $s2['antm11'];
} }
if (isset($btl->info['id'])) { if (isset($btl->i->id)) {
$pm[3] = $btl->zmgo($s2['zm' . $t]); $pm[3] = $btl->zmgo($s2['zm' . $t]);
$pm[3] = round($pm[3]); $pm[3] = round($pm[3]);
} }
@ -947,13 +948,13 @@ class Priems
} }
// тяж травма для кровавых // тяж травма для кровавых
if ($btl->info['type'] == 99 and $hp2 == 0 and !$trawm_off) { if ($btl->i->type == 99 and $hp2 == 0 and !$trawm_off) {
//$eff['user_use'] //$eff['user_use']
//$sp1 = mysql_query('SELECT `e`.* FROM `eff_users` AS `e` WHERE `e`.`uid` = "'.$uen.'" AND `e`.`id_eff` = "22" AND `e`.`delete` = "0" AND `e`.`v1` = "priem" LIMIT 25'); //$sp1 = mysql_query('SELECT `e`.* FROM `eff_users` AS `e` WHERE `e`.`uid` = "'.$uen.'" AND `e`.`id_eff` = "22" AND `e`.`delete` = "0" AND `e`.`v1` = "priem" LIMIT 25');
$trawm_off = true; $trawm_off = true;
//$at[2][$i]['ttravm']='получил <font color=red><b>Тяжелую травму</b></font>.'; //$at[2][$i]['ttravm']='получил <font color=red><b>Тяжелую травму</b></font>.';
$btl->addTravm($btl->users[$btl->uids[$uen]]['id'], 3, $btl->users[$btl->uids[$eff['user_use']]]['level']); Effects::addInjury($btl->users[$btl->uids[$uen]]['id'], 3, $btl->users[$btl->uids[$eff['user_use']]]['level']);
} }
$upd = mysql_query( $upd = mysql_query(
'UPDATE `stats` SET `hpNow` = ' . $hp2 . ',`last_hp` = "' . $btl->stats[$btl->uids[$uen]]['last_hp'] . '" WHERE `id` = "' . $uen . '" LIMIT 1' 'UPDATE `stats` SET `hpNow` = ' . $hp2 . ',`last_hp` = "' . $btl->stats[$btl->uids[$uen]]['last_hp'] . '" WHERE `id` = "' . $uen . '" LIMIT 1'
@ -964,7 +965,7 @@ class Priems
) . '||s1=' . $btl->users[$btl->uids[$usu]]['sex'] . '||t1=' . $btl->users[$btl->uids[$usu]]['team'] . '||login1=' . $btl->users[$btl->uids[$usu]]['login'] . '||s2=' . $btl->users[$btl->uids[$uen]]['sex'] . '||t2=' . $btl->users[$btl->uids[$uen]]['team'] . '||login2=' . $btl->users[$btl->uids[$uen]]['login'] . ''; ) . '||s1=' . $btl->users[$btl->uids[$usu]]['sex'] . '||t1=' . $btl->users[$btl->uids[$usu]]['team'] . '||login1=' . $btl->users[$btl->uids[$usu]]['login'] . '||s2=' . $btl->users[$btl->uids[$uen]]['sex'] . '||t2=' . $btl->users[$btl->uids[$uen]]['team'] . '||login2=' . $btl->users[$btl->uids[$uen]]['login'] . '';
$mas1 = [ $mas1 = [
'time' => time(), 'time' => time(),
'battle' => $btl->info['id'], 'battle' => $btl->i->id,
'id_hod' => ($btl->hodID + 1), 'id_hod' => ($btl->hodID + 1),
'text' => '', 'text' => '',
'vars' => $vLog, 'vars' => $vLog,
@ -1088,7 +1089,7 @@ class Priems
$u = $this->u; // Для присоедиянемых файлов. $u = $this->u; // Для присоедиянемых файлов.
if ($id == 100500 && $this->u->info['animal'] > 0) { if ($id == 100500 && $this->u->info['animal'] > 0) {
$use_lst = $this->u->testAction( $use_lst = $this->u->testAction(
'`uid` = "' . $this->u->info['id'] . '" AND `vars` = "animal_use' . $btl->info['id'] . '" LIMIT 1', '`uid` = "' . $this->u->info['id'] . '" AND `vars` = "animal_use' . $btl->i->id . '" LIMIT 1',
1 1
); );
if (!isset($use_lst['id'])) { if (!isset($use_lst['id'])) {
@ -1117,7 +1118,7 @@ class Priems
'SELECT `id` FROM `test_bot` WHERE `login` = "' . $tp[$a['type']] . ' [' . $a['level'] . ']" LIMIT 1' 'SELECT `id` FROM `test_bot` WHERE `login` = "' . $tp[$a['type']] . ' [' . $a['level'] . ']" LIMIT 1'
) )
); );
if (isset($id['id']) && $btl->info['type'] != 500) { if (isset($id['id']) && $btl->i->type != 500) {
$b = $this->u->addNewbot($id['id'], null, null); $b = $this->u->addNewbot($id['id'], null, null);
if ($b > 0 && $b) { if ($b > 0 && $b) {
$a['eda'] -= 4; $a['eda'] -= 4;
@ -1128,7 +1129,7 @@ class Priems
$vLog = 'time1=' . time() . '||s1=' . $this->u->info['sex'] . '||t1=' . $this->u->info['team'] . '||login1=' . $this->u->info['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $this->u->info['sex'] . '||t1=' . $this->u->info['team'] . '||login1=' . $this->u->info['login'] . '';
$mas1 = [ $mas1 = [
'time' => time(), 'time' => time(),
'battle' => $btl->info['id'], 'battle' => $btl->i->id,
'id_hod' => $btl->hodID, 'id_hod' => $btl->hodID,
'vars' => $vLog, 'vars' => $vLog,
'zona1' => '', 'zona1' => '',
@ -1143,7 +1144,7 @@ class Priems
$btl->add_log($mas1); $btl->add_log($mas1);
mysql_query( mysql_query(
'UPDATE `users` SET `login` = "' . $a['name'] . ' (зверь ' . $this->u->info['login'] . ')",`obraz` = "' . $a['obraz'] . '.gif",`battle` = "' . $btl->info['id'] . '" WHERE `id` = "' . $b['id'] . '" LIMIT 1' 'UPDATE `users` SET `login` = "' . $a['name'] . ' (зверь ' . $this->u->info['login'] . ')",`obraz` = "' . $a['obraz'] . '.gif",`battle` = "' . $btl->i->id . '" WHERE `id` = "' . $b['id'] . '" LIMIT 1'
); );
mysql_query( mysql_query(
'UPDATE `stats` SET `team` = "' . $this->u->info['team'] . '" WHERE `id` = "' . $b['id'] . '" LIMIT 1' 'UPDATE `stats` SET `team` = "' . $this->u->info['team'] . '" WHERE `id` = "' . $b['id'] . '" LIMIT 1'
@ -1151,7 +1152,7 @@ class Priems
mysql_query( mysql_query(
'UPDATE `users_animal` SET `eda` = "' . $a['eda'] . '" WHERE `id` = "' . $a['id'] . '" LIMIT 1' 'UPDATE `users_animal` SET `eda` = "' . $a['eda'] . '" WHERE `id` = "' . $a['id'] . '" LIMIT 1'
); );
$this->u->addAction(time(), 'animal_use' . $btl->info['id'], $a['level']); $this->u->addAction(time(), 'animal_use' . $btl->i->id, $a['level']);
} else { } else {
echo 'Не удалось выпустить зверя...'; echo 'Не удалось выпустить зверя...';
} }
@ -1212,7 +1213,7 @@ class Priems
( (
`u`.`inUser` > 0 OR `u`.`inUser` > 0 OR
( (
`u`.`battle`="' . $btl->info['id'] . '" AND `u`.`battle`="' . $btl->i->id . '" AND
`st`.`hpNow` > 0 `st`.`hpNow` > 0
) )
) ORDER BY `u`.`id` DESC LIMIT 1' ) ORDER BY `u`.`id` DESC LIMIT 1'
@ -1233,7 +1234,7 @@ class Priems
FROM `users` AS `u` FROM `users` AS `u`
LEFT JOIN `stats` AS `st` ON (`u`.`id`=`st`.`id`) LEFT JOIN `stats` AS `st` ON (`u`.`id`=`st`.`id`)
WHERE WHERE
`u`.`battle`="' . $btl->info['id'] . '" AND `u`.`battle`="' . $btl->i->id . '" AND
`st`.`hpNow` > 0) AND `st`.`hpNow` > 0) AND
`u`.`id` = "' . $this->ue['inUser'] . '" ORDER BY `u`.`id` ASC LIMIT 1' `u`.`id` = "' . $this->ue['inUser'] . '" ORDER BY `u`.`id` ASC LIMIT 1'
) )
@ -1256,7 +1257,7 @@ class Priems
} else { } else {
$ga = mysql_fetch_assoc( $ga = mysql_fetch_assoc(
mysql_query( mysql_query(
'SELECT * FROM `battle_act` WHERE `battle` = "' . $btl->info['id'] . '" AND `uid1` = "' . $this->u->info['id'] . '" AND `uid2` = "' . $this->u->info['enemy'] . '" LIMIT 1' 'SELECT * FROM `battle_act` WHERE `battle` = "' . $btl->i->id . '" AND `uid1` = "' . $this->u->info['id'] . '" AND `uid2` = "' . $this->u->info['enemy'] . '" LIMIT 1'
) )
); );
if (($this->u->info['enemy'] == 0 || isset($ga['id'])) && ($pl['tr_hod'] > 0 || $pl['trUser'] > 0)) { if (($this->u->info['enemy'] == 0 || isset($ga['id'])) && ($pl['tr_hod'] > 0 || $pl['trUser'] > 0)) {
@ -1423,7 +1424,7 @@ class Priems
if ($pl['xuse'] > 0) { if ($pl['xuse'] > 0) {
$xu = $this->u->testAction( $xu = $this->u->testAction(
'`vars` = "use_priem_' . $btl->info['id'] . '_' . $this->u->info['id'] . '" AND `vals` = "' . $pl['id'] . '" LIMIT ' . $pl['xuse'], '`vars` = "use_priem_' . $btl->i->id . '_' . $this->u->info['id'] . '" AND `vals` = "' . $pl['id'] . '" LIMIT ' . $pl['xuse'],
2 2
); );
if ($xu[0] >= $pl['xuse']) { if ($xu[0] >= $pl['xuse']) {
@ -1535,7 +1536,7 @@ class Priems
//требует чтобы пользователь с кем-то разменивался (при ожидании не пропадает, но не используется) //требует чтобы пользователь с кем-то разменивался (при ожидании не пропадает, но не используется)
$ga = mysql_fetch_assoc( $ga = mysql_fetch_assoc(
mysql_query( mysql_query(
'SELECT * FROM `battle_act` WHERE `battle` = "' . $btl->info['id'] . '" AND `uid1` = "' . $this->u->info['id'] . '" AND `uid2` = "' . $btl->users[$btl->uids[$this->u->info['id']]]['enemy'] . '" LIMIT 1' 'SELECT * FROM `battle_act` WHERE `battle` = "' . $btl->i->id . '" AND `uid1` = "' . $this->u->info['id'] . '" AND `uid2` = "' . $btl->users[$btl->uids[$this->u->info['id']]]['enemy'] . '" LIMIT 1'
) )
); );
if (isset($ga['id'])) { if (isset($ga['id'])) {
@ -1960,7 +1961,7 @@ class Priems
} else { } else {
$a1 = mysql_fetch_assoc( $a1 = mysql_fetch_assoc(
mysql_query( mysql_query(
'SELECT * FROM `battle_act` WHERE `battle` = "' . $btl->info['id'] . '" AND `uid2` = "' . $this->u->info['id'] . '" AND `uid1` = "' . $this->u->info['enemy'] . '" LIMIT 1' 'SELECT * FROM `battle_act` WHERE `battle` = "' . $btl->i->id . '" AND `uid2` = "' . $this->u->info['id'] . '" AND `uid1` = "' . $this->u->info['enemy'] . '" LIMIT 1'
) )
); );
if (isset($a1['id'])) { if (isset($a1['id'])) {
@ -1976,7 +1977,7 @@ class Priems
} else { } else {
//бьем противника с пропуском хода //бьем противника с пропуском хода
mysql_query( mysql_query(
'INSERT INTO `battle_act` (`battle`,`uid1`,`uid2`,`time`,`out1`,`type`,`tpo1`) VALUES ("' . $btl->info['id'] . '","' . $this->u->info['id'] . '","' . $this->u->info['enemy'] . '","' . time( 'INSERT INTO `battle_act` (`battle`,`uid1`,`uid2`,`time`,`out1`,`type`,`tpo1`) VALUES ("' . $btl->i->id . '","' . $this->u->info['id'] . '","' . $this->u->info['enemy'] . '","' . time(
) . '","1","1","2")' ) . '","1","1","2")'
); );
} }
@ -2191,7 +2192,7 @@ class Priems
} }
if ($this->u->info['animal'] > 0 && $t == 2) { if ($this->u->info['animal'] > 0 && $t == 2) {
$use_lst = $this->u->testAction( $use_lst = $this->u->testAction(
'`uid` = "' . $this->u->info['id'] . '" AND `vars` = "animal_use' . $btl->info['id'] . '" LIMIT 1', '`uid` = "' . $this->u->info['id'] . '" AND `vars` = "animal_use' . $btl->i->id . '" LIMIT 1',
1 1
); );
if (!isset($use_lst['id'])) { if (!isset($use_lst['id'])) {
@ -2721,7 +2722,7 @@ class Priems
$x++; $x++;
} }
if ($pl['xuse'] > 0) { if ($pl['xuse'] > 0) {
$this->u->addAction(time(), 'use_priem_' . $btl->info['id'] . '_' . $this->u->info['id'], $pl['id']); $this->u->addAction(time(), 'use_priem_' . $btl->i->id . '_' . $this->u->info['id'], $pl['id']);
} }
$rt = ltrim($rt, ','); $rt = ltrim($rt, ',');
mysql_query('UPDATE `stats` SET ' . $rt . ' WHERE `id` = "' . $this->u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `stats` SET ' . $rt . ' WHERE `id` = "' . $this->u->info['id'] . '" LIMIT 1');

View File

@ -118,6 +118,37 @@ insert into eff_users
return true; return true;
} }
public static function addInjury($uid, $type, $lvl): void
{
$stat = rand(1, 3); // пока без духовности
$img = "eff_travma$type.gif";
if ($type == 1) {
$name = 'Легкая травма';
$timeEnd = rand(1, 3);// время травмы от 1.30 до 6 часов
$data = 'add_s' . $stat . '=-' . $lvl;
} elseif ($type == 2) {
$name = 'Средняя травма';
$timeEnd = rand(3, 5);// время травмы от 6 до 12 часов
$data = 'add_s' . $stat . '=-' . ($lvl * 2);
} elseif ($type == 3) {
$name = 'Тяжелая травма';
$timeEnd = rand(5, 7);// время травмы от 12 до 6 часов
$data = 'add_s' . $stat . '=-' . ($lvl * 3);
} else {
$name = 'Неизлечимая травма';
$timeEnd = 24;// время травмы от 24 часа
$data = 'add_s' . $stat . '=-' . ($lvl * 50);
}
$timeEnd *= 3600;
Db::sql(
"insert into eff_users (id_eff, uid, name, timeUse, data, img2, v1, timeace) values (4,?,?,unix_timestamp(),?,?,?,?)",
[$uid, $name, $data, $img, $type, $timeEnd]
);
self::addById($uid, 263);
}
public static function removeByEffectId(int $userId, int $effectId): void public static function removeByEffectId(int $userId, int $effectId): void
{ {
Db::sql('delete from eff_users where id_eff = ? and uid = ?', [$effectId, $userId]); Db::sql('delete from eff_users where id_eff = ? and uid = ?', [$effectId, $userId]);

View File

@ -6,7 +6,7 @@ if (!defined('GAME')) {
Прием: Оледенение [4] Прием: Оледенение [4]
*/ */
$pvr = []; $pvr = [];
if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !isset($this->info['id'])) { if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->i->id) && !isset($this->info['id'])) {
} elseif (isset($pr_used_this) && isset($pr_moment)) { } elseif (isset($pr_used_this) && isset($pr_moment)) {
//Каждый ход //Каждый ход

View File

@ -17,12 +17,12 @@ if( isset($pr_momental_this)) {
return $at; return $at;
}; };
unset( $pr_used_this ); unset( $pr_used_this );
}elseif( isset($pr_used_this) && isset($pr_moment) && isset($btl->info['id']) ) { }elseif( isset($pr_used_this) && isset($pr_moment) && isset($btl->i->id) ) {
$fx_priem = function( $id , $at , $uid, $j_id ) { $fx_priem = function( $id , $at , $uid, $j_id ) {
return $at; return $at;
}; };
unset( $pr_used_this ); unset( $pr_used_this );
}elseif(isset($btl->info['id'])) { }elseif(isset($btl->i->id)) {
//Действие при клике //Действие при клике
/* /*
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'], $btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],

View File

@ -11,14 +11,14 @@ $pvr['id'] = mysql_fetch_array(mysql_query('SELECT `id` FROM `test_bot` WHERE `l
if( isset($pvr['id']['id']) ) { if( isset($pvr['id']['id']) ) {
$pvr['bot'] = $u->addNewbot($pvr['id']['id'],NULL,NULL); $pvr['bot'] = $u->addNewbot($pvr['id']['id'],NULL,NULL);
// //
$pvr['xznm'] = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `users` WHERE `battle` = "'.$btl->info['id'].'" AND `login` LIKE "Каменный Страж%" LIMIT 1')); $pvr['xznm'] = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `users` WHERE `battle` = "'.$btl->i->id.'" AND `login` LIKE "Каменный Страж%" LIMIT 1'));
if($pvr['xznm'][0] > 0) { if($pvr['xznm'][0] > 0) {
$pvr['xznm'] = ' ('.($pvr['xznm'][0]).')'; $pvr['xznm'] = ' ('.($pvr['xznm'][0]).')';
}else{ }else{
$pvr['xznm'] = ''; $pvr['xznm'] = '';
} }
// //
mysql_query('UPDATE `users` SET `login` = "Каменный Страж'.$pvr['xznm'].'",`obraz` = "0.gif",`battle` = "'.$btl->info['id'].'" WHERE `id` = "'.$pvr['bot']['id'].'" LIMIT 1'); mysql_query('UPDATE `users` SET `login` = "Каменный Страж'.$pvr['xznm'].'",`obraz` = "0.gif",`battle` = "'.$btl->i->id.'" WHERE `id` = "'.$pvr['bot']['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `team` = "'.$u->info['team'].'" WHERE `id` = "'.$pvr['bot']['id'].'" LIMIT 1'); mysql_query('UPDATE `stats` SET `team` = "'.$u->info['team'].'" WHERE `id` = "'.$pvr['bot']['id'].'" LIMIT 1');
// //
$btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'], $btl->priemAddLog( $id, 1, 2, $u->info['id'], $u->info['enemy'],

View File

@ -46,7 +46,7 @@ if(isset($pr_momental_this)) {
return $at; return $at;
}; };
unset( $pr_used_this ); unset( $pr_used_this );
//}elseif( isset($pr_used_this) && !isset($btl->info['id']) ) { //}elseif( isset($pr_used_this) && !isset($btl->i->id) ) {
}elseif( isset($pr_used_this) ) { }elseif( isset($pr_used_this) ) {
$fx_priem = function( $id , $at , $uid, $j_id ) { $fx_priem = function( $id , $at , $uid, $j_id ) {

View File

@ -19,7 +19,7 @@ if( isset($pr_momental_this)) {
0, time() ); 0, time() );
// //
mysql_query('INSERT INTO `battle_actions` (`btl`,`uid`,`time`,`vars`,`vals`) VALUES ( mysql_query('INSERT INTO `battle_actions` (`btl`,`uid`,`time`,`vars`,`vals`) VALUES (
"'.$btl->info['id'].'","'.$u->info['id'].'","'.time().'","use_defteam'.$u->info['team'].'","1" "'.$btl->i->id.'","'.$u->info['id'].'","'.time().'","use_defteam'.$u->info['team'].'","1"
)'); )');
// //
$this->mintr($pl); $this->mintr($pl);

View File

@ -19,7 +19,7 @@ if( isset($pr_momental_this)) {
0, time() ); 0, time() );
// //
mysql_query('INSERT INTO `battle_actions` (`btl`,`uid`,`time`,`vars`,`vals`) VALUES ( mysql_query('INSERT INTO `battle_actions` (`btl`,`uid`,`time`,`vars`,`vals`) VALUES (
"'.$btl->info['id'].'","'.$u->info['id'].'","'.time().'","use_powteam'.$u->info['team'].'","1" "'.$btl->i->id.'","'.$u->info['id'].'","'.time().'","use_powteam'.$u->info['team'].'","1"
)'); )');
// //
$this->mintr($pl); $this->mintr($pl);

View File

@ -6,7 +6,7 @@ if (!defined('GAME')) {
Прием: Оледенение [5] Прием: Оледенение [5]
*/ */
$pvr = []; $pvr = [];
if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !isset($this->info['id'])) { if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->i->id) && !isset($this->info['id'])) {
} elseif (isset($pr_used_this) && isset($pr_moment)) { } elseif (isset($pr_used_this) && isset($pr_moment)) {
//Каждый ход //Каждый ход

View File

@ -6,7 +6,7 @@ if (!defined('GAME')) {
Прием: Оледенение [6] Прием: Оледенение [6]
*/ */
$pvr = []; $pvr = [];
if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !isset($this->info['id'])) { if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->i->id) && !isset($this->info['id'])) {
} elseif (isset($pr_used_this) && isset($pr_moment)) { } elseif (isset($pr_used_this) && isset($pr_moment)) {
//Каждый ход //Каждый ход

View File

@ -6,7 +6,7 @@ if (!defined('GAME')) {
Прием: Оледенение [7] Прием: Оледенение [7]
*/ */
$pvr = []; $pvr = [];
if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !isset($this->info['id'])) { if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->i->id) && !isset($this->info['id'])) {
} elseif (isset($pr_used_this) && isset($pr_moment)) { } elseif (isset($pr_used_this) && isset($pr_moment)) {
//Каждый ход //Каждый ход

View File

@ -6,7 +6,7 @@ if (!defined('GAME')) {
Прием: Оледенение [8] Прием: Оледенение [8]
*/ */
$pvr = []; $pvr = [];
if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !isset($this->info['id'])) { if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->i->id) && !isset($this->info['id'])) {
} elseif (isset($pr_used_this) && isset($pr_moment)) { } elseif (isset($pr_used_this) && isset($pr_moment)) {
//Каждый ход //Каждый ход

View File

@ -7,7 +7,7 @@ if (!defined('GAME')) {
*/ */
$pvr = []; $pvr = [];
if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !isset($this->info['id'])) { if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->i->id) && !isset($this->info['id'])) {
} elseif (isset($pr_used_this) && isset($pr_moment)) { } elseif (isset($pr_used_this) && isset($pr_moment)) {

View File

@ -6,7 +6,7 @@ if (!defined('GAME')) {
Прием: Оледенение [10] Прием: Оледенение [10]
*/ */
$pvr = []; $pvr = [];
if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !isset($this->info['id'])) { if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->i->id) && !isset($this->info['id'])) {
} elseif (isset($pr_used_this) && isset($pr_moment)) { } elseif (isset($pr_used_this) && isset($pr_moment)) {
//Каждый ход //Каждый ход

View File

@ -6,7 +6,7 @@ if (!defined('GAME')) {
Прием: Оледенение [11] Прием: Оледенение [11]
*/ */
$pvr = []; $pvr = [];
if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->info['id']) && !isset($this->info['id'])) { if (isset($pr_used_this) && isset($pr_moment) && !isset($btl->i->id) && !isset($this->info['id'])) {
} elseif (isset($pr_used_this) && isset($pr_moment)) { } elseif (isset($pr_used_this) && isset($pr_moment)) {
//Каждый ход //Каждый ход

View File

@ -88,7 +88,7 @@ if (isset($hod)) {
mysql_query('UPDATE `stats` SET `mpNow` = "' . $btl->stats[$btl->uids[$u->info['id']]]['mpNow'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); mysql_query('UPDATE `stats` SET `mpNow` = "' . $btl->stats[$btl->uids[$u->info['id']]]['mpNow'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
//заносим в лог боя //заносим в лог боя
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$u->info['enemy']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$u->info['enemy']]]['team'] . '||login2=' . $btl->users[$btl->uids[$u->info['enemy']]]['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$u->info['enemy']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$u->info['enemy']]]['team'] . '||login2=' . $btl->users[$btl->uids[$u->info['enemy']]]['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
if ($rg > 0) { if ($rg > 0) {
$rg = '+' . $rg; $rg = '+' . $rg;
} else { } else {

View File

@ -117,17 +117,17 @@ if(isset($hod))
$b = $u->addNewbot($id['id'],NULL,NULL); $b = $u->addNewbot($id['id'],NULL,NULL);
if($b>0 && $b!=false) if($b>0 && $b!=false)
{ {
$xznm = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `users` WHERE `battle` = "'.$btl->info['id'].'" AND `login` LIKE "Каменный Страж%" LIMIT 1')); $xznm = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `users` WHERE `battle` = "'.$btl->i->id.'" AND `login` LIKE "Каменный Страж%" LIMIT 1'));
if($xznm[0] > 0) { if($xznm[0] > 0) {
$xznm = ' ('.($xznm[0]).')'; $xznm = ' ('.($xznm[0]).')';
}else{ }else{
$xznm = ''; $xznm = '';
} }
mysql_query('UPDATE `users` SET `login` = "Каменный Страж'.$xznm.'",`obraz` = "0.gif",`battle` = "'.$btl->info['id'].'" WHERE `id` = "'.$b['id'].'" LIMIT 1'); mysql_query('UPDATE `users` SET `login` = "Каменный Страж'.$xznm.'",`obraz` = "0.gif",`battle` = "'.$btl->i->id.'" WHERE `id` = "'.$b['id'].'" LIMIT 1');
mysql_query('UPDATE `stats` SET `team` = "'.$u->info['team'].'" WHERE `id` = "'.$b['id'].'" LIMIT 1'); mysql_query('UPDATE `stats` SET `team` = "'.$u->info['team'].'" WHERE `id` = "'.$b['id'].'" LIMIT 1');
mysql_query('INSERT INTO `eff_users` (`id_eff`,`uid`,`user_use`,`name`,`timeUse`,`v1`,`v2`,`img2`) VALUES ("22","'.$b['id'].'","'.$u->info['id'].'","Каменный Страж: Защитить","77","priem","254","wis_earth_summon") '); mysql_query('INSERT INTO `eff_users` (`id_eff`,`uid`,`user_use`,`name`,`timeUse`,`v1`,`v2`,`img2`) VALUES ("22","'.$b['id'].'","'.$u->info['id'].'","Каменный Страж: Защитить","77","priem","254","wis_earth_summon") ');
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].''; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>$btl->hodID,'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>$btl->hodID,'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
if($u->info['sex'] == 1) { if($u->info['sex'] == 1) {
$mas1['text'] = '{tm1} {u1} начертила круг на земле и призвала &quot;<b>Каменный Страж'.$xznm.'&quot;</b>.'; $mas1['text'] = '{tm1} {u1} начертила круг на земле и призвала &quot;<b>Каменный Страж'.$xznm.'&quot;</b>.';
}else{ }else{
@ -201,7 +201,7 @@ if(isset($hod))
//заносим в лог боя //заносим в лог боя
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].''; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
if($rg>0) if($rg>0)
{ {
$rg = '+'.$rg; $rg = '+'.$rg;
@ -252,7 +252,7 @@ if(isset($hod))
mysql_query('UPDATE `eff_users` SET `data` = "'.$dell['data'].'", `x`="'.$dell['x'].'" WHERE `id` = "'.$dell['id'].'"'); mysql_query('UPDATE `eff_users` SET `data` = "'.$dell['data'].'", `x`="'.$dell['x'].'" WHERE `id` = "'.$dell['id'].'"');
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].''; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>$btl->hodID,'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>$btl->hodID,'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
$mas1['text'] = '{u1} Ослабил эфект &quot;<b>'.$dell['name'].'</b>&quot; с помощью <b>Очиститься Кровью</b> .'; $mas1['text'] = '{u1} Ослабил эфект &quot;<b>'.$dell['name'].'</b>&quot; с помощью <b>Очиститься Кровью</b> .';
$btl->add_log($mas1); $btl->add_log($mas1);
}*/ }*/
@ -275,7 +275,7 @@ if(isset($hod))
//заносим в лог боя //заносим в лог боя
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].''; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
if($rg>0) if($rg>0)
{ {
$rg = '+'.$rg; $rg = '+'.$rg;

View File

@ -149,7 +149,7 @@ if(isset($hod))
//$hpmin = $yn; //$hpmin = $yn;
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$ue['sex'].'||t2='.$ue['team'].'||login2='.$ue['login'].''; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$ue['sex'].'||t2='.$ue['team'].'||login2='.$ue['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'",`uid` = "0" WHERE `id` = "'.$ptst['id'].'" LIMIT 1'); mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'",`uid` = "0" WHERE `id` = "'.$ptst['id'].'" LIMIT 1');
@ -210,7 +210,7 @@ if(isset($hod))
//$hpmin = $yn; //$hpmin = $yn;
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$ue['sex'].'||t2='.$ue['team'].'||login2='.$ue['login'].''; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$ue['sex'].'||t2='.$ue['team'].'||login2='.$ue['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'",`uid` = "0" WHERE `id` = "'.$ptst['id'].'" LIMIT 1'); mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'",`uid` = "0" WHERE `id` = "'.$ptst['id'].'" LIMIT 1');
@ -254,7 +254,7 @@ if(isset($hod))
$hpmin = $yn; $hpmin = $yn;
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$ue['sex'].'||t2='.$ue['team'].'||login2='.$ue['login'].''; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$ue['sex'].'||t2='.$ue['team'].'||login2='.$ue['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'",`uid` = "0" WHERE `id` = "'.$ptst['id'].'" LIMIT 1'); mysql_query('UPDATE `eff_users` SET `delete` = "'.time().'",`uid` = "0" WHERE `id` = "'.$ptst['id'].'" LIMIT 1');
@ -510,7 +510,7 @@ if(isset($hod))
mysql_query('UPDATE `stats` SET `mpNow` = "'.$btl->users[$btl->uids[$u->info['id']]]['mpNow'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); mysql_query('UPDATE `stats` SET `mpNow` = "'.$btl->users[$btl->uids[$u->info['id']]]['mpNow'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
//заносим в лог боя //заносим в лог боя
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].''; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>($btl->hodID),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
if($rg>0) if($rg>0)
{ {
$rg = '+'.$rg; $rg = '+'.$rg;

View File

@ -41,7 +41,7 @@ if(!defined('GAME'))
mysql_query('UPDATE `stats` SET `mpNow` = "'.$btl->stats[$btl->uids[$u->info['id']]]['mpNow'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); mysql_query('UPDATE `stats` SET `mpNow` = "'.$btl->stats[$btl->uids[$u->info['id']]]['mpNow'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
//заносим в лог боя //заносим в лог боя
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].''; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
if($rg>0) if($rg>0)
{ {
$rg = '+'.$rg; $rg = '+'.$rg;

View File

@ -34,7 +34,7 @@ if ($pl['id'] == 189) {
$sx = 'а'; $sx = 'а';
} }
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$u->info['enemy']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$u->info['enemy']]]['team'] . '||login2=' . $btl->users[$btl->uids[$u->info['enemy']]]['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$u->info['enemy']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$u->info['enemy']]]['team'] . '||login2=' . $btl->users[$btl->uids[$u->info['enemy']]]['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => $btl->hodID, 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => $btl->hodID, 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot; и ошеломил' . $sx . ' персонажа {u2} на два хода.'; $mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot; и ошеломил' . $sx . ' персонажа {u2} на два хода.';
$pz = $btl->users[$btl->uids[$u->info['enemy']]]['priems_z']; $pz = $btl->users[$btl->uids[$u->info['enemy']]]['priems_z'];
@ -75,7 +75,7 @@ if ($pl['id'] == 189) {
$sx = 'а'; $sx = 'а';
} }
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$u->info['enemy']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$u->info['enemy']]]['team'] . '||login2=' . $btl->users[$btl->uids[$u->info['enemy']]]['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$u->info['enemy']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$u->info['enemy']]]['team'] . '||login2=' . $btl->users[$btl->uids[$u->info['enemy']]]['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => $btl->hodID, 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => $btl->hodID, 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$hp = $u->info['level'] * 2 - $u->info['level']; $hp = $u->info['level'] * 2 - $u->info['level'];
@ -140,7 +140,7 @@ if ($pl['id'] == 189) {
} }
mysql_query('UPDATE `stats` SET `tactic6` = "' . $btl->users[$btl->uids[$this->ue['id']]]['tactic6'] . '" WHERE `id` = "' . $this->ue['id'] . '" LIMIT 1'); mysql_query('UPDATE `stats` SET `tactic6` = "' . $btl->users[$btl->uids[$this->ue['id']]]['tactic6'] . '" WHERE `id` = "' . $this->ue['id'] . '" LIMIT 1');
$vLog = 'time1=' . time() . '||s1=' . $btl->users[$btl->uids[$u->info['id']]]['sex'] . '||t1=' . $btl->users[$btl->uids[$u->info['id']]]['team'] . '||login1=' . $btl->users[$btl->uids[$u->info['id']]]['login'] . '||s2=' . $btl->users[$btl->uids[$this->ue['id']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$this->ue['id']]]['team'] . '||login2=' . $btl->users[$btl->uids[$this->ue['id']]]['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $btl->users[$btl->uids[$u->info['id']]]['sex'] . '||t1=' . $btl->users[$btl->uids[$u->info['id']]]['team'] . '||login1=' . $btl->users[$btl->uids[$u->info['id']]]['login'] . '||s2=' . $btl->users[$btl->uids[$this->ue['id']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$this->ue['id']]]['team'] . '||login2=' . $btl->users[$btl->uids[$this->ue['id']]]['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot; на персонажа {u2}.'; $mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot; на персонажа {u2}.';
$btl->add_log($mas1); $btl->add_log($mas1);
$pz[(int)$id] = 1; $pz[(int)$id] = 1;
@ -209,7 +209,7 @@ if ($pl['id'] == 189) {
} }
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot;. <b><font color=#006699>' . $hp . '</font></b> [' . floor($btl->stats[$btl->uids[$u->info['id']]]['hpNow']) . '/' . $btl->stats[$btl->uids[$u->info['id']]]['hpAll'] . ']'; $mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot;. <b><font color=#006699>' . $hp . '</font></b> [' . floor($btl->stats[$btl->uids[$u->info['id']]]['hpNow']) . '/' . $btl->stats[$btl->uids[$u->info['id']]]['hpAll'] . ']';
$btl->add_log($mas1); $btl->add_log($mas1);
@ -243,7 +243,7 @@ if ($pl['id'] == 189) {
} }
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot;. <b><font color=#006699>' . $hp . '</font></b> [' . floor($btl->stats[$btl->uids[$u->info['id']]]['hpNow']) . '/' . $btl->stats[$btl->uids[$u->info['id']]]['hpAll'] . ']'; $mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot;. <b><font color=#006699>' . $hp . '</font></b> [' . floor($btl->stats[$btl->uids[$u->info['id']]]['hpNow']) . '/' . $btl->stats[$btl->uids[$u->info['id']]]['hpAll'] . ']';
$btl->add_log($mas1); $btl->add_log($mas1);
@ -323,7 +323,7 @@ if ($pl['id'] == 189) {
} elseif ($pl['id'] == 212) { } elseif ($pl['id'] == 212) {
//Ограниченный маневр //Ограниченный маневр
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$u->info['enemy']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$u->info['enemy']]]['team'] . '||login2=' . $btl->users[$btl->uids[$u->info['enemy']]]['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$u->info['enemy']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$u->info['enemy']]]['team'] . '||login2=' . $btl->users[$btl->uids[$u->info['enemy']]]['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot; на персонажа {u2}'; $mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot; на персонажа {u2}';
$btl->add_log($mas1); $btl->add_log($mas1);
$pz[(int)$id] = 1; $pz[(int)$id] = 1;
@ -332,7 +332,7 @@ if ($pl['id'] == 189) {
//заносим в лог боя //заносим в лог боя
if (isset($this->ue['id'], $btl->users[$btl->uids[$this->ue['id']]]) && ($btl->users[$btl->uids[$this->ue['id']]]['team'] != $u->info['team'] && $btl->stats[$btl->uids[$this->ue['id']]]['hpNow'] >= 1)) { if (isset($this->ue['id'], $btl->users[$btl->uids[$this->ue['id']]]) && ($btl->users[$btl->uids[$this->ue['id']]]['team'] != $u->info['team'] && $btl->stats[$btl->uids[$this->ue['id']]]['hpNow'] >= 1)) {
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$this->ue['id']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$this->ue['id']]]['team'] . '||login2=' . $btl->users[$btl->uids[$this->ue['id']]]['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$this->ue['id']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$this->ue['id']]]['team'] . '||login2=' . $btl->users[$btl->uids[$this->ue['id']]]['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot;. (Новая цель: {u2})'; $mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot;. (Новая цель: {u2})';
$btl->add_log($mas1); $btl->add_log($mas1);
$pz[(int)$id] = 1; $pz[(int)$id] = 1;
@ -420,7 +420,7 @@ if (isset($hpmin) && $hpmin > 0 && $u->info['enemy'] > 0) {
//заносим в лог боя //заносим в лог боя
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$u->info['enemy']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$u->info['enemy']]]['team'] . '||login2=' . $btl->users[$btl->uids[$u->info['enemy']]]['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$u->info['enemy']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$u->info['enemy']]]['team'] . '||login2=' . $btl->users[$btl->uids[$u->info['enemy']]]['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
if ($hpmin > 0) { if ($hpmin > 0) {
$hpmin = '-' . $hpmin; $hpmin = '-' . $hpmin;
} else { } else {

View File

@ -6,7 +6,7 @@ if(!defined('GAME'))
if($st['usefromfile']=='muh' && $u->info['battle'] > 0 && $u->info['hpNow'] >= 1) if($st['usefromfile']=='muh' && $u->info['battle'] > 0 && $u->info['hpNow'] >= 1)
{ {
if($btl->info['team_win'] != -1 ) { if($btl->i->getTeamwin() != -1 ) {
$u->error = 'Использовать пирожки возможно только во время боя'; $u->error = 'Использовать пирожки возможно только во время боя';
}else{ }else{
$bu = mysql_fetch_array(mysql_query('SELECT * FROM `pirogi` WHERE `btl` = "'.$u->info['battle'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1')); $bu = mysql_fetch_array(mysql_query('SELECT * FROM `pirogi` WHERE `btl` = "'.$u->info['battle'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));

View File

@ -6,7 +6,7 @@ if(!defined('GAME'))
if($st['usefromfile']=='pirogi' && $u->info['battle'] > 0 && $u->info['hpNow'] >= 1) if($st['usefromfile']=='pirogi' && $u->info['battle'] > 0 && $u->info['hpNow'] >= 1)
{ {
if($btl->info['team_win'] != -1 ) { if($btl->i->getTeamwin() != -1 ) {
$u->error = 'Использовать пирожки возможно только во время боя'; $u->error = 'Использовать пирожки возможно только во время боя';
}else{ }else{
$bu = mysql_fetch_array(mysql_query('SELECT * FROM `pirogi` WHERE `btl` = "'.$u->info['battle'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1')); $bu = mysql_fetch_array(mysql_query('SELECT * FROM `pirogi` WHERE `btl` = "'.$u->info['battle'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));

View File

@ -7,7 +7,7 @@ if(!defined('GAME'))
if($st['usefromfile']=='pirogi2' && $u->info['battle'] > 0 && $u->info['hpNow'] >= 1) if($st['usefromfile']=='pirogi2' && $u->info['battle'] > 0 && $u->info['hpNow'] >= 1)
{ {
if($btl->info['team_win'] != -1 ) { if($btl->i->getTeamwin() != -1 ) {
$u->error = 'Использовать пирожки возможно только во время боя'; $u->error = 'Использовать пирожки возможно только во время боя';
}else{ }else{
$bu = mysql_fetch_array(mysql_query('SELECT * FROM `pirogi` WHERE `btl` = "'.$u->info['battle'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1')); $bu = mysql_fetch_array(mysql_query('SELECT * FROM `pirogi` WHERE `btl` = "'.$u->info['battle'].'" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));

View File

@ -255,7 +255,7 @@ OR `name` LIKE "Пожирающее Пламя%" OR `name` LIKE "Переохл
mysql_query('UPDATE `eff_users` SET `data` = "' . $dell['data'] . '", `x`="' . $dell['x'] . '" WHERE `id` = "' . $dell['id'] . '"'); mysql_query('UPDATE `eff_users` SET `data` = "' . $dell['data'] . '", `x`="' . $dell['x'] . '" WHERE `id` = "' . $dell['id'] . '"');
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => $btl->hodID, 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => $btl->hodID, 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{u1} Ослабил эфект &quot;<b>' . $dell['name'] . '</b>&quot; с помощью <b>Очиститься Кровью</b> .'; $mas1['text'] = '{u1} Ослабил эфект &quot;<b>' . $dell['name'] . '</b>&quot; с помощью <b>Очиститься Кровью</b> .';
$btl->add_log($mas1); $btl->add_log($mas1);
} }
@ -285,7 +285,7 @@ if (isset($hpadd)) {
$upd = mysql_query('UPDATE `stats` SET `hpNow` = ' . $u->info['hpNow'] . ' WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'); $upd = mysql_query('UPDATE `stats` SET `hpNow` = ' . $u->info['hpNow'] . ' WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
if ($upd) { if ($upd) {
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => $btl->hodID, 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => $btl->hodID, 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
if ($hpadd > 0) { if ($hpadd > 0) {
$hpadd = '+' . ceil($hpadd); $hpadd = '+' . ceil($hpadd);
} else { } else {
@ -324,7 +324,7 @@ if (isset($hpadd)) {
$upd = mysql_query('UPDATE `stats` SET `hpNow` = ' . $btl->stats[$btl->uids[$ue['id']]]['hpNow'] . ' WHERE `id` = "' . $btl->users[$btl->uids[$ue['id']]]['id'] . '" LIMIT 1'); $upd = mysql_query('UPDATE `stats` SET `hpNow` = ' . $btl->stats[$btl->uids[$ue['id']]]['hpNow'] . ' WHERE `id` = "' . $btl->users[$btl->uids[$ue['id']]]['id'] . '" LIMIT 1');
if ($upd) { if ($upd) {
$vLog = 'time1=' . time() . '||s1=' . $btl->users[$btl->uids[$ue['id']]]['sex'] . '||t1=' . $btl->users[$btl->uids[$ue['id']]]['team'] . '||login1=' . $btl->users[$btl->uids[$ue['id']]]['login'] . ''; $vLog = 'time1=' . time() . '||s1=' . $btl->users[$btl->uids[$ue['id']]]['sex'] . '||t1=' . $btl->users[$btl->uids[$ue['id']]]['team'] . '||login1=' . $btl->users[$btl->uids[$ue['id']]]['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->info['id'], 'id_hod' => $btl->hodID, 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1']; $mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => $btl->hodID, 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
if ($hpadd_pr > 0) { if ($hpadd_pr > 0) {
$hpadd_pr = '+' . ceil($hpadd_pr); $hpadd_pr = '+' . ceil($hpadd_pr);
} else { } else {

View File

@ -6,7 +6,7 @@ if(!defined('GAME'))
if($st['usefromfile']=='veter1' && $u->info['battle'] > 0 && $u->info['hpNow'] >= 1) if($st['usefromfile']=='veter1' && $u->info['battle'] > 0 && $u->info['hpNow'] >= 1)
{ {
if($btl->info['team_win'] != -1 ) { if($btl->i->getTeamwin() != -1 ) {
$u->error = 'Использовать кольцо возможно только во время боя'; $u->error = 'Использовать кольцо возможно только во время боя';
}else{ }else{
$bu = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE `v1` = "priem" AND `v2` = "228" AND `delete` = "0" LIMIT 1')); $bu = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE `v1` = "priem" AND `v2` = "228" AND `delete` = "0" LIMIT 1'));

View File

@ -436,7 +436,7 @@ if(isset($hod))
$cup = true; $cup = true;
}else{ }else{
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login']; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'];
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>($btl->hodID+1),'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>'.$pl['name'].'</b>&quot;. <small>(Сняты задержки на магию Воды)</small>'; $mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>'.$pl['name'].'</b>&quot;. <small>(Сняты задержки на магию Воды)</small>';
$btl->add_log($mas1); $btl->add_log($mas1);
} }

View File

@ -158,14 +158,14 @@ if (!$isBattle) {
$btl->testFinish(); $btl->testFinish();
} }
if ($btl->info['team_win'] == -1) { if ($btl->i->getTeamwin() == -1) {
$js .= $btl->genTeams($u->info['id']); $js .= $btl->genTeams($u->info['id']);
} else { } else {
$btl->mainStatus = 3; $btl->mainStatus = 3;
$btl->e = $u->btl_txt; $btl->e = $u->btl_txt;
} }
if ($btl->info['id'] == $u->info['lider']) { if ($btl->i->id == $u->info['lider']) {
$js .= '$("#btn_down_img3").show();$("#btn_down_img4").show();'; $js .= '$("#btn_down_img3").show();$("#btn_down_img4").show();';
} else { } else {
$js .= '$("#btn_down_img3").hide();$("#btn_down_img4").hide();'; $js .= '$("#btn_down_img3").hide();$("#btn_down_img4").hide();';
@ -186,14 +186,14 @@ if (!$isBattle) {
$btl->mainStatus = 2; $btl->mainStatus = 2;
} elseif ( } elseif (
$u->info['enemy'] != 0 && $u->info['enemy'] != 0 &&
$btl->info['team_win'] == -1 && $btl->i->getTeamwin() == -1 &&
$u->info['hpNow'] >= 1 $u->info['hpNow'] >= 1
) { ) {
$js .= $btl->myInfo($u->info['enemy'], 2); $js .= $btl->myInfo($u->info['enemy'], 2);
} }
if ($btl->info['izlom'] > 0) { if ($btl->i->izlom > 0) {
$js .= 'volna(' . (1 + $btl->info['izlomRoundSee']) . ');'; $js .= 'volna(' . (1 + $btl->i->izlomroundsee) . ');';
} }
$i = 1; $i = 1;
@ -218,7 +218,7 @@ if (!$isBattle) {
$atk1 = isset($btl->ga[$u->info['enemy']][$u->info['id']]) ? 1 : 0; $atk1 = isset($btl->ga[$u->info['enemy']][$u->info['id']]) ? 1 : 0;
$nabito = floor($btl->users[$btl->uids[$u->info['id']]]['battle_yron']); $nabito = floor($btl->users[$btl->uids[$u->info['id']]]['battle_yron']);
$expmaybe = floor($btl->users[$btl->uids[$u->info['id']]]['battle_exp']); $expmaybe = floor($btl->users[$btl->uids[$u->info['id']]]['battle_exp']);
$tmr = round(($btl->info['timeout'] / 60), 2); $tmr = round(($btl->i->timeout / 60), 2);
$persMagic = $u->btlMagicList(); $persMagic = $u->btlMagicList();
$za = (int)$btl->stats[$btl->uids[$u->info['id']]]['zona']; $za = (int)$btl->stats[$btl->uids[$u->info['id']]]['zona'];
$zb = (int)$btl->testZonbVis(); $zb = (int)$btl->testZonbVis();

View File

@ -57,11 +57,9 @@ if (!isset($CRON_CORE)) {
} }
} }
$btl->is = $u->is; $isBattle = $btl->initRefresh($u);
$btl->items = $u->items;
$btl->info = $btl->battleInfo($u->info['battle']);
if (!isset($btl->info['id'])) { if (!$isBattle) {
if ($u->info['battle'] == -1) { if ($u->info['battle'] == -1) {
//завершаем поединок //завершаем поединок
$upd = mysql_query( $upd = mysql_query(
@ -142,7 +140,7 @@ if (!isset($btl->info['id'])) {
if (!isset($_POST['usepriem'])) { if (!isset($_POST['usepriem'])) {
$btl->testFinish(); $btl->testFinish();
} }
if ($btl->info['team_win'] == -1) { if ($btl->i->getTeamwin() == -1) {
$js .= $btl->genTeams($u->info['id']); $js .= $btl->genTeams($u->info['id']);
} else { } else {
$btl->mainStatus = 3; $btl->mainStatus = 3;
@ -160,12 +158,12 @@ if (!isset($btl->info['id'])) {
$btl->mainStatus = 2; $btl->mainStatus = 2;
} }
} else { } else {
if ($u->info['enemy'] != 0 && $btl->info['team_win'] == -1 && $u->info['hpNow'] >= 1) { if ($u->info['enemy'] != 0 && $btl->i->getTeamwin() == -1 && $u->info['hpNow'] >= 1) {
$js .= $btl->myInfo($u->info['enemy'], 2); $js .= $btl->myInfo($u->info['enemy'], 2);
} }
} }
if ($btl->info['izlom'] > 0) { if ($btl->i->izlom > 0) {
$js .= 'volna(' . (1 + $btl->info['izlomRoundSee']) . ');'; $js .= 'volna(' . (1 + $btl->i->izlomroundsee) . ');';
} }
$i = 1; $i = 1;
while ($i <= 7) { while ($i <= 7) {
@ -200,7 +198,7 @@ if (!isset($btl->info['id'])) {
} }
unset($jslog); unset($jslog);
//} //}
$rehtml .= '<script type="text/javascript">var battle = ' . (0 + $btl->info['id']) . ';top.cb_statusTest();eatk=' . $atk1 . '; $rehtml .= '<script type="text/javascript">var battle = ' . (0 + $btl->i->id) . ';top.cb_statusTest();eatk=' . $atk1 . ';
if(document.getElementById("nabito")!=undefined) if(document.getElementById("nabito")!=undefined)
{ {
document.getElementById("nabito").innerHTML = "' . (floor( document.getElementById("nabito").innerHTML = "' . (floor(
@ -215,7 +213,7 @@ if (!isset($btl->info['id'])) {
} }
if(document.getElementById("timer_out")!=undefined) if(document.getElementById("timer_out")!=undefined)
{ {
document.getElementById("timer_out").innerHTML = "' . round(($btl->info['timeout'] / 60), 2) . '"; document.getElementById("timer_out").innerHTML = "' . round(($btl->i->timeout / 60), 2) . '";
} }
$(\'#pers_magic\').html("' . $u->btlMagicList() . '"); $(\'#pers_magic\').html("' . $u->btlMagicList() . '");
g_iCount = 30; g_iCount = 30;

View File

@ -53,11 +53,9 @@ if (isset($_POST['atack'], $_POST['block']) || (isset($_POST['id']) && $_POST['i
} }
} }
$btl->is = $u->is; $isBattle = $btl->initRefresh($u);
$btl->items = $u->items;
$btl->info = $btl->battleInfo($u->info['battle']);
if (!isset($btl->info['id'])) { if (!$isBattle) {
if ($u->info['battle'] == -1) { if ($u->info['battle'] == -1) {
//завершаем поединок //завершаем поединок
$upd = mysql_query( $upd = mysql_query(
@ -139,13 +137,13 @@ if (isset($_POST['atack'], $_POST['block']) || (isset($_POST['id']) && $_POST['i
//Если бой сыгран - завершаем //Если бой сыгран - завершаем
if (!isset($_POST['usepriem'])) { if (!isset($_POST['usepriem'])) {
if ($btl->info['team_win'] == -1) { if ($btl->i->getTeamwin() == -1) {
$btl->testFinish(); $btl->testFinish();
} else { } else {
$btl->testFinish(); $btl->testFinish();
} }
} }
if ($btl->info['team_win'] == -1) { if ($btl->i->getTeamwin() == -1) {
$js .= $btl->genTeams($u->info['id']); $js .= $btl->genTeams($u->info['id']);
} else { } else {
$btl->mainStatus = 3; $btl->mainStatus = 3;
@ -163,12 +161,12 @@ if (isset($_POST['atack'], $_POST['block']) || (isset($_POST['id']) && $_POST['i
$btl->mainStatus = 2; $btl->mainStatus = 2;
} }
} else { } else {
if ($u->info['enemy'] != 0 && $btl->info['team_win'] == -1 && $u->info['hpNow'] >= 1) { if ($u->info['enemy'] != 0 && $btl->i->getTeamwin() == -1 && $u->info['hpNow'] >= 1) {
$js .= $btl->myInfo($u->info['enemy'], 2); $js .= $btl->myInfo($u->info['enemy'], 2);
} }
} }
if ($btl->info['izlom'] > 0) { if ($btl->i->izlom > 0) {
$js .= 'volna(' . (1 + $btl->info['izlomRoundSee']) . ');'; $js .= 'volna(' . (1 + $btl->i->izlomroundsee) . ');';
} }
$i = 1; $i = 1;
while ($i <= 7) { while ($i <= 7) {
@ -203,7 +201,7 @@ if (isset($_POST['atack'], $_POST['block']) || (isset($_POST['id']) && $_POST['i
} }
unset($jslog); unset($jslog);
//} //}
$rehtml .= '<script type="text/javascript">var battle = ' . (0 + $btl->info['id']) . ';top.cb_statusTest();eatk=' . $atk1 . '; $rehtml .= '<script type="text/javascript">var battle = ' . (0 + $btl->i->id) . ';top.cb_statusTest();eatk=' . $atk1 . ';
if(document.getElementById("nabito")!=undefined) if(document.getElementById("nabito")!=undefined)
{ {
document.getElementById("nabito").innerHTML = "' . (floor( document.getElementById("nabito").innerHTML = "' . (floor(
@ -218,7 +216,7 @@ if (isset($_POST['atack'], $_POST['block']) || (isset($_POST['id']) && $_POST['i
} }
if(document.getElementById("timer_out")!=undefined) if(document.getElementById("timer_out")!=undefined)
{ {
document.getElementById("timer_out").innerHTML = "' . round(($btl->info['timeout'] / 60), 2) . '"; document.getElementById("timer_out").innerHTML = "' . round(($btl->i->timeout / 60), 2) . '";
} }
$(\'#pers_magic\').html("' . $u->btlMagicList() . '"); $(\'#pers_magic\').html("' . $u->btlMagicList() . '");
g_iCount = 30; g_iCount = 30;

View File

@ -172,7 +172,7 @@ if (isset($CRON_CORE) && (isset($_POST['atack'], $_POST['block']) || (isset($_PO
//Если бой сыгран - завершаем //Если бой сыгран - завершаем
$btl->testFinish(); $btl->testFinish();
if ($btl->info['team_win'] == -1) { if ($btl->i->getTeamwin() == -1) {
$js .= $btl->genTeams($u->info['id']); $js .= $btl->genTeams($u->info['id']);
} else { } else {
$btl->mainStatus = 3; $btl->mainStatus = 3;
@ -190,12 +190,12 @@ if (isset($CRON_CORE) && (isset($_POST['atack'], $_POST['block']) || (isset($_PO
$btl->mainStatus = 2; $btl->mainStatus = 2;
} }
} else { } else {
if ($u->info['enemy'] != 0 && $btl->info['team_win'] == -1 && $u->info['hpNow'] >= 1) { if ($u->info['enemy'] != 0 && $btl->i->getTeamwin() == -1 && $u->info['hpNow'] >= 1) {
$js .= $btl->myInfo($u->info['enemy'], 2); $js .= $btl->myInfo($u->info['enemy'], 2);
} }
} }
if ($btl->info['izlom'] > 0) { if ($btl->i->izlom > 0) {
$js .= 'volna(' . (1 + $btl->info['izlomRoundSee']) . ');'; $js .= 'volna(' . (1 + $btl->i->izlomroundsee) . ');';
} }
$i = 1; $i = 1;
while ($i <= 7) { while ($i <= 7) {

View File

@ -37,7 +37,7 @@ if($pl['id']==3)
$sx = 'а'; $sx = 'а';
} }
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].''; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'||s2='.$btl->users[$btl->uids[$u->info['enemy']]]['sex'].'||t2='.$btl->users[$btl->uids[$u->info['enemy']]]['team'].'||login2='.$btl->users[$btl->uids[$u->info['enemy']]]['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>$btl->hodID,'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>$btl->hodID,'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>'.$pl['name'].'</b>&quot; и ошеломил'.$sx.' {u2} на два хода.'; $mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>'.$pl['name'].'</b>&quot; и ошеломил'.$sx.' {u2} на два хода.';
$pz = $btl->users[$btl->uids[$u->info['enemy']]]['priems_z']; $pz = $btl->users[$btl->uids[$u->info['enemy']]]['priems_z'];
$pz = explode('|',$pz); $pz = explode('|',$pz);
@ -76,7 +76,7 @@ if(isset($hpadd))
if($upd) if($upd)
{ {
$vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].''; $vLog = 'time1='.time().'||s1='.$u->info['sex'].'||t1='.$u->info['team'].'||login1='.$u->info['login'].'';
$mas1 = array('time'=>time(),'battle'=>$btl->info['id'],'id_hod'=>$btl->hodID,'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1'); $mas1 = array('time'=>time(),'battle'=>$btl->i->id,'id_hod'=>$btl->hodID,'text'=>'','vars'=>$vLog,'zona1'=>'','zonb1'=>'','zona2'=>'','zonb2'=>'','type'=>'1');
if($hpadd>0) if($hpadd>0)
{ {
$hpadd = '+'.ceil($hpadd); $hpadd = '+'.ceil($hpadd);