summaryrefslogtreecommitdiff
path: root/npc/items/legacy_heal.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-07-14 23:12:09 -0300
committerJesusaves <cpntb1@ymail.com>2019-07-14 23:12:09 -0300
commit751ceff3cb0a39ffb6ddd8113d41d04cc40054b6 (patch)
treec3418ec1bb16bb9301405da4ebf46bd979f1bcd8 /npc/items/legacy_heal.txt
parentbba0f8ca2e5c507a5930be008cd3c46800bf1f47 (diff)
downloadserverdata-751ceff3cb0a39ffb6ddd8113d41d04cc40054b6.tar.gz
serverdata-751ceff3cb0a39ffb6ddd8113d41d04cc40054b6.tar.bz2
serverdata-751ceff3cb0a39ffb6ddd8113d41d04cc40054b6.tar.xz
serverdata-751ceff3cb0a39ffb6ddd8113d41d04cc40054b6.zip
Fix a bug on all legacy (number-based) healing items
Diffstat (limited to 'npc/items/legacy_heal.txt')
-rw-r--r--npc/items/legacy_heal.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/npc/items/legacy_heal.txt b/npc/items/legacy_heal.txt
index 3ff0e1e60..62b501668 100644
--- a/npc/items/legacy_heal.txt
+++ b/npc/items/legacy_heal.txt
@@ -22,6 +22,10 @@ OnUse:
end;
}
+ // Decide the healing bonus type. We have four types: S, L, G and M
+ // By default, we use 'S'
+ .@skill = SC_S_LIFEPOTION;
+
// minimum between @min and bVit / 2 * BaseLevel / 10
@min = min(@max, readparam(bVit) * BaseLevel / 20);
@val1 = rand(@min, @max);
@@ -30,8 +34,8 @@ OnUse:
// 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;
+ .@v=getstatus(.@skill, 1);
+ .@d=getstatus(.@skill, 4) * 1000;
// If there WAS an effect previously, get ponderate average
if (.@v > 0) {
@@ -39,10 +43,6 @@ 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;
-
// Apply the effect and finish
sc_end .@skill;
sc_start2 .@skill, @delay, @val1, 1;