mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Updated setup to TDB r60
* removed --resume command. Always offer to resume first time setup instead. * added skill_perfect_item_template to sources
This commit is contained in:
@@ -28,7 +28,7 @@ function finish()
|
||||
die("\n");
|
||||
}
|
||||
|
||||
$opt = getopt('h', ['help', 'account', 'dbconfig', 'siteconfig', 'sql', 'build', 'sync', 'update', 'firstrun', 'resume']);
|
||||
$opt = getopt('h', ['help', 'account', 'dbconfig', 'siteconfig', 'sql', 'build', 'sync', 'update', 'firstrun']);
|
||||
if (!$opt || ((isset($opt['help']) || isset($opt['h'])) && (isset($opt['firstrun']) || isset($opt['resume']))))
|
||||
{
|
||||
echo "\nAowow Setup\n";
|
||||
@@ -39,7 +39,7 @@ if (!$opt || ((isset($opt['help']) || isset($opt['h'])) && (isset($opt['firstrun
|
||||
echo "--build : create server specific files\n";
|
||||
echo "--sync=<tabelList,> : regenerate tables/files that depend on given world-table\n";
|
||||
echo "--update : apply new sql updates fetched from github\n";
|
||||
echo "--firstrun : goes through the nessecary hoops of the initial setup. Can be interrupted and --resume'd\n";
|
||||
echo "--firstrun : goes through the nessecary hoops of the initial setup.\n";
|
||||
echo "additional options\n";
|
||||
echo "--log logfile : write ouput to file\n";
|
||||
echo "--locales=<regionCodes,> : limit setup to enUS, frFR, deDE, esES and/or ruRU (does not override config settings)\n";
|
||||
@@ -57,9 +57,8 @@ $b = [];
|
||||
switch ($cmd) // we accept only one main parameter
|
||||
{
|
||||
case 'firstrun':
|
||||
case 'resume':
|
||||
require_once 'setup/tools/clisetup/firstrun.func.php';
|
||||
firstrun($cmd == 'resume');
|
||||
firstrun();
|
||||
|
||||
finish();
|
||||
case 'account':
|
||||
|
||||
@@ -11,7 +11,7 @@ if (!CLI)
|
||||
/* string setup steps together for first use */
|
||||
/*********************************************/
|
||||
|
||||
function firstrun($resume)
|
||||
function firstrun()
|
||||
{
|
||||
require_once 'setup/tools/sqlGen.class.php';
|
||||
require_once 'setup/tools/fileGen.class.php';
|
||||
@@ -191,34 +191,30 @@ function firstrun($resume)
|
||||
/********************/
|
||||
|
||||
$startStep = 0;
|
||||
if ($resume)
|
||||
if (file_exists('cache/firstrun'))
|
||||
{
|
||||
if (file_exists('cache/firstrun'))
|
||||
{
|
||||
$rows = file('cache/firstrun');
|
||||
if ((int)$rows[0] == AOWOW_REVISION)
|
||||
$startStep = (int)$rows[1];
|
||||
else
|
||||
CLISetup::log('firstrun info is outdated! Starting from scratch.', CLISetup::LOG_WARN);
|
||||
}
|
||||
$rows = file('cache/firstrun');
|
||||
if ((int)$rows[0] == AOWOW_REVISION)
|
||||
$startStep = (int)$rows[1];
|
||||
}
|
||||
|
||||
if (!$startStep)
|
||||
{
|
||||
CLISetup::log('no usable info found.', CLISetup::LOG_WARN);
|
||||
$inp = ['x' => ['start from scratch? (y/n)', true, '/y|n/i']];
|
||||
if (!CLISetup::readInput($inp, true) || !$inp || strtolower($inp['x']) == 'n')
|
||||
{
|
||||
CLISetup::log();
|
||||
return;
|
||||
}
|
||||
if ($startStep)
|
||||
{
|
||||
|
||||
CLISetup::log();
|
||||
CLISetup::log('Found firstrun progression info. (Halted on subscript '.($steps[$startStep][1] ?: $steps[$startStep][0]).')', CLISetup::LOG_INFO);
|
||||
$inp = ['x' => ['continue setup? (y/n)', true, '/y|n/i']];
|
||||
$msg = '';
|
||||
if (!CLISetup::readInput($inp, true) || !$inp || strtolower($inp['x']) == 'n')
|
||||
{
|
||||
$msg = 'Starting setup from scratch...';
|
||||
$startStep = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
CLISetup::log('Resuming setup from step '.$startStep);
|
||||
sleep(1);
|
||||
}
|
||||
$msg = 'Resuming setup from step '.$startStep.'...';
|
||||
|
||||
CLISetup::log();
|
||||
CLISetup::log($msg);
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
/*******/
|
||||
@@ -270,16 +266,15 @@ function firstrun($resume)
|
||||
$inp = ['x' => ['['.CLISetup::bold('c').']ontinue anyway? ['.CLISetup::bold('r').']etry? ['.CLISetup::bold('a').']bort?', true, '/c|r|a/i']];
|
||||
if (CLISetup::readInput($inp, true) && $inp)
|
||||
{
|
||||
CLISetup::log();
|
||||
switch(strtolower($inp['x']))
|
||||
{
|
||||
case 'c':
|
||||
$saveProgress($idx);
|
||||
break 2;
|
||||
case 'r':
|
||||
CLISetup::log();
|
||||
break;
|
||||
case 'a':
|
||||
CLISetup::log();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ if (!CLI)
|
||||
},
|
||||
*/
|
||||
|
||||
$reqDBC = ['creatureFamily'];
|
||||
$reqDBC = ['creaturefamily'];
|
||||
|
||||
function pets()
|
||||
{
|
||||
|
||||
@@ -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', 'quest_template_addon', 'playercreateinfo_item', 'npc_trainer', 'skill_discovery_template', 'playercreateinfo_skills', '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', 'skill_perfect_item_template']]
|
||||
);
|
||||
|
||||
public static $cliOpts = [];
|
||||
|
||||
@@ -31,8 +31,8 @@ function creature(array $ids = [])
|
||||
"" AS textureString, -- textureString
|
||||
0 AS modelId, -- modelId
|
||||
"" AS iconString, -- iconString
|
||||
name, IFNULL(name_loc2, ""), IFNULL(name_loc3, ""), IFNULL(name_loc6, ""), IFNULL(name_loc8, ""),
|
||||
subname, IFNULL(subname_loc2, ""), IFNULL(subname_loc3, ""), IFNULL(subname_loc6, ""), IFNULL(subname_loc8, ""),
|
||||
ct.name, ctl2.`Name` AS n2, ctl3.`Name` AS n3, ctl6.`Name` AS n6, ctl8.`Name` AS n8,
|
||||
subname, ctl2.`Title` AS t2, ctl3.`Title` AS t3, ctl6.`Title` AS t6, ctl8.`Title` AS t8,
|
||||
minLevel, maxLevel,
|
||||
exp,
|
||||
faction,
|
||||
@@ -82,7 +82,13 @@ function creature(array $ids = [])
|
||||
JOIN
|
||||
creature_classlevelstats max ON ct.unit_class = max.class AND ct.maxlevel = max.level
|
||||
LEFT JOIN
|
||||
locales_creature lc ON lc.entry = ct.entry
|
||||
creature_template_locale ctl2 ON ct.entry = ctl2.entry AND ctl2.`locale` = "frFR"
|
||||
LEFT JOIN
|
||||
creature_template_locale ctl3 ON ct.entry = ctl3.entry AND ctl3.`locale` = "deDE"
|
||||
LEFT JOIN
|
||||
creature_template_locale ctl6 ON ct.entry = ctl6.entry AND ctl6.`locale` = "esES"
|
||||
LEFT JOIN
|
||||
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
|
||||
{
|
||||
|
||||
@@ -25,39 +25,39 @@ function quests(array $ids = [])
|
||||
$baseQuery = '
|
||||
SELECT
|
||||
q.ID,
|
||||
QuestType AS Method,
|
||||
QuestType, -- Method
|
||||
QuestLevel,
|
||||
MinLevel,
|
||||
MaxLevel,
|
||||
QuestSortID,
|
||||
QuestSortID AS zoneOrSortBak, -- ZoneOrSortBak
|
||||
QuestInfoID AS QuestType,
|
||||
QuestInfoID, -- QuestType
|
||||
SuggestedGroupNum,
|
||||
LimitTime,
|
||||
TimeAllowed,
|
||||
IFNULL(gesqr.eventEntry, 0) AS eventId,
|
||||
PrevQuestId,
|
||||
NextQuestId,
|
||||
ExclusiveGroup,
|
||||
NextQuestIdChain,
|
||||
RewardNextQuest,
|
||||
Flags,
|
||||
SpecialFlags,
|
||||
0 AS cuFlags, -- cuFlags
|
||||
AllowableClasses AS RequiredClasses,
|
||||
RequiredRaces,
|
||||
AllowableClasses,
|
||||
AllowableRaces,
|
||||
RequiredSkillId, RequiredSkillPoints,
|
||||
RequiredFactionId1, RequiredFactionId2,
|
||||
RequiredFactionValue1, RequiredFactionValue2,
|
||||
RequiredMinRepFaction, RequiredMaxRepFaction,
|
||||
RequiredMinRepValue, RequiredMaxRepValue,
|
||||
RequiredPlayerKills,
|
||||
SourceItemId,
|
||||
ProvidedItemCount AS SourceItemCount,
|
||||
StartItem,
|
||||
ProvidedItemCount,
|
||||
SourceSpellId,
|
||||
RewardXPId, -- QuestXP.dbc x level
|
||||
RewardOrRequiredMoney,
|
||||
RewardMoneyMaxLevel,
|
||||
RewardSpell, RewardSpellCast,
|
||||
RewardHonor * 124 * RewardHonorMultiplier, -- alt calculation in QuestDef.cpp -> Quest::CalculateHonorGain(playerLevel)
|
||||
RewardXPDifficulty, -- QuestXP.dbc x level
|
||||
RewardMoney,
|
||||
RewardBonusMoney,
|
||||
RewardDisplaySpell, RewardSpell,
|
||||
RewardHonor * 124 * RewardKillHonor, -- alt calculation in QuestDef.cpp -> Quest::CalculateHonorGain(playerLevel)
|
||||
RewardMailTemplateId, RewardMailDelay,
|
||||
RewardTitle,
|
||||
RewardTalents,
|
||||
@@ -75,14 +75,14 @@ function quests(array $ids = [])
|
||||
LogTitle, Title_loc2, Title_loc3, Title_loc6, Title_loc8,
|
||||
LogDescription, Objectives_loc2, Objectives_loc3, Objectives_loc6, Objectives_loc8,
|
||||
QuestDescription, Details_loc2, Details_loc3, Details_loc6, Details_loc8,
|
||||
EndText, EndText_loc2, EndText_loc3, EndText_loc6, EndText_loc8,
|
||||
qor.RewardText AS OfferRewardText, OfferRewardText_loc2, OfferRewardText_loc3, OfferRewardText_loc6, OfferRewardText_loc8,
|
||||
qri.CompletionText AS RequestItemsText, RequestItemsText_loc2, RequestItemsText_loc3, RequestItemsText_loc6, RequestItemsText_loc8,
|
||||
AreaDescription, EndText_loc2, EndText_loc3, EndText_loc6, EndText_loc8,
|
||||
qor.RewardText, OfferRewardText_loc2, OfferRewardText_loc3, OfferRewardText_loc6, OfferRewardText_loc8,
|
||||
qri.CompletionText, RequestItemsText_loc2, RequestItemsText_loc3, RequestItemsText_loc6, RequestItemsText_loc8,
|
||||
QuestCompletionLog, CompletedText_loc2, CompletedText_loc3, CompletedText_loc6, CompletedText_loc8,
|
||||
RequiredNpcOrGo1, RequiredNpcOrGo2, RequiredNpcOrGo3, RequiredNpcOrGo4,
|
||||
RequiredNpcOrGoCount1, RequiredNpcOrGoCount2, RequiredNpcOrGoCount3, RequiredNpcOrGoCount4,
|
||||
RequiredSourceItemId1, RequiredSourceItemId2, RequiredSourceItemId3, RequiredSourceItemId4,
|
||||
RequiredSourceItemCount1, RequiredSourceItemCount2, RequiredSourceItemCount3, RequiredSourceItemCount4,
|
||||
ItemDrop1, ItemDrop2, ItemDrop3, ItemDrop4,
|
||||
ItemDropQuantity1, ItemDropQuantity2, ItemDropQuantity3, ItemDropQuantity4,
|
||||
RequiredItemId1, RequiredItemId2, RequiredItemId3, RequiredItemId4, RequiredItemId5, RequiredItemId6,
|
||||
RequiredItemCount1, RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, RequiredItemCount6,
|
||||
ObjectiveText1, ObjectiveText1_loc2, ObjectiveText1_loc3, ObjectiveText1_loc6, ObjectiveText1_loc8,
|
||||
|
||||
@@ -25,6 +25,7 @@ if (!CLI)
|
||||
* gameobject_template
|
||||
* quest_template
|
||||
* quest_template_addon
|
||||
* skill_perfect_item_template
|
||||
|
||||
* npc_trainer
|
||||
* npc_vendor
|
||||
@@ -177,6 +178,12 @@ function source(array $ids = [])
|
||||
ARRAY_KEY',
|
||||
[164, 165, 171, 182, 186, 197, 202, 333, 393, 755, 773, 129, 185, 356, 762]
|
||||
);
|
||||
|
||||
// assume unique craft spells per item
|
||||
if ($perfItems = DB::World()->selectCol('SELECT perfectItemType AS ARRAY_KEY, spellId AS spell FROM skill_perfect_item_template'))
|
||||
foreach ($perfItems AS $item => $spell)
|
||||
$itemSpells[$item] = $spell;
|
||||
|
||||
$spellItems = DB::World()->select('SELECT entry AS ARRAY_KEY, class, subclass, spellid_1, spelltrigger_1, spellid_2, spelltrigger_2 FROM item_template WHERE entry IN (?a)', array_keys($itemSpells));
|
||||
|
||||
foreach ($spellItems as $iId => $si)
|
||||
@@ -390,16 +397,16 @@ function source(array $ids = [])
|
||||
$itemBuff = [];
|
||||
$quests = DB::World()->select(
|
||||
'SELECT n.item AS ARRAY_KEY, n.ID AS quest, SUM(n.qty) AS qty, BIT_OR(n.side) AS side, it.class, it.subclass, it.spellid_1, it.spelltrigger_1, it.spellid_2, it.spelltrigger_2 FROM (
|
||||
SELECT RewardChoiceItemID1 AS item, 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 RewardChoiceItemID1 > 0 GROUP BY item UNION
|
||||
SELECT RewardChoiceItemID2 AS item, 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 RewardChoiceItemID2 > 0 GROUP BY item UNION
|
||||
SELECT RewardChoiceItemID3 AS item, 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 RewardChoiceItemID3 > 0 GROUP BY item UNION
|
||||
SELECT RewardChoiceItemID4 AS item, 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 RewardChoiceItemID4 > 0 GROUP BY item UNION
|
||||
SELECT RewardChoiceItemID5 AS item, 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 RewardChoiceItemID5 > 0 GROUP BY item UNION
|
||||
SELECT RewardChoiceItemID6 AS item, 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 RewardChoiceItemID6 > 0 GROUP BY item UNION
|
||||
SELECT RewardItem1 AS item, 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 RewardItem1 > 0 GROUP BY item UNION
|
||||
SELECT RewardItem2 AS item, 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 RewardItem2 > 0 GROUP BY item UNION
|
||||
SELECT RewardItem3 AS item, 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 RewardItem3 > 0 GROUP BY item UNION
|
||||
SELECT RewardItem4 AS item, 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 RewardItem4 > 0 GROUP BY item
|
||||
SELECT RewardChoiceItemID1 AS item, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE RewardChoiceItemID1 > 0 GROUP BY item UNION
|
||||
SELECT RewardChoiceItemID2 AS item, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE RewardChoiceItemID2 > 0 GROUP BY item UNION
|
||||
SELECT RewardChoiceItemID3 AS item, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE RewardChoiceItemID3 > 0 GROUP BY item UNION
|
||||
SELECT RewardChoiceItemID4 AS item, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE RewardChoiceItemID4 > 0 GROUP BY item UNION
|
||||
SELECT RewardChoiceItemID5 AS item, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE RewardChoiceItemID5 > 0 GROUP BY item UNION
|
||||
SELECT RewardChoiceItemID6 AS item, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE RewardChoiceItemID6 > 0 GROUP BY item UNION
|
||||
SELECT RewardItem1 AS item, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE RewardItem1 > 0 GROUP BY item UNION
|
||||
SELECT RewardItem2 AS item, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE RewardItem2 > 0 GROUP BY item UNION
|
||||
SELECT RewardItem3 AS item, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE RewardItem3 > 0 GROUP BY item UNION
|
||||
SELECT RewardItem4 AS item, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE RewardItem4 > 0 GROUP BY item
|
||||
) n JOIN item_template it ON it.entry = n.item
|
||||
GROUP BY item'
|
||||
);
|
||||
@@ -417,7 +424,7 @@ function source(array $ids = [])
|
||||
qt.ID AS entry,
|
||||
it.class, it.subclass, it.spellid_1, it.spelltrigger_1, it.spellid_2, it.spelltrigger_2,
|
||||
count(1) AS qty,
|
||||
BIT_OR(IF(qt.RequiredRaces & 0x2B2 AND !(qt.RequiredRaces & 0x44D), 2, IF(qt.RequiredRaces & 0x44D AND !(qt.RequiredRaces & 0x2B2), 1, 3))) AS side
|
||||
BIT_OR(IF(qt.AllowableRaces & 0x2B2 AND !(qt.AllowableRaces & 0x44D), 2, IF(qt.AllowableRaces & 0x44D AND !(qt.AllowableRaces & 0x2B2), 1, 3))) AS side
|
||||
FROM
|
||||
mail_loot_template mlt
|
||||
JOIN
|
||||
@@ -1048,9 +1055,9 @@ function source(array $ids = [])
|
||||
CLISetup::log(' * #4 Quest');
|
||||
$quests = DB::World()->select('
|
||||
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(RewardSpell = 0, RewardDisplaySpell, RewardSpell) AS spell, ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 0x2B2), 1, 3)) AS side FROM quest_template WHERE IF(RewardSpell = 0, RewardDisplaySpell, RewardSpell) > 0 GROUP BY spell
|
||||
UNION
|
||||
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
|
||||
SELECT qta.SourceSpellId AS spell, qt.ID, COUNT(1) AS qty, IF(AllowableRaces & 0x2B2 AND !(AllowableRaces & 0x44D), 2, IF(AllowableRaces & 0x44D AND !(AllowableRaces & 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)
|
||||
|
||||
@@ -38,7 +38,7 @@ function titles()
|
||||
$questQuery = '
|
||||
SELECT
|
||||
qt.RewardTitle AS ARRAY_KEY,
|
||||
qt.RequiredRaces,
|
||||
qt.AllowableRaces,
|
||||
ge.eventEntry
|
||||
FROM
|
||||
quest_template qt
|
||||
@@ -80,7 +80,7 @@ function titles()
|
||||
if ($data['eventEntry'])
|
||||
DB::Aowow()->query('UPDATE ?_titles SET eventId = ?d WHERE id = ?d', $data['eventEntry'], $tId);
|
||||
|
||||
$side = Util::sideByRaceMask($data['RequiredRaces']);
|
||||
$side = Util::sideByRaceMask($data['AllowableRaces']);
|
||||
if ($side == 3)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user