summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorGepard <Gepard@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-15 17:04:46 +0000
committerGepard <Gepard@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-15 17:04:46 +0000
commitebc2e786b5003fc7e3624419db895e26ed4d41dd (patch)
treeb172f750660ab9f379dee7144eee7fd070bf4b36 /src/map/atcommand.c
parent6c492d546fde8fd7180695891a1f1eb576758075 (diff)
downloadhercules-ebc2e786b5003fc7e3624419db895e26ed4d41dd.tar.gz
hercules-ebc2e786b5003fc7e3624419db895e26ed4d41dd.tar.bz2
hercules-ebc2e786b5003fc7e3624419db895e26ed4d41dd.tar.xz
hercules-ebc2e786b5003fc7e3624419db895e26ed4d41dd.zip
* Extracted calculations of the number of status points PC gets when leveling up to a function.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14825 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 459a6a734..e58f07880 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1751,8 +1751,8 @@ ACMD_FUNC(baselevelup)
} // End Addition
if ((unsigned int)level > pc_maxbaselv(sd) || (unsigned int)level > pc_maxbaselv(sd) - sd->status.base_level) // fix positiv overflow
level = pc_maxbaselv(sd) - sd->status.base_level;
- for (i = 1; i <= level; i++)
- status_point += (sd->status.base_level + i + 14) / 5;
+ for (i = 0; i < level; i++)
+ status_point += pc_gets_status_point(sd->status.base_level + i);
sd->status.status_point += status_point;
sd->status.base_level += (unsigned int)level;
@@ -1768,7 +1768,7 @@ ACMD_FUNC(baselevelup)
if ((unsigned int)level >= sd->status.base_level)
level = sd->status.base_level-1;
for (i = 0; i > -level; i--)
- status_point += (sd->status.base_level + i + 14) / 5;
+ status_point += pc_gets_status_point(sd->status.base_level + i - 1);
if (sd->status.status_point < status_point)
pc_resetstate(sd);
if (sd->status.status_point < status_point)