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]); } }