summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcookiecrumbs <cookiecrumbs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-20 03:35:52 +0000
committercookiecrumbs <cookiecrumbs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-20 03:35:52 +0000
commitbb874f80b45fa36bd2bc50a26c0324da2561c2ad (patch)
tree5e2af9c066d9a8868dc9c2c124c36db587d6da50 /src
parentcf6f0ee71e978691de28579ad33c0b30fdc8be09 (diff)
downloadhercules-bb874f80b45fa36bd2bc50a26c0324da2561c2ad.tar.gz
hercules-bb874f80b45fa36bd2bc50a26c0324da2561c2ad.tar.bz2
hercules-bb874f80b45fa36bd2bc50a26c0324da2561c2ad.tar.xz
hercules-bb874f80b45fa36bd2bc50a26c0324da2561c2ad.zip
Added new status bonuses: SC_INCMHP and SC_INCMSP to increase maximum HP and SP by a FIXED amount.
Fixed the following items in the /db/*re/item_db.txt and /sql-files/item_db.sql: Increase HP Potion (Small), Increase HP Potion (Medium), Increase HP Potion (Large). bugreport:5790 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16454 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/status.c6
-rw-r--r--src/map/status.h4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 2ea6fffd0..b349e6ab2 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -894,6 +894,8 @@ void initChangeTables(void) {
StatusChangeFlagTable[SC_INCFLEE2] |= SCB_FLEE2;
StatusChangeFlagTable[SC_INCMHPRATE] |= SCB_MAXHP;
StatusChangeFlagTable[SC_INCMSPRATE] |= SCB_MAXSP;
+ StatusChangeFlagTable[SC_INCMHP] |= SCB_MAXHP;
+ StatusChangeFlagTable[SC_INCMSP] |= SCB_MAXSP;
StatusChangeFlagTable[SC_INCATKRATE] |= SCB_BATK|SCB_WATK;
StatusChangeFlagTable[SC_INCMATKRATE] |= SCB_MATK;
StatusChangeFlagTable[SC_INCDEFRATE] |= SCB_DEF;
@@ -5308,6 +5310,8 @@ static unsigned int status_calc_maxhp(struct block_list *bl, struct status_chang
if(sc->data[SC_INCMHPRATE])
maxhp += maxhp * sc->data[SC_INCMHPRATE]->val1/100;
+ if(sc->data[SC_INCMHP])
+ maxhp += (sc->data[SC_INCMHP]->val1);
if(sc->data[SC_APPLEIDUN])
maxhp += maxhp * sc->data[SC_APPLEIDUN]->val2/100;
if(sc->data[SC_DELUGE])
@@ -5359,6 +5363,8 @@ static unsigned int status_calc_maxsp(struct block_list *bl, struct status_chang
if(sc->data[SC_INCMSPRATE])
maxsp += maxsp * sc->data[SC_INCMSPRATE]->val1/100;
+ if(sc->data[SC_INCMSP])
+ maxsp += (sc->data[SC_INCMSP]->val1);
if(sc->data[SC_SERVICE4U])
maxsp += maxsp * sc->data[SC_SERVICE4U]->val2/100;
if(sc->data[SC_MERC_SPUP])
diff --git a/src/map/status.h b/src/map/status.h
index b5a00b91e..b6d55cbb6 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -617,7 +617,9 @@ typedef enum sc_type {
SC_ANGRIFFS_MODUS,
SC_GOLDENE_FERSE,
SC_ERASER_CUTTER,
-
+ /* Max HP & SP */
+ SC_INCMHP,
+ SC_INCMSP,
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;