mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Core/Cleanup
* try to give included files a logical structure * move objects from Util and Game to their own files * make non-essential files auto-loaded
This commit is contained in:
@@ -121,7 +121,7 @@ CLISetup::registerUtility(new class extends UtilityScript
|
||||
if (CLI::read(['x' => ['['.CLI::bold('c').']ontinue anyway? ['.CLI::bold('r').']etry? ['.CLI::bold('a').']bort?', true, true, '/c|r|a/i']], $uiCRA) && $uiCRA)
|
||||
{
|
||||
CLI::write();
|
||||
switch(strtolower($uiCRA['x']))
|
||||
switch (strtolower($uiCRA['x']))
|
||||
{
|
||||
case 'c':
|
||||
$this->saveProgress($idx);
|
||||
|
||||
@@ -312,13 +312,13 @@ CLISetup::registerSetup("sql", new class extends SetupScript
|
||||
$notice = '[points] '.str_pad('['.$point['guid'].']', 9).' manually moved to [A:'.($point['areaId'] ?? 0).' => '.$area.'; F: '.$floor.']';
|
||||
}
|
||||
|
||||
if ($points = Game::worldPosToZonePos($point['map'], $point['posX'], $point['posY'], $area, $floor))
|
||||
if ($points = WorldPosition::toZonePos($point['map'], $point['posX'], $point['posY'], $area, $floor))
|
||||
{
|
||||
// if areaId is set and we match it .. we're fine .. mostly
|
||||
if (count($points) == 1 && $area == $points[0]['areaId'])
|
||||
return ['areaId' => $points[0]['areaId'], 'posX' => $points[0]['posX'], 'posY' => $points[0]['posY'], 'floor' => $points[0]['floor']];
|
||||
|
||||
$point = Game::checkCoords($points); // try to determine best found point by alphamap
|
||||
$point = WorldPosition::checkZonePos($points); // try to determine best found point by alphamap
|
||||
return ['areaId' => $point['areaId'], 'posX' => $point['posX'], 'posY' => $point['posY'], 'floor' => $point['floor']];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user