Skip to content
Permalink
Browse files

Creature/Spells

 * update db structure for TrinityCore/TrinityCore@d5fb0a3
  • Loading branch information
Sarjuuk committed Feb 14, 2020
1 parent 243429b commit 48552a97ab8c04df64fe59fd0556c0c3aeefa6d0
Showing with 18 additions and 9 deletions.
  1. +17 −1 setup/tools/sqlgen/creature.func.php
  2. +1 −8 setup/tools/sqlgen/spell.func.php
@@ -56,7 +56,7 @@ public function generate(array $ids = []) : bool
type,
type_flags,
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,
VehicleId,
mingold, maxgold,
@@ -89,6 +89,22 @@ public function generate(array $ids = []) : bool
creature_template_locale ctl8 ON ct.entry = ctl8.entry AND ctl8.`locale` = "ruRU"
LEFT JOIN
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
ct.entry > ?d
{
@@ -612,14 +612,7 @@ public function generate(array $ids = []) : bool
// 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('
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 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'
SELECT cts.Spell FROM creature_template_spell cts'
);

$auras = DB::World()->selectCol('SELECT cta.auras FROM creature_template_addon cta WHERE auras <> ""');

0 comments on commit 48552a9

Please sign in to comment.
You can’t perform that action at this time.