Spells/Models

* fixed assigning same display to multiple spells from the same SpellList
 * fixes missing mounts in Profiler
This commit is contained in:
Sarjuuk
2018-11-26 23:18:01 +01:00
parent 04209cfc6d
commit 13db19c64f
2 changed files with 25 additions and 22 deletions

View File

@@ -684,12 +684,11 @@ class SpellList extends BaseType
$nModels = new CreatureList(array(['id', array_column($displays[TYPE_NPC], 1)]));
foreach ($nModels->iterate() as $nId => $__)
{
$srcId = 0;
foreach ($displays[TYPE_NPC] as $srcId => $set)
if ($set[1] == $nId)
break;
foreach ($set[0] as $idx)
foreach ($displays[TYPE_NPC] as $srcId => list($indizes, $npcId))
{
if ($npcId == $nId)
{
foreach ($indizes as $idx)
{
$results[$srcId][$idx] = array(
'typeId' => $nId,
@@ -699,18 +698,19 @@ class SpellList extends BaseType
}
}
}
}
}
if (!empty($displays[TYPE_OBJECT]))
{
$oModels = new GameObjectList(array(['id', array_column($displays[TYPE_OBJECT], 1)]));
foreach ($oModels->iterate() as $oId => $__)
{
$srcId = 0;
foreach ($displays[TYPE_OBJECT] as $srcId => $set)
if ($set[1] == $oId)
break;
foreach ($set[0] as $idx)
foreach ($displays[TYPE_OBJECT] as $srcId => list($indizes, $objId))
{
if ($objId == $oId)
{
foreach ($indizes as $idx)
{
$results[$srcId][$idx] = array(
'typeId' => $oId,
@@ -720,6 +720,8 @@ class SpellList extends BaseType
}
}
}
}
}
if ($spellId && $effIdx)
return !empty($results[$spellId][$effIdx]) ? $results[$spellId][$effIdx] : 0;

View File

@@ -0,0 +1 @@
UPDATE `aowow_dbversion` SET `build` = CONCAT(IFNULL(`build`, ''), ' profiler');