summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-09-20 00:30:15 +0000
committerFate <fate-tmw@googlemail.com>2009-09-20 00:30:15 +0000
commit264bf4fd6dfb501643cf9178e5471e9e0e55152b (patch)
tree3ac7e832801590219bd62e8c45ccca2ccf86d2dd /src/map/pc.c
parent162c84a85c288bcb97df44d08e0c0ff271ec102b (diff)
downloadtmwa-264bf4fd6dfb501643cf9178e5471e9e0e55152b.tar.gz
tmwa-264bf4fd6dfb501643cf9178e5471e9e0e55152b.tar.bz2
tmwa-264bf4fd6dfb501643cf9178e5471e9e0e55152b.tar.xz
tmwa-264bf4fd6dfb501643cf9178e5471e9e0e55152b.zip
Initial support for skill pools
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 7d083d1..51165ea 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4756,18 +4756,12 @@ int pc_skillup(struct map_session_data *sd,int skill_num)
{
nullpo_retr(0, sd);
- if( skill_num>=10000 ){
- guild_skillup(sd,skill_num);
- return 0;
- }
-
- if( sd->status.skill_point>0 &&
- sd->status.skill[skill_num].id!=0 &&
- sd->status.skill[skill_num].lv < skill_get_max(skill_num) &&
- skill_get_inf2(skill_num) & 0x01)
- {
+ if (sd->status.skill[skill_num].id !=0
+ && sd->status.skill_point > sd->status.skill[skill_num].lv
+ && sd->status.skill[skill_num].lv < skill_db[skill_num].max_raise) {
sd->status.skill[skill_num].lv++;
- sd->status.skill_point--;
+ sd->status.skill_point -= sd->status.skill[skill_num].lv;
+
pc_calcstatus(sd,0);
clif_skillup(sd,skill_num);
clif_updatestatus(sd,SP_SKILLPOINT);