* reworked default exclusions (hid some things entirely, flagged others for appropriate cases)
 * char names consisting of two letters are now valid
 * fixed matching enchantments onto ranged weapons
This commit is contained in:
Sarjuuk
2018-04-22 11:31:02 +02:00
parent 9dcb0b3a15
commit d0b7fa9ef5
7 changed files with 68 additions and 24 deletions

View File

@@ -13,7 +13,7 @@ class ProfileList extends BaseType
$data = [];
foreach ($this->iterate() as $__)
{
if ($this->getField('user') && User::$id != $this->getField('user') && !($this->getField('cuFlags') & PROFILER_CU_PUBLISHED))
if (!$this->getField('cuFlags') & PROFILER_CU_PUBLISHED && !User::isInGroup(U_GROUP_STAFF))
continue;
if (($addInfo & PROFILEINFO_PROFILE) && !$this->isCustom())

View File

@@ -107,9 +107,6 @@ trait TrProfiler
$cat = array_map('urldecode', $cat);
if (count($cat) > 3)
return;
if ($cat[0] !== 'eu' && $cat[0] !== 'us')
return;
@@ -125,7 +122,7 @@ trait TrProfiler
{
$this->realm = $r['name'];
$this->realmId = $rId;
if (isset($cat[2]) && mb_strlen($cat[2]) >= 3)
if (isset($cat[2]) && mb_strlen($cat[2]) >= 2)
$this->subjectName = $cat[2]; // cannot reconstruct original name from urlized form; match against special name field
break;

File diff suppressed because one or more lines are too long

View File

@@ -55,8 +55,8 @@ if (!CLI)
function enchants()
{
// from g_item_slots: 13:"One-Hand", 26:"Ranged", 17:"Two-Hand",
$slotPointer = [13, 17, 26, 26, 13, 17, 17, 13, 17, null, 17, null, null, 13, null, 13, null, null, null, null, 17];
// from g_item_slots: 13:"One-Hand", 15:"Ranged", 17:"Two-Hand",
$slotPointer = [13, 17, 15, 15, 13, 17, 17, 13, 17, null, 17, null, null, 13, null, 13, null, null, null, null, 17];
$castItems = [];
$successs = true;
$enchantSpells = DB::Aowow()->select('

View File

@@ -152,7 +152,17 @@ if (!CLI)
$mountz = new SpellList($condition);
// we COULD go into aowow_sources to get the faction of the source and apply it to the spell. .. Or we could keep our sanity and assume TC did nothing wrong. haHA! no!
$factionSet = DB::World()->selectCol('SELECT alliance_id AS ARRAY_KEY, horde_id FROM player_factionchange_spells WHERE alliance_id IN (?a) OR horde_id IN (?a)', $mountz->getFoundIDs(), $mountz->getFoundIDs());
$factionSet = DB::World()->selectCol('SELECT alliance_id AS ARRAY_KEY, horde_id FROM player_factionchange_spells WHERE alliance_id IN (?a) OR horde_id IN (?a)', $mountz->getFoundIDs(), $mountz->getFoundIDs());
$conditionSet = DB::World()->selectCol('SELECT SourceEntry AS ARRAY_KEY, ConditionValue1 FROM conditions WHERE SourceTypeOrReferenceId = ?d AND ConditionTypeOrReference = ?d AND SourceEntry IN (?a)', CND_SRC_SPELL, CND_SKILL, $mountz->getFoundIDs());
// get mounts for exclusion
foreach ($conditionSet as $mount => $skill)
{
if ($skill == 202)
$exAdd(TYPE_SPELL, $mount, PR_EXCLUDE_GROUP_REQ_ENGINEERING);
else if ($skill == 197)
$exAdd(TYPE_SPELL, $mount, PR_EXCLUDE_GROUP_REQ_TAILORING);
}
foreach (CLISetup::$localeIds as $l)
{
@@ -164,6 +174,12 @@ if (!CLI)
$buff = "var _ = g_spells;\n";
foreach ($mountz->getListviewData(ITEMINFO_MODEL) as $id => $data)
{
// two cases where the spell is unrestricted but the castitem has class restriction (too lazy to formulate ruleset)
if ($id == 66906) // Argent Charger
$data['reqclass'] = CLASS_PALADIN;
else if ($id == 54729) // Winged Steed of the Ebon Blade
$data['reqclass'] = CLASS_DEATHKNIGHT;
if (isset($factionSet[$id])) // alliance owned
$data['side'] = SIDE_ALLIANCE;
else if (in_array($id, $factionSet)) // horde owned
@@ -173,9 +189,6 @@ if (!CLI)
rsort($data['skill']); // riding (777) expected at pos 0
if ($id == 54729) // special case: Winged Steed of the Ebon Blade; cast-item is DK only
$data['reqclass'] = CLASS_DEATHKNIGHT;
$data['quality'] = $data['name'][0];
$data['name'] = mb_substr($data['name'], 1);
$buff .= '_['.$id.'] = '.Util::toJSON($data).";\n";

View File

@@ -587,18 +587,19 @@ function spell()
// class Spells (7)
DB::Aowow()->query('UPDATE ?_spell s, dbc_skillline sl SET s.typeCat = 7 WHERE s.typeCat = 0 AND s.skillLine1 = sl.id AND sl.categoryId = 7');
// hide some internal class stuffs
// hide some internal/unused stuffs
DB::Aowow()->query('UPDATE ?_spell s SET s.cuFlags = ?d WHERE s.typeCat = 7 AND (
s.name_loc0 LIKE "%passive%" OR s.name_loc0 LIKE "%effect%" OR s.name_loc0 LIKE "%improved%" OR s.name_loc0 LIKE "%prototype%" OR -- can probably be extended
(s.id NOT IN (47241, 59879, 59671) AND s.baseLevel <= 1 AND s.reqclassMask = 0) OR -- can probably still be extended
(s.SpellFamilyId = 15 AND s.SpellDescriptionVariableId <> 84) OR -- DK: Skill Coil
(s.SpellFamilyId = 10 AND s.SpellFamilyFlags2 & 0x1000000 AND s.attributes1 = 0) OR -- Paladin: Bacon of Light hmm.. Bacon.... :]
(s.SpellFamilyId = 6 AND s.SpellFamilyFlags3 & 0x4000) OR -- Priest: Lolwell Renew
(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) -- Misc
s.name_loc0 LIKE "%passive%" OR s.name_loc0 LIKE "%effect%" OR s.name_loc0 LIKE "%improved%" OR s.name_loc0 LIKE "%prototype%" OR -- can probably be extended
(s.id NOT IN (47241, 59879, 59671) AND s.baseLevel <= 1 AND s.reqclassMask = 0) OR -- can probably still be extended
(s.SpellFamilyId = 15 AND s.SpellDescriptionVariableId <> 84) OR -- DK: Skill Coil
(s.SpellFamilyId = 10 AND s.SpellFamilyFlags2 & 0x1000000 AND s.attributes1 = 0) OR -- Paladin: Bacon of Light hmm.. Bacon.... :]
(s.SpellFamilyId = 6 AND s.SpellFamilyFlags3 & 0x4000) OR -- Priest: Lolwell Renew
(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) -- Misc cont.
)', CUSTOM_EXCLUDE_FOR_LISTVIEW);
foreach ([1, 2, 3, 4, 5, 6, 7, 8, 9, 11] as $classId)

View File

@@ -0,0 +1,33 @@
REPLACE INTO aowow_profiler_excludes (`type`, `typeId`, `groups`, `comment`) VALUES
(6, 46197, 2, 'X-51 Nether-Rocket - TCG loot'),
(6, 46199, 2, 'X-51 Nether-Rocket X-TREME - TCG loot'),
(6, 75614, 1, 'Celestial Steed - unavailable'),
(6, 26656, 1, 'Black Qiraji Battle Tank - unavailable'),
(6, 43899, 1, 'Brewfest Ram - unavailable'),
(6, 58983, 8, 'Big Blizzard Bear - promotion'),
(6, 49193, 1, 'Vengeful Nether Drake - unavailable'),
(6, 58615, 1, 'Brutal Nether Drake - unavailable'),
(6, 64927, 1, 'Deadly Gladiator\'s Frost Wyrm - unavailable'),
(6, 65439, 1, 'Furious Gladiator\'s Frost Wyrm - unavailable'),
(6, 67336, 1, 'Relentless Gladiator\'s Frost Wyrm - unavailable'),
(6, 71810, 1, 'Wrathful Gladiator\'s Frost Wyrm - unavailable'),
(11, 122, 1, 'RealmFirst Kel\'T Title - unavailable'),
(11, 159, 1, 'RealmFirst Algalon Title - unavailable'),
(11, 120, 1, 'RealmFirst Maly Title - unavailable'),
(11, 170, 1, 'RealmFirst TotGC Title - unavailable'),
(11, 139, 1, 'RealmFirst Sarth Title - unavailable'),
(11, 158, 1, 'RealmFirst Yogg Title - unavailable'),
(6, 40405, 16, 'Lucky - wrong region'),
(6, 45174, 16, 'Golden Pig - wrong region'),
(6, 67527, 16, 'Onyx Panther - wrong region'),
(6, 28505, 8, 'Poley - promotion'),
(6, 45175, 16, 'Silver Pig - wrong region'),
(6, 28487, 1, 'Terky - unavailable'),
(6, 23531, 16, 'Tiny Green Dragon - wrong region'),
(6, 23530, 16, 'Tiny Red Dragon - wrong region'),
(8, 70, 1024, 'Syndicate - max rank is neutral'),
(6, 48408, 16, 'Essence of Competition - wrong region');
DELETE FROM aowow_profiler_excludes WHERE `type` = 6 AND `typeId` IN (66122, 66123, 66124, 61309, 61451, 75596);
UPDATE `aowow_dbversion` SET `build` = CONCAT(IFNULL(`build`, ''), ' enchants profiler');