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

@@ -352,6 +352,16 @@ abstract class BaseType
return $value;
}
public function getAllFields($field, $localized = false, $silent = false)
{
$data = [];
foreach ($this->iterate() as $__)
$data[$this->id] = $this->getField($field, $localized, $silent);
return $data;
}
public function getRandomId()
{
// ORDER BY RAND() is not optimal, so if anyone has an alternative idea..
@@ -668,7 +678,7 @@ trait spawnHelper
public function getSpawns($mode)
{
// ony Creatures and GOs can be spawned
if (!self::$type || (self::$type != TYPE_NPC && self::$type != TYPE_OBJECT))
if (!self::$type || (self::$type != TYPE_NPC && self::$type != TYPE_OBJECT && self::$type != TYPE_SOUND))
return [];
switch ($mode)