summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-24 08:19:34 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-24 08:19:34 -0300
commit5b27aad922f1dddb5dff09d62c9b9623419cca48 (patch)
treeb55953c56b2da3017daf9264be65c46a8a512807 /npc
parent526dc032b3a68ff8282be2817083c250b6f26bf7 (diff)
downloadserverdata-5b27aad922f1dddb5dff09d62c9b9623419cca48.tar.gz
serverdata-5b27aad922f1dddb5dff09d62c9b9623419cca48.tar.bz2
serverdata-5b27aad922f1dddb5dff09d62c9b9623419cca48.tar.xz
serverdata-5b27aad922f1dddb5dff09d62c9b9623419cca48.zip
Fix healing bugs and disregard item stacking
Diffstat (limited to 'npc')
-rw-r--r--npc/items/legacy_heal.txt3
-rw-r--r--npc/items/rand_sc_heal.txt31
2 files changed, 27 insertions, 7 deletions
diff --git a/npc/items/legacy_heal.txt b/npc/items/legacy_heal.txt
index dd13e590e..fd390bfae 100644
--- a/npc/items/legacy_heal.txt
+++ b/npc/items/legacy_heal.txt
@@ -47,5 +47,8 @@ OnUse:
sc_end .@skill;
sc_start2 .@skill, @delay, @val1, 1;
+ @delay=0;
+ @type=0;
+ @rarity=0;
end;
}
diff --git a/npc/items/rand_sc_heal.txt b/npc/items/rand_sc_heal.txt
index 533a92d1b..83b19e0b6 100644
--- a/npc/items/rand_sc_heal.txt
+++ b/npc/items/rand_sc_heal.txt
@@ -90,13 +90,22 @@ OnUse:
@delay=1 + (@type*2);
}
- // Put the delay in ms
- @delay *= 1000;
+ // Decide the healing bonus type. We have four types: S, L, G and M
+ // By default, we use 'S'
+ .@skill = SC_S_LIFEPOTION;
// We now have @val1 (new effect), @delay (new delay)
// But do we have .@v and .@d (old effect and delay)?
- .@v=getstatus(getarg(0), 1);
- .@d=getstatus(getarg(0), 4) * 1000;
+ //Meh, just override it
+ /*
+ if (getstatus(.@skill)) {
+ .@v=getstatus(.@skill, 1);
+ .@d=getstatus(.@skill, 4);
+ }
+ */
+
+ debugmes "PDAVG: %d/%d", .@v, .@d;
+ debugmes "Pre PD: %d/%d", @val1, @delay;
// If there WAS an effect previously, get ponderate average
if (.@v > 0) {
@@ -104,13 +113,21 @@ OnUse:
@delay=ponderate_avg(@delay, @val1, .@d, .@v);
}
- // Decide the healing bonus type. We have four types: S, L, G and M
- // By default, we use 'S'
- .@skill = SC_S_LIFEPOTION;
+ debugmes "Post PD: %d/%d", @val1, @delay;
+
+ // Put the delay in ms
+ @delay *= 1000;
+
+ debugmes "Ready";
// Apply the effect and finish
sc_end .@skill;
sc_start2 .@skill, @delay, @val1, 1;
+ debugmes "Done";
+
+ @delay=0;
+ @type=0;
+ @rarity=0;
end;
}