summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-05 07:36:22 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-05 07:36:22 +0000
commit2d82d89f7405a977262e13de3f0985e7792cc9a7 (patch)
tree837df408b23c5078c01bfe5ad7be523fc7d104be
parentb88b28bc1b4f6556a6c2f0d85851010446082c3b (diff)
downloadhercules-2d82d89f7405a977262e13de3f0985e7792cc9a7.tar.gz
hercules-2d82d89f7405a977262e13de3f0985e7792cc9a7.tar.bz2
hercules-2d82d89f7405a977262e13de3f0985e7792cc9a7.tar.xz
hercules-2d82d89f7405a977262e13de3f0985e7792cc9a7.zip
Reset all skill variables if the skill fails so certain skills can't be abused
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@910 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog.txt2
-rw-r--r--src/map/clif.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 951cf61a2..e5759fc06 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,7 @@
Date Added
01/05
+ * Reset all skill variables if the skill fails so certain skills can't be
+ abused (such as Warp, thanks to Alex14 for pointing it out) [celest]
* Added /mapflag/noreturn.txt for disabling butterfly wings (not fly wings)
[celest]
* Fixed skill_require_db reading somehow getting corrupted if weapons usable
diff --git a/src/map/clif.c b/src/map/clif.c
index e0d76a756..af89df654 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4315,6 +4315,11 @@ int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype)
fd=sd->fd;
+ // reset all variables [celest]
+ sd->skillx = sd->skilly = -1;
+ sd->skillid = sd->skilllv = -1;
+ sd->skillitem = sd->skillitemlv = -1;
+
if(type==0x4 && battle_config.display_delay_skill_fail==0){
return 0;
}