Setup/Fixups

* some additions to latest pull requests
   - added missing dependancies
   - added quest_template changes to source.func.php
This commit is contained in:
Sarjuuk
2015-08-19 17:10:50 +02:00
parent af7015097b
commit cb1916c484
4 changed files with 16 additions and 12 deletions

View File

@@ -57,9 +57,9 @@ class SqlGen
'creature' => [null, null, null, ['creature_template', 'locales_creature', 'creature_classlevelstats', 'instance_encounters']],
'currencies' => [null, null, null, ['item_template', 'locales_item']],
'events' => [null, null, null, ['game_event', 'game_event_prerequisite']],
'objects' => [null, null, null, ['gameobject_template', 'locales_gameobject', 'gameobject_questitem']],
'objects' => [null, null, null, ['gameobject_template', 'gameobject_template_locale', 'gameobject_questitem']],
'pet' => [null, null, null, ['creature_template', 'creature']],
'quests' => [null, null, null, ['quest_template', 'locales_quest', 'game_event', 'game_event_seasonal_questrelation']],
'quests' => [null, null, null, ['quest_template', 'quest_template_addon', 'locales_quest', 'game_event', 'game_event_seasonal_questrelation']],
'quests_startend' => [null, null, null, ['creature_queststarter', 'creature_questender', 'game_event_creature_quest', 'gameobject_queststarter', 'gameobject_questender', 'game_event_gameobject_quest', 'item_template']],
'spell' => [null, null, null, ['skill_discovery_template', 'item_template', 'creature_template', 'creature_template_addon', 'smart_scripts', 'npc_trainer', 'disables', 'spell_ranks', 'spell_dbc']],
'spelldifficulty' => [null, null, null, ['spelldifficulty_dbc']],
@@ -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_skill', 'achievement_reward']]
'source' => [null, null, ['spell', 'achievement'], ['npc_vendor', 'game_event_npc_vendor', 'creature', 'quest_template', 'quest_template_addon', 'playercreateinfo_item', 'npc_trainer', 'skill_discovery_template', 'playercreateinfo_skills', 'achievement_reward']]
);
public static $cliOpts = [];

View File

@@ -9,7 +9,7 @@ if (!CLI)
/* deps:
* gameobject_template
* locales_gameobject
* gameobject_template_locale
* gameobject_questitem
*/
@@ -30,11 +30,11 @@ function objects(array $ids = [])
IF(`type` IN (3, 9, 25), `type`, 0)))), -- regular chests, books, pools
0 AS event, -- linked worldevent
displayId,
go.name,
gtl2.`name` AS name_loc2,
gtl3.`name` AS name_loc3,
gtl6.`name` AS name_loc6,
gtl8.`name` AS name_loc8,
go.name,
gtl2.`name` AS name_loc2,
gtl3.`name` AS name_loc3,
gtl6.`name` AS name_loc6,
gtl8.`name` AS name_loc8,
faction,
flags,
0 AS cuFlags, -- custom Flags

View File

@@ -9,6 +9,7 @@ if (!CLI)
/* deps:
* quest_template
* quest_template_addon
* locales_quest
* game_event
* game_event_seasonal_questrelation

View File

@@ -24,6 +24,7 @@ if (!CLI)
* creature_template
* gameobject_template
* quest_template
* quest_template_addon
* npc_trainer
* npc_vendor
@@ -420,11 +421,13 @@ function source(array $ids = [])
FROM
mail_loot_template mlt
JOIN
quest_template qt ON qt.RewardMailTemplateId = mlt.entry
quest_template_addon qta ON qta.RewardMailTemplateId = mlt.entry
JOIN
quest_template qt ON qt.ID = qta.ID
LEFT JOIN
item_template it ON it.entry = mlt.Item AND mlt.Reference <= 0
WHERE
qt.RewardMailTemplateId > 0
qta.RewardMailTemplateId > 0
GROUP BY
ARRAY_KEY
');
@@ -1047,7 +1050,7 @@ function source(array $ids = [])
SELECT spell AS ARRAY_KEY, id, SUM(qty) AS qty, BIT_OR(side) AS side FROM (
SELECT IF(rewardSpellCast = 0, rewardSpell, rewardSpellCast) AS spell, ID, COUNT(1) AS qty, IF(RequiredRaces & 0x2B2 AND !(RequiredRaces & 0x44D), 2, IF(RequiredRaces & 0x44D AND !(RequiredRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE IF(rewardSpellCast = 0, rewardSpell, rewardSpellCast) > 0 GROUP BY spell
UNION
SELECT SourceSpellId AS spell, ID, COUNT(1) AS qty, IF(RequiredRaces & 0x2B2 AND !(RequiredRaces & 0x44D), 2, IF(RequiredRaces & 0x44D AND !(RequiredRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE SourceSpellId > 0 GROUP BY spell
SELECT qta.SourceSpellId AS spell, qt.ID, COUNT(1) AS qty, IF(RequiredRaces & 0x2B2 AND !(RequiredRaces & 0x44D), 2, IF(RequiredRaces & 0x44D AND !(RequiredRaces & 0x2B2), 1, 3)) AS side FROM quest_template qt JOIN quest_template_addon qta ON qta.ID = qt.ID WHERE qta.SourceSpellId > 0 GROUP BY spell
) t GROUP BY spell');
if ($quests)