mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Setup/Fixups
* some additions to latest pull requests - added missing dependancies - added quest_template changes to source.func.php
This commit is contained in:
@@ -57,9 +57,9 @@ class SqlGen
|
|||||||
'creature' => [null, null, null, ['creature_template', 'locales_creature', 'creature_classlevelstats', 'instance_encounters']],
|
'creature' => [null, null, null, ['creature_template', 'locales_creature', 'creature_classlevelstats', 'instance_encounters']],
|
||||||
'currencies' => [null, null, null, ['item_template', 'locales_item']],
|
'currencies' => [null, null, null, ['item_template', 'locales_item']],
|
||||||
'events' => [null, null, null, ['game_event', 'game_event_prerequisite']],
|
'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']],
|
'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']],
|
'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']],
|
'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']],
|
'spelldifficulty' => [null, null, null, ['spelldifficulty_dbc']],
|
||||||
@@ -70,7 +70,7 @@ class SqlGen
|
|||||||
'zones' => [null, null, null, ['access_requirement']],
|
'zones' => [null, null, null, ['access_requirement']],
|
||||||
'itemset' => [null, null, ['spell'], ['item_template', 'game_event']],
|
'itemset' => [null, null, ['spell'], ['item_template', 'game_event']],
|
||||||
'item_stats' /* + ench */ => [null, null, ['items', 'spell'], null],
|
'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 = [];
|
public static $cliOpts = [];
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ if (!CLI)
|
|||||||
|
|
||||||
/* deps:
|
/* deps:
|
||||||
* gameobject_template
|
* gameobject_template
|
||||||
* locales_gameobject
|
* gameobject_template_locale
|
||||||
* gameobject_questitem
|
* gameobject_questitem
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ if (!CLI)
|
|||||||
|
|
||||||
/* deps:
|
/* deps:
|
||||||
* quest_template
|
* quest_template
|
||||||
|
* quest_template_addon
|
||||||
* locales_quest
|
* locales_quest
|
||||||
* game_event
|
* game_event
|
||||||
* game_event_seasonal_questrelation
|
* game_event_seasonal_questrelation
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ if (!CLI)
|
|||||||
* creature_template
|
* creature_template
|
||||||
* gameobject_template
|
* gameobject_template
|
||||||
* quest_template
|
* quest_template
|
||||||
|
* quest_template_addon
|
||||||
|
|
||||||
* npc_trainer
|
* npc_trainer
|
||||||
* npc_vendor
|
* npc_vendor
|
||||||
@@ -420,11 +421,13 @@ function source(array $ids = [])
|
|||||||
FROM
|
FROM
|
||||||
mail_loot_template mlt
|
mail_loot_template mlt
|
||||||
JOIN
|
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
|
LEFT JOIN
|
||||||
item_template it ON it.entry = mlt.Item AND mlt.Reference <= 0
|
item_template it ON it.entry = mlt.Item AND mlt.Reference <= 0
|
||||||
WHERE
|
WHERE
|
||||||
qt.RewardMailTemplateId > 0
|
qta.RewardMailTemplateId > 0
|
||||||
GROUP BY
|
GROUP BY
|
||||||
ARRAY_KEY
|
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 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
|
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
|
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');
|
) t GROUP BY spell');
|
||||||
|
|
||||||
if ($quests)
|
if ($quests)
|
||||||
|
|||||||
Reference in New Issue
Block a user