Spells/Sounds

* get sounds from ScreenEffect.dbc and link to type Spell and type Sound
 * resolve ScreenEffect name in SpellDetailPage
Fixup
 * fix warning in UI escape sequence parsing
This commit is contained in:
Sarjuuk
2023-08-31 14:54:23 +02:00
parent 9b16f2d84a
commit ac34b47c26
8 changed files with 85 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ SqlGen::register(new class extends SetupScript
// creatures
'npcsounds', 'creaturesounddata', 'creaturedisplayinfo', 'creaturemodeldata',
// spells
'spell', 'spellvisual', 'spellvisualkit',
'spell', 'spellvisual', 'spellvisualkit', 'screeneffect',
// zones
'soundambience', 'zonemusic', 'zoneintromusictable', 'worldstatezonesounds', 'areatable',
// items
@@ -423,6 +423,27 @@ SqlGen::register(new class extends SetupScript
subClassMask = subClassMask | (1 << isc.subClass)
');
/************************/
/* Screen Effect Sounds */
/************************/
CLI::write(' - linking to screen effects');
DB::Aowow()->query('TRUNCATE ?_screeneffect_sounds');
DB::Aowow()->query('
INSERT INTO
?_screeneffect_sounds
SELECT
se.id, se.name, IFNULL(sa.soundIdDay, 0), IFNULL(sa.soundIdNight, 0), IFNULL(zm.soundIdDay, 0), IFNULL(zm.soundIdNight, 0)
FROM
dbc_screeneffect se
LEFT JOIN
dbc_soundambience sa ON se.soundAmbienceId = sa.id
LEFT JOIN
dbc_zonemusic zm ON se.zoneMusicId = zm.id
');
$this->reapplyCCFlags('sounds', Type::SOUND);
return true;