summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-21 17:55:19 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-21 17:55:19 +0000
commit90d59676f4e34d970a7c89d82afc8b57f4b34dc8 (patch)
tree11036b1d86c60f41403827ae6391545b14afac71 /src/map/script.c
parent30eed6413ac034f94e6aa2e0064318f153cb2cf8 (diff)
downloadhercules-90d59676f4e34d970a7c89d82afc8b57f4b34dc8.tar.gz
hercules-90d59676f4e34d970a7c89d82afc8b57f4b34dc8.tar.bz2
hercules-90d59676f4e34d970a7c89d82afc8b57f4b34dc8.tar.xz
hercules-90d59676f4e34d970a7c89d82afc8b57f4b34dc8.zip
- Adjusted Glittering's success rate to 20+10*lv%
- Corrected isequipped() so that cards will not be tagged as "used up" unless all the specified items were found. - Fixed a confusion in skill_attack using the src instead of dsrc for some calls, which was causing some problems with the KAITE check from AoE spells. - Fixed ASC_BREAKER's misc damage part not having the ignore-element flag set. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8406 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 6aa199d1b..7d199721d 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10796,6 +10796,8 @@ int buildin_isequipped(struct script_state *st)
int i, j, k, id = 1;
int index, flag;
int ret = -1;
+ //Original hash to reverse it when full check fails.
+ unsigned int setitem_hash = 0, setitem_hash2 = 0;
sd = script_rid2sd(st);
@@ -10803,7 +10805,9 @@ int buildin_isequipped(struct script_state *st)
push_val(st->stack,C_INT,0);
return 0;
}
-
+
+ setitem_hash = sd->setitem_hash;
+ setitem_hash2 = sd->setitem_hash2;
for (i=0; id!=0; i++)
{
FETCH (i+2, id) else id = 0;
@@ -10860,7 +10864,11 @@ int buildin_isequipped(struct script_state *st)
ret &= flag;
if (!ret) break;
}
-
+ if (!ret)
+ { //When check fails, restore original hash values. [Skotlex]
+ sd->setitem_hash = setitem_hash;
+ sd->setitem_hash2 = setitem_hash2;
+ }
push_val(st->stack,C_INT,ret);
return 0;
}