diff options
-rw-r--r-- | Changelog-Trunk.txt | 1 | ||||
-rw-r--r-- | src/map/skill.c | 8 |
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;
}
|