Creature/Spells

* update db structure for https://github.com/TrinityCore/TrinityCore/commit/d5fb0a30ec6
This commit is contained in:
Sarjuuk
2020-02-14 17:35:16 +01:00
parent 243429bf68
commit 48552a97ab
2 changed files with 18 additions and 9 deletions

View File

@@ -56,7 +56,7 @@ SqlGen::register(new class extends SetupScript
type, type,
type_flags, type_flags,
lootid, pickpocketloot, skinloot, lootid, pickpocketloot, skinloot,
spell1, spell2, spell3, spell4, spell5, spell6, spell7, spell8, IFNULL(cts0.Spell, 0), IFNULL(cts1.Spell, 0), IFNULL(cts2.Spell, 0), IFNULL(cts3.Spell, 0), IFNULL(cts4.Spell, 0), IFNULL(cts5.Spell, 0), IFNULL(cts6.Spell, 0), IFNULL(cts7.Spell, 0),
PetSpellDataId, PetSpellDataId,
VehicleId, VehicleId,
mingold, maxgold, mingold, maxgold,
@@ -89,6 +89,22 @@ SqlGen::register(new class extends SetupScript
creature_template_locale ctl8 ON ct.entry = ctl8.entry AND ctl8.`locale` = "ruRU" creature_template_locale ctl8 ON ct.entry = ctl8.entry AND ctl8.`locale` = "ruRU"
LEFT JOIN LEFT JOIN
instance_encounters ie ON ie.creditEntry = ct.entry AND ie.creditType = 0 instance_encounters ie ON ie.creditEntry = ct.entry AND ie.creditType = 0
LEFT JOIN
creature_template_spell cts0 ON ct.entry = cts0.CreatureID AND cts0.Index = 0
LEFT JOIN
creature_template_spell cts1 ON ct.entry = cts1.CreatureID AND cts1.Index = 1
LEFT JOIN
creature_template_spell cts2 ON ct.entry = cts2.CreatureID AND cts2.Index = 2
LEFT JOIN
creature_template_spell cts3 ON ct.entry = cts3.CreatureID AND cts3.Index = 3
LEFT JOIN
creature_template_spell cts4 ON ct.entry = cts4.CreatureID AND cts4.Index = 4
LEFT JOIN
creature_template_spell cts5 ON ct.entry = cts5.CreatureID AND cts5.Index = 5
LEFT JOIN
creature_template_spell cts6 ON ct.entry = cts6.CreatureID AND cts6.Index = 6
LEFT JOIN
creature_template_spell cts7 ON ct.entry = cts7.CreatureID AND cts7.Index = 7
WHERE WHERE
ct.entry > ?d ct.entry > ?d
{ {

View File

@@ -612,14 +612,7 @@ SqlGen::register(new class extends SetupScript
// npc spells (-8) (run as last! .. missing from npc_scripts? "enum Spells { \s+(\w\d_)+\s+=\s(\d+) }" and "#define SPELL_(\d\w_)+\s+(\d+)") // RAID_MODE(1, 2[, 3, 4]) - macro still not considered // npc spells (-8) (run as last! .. missing from npc_scripts? "enum Spells { \s+(\w\d_)+\s+=\s(\d+) }" and "#define SPELL_(\d\w_)+\s+(\d+)") // RAID_MODE(1, 2[, 3, 4]) - macro still not considered
$world = DB::World()->selectCol(' $world = DB::World()->selectCol('
SELECT ss.action_param1 FROM smart_scripts ss WHERE ss.action_type IN (11, 75, 85, 86) UNION SELECT ss.action_param1 FROM smart_scripts ss WHERE ss.action_type IN (11, 75, 85, 86) UNION
SELECT ct.spell1 FROM creature_template ct WHERE ct.spell1 <> 0 UNION SELECT cts.Spell FROM creature_template_spell cts'
SELECT ct.spell2 FROM creature_template ct WHERE ct.spell2 <> 0 UNION
SELECT ct.spell3 FROM creature_template ct WHERE ct.spell3 <> 0 UNION
SELECT ct.spell4 FROM creature_template ct WHERE ct.spell4 <> 0 UNION
SELECT ct.spell5 FROM creature_template ct WHERE ct.spell5 <> 0 UNION
SELECT ct.spell6 FROM creature_template ct WHERE ct.spell6 <> 0 UNION
SELECT ct.spell7 FROM creature_template ct WHERE ct.spell7 <> 0 UNION
SELECT ct.spell8 FROM creature_template ct WHERE ct.spell8 <> 0'
); );
$auras = DB::World()->selectCol('SELECT cta.auras FROM creature_template_addon cta WHERE auras <> ""'); $auras = DB::World()->selectCol('SELECT cta.auras FROM creature_template_addon cta WHERE auras <> ""');