summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-29 16:51:23 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-29 16:51:23 +0000
commit4e8a2d0e62c0669da6847b5d2ef735c63389d8c7 (patch)
tree1f06b9f76ac355a97103d81bf6675971e68b4dfe /src/map
parenteb7c3471753d978ef6e0a1c9be77fcc67e63a825 (diff)
downloadhercules-4e8a2d0e62c0669da6847b5d2ef735c63389d8c7.tar.gz
hercules-4e8a2d0e62c0669da6847b5d2ef735c63389d8c7.tar.bz2
hercules-4e8a2d0e62c0669da6847b5d2ef735c63389d8c7.tar.xz
hercules-4e8a2d0e62c0669da6847b5d2ef735c63389d8c7.zip
Fixed exploit with infinite item use, bugreport:2973
-- Special Thanks to Yommy git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15312 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 9044a9bf1..1720db43e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -446,7 +446,12 @@ int skillnotok (int skillid, struct map_session_data *sd)
if (sd->blockskill[i] > 0)
return 1;
-
+ /**
+ * It has been confirmed on a official server (thanks to Yommy) that item-cast skills bypass all the restrictions above
+ * Also, without this check, an exploit where an item casting + healing (or any other kind buff) isn't deleted after used on a restricted map
+ **/
+ if( sd->skillitem == skillid )
+ return 0;
// Check skill restrictions [Celest]
if(!map_flag_vs(m) && skill_get_nocast (skillid) & 1)
return 1;