diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-27 09:38:38 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-27 09:38:38 +0000 |
commit | 6a124d9973efda1f0a955e8e5714f3fa8919aa92 (patch) | |
tree | 9e47b6a9effadf270152cf24fc928a7c61628ff5 | |
parent | 4f59f46d78c8ca16c0acce0e5e196503aacc17c0 (diff) | |
download | hercules-6a124d9973efda1f0a955e8e5714f3fa8919aa92.tar.gz hercules-6a124d9973efda1f0a955e8e5714f3fa8919aa92.tar.bz2 hercules-6a124d9973efda1f0a955e8e5714f3fa8919aa92.tar.xz hercules-6a124d9973efda1f0a955e8e5714f3fa8919aa92.zip |
- Moved basic max HP/SP calculation to before parsing equipment, fixes negative absolute HP/SP bonuses not working.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11819 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/status.c | 13 |
2 files changed, 6 insertions, 9 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 374502f11..6f0834ddb 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ 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. 2007/11/27 + * Moved basic max HP/SP calculation to before parsing equipment, fixes + negative absolute HP/SP bonuses not working. * Corrected the online_data_cleanup routine setting offline characters that are still connected to the char-server. * Added a check in script command sc_end to properly end infinte endure diff --git a/src/map/status.c b/src/map/status.c index a76c03a6c..fdcf1c2a3 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1715,6 +1715,10 @@ int status_calc_pc(struct map_session_data* sd,int first) status->aspd_rate = 1000; status->ele_lv = 1; status->race = RC_DEMIHUMAN; + //Set base Max-Hp/Sp (required here for negative Hp/Sp bonuses to work properly) + //We hold the standard Max HP here to make it faster to recalculate on vit changes. + sd->status.max_hp = status->max_hp = status_base_pc_maxhp(sd,status); + sd->status.max_sp = status->max_sp = status_base_pc_maxsp(sd,status); //zero up structures... memset(&sd->autospell,0,sizeof(sd->autospell) @@ -2032,11 +2036,6 @@ int status_calc_pc(struct map_session_data* sd,int first) // ----- HP MAX CALCULATION ----- - // Basic MaxHP value - //We hold the standard Max HP here to make it faster to recalculate on vit changes. - sd->status.max_hp = status_base_pc_maxhp(sd,status); - status->max_hp += sd->status.max_hp; - // Absolute modifiers from passive skills if((skill=pc_checkskill(sd,CR_TRUST))>0) status->max_hp += skill*200; @@ -2056,10 +2055,6 @@ int status_calc_pc(struct map_session_data* sd,int first) // ----- SP MAX CALCULATION ----- - // Basic MaxSP value - sd->status.max_sp = status_base_pc_maxsp(sd,status); - status->max_sp += sd->status.max_sp; - // Absolute modifiers from passive skills if((skill=pc_checkskill(sd,SL_KAINA))>0) status->max_sp += 30*skill; |