mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Quest/Map
* assign objective text to map pips if possible
This commit is contained in:
@@ -684,11 +684,11 @@ class QuestPage extends GenericPage
|
|||||||
$npcData['point'] = 'requirement'; // always requirement
|
$npcData['point'] = 'requirement'; // always requirement
|
||||||
foreach ($olNPCs as $proxyNpcId => $npc)
|
foreach ($olNPCs as $proxyNpcId => $npc)
|
||||||
{
|
{
|
||||||
if (empty($npc[2][$npcId]))
|
if ($npc[1] && $npcId == $proxyNpcId) // overwrite creature name with quest specific text, if set.
|
||||||
continue;
|
$npcData['name'] = $npc[1];
|
||||||
|
|
||||||
|
if (!empty($npc[2][$npcId]))
|
||||||
$npcData['objective'] = $proxyNpcId;
|
$npcData['objective'] = $proxyNpcId;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$npcData['objective'])
|
if (!$npcData['objective'])
|
||||||
@@ -702,8 +702,17 @@ class QuestPage extends GenericPage
|
|||||||
if ($olGOData && !$olGOData->error)
|
if ($olGOData && !$olGOData->error)
|
||||||
{
|
{
|
||||||
$spawns = $olGOData->getSpawns(SPAWNINFO_QUEST);
|
$spawns = $olGOData->getSpawns(SPAWNINFO_QUEST);
|
||||||
$addObjectiveSpawns($spawns, function ($goId, $goData, &$objectiveIdx)
|
$addObjectiveSpawns($spawns, function ($goId, $goData) use ($olGOs, &$objectiveIdx)
|
||||||
{
|
{
|
||||||
|
foreach ($olGOs as $_goId => $go)
|
||||||
|
{
|
||||||
|
if ($go[1] && $goId == $_goId) // overwrite object name with quest specific text, if set.
|
||||||
|
{
|
||||||
|
$goData['name'] = $go[1];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$goData['point'] = 'requirement'; // always requirement
|
$goData['point'] = 'requirement'; // always requirement
|
||||||
$goData['objective'] = $objectiveIdx++;
|
$goData['objective'] = $objectiveIdx++;
|
||||||
return $goData;
|
return $goData;
|
||||||
|
|||||||
Reference in New Issue
Block a user