From 13d0dfeb070b27ae471a0051ca22729480bd29f4 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Mon, 13 Mar 2017 22:06:40 +0100 Subject: [PATCH] Quest/Map * assign objective text to map pips if possible --- pages/quest.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pages/quest.php b/pages/quest.php index 6320e2a7..a2f631c0 100644 --- a/pages/quest.php +++ b/pages/quest.php @@ -684,11 +684,11 @@ class QuestPage extends GenericPage $npcData['point'] = 'requirement'; // always requirement foreach ($olNPCs as $proxyNpcId => $npc) { - if (empty($npc[2][$npcId])) - continue; + if ($npc[1] && $npcId == $proxyNpcId) // overwrite creature name with quest specific text, if set. + $npcData['name'] = $npc[1]; - $npcData['objective'] = $proxyNpcId; - break; + if (!empty($npc[2][$npcId])) + $npcData['objective'] = $proxyNpcId; } if (!$npcData['objective']) @@ -702,8 +702,17 @@ class QuestPage extends GenericPage if ($olGOData && !$olGOData->error) { $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['objective'] = $objectiveIdx++; return $goData;