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,18 +684,19 @@ 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))
{
$results[$srcId][$idx] = array(
'typeId' => $nId,
'displayId' => $nModels->getRandomModelId(),
'displayName' => $nModels->getField('name', true)
);
if ($npcId == $nId)
{
foreach ($indizes as $idx)
{
$results[$srcId][$idx] = array(
'typeId' => $nId,
'displayId' => $nModels->getRandomModelId(),
'displayName' => $nModels->getField('name', true)
);
}
}
}
}
}
@@ -705,18 +706,19 @@ class SpellList extends BaseType
$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))
{
$results[$srcId][$idx] = array(
'typeId' => $oId,
'displayId' => $oModels->getField('displayId'),
'displayName' => $oModels->getField('name', true)
);
if ($objId == $oId)
{
foreach ($indizes as $idx)
{
$results[$srcId][$idx] = array(
'typeId' => $oId,
'displayId' => $oModels->getField('displayId'),
'displayName' => $oModels->getField('name', true)
);
}
}
}
}
}

View File

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