mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
implementation of Sound DB
Client sounds are cross-referenced with as many other DB-Types as possible. Including, but not limited to: * Character VOs (Errors, Emotes) * Creature VOs (Boss Dialogue) * Zone Music and Ambience * Sounds triggerd by spells * Sounds from general item/spell usage, creature behavior Restrictions: * only one locale is supported. Choose wisely!
This commit is contained in:
@@ -328,6 +328,42 @@ class CLISetup
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function nicePath(/* $file = '', ...$pathParts */)
|
||||
{
|
||||
$path = '';
|
||||
|
||||
switch (func_num_args())
|
||||
{
|
||||
case 0:
|
||||
return '';
|
||||
case 1:
|
||||
$path = func_get_arg(0);
|
||||
break;
|
||||
default:
|
||||
$args = func_get_args();
|
||||
$file = array_shift($args);
|
||||
$path = implode(DIRECTORY_SEPARATOR, $args).DIRECTORY_SEPARATOR.$file;
|
||||
}
|
||||
|
||||
if (DIRECTORY_SEPARATOR == '/') // *nix
|
||||
{
|
||||
$path = str_replace('\\', '/', $path);
|
||||
$path = preg_replace('/\/+/i', '/', $path);
|
||||
}
|
||||
else if (DIRECTORY_SEPARATOR == '\\') // win
|
||||
{
|
||||
$path = str_replace('/', '\\', $path);
|
||||
$path = preg_replace('/\\\\+/i', '\\', $path);
|
||||
}
|
||||
else
|
||||
CLISetup::log('Dafuq! Your directory separator is "'.DIRECTORY_SEPARATOR.'". Please report this!', CLISetup::LOG_ERROR);
|
||||
|
||||
if ($path[0] == DIRECTORY_SEPARATOR)
|
||||
$path = substr($path, 1);
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**************/
|
||||
/* read input */
|
||||
/**************/
|
||||
|
||||
Reference in New Issue
Block a user