Added presence points handling in Swar6 reader

The update introduces a new feature to handle presence points in the Swar6 reader. If the tournament uses presence points, it now assigns these to 'absence' and removes them from 'presence'. The change also removes an unnecessary line related to EloUsed.
This commit is contained in:
Jeroen De Meerleer 2024-09-19 12:06:35 +02:00
parent 4cee5fe116
commit 58851af343
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6

View File

@ -283,8 +283,12 @@ class Swar6 implements ReaderInterface
$custompoints['loss'] = $this->readData('Int', $swshandle) / 4;
$custompoints['bye'] = $this->readData('Int', $swshandle) / 4;
$custompoints['presence'] = $this->readData('Int', $swshandle) / 4;
$this->Tournament->IsPresencePoints = (bool)$this->readData('Int', $swshandle);
if(!$this->Tournament->IsPresencePoints) {
$custompoints['absence'] = $custompoints['presence'];
unset($custompoints['presence'])
}
if($applycustompoints) $this->Tournament->CustomPoints = $custompoints;
$this->Tournament->EloUsed = $this->readData('Int', $swshandle);
$this->Tournament->TournoiStd = $this->readData('Int', $swshandle);
$this->Tournament->TbPersonel = $this->readData('Int', $swshandle);
$this->Tournament->ApparOrder = $this->readData('Int', $swshandle);