Skip to content

Commit

Permalink
Spells/Models
Browse files Browse the repository at this point in the history
 * fixed assigning same display to multiple spells from the same SpellList
 * fixes missing mounts in Profiler
  • Loading branch information
Sarjuuk committed Nov 26, 2018
1 parent 04209cf commit 13db19c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
46 changes: 24 additions & 22 deletions includes/types/spell.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -684,18 +684,19 @@ public function getModelInfo($spellId = 0, $effIdx = 0)
$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)
);
}
}
}
}
}
Expand All @@ -705,18 +706,19 @@ public function getModelInfo($spellId = 0, $effIdx = 0)
$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)
);
}
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions setup/updates/1543271379_01.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE `aowow_dbversion` SET `build` = CONCAT(IFNULL(`build`, ''), ' profiler');

0 comments on commit 13db19c

Please sign in to comment.