-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2720 from RaiderIO/development
Release v12.1 - Added various new filters for the heatmaps
- Loading branch information
Showing
537 changed files
with
96,574 additions
and
1,688 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands\CombatLog; | ||
|
||
use App\Service\CombatLog\CombatLogServiceInterface; | ||
|
||
class DetermineBounds extends BaseCombatLogCommand | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'combatlog:determinebounds {filePath}'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Finds the min and max coordinates of all combat log events. Useful for determining the size of the map if no coordinates are known.'; | ||
|
||
/** | ||
* Execute the console command. | ||
*/ | ||
public function handle(CombatLogServiceInterface $combatLogService): int | ||
{ | ||
ini_set('memory_limit', '2G'); | ||
|
||
$filePath = $this->argument('filePath'); | ||
|
||
return $this->parseCombatLogRecursively($filePath, fn(string $filePath) => $this->extractUiMapIds($combatLogService, $filePath)); | ||
} | ||
|
||
private function extractUiMapIds(CombatLogServiceInterface $combatLogService, string $filePath): int | ||
{ | ||
$mapBounds = $combatLogService->getBoundsFromEvents($filePath); | ||
|
||
$this->info( | ||
sprintf( | ||
'minX: %.02f, minY: %.02f, maxX: %.02f, maxY: %.02f', | ||
$mapBounds->getMinIngameX(), | ||
$mapBounds->getMinIngameY(), | ||
$mapBounds->getMaxIngameX(), | ||
$mapBounds->getMaxIngameY() | ||
) | ||
); | ||
|
||
$this->info( | ||
sprintf( | ||
'Copy me: %.02f, %.02f, %.02f, %.02f', | ||
$mapBounds->getMinIngameX(), | ||
$mapBounds->getMinIngameY(), | ||
$mapBounds->getMaxIngameX(), | ||
$mapBounds->getMaxIngameY() | ||
) | ||
); | ||
|
||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.