From efae7aa61b3b4d7fbb2782e8f00e27a6adc325c1 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 15 Aug 2007 22:08:30 +0000 Subject: - Merged and completed Latio's work on server-side hot-key saving (http://www.eathena.ws/board/index.php?s=&showtopic=159388&view=findpost&p=884453) - Now hotkeys are stored server-side (table hotkey in SQL servers, file save/hotkeys.txt for TXT servers). You can disable this behaviour by commenting out the 'HOTKEY_SAVING' define in mmo.h - Fixed a few compilation warnings/errors. - Apply upgrade_svn11018.sql to create the hotkey table. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11019 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/mmo.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/common') diff --git a/src/common/mmo.h b/src/common/mmo.h index 2a42c017c..0fcfff137 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -13,6 +13,11 @@ //Remove/Comment this line to disable sc_data saving. [Skotlex] #define ENABLE_SC_SAVING +//Remove/Comment this line to disable server-side hot-key saving support [Skotlex] +//Note that newer clients no longer save hotkeys in the registry! +//The number is the max number of hotkeys to save (27 = 9 skills x 3 bars) +#define HOTKEY_SAVING 27 + #define MAX_MAP_PER_SERVER 1024 #define MAX_INVENTORY 100 //Max number of characters per account. Note that changing this setting alone is not enough if the client is not hexed to support more characters as well. @@ -180,6 +185,14 @@ struct friend { char name[NAME_LENGTH]; }; +#ifdef HOTKEY_SAVING +struct hotkey { + unsigned int id; + unsigned short lv; + unsigned char type; // 0: item, 1: skill +}; +#endif + struct mmo_charstatus { int char_id; int account_id; @@ -217,6 +230,9 @@ struct mmo_charstatus { struct skill skill[MAX_SKILL]; struct friend friends[MAX_FRIENDS]; //New friend system [Skotlex] +#ifdef HOTKEY_SAVING + struct hotkey hotkeys[HOTKEY_SAVING]; +#endif }; struct registry { -- cgit v1.2.3-70-g09d2