diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-21 02:48:25 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-21 02:48:25 +0000 |
commit | bec4f4660a654ecda5072c6adf4d01756b4a1f37 (patch) | |
tree | 566da7714f2216fdf2b5b9c1f1baf9a80e1c1dff /src/map/skill.c | |
parent | a53971a734a55c1ceebb47bb5bb03611d7e569c5 (diff) | |
download | hercules-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
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 8 |
1 files changed, 5 insertions, 3 deletions
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;
}
|