From 6cdf20622f6e9e697567aa08b821cd51ffe4be40 Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Sat, 23 Feb 2013 20:13:36 +0100 Subject: Inspector quest: add the handling of variable restructuring to clear_vars. This was forgottten in the actual commit about the Inspector quest. That's why it needs extra handling in case a player already started the quest a second time. --- world/map/npc/functions/clear_vars.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'world/map') diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt index 48002fa4..6cc311fe 100644 --- a/world/map/npc/functions/clear_vars.txt +++ b/world/map/npc/functions/clear_vars.txt @@ -133,6 +133,13 @@ function|script|ClearVariables|{ set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_2_MASK)) | (QUEST_demon_mines << NIBBLE_2_SHIFT); set QUEST_demon_mines, 0; + // move Inspector quest into bitmasked variable QUEST_Hurnscald + set @inspector, ((QUEST_Hurnscald & NIBBLE_3_MASK) >> NIBBLE_3_SHIFT); + if (Inspector > @inspector) + set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_3_MASK)) | (Inspector << NIBBLE_3_SHIFT); + set Inspector, 0; + set @inspector, 0; + //These lines are needed to migrate stuff from variables to flags if (Open_Underground_Palace_Barrier) set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND; -- cgit v1.2.3-60-g2f50