summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-10 21:26:12 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-10 21:26:12 +0000
commit852633e420ed06e806ed8fd9e02ee3038b6b1f13 (patch)
tree08d5b5aa8b09a073b97f3b344812ca6eab0540ab
parent5d8d40de3112a62e3462c75f138ff675edf91459 (diff)
downloadhercules-852633e420ed06e806ed8fd9e02ee3038b6b1f13.tar.gz
hercules-852633e420ed06e806ed8fd9e02ee3038b6b1f13.tar.bz2
hercules-852633e420ed06e806ed8fd9e02ee3038b6b1f13.tar.xz
hercules-852633e420ed06e806ed8fd9e02ee3038b6b1f13.zip
Fixed a bug in r11384 letting you bypass requirements for some skills (see bugreport:219).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11710 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/skill.c13
-rw-r--r--src/map/unit.c3
3 files changed, 4 insertions, 14 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 1a474e85d..32a7ae0c2 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2007/11/12
+ * Fixed a bug in r11384 letting you bypass requirements for some skills
2007/11/09
* Expanded weapon_type enum with dual-wield constants (bugreport:384)
* Replaced several 'int' variables with enums that they represent
diff --git a/src/map/skill.c b/src/map/skill.c
index 943548c91..c929de450 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7801,17 +7801,6 @@ int skill_check_condition(struct map_session_data* sd, short skill, short lv, in
if(!sc || sc->data[SC_COMBO].timer == -1 || sc->data[SC_COMBO].val1 != skill)
return 0;
break;
- case AM_BERSERKPITCHER:
- case AM_POTIONPITCHER:
- case CR_SLIMPITCHER:
- case MG_STONECURSE:
- case CR_CULTIVATION:
- case SA_FLAMELAUNCHER:
- case SA_FROSTWEAPON:
- case SA_LIGHTNINGLOADER:
- case SA_SEISMICWEAPON:
- delitem_flag = 0;
- break;
case SA_DELUGE:
case SA_VOLCANO:
case SA_VIOLENTGALE:
@@ -8094,7 +8083,7 @@ int skill_check_condition(struct map_session_data* sd, short skill, short lv, in
}
if(!(type&1))
- return 1;
+ return 1; // consumption only happens on cast-end
if( delitem_flag )
{
diff --git a/src/map/unit.c b/src/map/unit.c
index 6fd7ce871..7d75d6e70 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1094,8 +1094,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
sc = NULL;
if(sd) {
- if (skillnotok(skill_num, sd) ||
- !skill_check_condition(sd, skill_num, skill_lv,0))
+ if (skillnotok(skill_num, sd) || !skill_check_condition(sd, skill_num, skill_lv,0))
return 0;
}