diff options
author | Haru <haru@dotalux.com> | 2016-02-27 05:20:40 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-02-27 14:30:02 +0100 |
commit | 33d37ff161f724b0bbcde4eedf32c528d3576c90 (patch) | |
tree | 9dad669d1085a95344ece61161ca87e2a5cf7aa5 /src/common/mmo.h | |
parent | 8748ee58a47d8b1c6c88ebb1e18806921d37b746 (diff) | |
download | hercules-33d37ff161f724b0bbcde4eedf32c528d3576c90.tar.gz hercules-33d37ff161f724b0bbcde4eedf32c528d3576c90.tar.bz2 hercules-33d37ff161f724b0bbcde4eedf32c528d3576c90.tar.xz hercules-33d37ff161f724b0bbcde4eedf32c528d3576c90.zip |
Corrected wrong variable type of struct status_change_data::tick
- The variable should be signed, since it uses the value -1 to indicate
infinite duration (and it's stored as signed in the database).
- Added #define for the special value -1 (INFINITE_DURATION).
- This fixes an issue causing status changes to fail being saved to
database (thanks to Michi for reporting it).
- Related to commit 8dc75721.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/mmo.h')
-rw-r--r-- | src/common/mmo.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h index 981c1b30b..91eccb8cd 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -220,6 +220,8 @@ #define SCRIPT_VARNAME_LENGTH 32 ///< Maximum length of a script variable +#define INFINITE_DURATION (-1) // Infinite duration for status changes + struct hplugin_data_store; enum item_types { @@ -392,11 +394,11 @@ struct script_reg_str { char *value; }; -// For saving status changes across sessions. [Skotlex] +/// For saving status changes across sessions. [Skotlex] struct status_change_data { - unsigned short type; //SC_type - int val1, val2, val3, val4; - unsigned int tick; //Remaining duration. + unsigned short type; ///< Status change type (@see enum sc_type) + int val1, val2, val3, val4; ///< Parameters (meaning depends on type). + int tick; ///< Remaining duration. }; struct storage_data { |