summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-06-06 08:32:51 +0000
committerFate <fate-tmw@googlemail.com>2009-06-06 08:32:51 +0000
commiteb1119ab1f298f41fadae2364305f2e3fa48014e (patch)
treee8966dc2487f550a5d8e2a8e6e3e0dae586f9427 /npc
parentd8767bf2587a14a46c86f8ced7a9653ef3c52c0d (diff)
downloadserverdata-eb1119ab1f298f41fadae2364305f2e3fa48014e.tar.gz
serverdata-eb1119ab1f298f41fadae2364305f2e3fa48014e.tar.bz2
serverdata-eb1119ab1f298f41fadae2364305f2e3fa48014e.tar.xz
serverdata-eb1119ab1f298f41fadae2364305f2e3fa48014e.zip
Elanore quest status corruption autocorrection
Diffstat (limited to 'npc')
-rw-r--r--npc/001-1_Tulimshar/elanore.txt23
-rw-r--r--npc/001-2_Tulimshar/omar.txt2
-rw-r--r--npc/009-2_Hurnscald/wyara.txt2
3 files changed, 26 insertions, 1 deletions
diff --git a/npc/001-1_Tulimshar/elanore.txt b/npc/001-1_Tulimshar/elanore.txt
index a1075fbc..e37dc63b 100644
--- a/npc/001-1_Tulimshar/elanore.txt
+++ b/npc/001-1_Tulimshar/elanore.txt
@@ -1,5 +1,20 @@
//
+function script ElanoreFix {
+ set @Q_MASK, NIBBLE_1_MASK;
+ set @Q_SHIFT, NIBBLE_1_SHIFT;
+
+ set @Q_STATUS_MAX, 3; // FIXME once level 3 magic was released
+
+ set @Q_status, (QUEST_MAGIC2 & @Q_MASK) >> @Q_SHIFT;
+ if (@Q_status > @Q_STATUS_MAX)
+ set @Q_status, @STATUS_INITIAL;
+
+ set QUEST_MAGIC2,
+ (QUEST_MAGIC2 & ~(@Q_MASK)
+ | (@Q_status << @Q_SHIFT));
+}
+
001-1.gat,58,68,0 script Elanore#_M 108,{
set @has_magic, getskilllv(SKILL_MAGIC);
@@ -18,6 +33,14 @@
set @STATUS_READY_TO_LEARN_CURE_POISON, 5;
set @STATUS_LEARNED_CURE_POISON, 6;
+ callfunc "ElanoreFix";
+
+ // This operation works around an earlier possible corruption of this state
+ if (@Q_status > @Q_STATUS_MAX)
+ set @Q_status, @STATUS_INITIAL;
+ callsub S_update_var;
+
+
if (sc_check(sc_poison))
goto L_CurePoison;
diff --git a/npc/001-2_Tulimshar/omar.txt b/npc/001-2_Tulimshar/omar.txt
index 2fd813ac..4f75574e 100644
--- a/npc/001-2_Tulimshar/omar.txt
+++ b/npc/001-2_Tulimshar/omar.txt
@@ -24,6 +24,7 @@ function script KadiyaSubquestConsts {
001-2.gat,70,60,0 script Omar 162,{
+ callfunc "ElanoreFix";
callfunc "KadiyaSubquestConsts";
set @Q_status, @Q_kadiya_status;
@@ -184,6 +185,7 @@ S_update_var:
001-2.gat,76,59,0 script _______Kadiya 174,{
+ callfunc "ElanoreFix";
set @Q_MASK, NIBBLE_3_MASK;
set @Q_SHIFT, NIBBLE_3_SHIFT;
diff --git a/npc/009-2_Hurnscald/wyara.txt b/npc/009-2_Hurnscald/wyara.txt
index 0e62fccb..114f569b 100644
--- a/npc/009-2_Hurnscald/wyara.txt
+++ b/npc/009-2_Hurnscald/wyara.txt
@@ -13,7 +13,7 @@
set @STATUS_PURIFY_OVER, 4;
set @STATUS_MAX, @STATUS_PURIFY_OVER;
- // This operation
+ // This operation works around an earlier possible corruption of this state
if (@Q_status > @Q_STATUS_MAX)
set @Q_status, @STATUS_INITIAL;
callsub S_update_var;