mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Misc
* define and use some more magic numbers * move id-based custom data from spell SetupScript to aowow_setup_custom_data table * hide on unused glyph while at it
This commit is contained in:
@@ -1144,6 +1144,9 @@ define('SKILL_JEWELCRAFTING', 755);
|
||||
define('SKILL_RIDING', 762);
|
||||
define('SKILL_INSCRIPTION', 773);
|
||||
|
||||
define('SKILLS_TRADE_PRIMARY', [SKILL_BLACKSMITHING, SKILL_LEATHERWORKING, SKILL_ALCHEMY, SKILL_HERBALISM, SKILL_MINING, SKILL_TAILORING, SKILL_ENGINEERING, SKILL_ENCHANTING, SKILL_SKINNING, SKILL_JEWELCRAFTING, SKILL_INSCRIPTION]);
|
||||
define('SKILLS_TRADE_SECONDARY', [SKILL_FIRST_AID, SKILL_COOKING, SKILL_FISHING, SKILL_RIDING]);
|
||||
|
||||
|
||||
// AchievementCriteriaCondition
|
||||
define('ACHIEVEMENT_CRITERIA_CONDITION_NO_DEATH', 1); // reset progress on death
|
||||
@@ -1710,4 +1713,15 @@ define('SRC_FLAG_COMMON', 0x02);
|
||||
define('SRC_FLAG_DUNGEON_DROP', 0x10);
|
||||
define('SRC_FLAG_RAID_DROP', 0x20);
|
||||
|
||||
// Map Types
|
||||
define('MAP_TYPE_ZONE', 0);
|
||||
define('MAP_TYPE_TRANSIT', 1);
|
||||
define('MAP_TYPE_DUNGEON', 2);
|
||||
define('MAP_TYPE_RAID', 3);
|
||||
define('MAP_TYPE_BATTLEGROUND', 4);
|
||||
define('MAP_TYPE_DUNGEON_HC', 5);
|
||||
define('MAP_TYPE_ARENA', 6);
|
||||
define('MAP_TYPE_MMODE_RAID', 7);
|
||||
define('MAP_TYPE_MMODE_RAID_HC', 8);
|
||||
|
||||
?>
|
||||
|
||||
@@ -239,7 +239,8 @@ class EnchantmentListFilter extends Filter
|
||||
{
|
||||
protected $enums = array(
|
||||
3 => array( // requiresprof
|
||||
null, 171, 164, 185, 333, 202, 129, 755, 165, 186, 197, true, false, 356, 182, 773
|
||||
null, SKILL_ALCHEMY, SKILL_BLACKSMITHING, SKILL_COOKING, SKILL_ENCHANTING, SKILL_ENGINEERING, SKILL_FIRST_AID, SKILL_JEWELCRAFTING,
|
||||
SKILL_LEATHERWORKING, SKILL_MINING, SKILL_TAILORING, true, false, SKILL_FISHING, SKILL_HERBALISM, SKILL_INSCRIPTION
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ class SpellList extends BaseType
|
||||
public static $skillLines = array(
|
||||
6 => [ 43, 44, 45, 46, 54, 55, 95, 118, 136, 160, 162, 172, 173, 176, 226, 228, 229, 473], // Weapons
|
||||
8 => [293, 413, 414, 415, 433], // Armor
|
||||
9 => [129, 185, 356, 762], // sec. Professions
|
||||
9 => SKILLS_TRADE_SECONDARY, // sec. Professions
|
||||
10 => [ 98, 109, 111, 113, 115, 137, 138, 139, 140, 141, 313, 315, 673, 759], // Languages
|
||||
11 => [164, 165, 171, 182, 186, 197, 202, 333, 393, 755, 773] // prim. Professions
|
||||
11 => SKILLS_TRADE_PRIMARY // prim. Professions
|
||||
);
|
||||
|
||||
public static $spellTypes = array(
|
||||
|
||||
@@ -92,11 +92,13 @@ class NpcPage extends GenericPage
|
||||
{
|
||||
switch (DB::Aowow()->selectCell('SELECT `type` FROM ?_zones WHERE id = ?d', $maps[0]))
|
||||
{
|
||||
case 2:
|
||||
case 5: $mapType = 1; break;
|
||||
case 3:
|
||||
case 7:
|
||||
case 8: $mapType = 2; break;
|
||||
// case MAP_TYPE_DUNGEON:
|
||||
case MAP_TYPE_DUNGEON_HC:
|
||||
$mapType = 1; break;
|
||||
// case MAP_TYPE_RAID:
|
||||
case MAP_TYPE_MMODE_RAID:
|
||||
case MAP_TYPE_MMODE_RAID_HC:
|
||||
$mapType = 2; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -320,7 +320,7 @@ if (!CLI)
|
||||
$scripts[] = function() use ($exAdd, $spellFactions)
|
||||
{
|
||||
// special case: secondary skills are always requested, so put them in one single file (185, 129, 356); it also contains g_skill_order
|
||||
$skills = [171, 164, 333, 202, 182, 773, 755, 165, 186, 393, 197, [185, 129, 356]];
|
||||
$skills = array_merge(SKILLS_TRADE_PRIMARY, [[185, 129, 356]]);
|
||||
$success = true;
|
||||
$baseCnd = array(
|
||||
CFG_SQL_LIMIT_NONE,
|
||||
|
||||
@@ -159,7 +159,7 @@ if (!CLI)
|
||||
{
|
||||
// profession perks ... too lazy to formulate a search algorithm for two occurences
|
||||
return array(
|
||||
186 => array( // mining / toughness
|
||||
SKILL_MINING => array( // mining / toughness
|
||||
75 => ['sta' => 3],
|
||||
150 => ['sta' => 5],
|
||||
225 => ['sta' => 7],
|
||||
@@ -167,7 +167,7 @@ if (!CLI)
|
||||
375 => ['sta' => 30],
|
||||
450 => ['sta' => 60],
|
||||
),
|
||||
393 => array( // skinning / master of anatomy
|
||||
SKILL_SKINNING => array( // skinning / master of anatomy
|
||||
75 => ['critstrkrtng' => 3],
|
||||
150 => ['critstrkrtng' => 6],
|
||||
225 => ['critstrkrtng' => 9],
|
||||
|
||||
@@ -18,11 +18,11 @@ SqlGen::register(new class extends SetupScript
|
||||
protected $dbcSourceFiles = ['gemproperties', 'itemdisplayinfo', 'spell', 'glyphproperties', 'durabilityquality', 'durabilitycosts'];
|
||||
|
||||
private $skill2cat = array(
|
||||
773 => 11, // inscription
|
||||
356 => 9, // fishing
|
||||
186 => 12, // mining
|
||||
185 => 5, // cooking
|
||||
171 => 6 // alchemy
|
||||
SKILL_INSCRIPTION => 11,
|
||||
SKILL_FISHING => 9,
|
||||
SKILL_MINING => 12,
|
||||
SKILL_COOKING => 5,
|
||||
SKILL_ALCHEMY => 6
|
||||
);
|
||||
|
||||
public function generate(array $ids = []) : bool
|
||||
|
||||
@@ -274,10 +274,10 @@ SqlGen::register(new class extends SetupScript
|
||||
{
|
||||
switch ($spawns[$entry]['type'])
|
||||
{
|
||||
case 5: // heroic dungeon
|
||||
case MAP_TYPE_DUNGEON_HC:
|
||||
$mMask |= SRC_FLAG_DUNGEON_DROP; break;
|
||||
case 7: // multi mode raid
|
||||
case 8: // heroic multi mode raid
|
||||
case MAP_TYPE_MMODE_RAID:
|
||||
case MAP_TYPE_MMODE_RAID_HC:
|
||||
$mMask |= SRC_FLAG_RAID_DROP; break;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ if (!CLI)
|
||||
|
||||
SqlGen::register(new class extends SetupScript
|
||||
{
|
||||
use TrCustomData;
|
||||
|
||||
protected $command = 'spell';
|
||||
|
||||
protected $tblDependencyAowow = ['icons'];
|
||||
@@ -451,9 +453,9 @@ SqlGen::register(new class extends SetupScript
|
||||
CLI::write(' - misc fixups & icons');
|
||||
|
||||
// FU [FixUps]
|
||||
DB::Aowow()->query('UPDATE ?_spell SET reqRaceMask = ?d WHERE skillLine1 = ?d', 1 << 10, 760); // Draenai Racials
|
||||
DB::Aowow()->query('UPDATE ?_spell SET reqRaceMask = ?d WHERE skillLine1 = ?d', 1 << 9, 756); // Bloodelf Racials
|
||||
DB::Aowow()->query('UPDATE ?_spell SET reqClassMask = ?d WHERE id = ?d', 1 << 7, 30449); // Mage - Spellsteal
|
||||
DB::Aowow()->query('UPDATE ?_spell SET reqRaceMask = ?d WHERE skillLine1 = ?d', RACE_DRAENEI, 760); // Draenai Racials
|
||||
DB::Aowow()->query('UPDATE ?_spell SET reqRaceMask = ?d WHERE skillLine1 = ?d', RACE_BLOODELF, 756); // Bloodelf Racials
|
||||
DB::Aowow()->query('UPDATE ?_spell SET reqClassMask = ?d WHERE id = ?d', CLASS_MAGE, 30449); // Mage - Spellsteal
|
||||
|
||||
// triggered by spell
|
||||
DB::Aowow()->query('
|
||||
@@ -503,7 +505,7 @@ SqlGen::register(new class extends SetupScript
|
||||
|
||||
$itemReqs = DB::World()->selectCol('SELECT entry AS ARRAY_KEY, requiredSpell FROM item_template WHERE requiredSpell NOT IN (?a)', [0, 34090, 34091]); // not riding
|
||||
foreach ($itemReqs AS $itemId => $req)
|
||||
DB::Aowow()->query('UPDATE ?_spell SET reqSpellId = ?d WHERE skillLine1 IN (?a) AND effect1CreateItemId = ?d', $req, [164, 165, 197, 202], $itemId);
|
||||
DB::Aowow()->query('UPDATE ?_spell SET reqSpellId = ?d WHERE skillLine1 IN (?a) AND effect1CreateItemId = ?d', $req, [SKILL_BLACKSMITHING, SKILL_LEATHERWORKING, SKILL_TAILORING, SKILL_ENGINEERING], $itemId);
|
||||
|
||||
// setting icons
|
||||
DB::Aowow()->query('UPDATE ?_spell s, ?_icons ic, dbc_spellicon si SET s.iconId = ic.id WHERE s.iconIdBak = si.id AND ic.name = LOWER(SUBSTRING_INDEX(si.iconPath, "\\\\", -1))');
|
||||
@@ -580,9 +582,7 @@ SqlGen::register(new class extends SetupScript
|
||||
(s.SpellFamilyId = 6 AND s.SpellFamilyFlags1 & 0x8000000 AND s.rank_loc0 <> "") OR -- Priest: Bling Bling
|
||||
(s.SpellFamilyId = 8 AND s.attributes0 = 0x50 AND s.attributes1 & 0x400) OR -- Rogue: Intuition (dropped Talent..? looks nice though)
|
||||
(s.SpellfamilyId = 11 AND s.SpellFamilyFlags1 & 3 AND s.attributes1 = 1024) OR -- Shaman: Lightning Overload procs
|
||||
(s.attributes0 = 0x20000000 AND s.attributes3 = 0x10000000) OR -- Master Demonologist (FamilyId = 0)
|
||||
s.id IN (47633, 22845, 29442, 31643, 44450, 32841, 20154, 34919, 27813, 27817, 27818, 30708, 30874, 379, 21169, 19483, 29886, 58889, 23885, 29841, 29842, 64380, 58427) OR -- Misc
|
||||
s.id IN (48954, 17567, 66175, 66122, 66123, 66124, 52374, 49575, 56816, 50536) -- Misc cont.
|
||||
(s.attributes0 = 0x20000000 AND s.attributes3 = 0x10000000) -- Master Demonologist (FamilyId = 0)
|
||||
)', CUSTOM_EXCLUDE_FOR_LISTVIEW);
|
||||
|
||||
foreach ([1, 2, 3, 4, 5, 6, 7, 8, 9, 11] as $classId)
|
||||
@@ -606,10 +606,10 @@ SqlGen::register(new class extends SetupScript
|
||||
);
|
||||
|
||||
// secondary Skills (9)
|
||||
DB::Aowow()->query('UPDATE ?_spell s SET s.typeCat = 9 WHERE s.typeCat = 0 AND (s.skillLine1 IN (129, 185, 356, 762) OR (s.skillLine1 > 0 AND s.skillLine2OrMask IN (129, 185, 356, 762)))');
|
||||
DB::Aowow()->query('UPDATE ?_spell s SET s.typeCat = 9 WHERE s.typeCat = 0 AND (s.skillLine1 IN (?a) OR (s.skillLine1 > 0 AND s.skillLine2OrMask IN (?a)))', SKILLS_TRADE_SECONDARY, SKILLS_TRADE_SECONDARY);
|
||||
|
||||
// primary Skills (11)
|
||||
DB::Aowow()->query('UPDATE ?_spell s SET s.typeCat = 11 WHERE s.typeCat = 0 AND s.skillLine1 IN (164, 165, 171, 182, 186, 197, 202, 333, 393, 755, 773)');
|
||||
DB::Aowow()->query('UPDATE ?_spell s SET s.typeCat = 11 WHERE s.typeCat = 0 AND s.skillLine1 IN (?a)', SKILLS_TRADE_PRIMARY);
|
||||
|
||||
// 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('
|
||||
@@ -741,9 +741,6 @@ SqlGen::register(new class extends SetupScript
|
||||
CLI::write('could not match '.$glyphEffect['name_loc0'].' ('.$glyphEffect['id'].') with affected spells', CLI::LOG_WARN);
|
||||
}
|
||||
|
||||
// hide unused glyphs
|
||||
DB::Aowow()->query('UPDATE ?_spell SET skillLine1 = 0, iconIdAlt = 0, cuFlags = cuFlags | ?d WHERE id IN (?a)', CUSTOM_EXCLUDE_FOR_LISTVIEW, [60460, 58166, 58239, 58240, 58261, 58262, 54910]);
|
||||
|
||||
$this->reapplyCCFlags('spell', Type::SPELL);
|
||||
|
||||
return true;
|
||||
|
||||
71
setup/updates/1684793469_01.sql
Normal file
71
setup/updates/1684793469_01.sql
Normal file
@@ -0,0 +1,71 @@
|
||||
REPLACE INTO `aowow_setup_custom_data` VALUES
|
||||
("spell", 9787, "reqSpellId", 9787, "Weaponsmith - requires itself"),
|
||||
("spell", 9788, "reqSpellId", 9788, "Armorsmith - requires itself"),
|
||||
("spell", 10656, "reqSpellId", 10656, "Dragonscale Leatherworking - requires itself"),
|
||||
("spell", 10658, "reqSpellId", 10658, "Elemental Leatherworking - requires itself"),
|
||||
("spell", 10660, "reqSpellId", 10660, "Tribal Leatherworking - requires itself"),
|
||||
("spell", 17039, "reqSpellId", 17039, "Master Swordsmith - requires itself"),
|
||||
("spell", 17040, "reqSpellId", 17040, "Master Hammersmith - requires itself"),
|
||||
("spell", 17041, "reqSpellId", 17041, "Master Axesmith - requires itself"),
|
||||
("spell", 20219, "reqSpellId", 20219, "Gnomish Engineer - requires itself"),
|
||||
("spell", 20222, "reqSpellId", 20222, "Goblin Engineer - requires itself"),
|
||||
("spell", 26797, "reqSpellId", 26797, "Spellfire Tailoring - requires itself"),
|
||||
("spell", 26798, "reqSpellId", 26798, "Mooncloth Tailoring - requires itself"),
|
||||
("spell", 26801, "reqSpellId", 26801, "Shadoweave Tailoring - requires itself"),
|
||||
("spell", 379, "cuFLags", 1073741824, "Earth Shield - hide"),
|
||||
("spell", 17567, "cuFLags", 1073741824, "Summon Blood Parrot - hide"),
|
||||
("spell", 19483, "cuFLags", 1073741824, "Immolation - hide"),
|
||||
("spell", 20154, "cuFLags", 1073741824, "Seal of Righteousness - hide"),
|
||||
("spell", 21169, "cuFLags", 1073741824, "Reincarnation - hide"),
|
||||
("spell", 22845, "cuFLags", 1073741824, "Frenzied Regeneration - hide"),
|
||||
("spell", 23885, "cuFLags", 1073741824, "Bloodthirst - hide"),
|
||||
("spell", 27813, "cuFLags", 1073741824, "Blessed Recovery - hide"),
|
||||
("spell", 27817, "cuFLags", 1073741824, "Blessed Recovery - hide"),
|
||||
("spell", 27818, "cuFLags", 1073741824, "Blessed Recovery - hide"),
|
||||
("spell", 29442, "cuFLags", 1073741824, "Magic Absorption - hide"),
|
||||
("spell", 29841, "cuFLags", 1073741824, "Second Wind - hide"),
|
||||
("spell", 29842, "cuFLags", 1073741824, "Second Wind - hide"),
|
||||
("spell", 29886, "cuFLags", 1073741824, "Create Soulwell - hide"),
|
||||
("spell", 30708, "cuFLags", 1073741824, "Totem of Wrath - hide"),
|
||||
("spell", 30874, "cuFLags", 1073741824, "Gift of the Water Spirit - hide"),
|
||||
("spell", 31643, "cuFLags", 1073741824, "Blazing Speed - hide"),
|
||||
("spell", 32841, "cuFLags", 1073741824, "Mass Resurrection - hide"),
|
||||
("spell", 34919, "cuFLags", 1073741824, "Vampiric Touch - hide"),
|
||||
("spell", 44450, "cuFLags", 1073741824, "Burnout - hide"),
|
||||
("spell", 47633, "cuFLags", 1073741824, "Death Coil - hide"),
|
||||
("spell", 48954, "cuFLags", 1073741824, "Swift Zhevra - hide"),
|
||||
("spell", 49575, "cuFLags", 1073741824, "Death Grip - hide"),
|
||||
("spell", 50536, "cuFLags", 1073741824, "Unholy Blight - hide"),
|
||||
("spell", 52374, "cuFLags", 1073741824, "Blood Strike - hide"),
|
||||
("spell", 56816, "cuFLags", 1073741824, "Rune Strike - hide"),
|
||||
("spell", 58427, "cuFLags", 1073741824, "Overkill - hide"),
|
||||
("spell", 58889, "cuFLags", 1073741824, "Create Soulwell - hide"),
|
||||
("spell", 64380, "cuFLags", 1073741824, "Shattering Throw - hide"),
|
||||
("spell", 66122, "cuFLags", 1073741824, "Magic Rooster - hide"),
|
||||
("spell", 66123, "cuFLags", 1073741824, "Magic Rooster - hide"),
|
||||
("spell", 66124, "cuFLags", 1073741824, "Magic Rooster - hide"),
|
||||
("spell", 66175, "cuFLags", 1073741824, "Macabre Marionette - hide"),
|
||||
("spell", 54910, "cuFLags", 1073741824, "Glyph of the Red Lynx - hide unused glyph"),
|
||||
("spell", 57231, "cuFLags", 1073741824, "Death Knight Glyph 25 - hide unused glyph"),
|
||||
("spell", 58166, "cuFLags", 1073741824, "Glyph of the Forest Lynx - hide unused glyph"),
|
||||
("spell", 58239, "cuFLags", 1073741824, "Glyph of the Penguin - hide unused glyph"),
|
||||
("spell", 58240, "cuFLags", 1073741824, "Glyph of the Bear Cub - hide unused glyph"),
|
||||
("spell", 58261, "cuFLags", 1073741824, "Glyph of the Arctic Wolf - hide unused glyph"),
|
||||
("spell", 58262, "cuFLags", 1073741824, "Glyph of the Black Wolf - hide unused glyph"),
|
||||
("spell", 60460, "cuFLags", 1073741824, "Glyph of Raise Dead - hide unused glyph"),
|
||||
("spell", 54910, "skillLine1", 0, "Glyph of the Red Lynx - hide unused glyph"),
|
||||
("spell", 57231, "skillLine1", 0, "Death Knight Glyph 25 - hide unused glyph"),
|
||||
("spell", 58166, "skillLine1", 0, "Glyph of the Forest Lynx - hide unused glyph"),
|
||||
("spell", 58239, "skillLine1", 0, "Glyph of the Penguin - hide unused glyph"),
|
||||
("spell", 58240, "skillLine1", 0, "Glyph of the Bear Cub - hide unused glyph"),
|
||||
("spell", 58261, "skillLine1", 0, "Glyph of the Arctic Wolf - hide unused glyph"),
|
||||
("spell", 58262, "skillLine1", 0, "Glyph of the Black Wolf - hide unused glyph"),
|
||||
("spell", 60460, "skillLine1", 0, "Glyph of Raise Dead - hide unused glyph"),
|
||||
("spell", 54910, "iconIdAlt", 0, "Glyph of the Red Lynx - hide unused glyph"),
|
||||
("spell", 57231, "iconIdAlt", 0, "Death Knight Glyph 25 - hide unused glyph"),
|
||||
("spell", 58166, "iconIdAlt", 0, "Glyph of the Forest Lynx - hide unused glyph"),
|
||||
("spell", 58239, "iconIdAlt", 0, "Glyph of the Penguin - hide unused glyph"),
|
||||
("spell", 58240, "iconIdAlt", 0, "Glyph of the Bear Cub - hide unused glyph"),
|
||||
("spell", 58261, "iconIdAlt", 0, "Glyph of the Arctic Wolf - hide unused glyph"),
|
||||
("spell", 58262, "iconIdAlt", 0, "Glyph of the Black Wolf - hide unused glyph"),
|
||||
("spell", 60460, "iconIdAlt", 0, "Glyph of Raise Dead - hide unused glyph");
|
||||
Reference in New Issue
Block a user