summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-21 02:48:25 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-21 02:48:25 +0000
commitbec4f4660a654ecda5072c6adf4d01756b4a1f37 (patch)
tree566da7714f2216fdf2b5b9c1f1baf9a80e1c1dff
parenta53971a734a55c1ceebb47bb5bb03611d7e569c5 (diff)
downloadhercules-bec4f4660a654ecda5072c6adf4d01756b4a1f37.tar.gz
hercules-bec4f4660a654ecda5072c6adf4d01756b4a1f37.tar.bz2
hercules-bec4f4660a654ecda5072c6adf4d01756b4a1f37.tar.xz
hercules-bec4f4660a654ecda5072c6adf4d01756b4a1f37.zip
* Player must learn the skill before doing auto-spell
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6673 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/skill.c8
2 files changed, 6 insertions, 3 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index ed7ab532b..ad93c091b 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/19
+ * Player must learn the skill before doing auto-spell [Lance]
* Exploit prevention in clif_parse_NpcStringInput [Lance]
* grfio_final moved back if any of GRF overriding is enabled so servers
with such configuration will not have different values after reloading. [Lance]
diff --git a/src/map/skill.c b/src/map/skill.c
index a8839bfd9..784f088ae 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8640,7 +8640,9 @@ int skill_autospell(struct map_session_data *sd,int skillid)
nullpo_retr(0, sd);
skilllv = sd->menuskill_lv;
- if(skilllv <= 0) return 0;
+ lv=pc_checkskill(sd,skillid);
+
+ if(skilllv <= 0 || !lv) return 0; // Player must learn the skill before doing auto-spell [Lance]
if(skillid==MG_NAPALMBEAT) maxlv=3;
else if(skillid==MG_COLDBOLT || skillid==MG_FIREBOLT || skillid==MG_LIGHTNINGBOLT){
@@ -8662,11 +8664,11 @@ int skill_autospell(struct map_session_data *sd,int skillid)
else if(skillid==MG_FROSTDIVER) maxlv=1;
else return 0;
- if(maxlv > (lv=pc_checkskill(sd,skillid)))
+ if(maxlv > lv)
maxlv = lv;
sc_start4(&sd->bl,SC_AUTOSPELL,100,skilllv,skillid,maxlv,0, // val1:スキルID val2:使用?ナ大Lv
- skill_get_time(SA_AUTOSPELL,skilllv));// にしてみたけどbscriptが?曹ォ易い????H
+ skill_get_time(SA_AUTOSPELL,skilllv));// にしてみたけどbscriptが?曹ォ易い????H
return 0;
}