From af7015097b987b281b762c993de4fe2f6b15f135 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Wed, 19 Aug 2015 16:45:44 +0200 Subject: [PATCH] Setup/Source * get starter spells from playercreateinfo_skill instead of playercreateinfo_spell (changed in https://github.com/TrinityCore/TrinityCore/commit/2a3546ca36468b81d673bdb27315006144af3165) thanks @Toshik for pointing that out --- setup/tools/sqlGen.class.php | 2 +- setup/tools/sqlgen/source.func.php | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/setup/tools/sqlGen.class.php b/setup/tools/sqlGen.class.php index 38cdfd11..8b14ce2f 100644 --- a/setup/tools/sqlGen.class.php +++ b/setup/tools/sqlGen.class.php @@ -70,7 +70,7 @@ class SqlGen 'zones' => [null, null, null, ['access_requirement']], 'itemset' => [null, null, ['spell'], ['item_template', 'game_event']], 'item_stats' /* + ench */ => [null, null, ['items', 'spell'], null], - 'source' => [null, null, ['spell', 'achievement'], ['npc_vendor', 'game_event_npc_vendor', 'creature', 'quest_template', 'playercreateinfo_item', 'npc_trainer', 'skill_discovery_template', 'playercreateinfo_spell', 'achievement_reward']] + 'source' => [null, null, ['spell', 'achievement'], ['npc_vendor', 'game_event_npc_vendor', 'creature', 'quest_template', 'playercreateinfo_item', 'npc_trainer', 'skill_discovery_template', 'playercreateinfo_skill', 'achievement_reward']] ); public static $cliOpts = []; diff --git a/setup/tools/sqlgen/source.func.php b/setup/tools/sqlgen/source.func.php index 8f34be00..abb7b492 100644 --- a/setup/tools/sqlgen/source.func.php +++ b/setup/tools/sqlgen/source.func.php @@ -31,7 +31,7 @@ if (!CLI) * creature * playercreateinfo_item - * playercreateinfo_spell + * playercreateinfo_skill * achievement_reward * skill_discovery_template */ @@ -1149,15 +1149,13 @@ function source(array $ids = []) CLISetup::log(' * #10 Starter'); /* acquireMethod ABILITY_LEARNED_ON_GET_PROFESSION_SKILL = 1, learnedAt = 1 && source10 = 1 - ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL = 2 not used for now + ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL = 2 */ - $subSkills = DB::Aowow()->subquery('SELECT ?d, spellId, 1, NULL AS m, NULL AS mt FROM dbc_skilllineability WHERE acquireMethod = 1 AND (reqSkillLevel = 1 OR skillLineId = 129) GROUP BY spellId', TYPE_SPELL); + $pcis = DB::World()->selectCol('SELECT DISTINCT skill FROM playercreateinfo_skills'); + $subSkills = DB::Aowow()->subquery('SELECT ?d, spellId, 1, NULL AS m, NULL AS mt FROM dbc_skilllineability WHERE {(skillLineId IN (?a) AND acquireMethod = 2) OR} (acquireMethod = 1 AND (reqSkillLevel = 1 OR skillLineId = 129)) GROUP BY spellId', $pcis ?: DBSIMPLE_SKIP, TYPE_SPELL); DB::Aowow()->query($insSub, 10, $subSkills, 10, 10); - if ($pcis = DB::World()->select('SELECT ?d, Spell, 1 FROM playercreateinfo_spell', TYPE_SPELL)) - DB::Aowow()->query(queryfy('[V]', $pcis, $insBasic), 10, 10, 10); - /**********/ /* Titles */