summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-04 16:16:44 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-04 16:16:44 +0000
commitb8431ef147bb1f98ace6dcad5bfaa7d5e0a02897 (patch)
tree748e07ec74b74e79c5240dcec014e0cc948a2851 /src/char
parent12bca4654c96b32bd282a9ce25b30bbf2f7e08b9 (diff)
downloadhercules-b8431ef147bb1f98ace6dcad5bfaa7d5e0a02897.tar.gz
hercules-b8431ef147bb1f98ace6dcad5bfaa7d5e0a02897.tar.bz2
hercules-b8431ef147bb1f98ace6dcad5bfaa7d5e0a02897.tar.xz
hercules-b8431ef147bb1f98ace6dcad5bfaa7d5e0a02897.zip
* Added MAX_HOTKEYS to supplement the HOTKEY_SAVING define
* Fixed a compile problem when hotkey saving is disabled (topic:167265) * Added script source error reporting to countitem() (topic:167165) * Removed integer mob skill state/target definition support (unused) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11353 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/char/char.c b/src/char/char.c
index d714a60bc..d3bd322c7 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -452,17 +452,18 @@ int mmo_friends_list_data_str(char *str, struct mmo_charstatus *p)
--------------------------------------------------*/
int mmo_hotkeys_tostr(char *str, struct mmo_charstatus *p)
{
+#ifdef HOTKEY_SAVING
int i;
char *str_p = str;
str_p += sprintf(str_p, "%d", p->char_id);
-#ifdef HOTKEY_SAVING
- for (i=0;i<HOTKEY_SAVING;i++)
+ for (i=0;i<MAX_HOTKEYS;i++)
str_p += sprintf(str_p, ",%d,%d,%d", p->hotkeys[i].type, p->hotkeys[i].id, p->hotkeys[i].lv);
-#endif
str_p += '\0';
+#endif
return 0;
}
+
//-------------------------------------------------
// Function to create the character line (for save)
//-------------------------------------------------
@@ -935,7 +936,7 @@ int parse_hotkey_txt(struct mmo_charstatus *p)
//Read hotkeys
len = strlen(line);
next = pos;
- for (count = 0; next < len && count < HOTKEY_SAVING; count++)
+ for (count = 0; next < len && count < MAX_HOTKEYS; count++)
{
if (sscanf(line+next, ",%d,%d,%d%n",&type,&id,&lv, &pos) < 3)
//Invalid entry?