mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Setup/Spells
* hide a lot of internal spells from searches * apply a faction to mount listing, so the Profiler can hide mounts from the opposite faction * apply GS to profession enchantments
This commit is contained in:
@@ -174,6 +174,10 @@ if (!CLI)
|
||||
$cI = &$castItems; // this construct is a bit .. unwieldy
|
||||
foreach ($cI->iterate() as $__)
|
||||
{
|
||||
if ($enchantments->getField('skillLevel'))
|
||||
if ($s = Util::getEnchantmentScore(0, -1, true, $eId))
|
||||
$ench['gearscore'] = $s;
|
||||
|
||||
if ($cI->getField('spellId1') != $esId)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -146,10 +146,14 @@ if (!CLI)
|
||||
$condition = array(
|
||||
CFG_SQL_LIMIT_NONE,
|
||||
[['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0],
|
||||
['typeCat', -5]
|
||||
['typeCat', -5],
|
||||
['castTime', 0, '!']
|
||||
);
|
||||
$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());
|
||||
|
||||
foreach (CLISetup::$localeIds as $l)
|
||||
{
|
||||
set_time_limit(5);
|
||||
@@ -160,6 +164,13 @@ if (!CLI)
|
||||
$buff = "var _ = g_spells;\n";
|
||||
foreach ($mountz->getListviewData(ITEMINFO_MODEL) as $id => $data)
|
||||
{
|
||||
if (isset($factionSet[$id])) // alliance owned
|
||||
$data['side'] = SIDE_ALLIANCE;
|
||||
else if (in_array($id, $factionSet)) // horde owned
|
||||
$data['side'] = SIDE_HORDE;
|
||||
else
|
||||
$data['side'] = SIDE_BOTH;
|
||||
|
||||
$data['quality'] = $data['name'][0];
|
||||
$data['name'] = mb_substr($data['name'], 1);
|
||||
$buff .= '_['.$id.'] = '.Util::toJSON($data).";\n";
|
||||
|
||||
@@ -277,9 +277,9 @@ function spell()
|
||||
}
|
||||
|
||||
|
||||
/******
|
||||
* merge SkillLineAbility into Spell
|
||||
******/
|
||||
/*************************************/
|
||||
/* merge SkillLineAbility into Spell */
|
||||
/*************************************/
|
||||
|
||||
/* acquireMethod
|
||||
ABILITY_LEARNED_ON_GET_PROFESSION_SKILL = 1, learnedAt = 1
|
||||
@@ -525,6 +525,12 @@ function spell()
|
||||
// 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))');
|
||||
|
||||
// hide internal stuff from listviews
|
||||
// QA*; *DND*; square brackets anything; *(NYI)*; *(TEST)*
|
||||
// cant catch raw: NYI (uNYIelding); PH (PHasing)
|
||||
DB::Aowow()->query('UPDATE ?_spell SET cuFlags = cuFlags | ?d WHERE name_loc0 LIKE "QA%" OR name_loc0 LIKE "%DND%" OR name_loc0 LIKE "%[%" OR name_loc0 LIKE "%(NYI)%" OR name_loc0 LIKE "%(TEST)%"', CUSTOM_EXCLUDE_FOR_LISTVIEW);
|
||||
|
||||
|
||||
/**************/
|
||||
/* Categories */
|
||||
/**************/
|
||||
@@ -641,6 +647,7 @@ function spell()
|
||||
|
||||
DB::Aowow()->query('UPDATE ?_spell s SET s.typeCat = -8 WHERE s.typeCat = 0 AND s.id In (?a)', $world);
|
||||
|
||||
|
||||
/**********/
|
||||
/* Glyphs */
|
||||
/**********/
|
||||
@@ -722,7 +729,7 @@ function spell()
|
||||
continue;
|
||||
}
|
||||
|
||||
// second: search by name and Family equality
|
||||
// second: search by name and family equality
|
||||
if (!$icons)
|
||||
{
|
||||
$search = !empty($glyphAffects[$applyId]) ? $glyphAffects[$applyId] : str_replace('Glyph of ', '', $glyphEffect['name_loc0']);
|
||||
|
||||
Reference in New Issue
Block a user