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:
Sarjuuk
2017-03-06 15:16:34 +01:00
committed by GitHub
parent 8fcd8ea429
commit 20a1829317
54 changed files with 3454 additions and 169 deletions

View File

@@ -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 */
/**************/