summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-03-31 17:26:34 -0300
committerpanikon <panikon@zoho.com>2014-03-31 17:26:34 -0300
commita3fecfc4e984f3f734f5f5481f1b756ad3b93caf (patch)
treeee1cb32de0492191fdd5353d7d9c09b247544d60 /src/map/pc.c
parentd9f4084d50057f1103cbdae03dea3b4abddaa209 (diff)
downloadhercules-a3fecfc4e984f3f734f5f5481f1b756ad3b93caf.tar.gz
hercules-a3fecfc4e984f3f734f5f5481f1b756ad3b93caf.tar.bz2
hercules-a3fecfc4e984f3f734f5f5481f1b756ad3b93caf.tar.xz
hercules-a3fecfc4e984f3f734f5f5481f1b756ad3b93caf.zip
Updated documentation for pc_statusup2 and pc_statusup
(fixed issue: 7916 http://hercules.ws/board/tracker/issue-7916-wrong-comment-in-pc-statusup2/) Now pc_statusup2 returns stat increase amount as stated in previous documentation Updated *statusup documentation it was wrong Added last update in upgrade index @console.c/.h Documented partially Now two different parsing categories can have functions with same name e.g. - server exit - sql exit
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 268125ae1..249b5f0b1 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6220,7 +6220,7 @@ int pc_maxparameterincrease(struct map_session_data* sd, int type) {
/**
* Raises a stat by the specified amount.
* Obeys max_parameter limits.
- * Subtracts stat points.
+ * Does not subtract stat points.
*
* @param sd The target character.
* @param type The stat to change (see enum _sp)
@@ -6275,12 +6275,16 @@ bool pc_statusup(struct map_session_data* sd, int type, int increase) {
return true;
}
-/// Raises a stat by the specified amount.
-/// Obeys max_parameter limits.
-/// Does not subtract stat points.
-///
-/// @param type The stat to change (see enum _sp)
-/// @param val The stat increase amount.
+/**
+ * Raises a stat by the specified amount.
+ * Obeys max_parameter limits.
+ * Subtracts stat points.
+ *
+ * @param sd The target character.
+ * @param type The stat to change (see enum _sp)
+ * @param increase The stat increase amount.
+ * @return zero if no changes were made, otherwise returns stat increase amount
+ */
int pc_statusup2(struct map_session_data* sd, int type, int val)
{
int max, need;
@@ -6289,7 +6293,7 @@ int pc_statusup2(struct map_session_data* sd, int type, int val)
if( type < SP_STR || type > SP_LUK )
{
clif->statusupack(sd,type,0,0);
- return 1;
+ return 0;
}
need = pc->need_status_point(sd,type,1);
@@ -6309,7 +6313,7 @@ int pc_statusup2(struct map_session_data* sd, int type, int val)
if( val > 255 )
clif->updatestatus(sd,type); // send after the 'ack' to override the truncated value
- return 0;
+ return val;
}
/*==========================================