diff options
author | Fate <fate-tmw@googlemail.com> | 2009-06-06 08:32:51 +0000 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2009-06-06 08:32:51 +0000 |
commit | eb1119ab1f298f41fadae2364305f2e3fa48014e (patch) | |
tree | e8966dc2487f550a5d8e2a8e6e3e0dae586f9427 /npc/001-1_Tulimshar/elanore.txt | |
parent | d8767bf2587a14a46c86f8ced7a9653ef3c52c0d (diff) | |
download | serverdata-eb1119ab1f298f41fadae2364305f2e3fa48014e.tar.gz serverdata-eb1119ab1f298f41fadae2364305f2e3fa48014e.tar.bz2 serverdata-eb1119ab1f298f41fadae2364305f2e3fa48014e.tar.xz serverdata-eb1119ab1f298f41fadae2364305f2e3fa48014e.zip |
Elanore quest status corruption autocorrection
Diffstat (limited to 'npc/001-1_Tulimshar/elanore.txt')
-rw-r--r-- | npc/001-1_Tulimshar/elanore.txt | 23 |
1 files changed, 23 insertions, 0 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; |