Jump to content

Haru

Administrators
  • Content Count

    382
  • Joined

  • Days Won

    38

Reputation Activity

  1. Upvote
    Haru got a reaction from AnnieRuru in [2016-05-01] HPMHooking improvements   
    Rationale:
    This changeset offers improvements to the HPMHooking, making it capable to detect, at compile time, an error in the type of a hook function, as well as allowing pre-hooks to be more powerful when it comes to pointer-type arguments.
     
    Contents:
    The HPMHooking macros addHookPre() and addHookPost() have been slightly edited, and they can now detect if the type of the passed function is the correct type for the hooked function. In order to do so, the HPMHookingGen script produces one more header (HPMHooking.Defs.inc) that lists the hook function types.
    This means that, if a plugin hooks into a function through HPMHooking, and the core function changes, the plugin will show a compile-time warning instead of silently compiling (and crashing at runtime or causing undesired effects).
    The post-hook function types have been simplified, dropping all the extra indirection levels that were added originally.
    The pre-hook function types have been changed, increasing the indirection level for pointers (now all variable types require an extra '*' in pre-hooks). This makes it possible to override const pointers from pre-hooks.
     
    Impact:
    Scripts that use the HPMHooking will need some small syntax changes.
     
    Details:
    All plugins that want to use the HPMHooking will need to #include "plugins/HPMHooking.h" (it's recommended to include it just above HPMDataCheck.h)
    #include "plugins/HPMHooking.h" // Included by plugins that use the HPMHooking #include "common/HPMDataCheck.h" // Included by all plugins Then the addHookPre() and addHookPost() calls need to be updated to the new syntax, separating interface name and function name:/* Before */ HPExport void plugin_init (void) { addHookPre("pc->dropitem", my_pc_dropitem_pre); addHookPost("pc->dropitem", my_pc_dropitem_post); } /* Now */ HPExport void plugin_init (void) { addHookPre(pc, dropitem, my_pc_dropitem_pre); addHookPost(pc, dropitem, my_pc_dropitem_post); } Pre-hook functions will need an additional indirection level in their pointer-type arguments:/* Hooked function: */ int (*dropitem) (struct map_session_data *sd, int n, int amount); /* Pre-hook (before) */ int my_pc_dropitem_pre(struct map_session_data *sd, int *n, int *amount) // Only adds '*' to the non-pointers /* Pre-hook (after) */ int my_pc_dropitem_pre(struct map_session_data **sd, int *n, int *amount) // Adds '*' to everything Note: arguments of type va_list do not require an additional indirection level. 'va_list ap' remains 'va_list ap' and does not become 'va_list *ap' 
    Post-hook functions will no longer need any additional indirection level in their arguments:
    /* Hooked function: */ int (*dropitem) (struct map_session_data *sd, int n, int amount); /* Post-hook (before) */ int my_pc_dropitem_post(int retVal, struct map_session_data *sd, int *n, int *amount) // Adds '*' to the non-pointers /* Post-hook (after) */ int my_pc_dropitem_post(int retVal, struct map_session_data *sd, int n, int amount) // No longer adds any '*' Merge Date:Sun, 1 May 2016 20:22:03 +0300
     
    Related Pull Requests:
    - #1253 - https://github.com/HerculesWS/Hercules/pull/1253 - HPMHooking improvements [Haru]
     
    Related Commits:
    1ec9328 - https://github.com/HerculesWS/Hercules/commit/1ec9328 - Sun, 28 Feb 2016 02:12:48 +0100 Moved HPMHooking-related definitions to plugins/HPMHooking.h [Haru]
    5db7c79 - https://github.com/HerculesWS/Hercules/commit/5db7c79 - Sun, 28 Feb 2016 02:17:21 +0100 Added type-checking for the addHookPre() and addHookPost() macros [Haru]
    4e49441 - https://github.com/HerculesWS/Hercules/commit/4e49441 - Sun, 28 Feb 2016 02:20:40 +0100 HPM Hooks Update [Haru]
    2788afc - https://github.com/HerculesWS/Hercules/commit/2788afc - Sun, 28 Feb 2016 02:40:15 +0100 Replaced memset with braced initializers in the HPMHooking hook handlers [Haru]
    fa2f2f4 - https://github.com/HerculesWS/Hercules/commit/fa2f2f4 - Sun, 28 Feb 2016 02:41:01 +0100 HPM Hooks Update [Haru]
    8aacecc - https://github.com/HerculesWS/Hercules/commit/8aacecc - Fri, 15 Apr 2016 19:37:54 +0200 Removed extra indirection level in HPMHooking post-hooks [Haru]
    7eb4ae4 - https://github.com/HerculesWS/Hercules/commit/7eb4ae4 - Sun, 17 Apr 2016 00:38:37 +0200 HPM Hooks Update [Haru]
    89e0550 - https://github.com/HerculesWS/Hercules/commit/89e0550 - Sun, 28 Feb 2016 02:48:47 +0100 Added one level of indirection to all variables in pre-hook functions [Haru]
    e9c98a1 - https://github.com/HerculesWS/Hercules/commit/e9c98a1 - Sun, 28 Feb 2016 02:50:40 +0100 HPM Hooks Update [Haru]
    95b4e32 - https://github.com/HerculesWS/Hercules/commit/95b4e32 - Sun, 1 May 2016 20:22:03 +0300 Merge pull request #1253 from HerculesWS/hpmhooking [Andrei Karas]
  2. Upvote
    Haru got a reaction from Nebraskka in Where is Herc Devs   
    No commits to the master branch doesn't mean there wasn't any development activity! There will be some commits soon, don't worry
  3. Upvote
    Haru got a reaction from Mystery in Where is Herc Devs   
    No commits to the master branch doesn't mean there wasn't any development activity! There will be some commits soon, don't worry
  4. Upvote
    Haru got a reaction from IndieRO in Scripting Tutorials & Guides   
    Mumbles: see my reply in the pull request. It actually becomes easier with .@select, as you don't even need to use the @menu variable.
     
    Garr: but using labels is even worse than using a switch, and makes the script less readable. If several options lead to the same result, their case labels in the switch can be grouped together without break in between, if you don't wish to use select. Or, nobody forces you to use a switch, and you can use if/else conditions if you prefer.
     

    switch (select("a:b:c:d:e")) {case 1:case 2:case 4: mes "a, b and d lead here."; break;case 3: mes "this is c."; break;}// and e does nothing Or
     

    .@choice = select("a:b:c:d:e"));if (.@choice == 3) { mes "this is c.";} else if (.@choice < 5) { mes "a, b and d lead here.";}// and e does nothing
  5. Upvote
    Haru got a reaction from Sephus in [2016-05-01] HPMHooking improvements   
    Rationale:
    This changeset offers improvements to the HPMHooking, making it capable to detect, at compile time, an error in the type of a hook function, as well as allowing pre-hooks to be more powerful when it comes to pointer-type arguments.
     
    Contents:
    The HPMHooking macros addHookPre() and addHookPost() have been slightly edited, and they can now detect if the type of the passed function is the correct type for the hooked function. In order to do so, the HPMHookingGen script produces one more header (HPMHooking.Defs.inc) that lists the hook function types.
    This means that, if a plugin hooks into a function through HPMHooking, and the core function changes, the plugin will show a compile-time warning instead of silently compiling (and crashing at runtime or causing undesired effects).
    The post-hook function types have been simplified, dropping all the extra indirection levels that were added originally.
    The pre-hook function types have been changed, increasing the indirection level for pointers (now all variable types require an extra '*' in pre-hooks). This makes it possible to override const pointers from pre-hooks.
     
    Impact:
    Scripts that use the HPMHooking will need some small syntax changes.
     
    Details:
    All plugins that want to use the HPMHooking will need to #include "plugins/HPMHooking.h" (it's recommended to include it just above HPMDataCheck.h)
    #include "plugins/HPMHooking.h" // Included by plugins that use the HPMHooking #include "common/HPMDataCheck.h" // Included by all plugins Then the addHookPre() and addHookPost() calls need to be updated to the new syntax, separating interface name and function name:/* Before */ HPExport void plugin_init (void) { addHookPre("pc->dropitem", my_pc_dropitem_pre); addHookPost("pc->dropitem", my_pc_dropitem_post); } /* Now */ HPExport void plugin_init (void) { addHookPre(pc, dropitem, my_pc_dropitem_pre); addHookPost(pc, dropitem, my_pc_dropitem_post); } Pre-hook functions will need an additional indirection level in their pointer-type arguments:/* Hooked function: */ int (*dropitem) (struct map_session_data *sd, int n, int amount); /* Pre-hook (before) */ int my_pc_dropitem_pre(struct map_session_data *sd, int *n, int *amount) // Only adds '*' to the non-pointers /* Pre-hook (after) */ int my_pc_dropitem_pre(struct map_session_data **sd, int *n, int *amount) // Adds '*' to everything Note: arguments of type va_list do not require an additional indirection level. 'va_list ap' remains 'va_list ap' and does not become 'va_list *ap' 
    Post-hook functions will no longer need any additional indirection level in their arguments:
    /* Hooked function: */ int (*dropitem) (struct map_session_data *sd, int n, int amount); /* Post-hook (before) */ int my_pc_dropitem_post(int retVal, struct map_session_data *sd, int *n, int *amount) // Adds '*' to the non-pointers /* Post-hook (after) */ int my_pc_dropitem_post(int retVal, struct map_session_data *sd, int n, int amount) // No longer adds any '*' Merge Date:Sun, 1 May 2016 20:22:03 +0300
     
    Related Pull Requests:
    - #1253 - https://github.com/HerculesWS/Hercules/pull/1253 - HPMHooking improvements [Haru]
     
    Related Commits:
    1ec9328 - https://github.com/HerculesWS/Hercules/commit/1ec9328 - Sun, 28 Feb 2016 02:12:48 +0100 Moved HPMHooking-related definitions to plugins/HPMHooking.h [Haru]
    5db7c79 - https://github.com/HerculesWS/Hercules/commit/5db7c79 - Sun, 28 Feb 2016 02:17:21 +0100 Added type-checking for the addHookPre() and addHookPost() macros [Haru]
    4e49441 - https://github.com/HerculesWS/Hercules/commit/4e49441 - Sun, 28 Feb 2016 02:20:40 +0100 HPM Hooks Update [Haru]
    2788afc - https://github.com/HerculesWS/Hercules/commit/2788afc - Sun, 28 Feb 2016 02:40:15 +0100 Replaced memset with braced initializers in the HPMHooking hook handlers [Haru]
    fa2f2f4 - https://github.com/HerculesWS/Hercules/commit/fa2f2f4 - Sun, 28 Feb 2016 02:41:01 +0100 HPM Hooks Update [Haru]
    8aacecc - https://github.com/HerculesWS/Hercules/commit/8aacecc - Fri, 15 Apr 2016 19:37:54 +0200 Removed extra indirection level in HPMHooking post-hooks [Haru]
    7eb4ae4 - https://github.com/HerculesWS/Hercules/commit/7eb4ae4 - Sun, 17 Apr 2016 00:38:37 +0200 HPM Hooks Update [Haru]
    89e0550 - https://github.com/HerculesWS/Hercules/commit/89e0550 - Sun, 28 Feb 2016 02:48:47 +0100 Added one level of indirection to all variables in pre-hook functions [Haru]
    e9c98a1 - https://github.com/HerculesWS/Hercules/commit/e9c98a1 - Sun, 28 Feb 2016 02:50:40 +0100 HPM Hooks Update [Haru]
    95b4e32 - https://github.com/HerculesWS/Hercules/commit/95b4e32 - Sun, 1 May 2016 20:22:03 +0300 Merge pull request #1253 from HerculesWS/hpmhooking [Andrei Karas]
  6. Upvote
    Haru got a reaction from evilpuncker in [2016-05-01] HPMHooking improvements   
    Rationale:
    This changeset offers improvements to the HPMHooking, making it capable to detect, at compile time, an error in the type of a hook function, as well as allowing pre-hooks to be more powerful when it comes to pointer-type arguments.
     
    Contents:
    The HPMHooking macros addHookPre() and addHookPost() have been slightly edited, and they can now detect if the type of the passed function is the correct type for the hooked function. In order to do so, the HPMHookingGen script produces one more header (HPMHooking.Defs.inc) that lists the hook function types.
    This means that, if a plugin hooks into a function through HPMHooking, and the core function changes, the plugin will show a compile-time warning instead of silently compiling (and crashing at runtime or causing undesired effects).
    The post-hook function types have been simplified, dropping all the extra indirection levels that were added originally.
    The pre-hook function types have been changed, increasing the indirection level for pointers (now all variable types require an extra '*' in pre-hooks). This makes it possible to override const pointers from pre-hooks.
     
    Impact:
    Scripts that use the HPMHooking will need some small syntax changes.
     
    Details:
    All plugins that want to use the HPMHooking will need to #include "plugins/HPMHooking.h" (it's recommended to include it just above HPMDataCheck.h)
    #include "plugins/HPMHooking.h" // Included by plugins that use the HPMHooking #include "common/HPMDataCheck.h" // Included by all plugins Then the addHookPre() and addHookPost() calls need to be updated to the new syntax, separating interface name and function name:/* Before */ HPExport void plugin_init (void) { addHookPre("pc->dropitem", my_pc_dropitem_pre); addHookPost("pc->dropitem", my_pc_dropitem_post); } /* Now */ HPExport void plugin_init (void) { addHookPre(pc, dropitem, my_pc_dropitem_pre); addHookPost(pc, dropitem, my_pc_dropitem_post); } Pre-hook functions will need an additional indirection level in their pointer-type arguments:/* Hooked function: */ int (*dropitem) (struct map_session_data *sd, int n, int amount); /* Pre-hook (before) */ int my_pc_dropitem_pre(struct map_session_data *sd, int *n, int *amount) // Only adds '*' to the non-pointers /* Pre-hook (after) */ int my_pc_dropitem_pre(struct map_session_data **sd, int *n, int *amount) // Adds '*' to everything Note: arguments of type va_list do not require an additional indirection level. 'va_list ap' remains 'va_list ap' and does not become 'va_list *ap' 
    Post-hook functions will no longer need any additional indirection level in their arguments:
    /* Hooked function: */ int (*dropitem) (struct map_session_data *sd, int n, int amount); /* Post-hook (before) */ int my_pc_dropitem_post(int retVal, struct map_session_data *sd, int *n, int *amount) // Adds '*' to the non-pointers /* Post-hook (after) */ int my_pc_dropitem_post(int retVal, struct map_session_data *sd, int n, int amount) // No longer adds any '*' Merge Date:Sun, 1 May 2016 20:22:03 +0300
     
    Related Pull Requests:
    - #1253 - https://github.com/HerculesWS/Hercules/pull/1253 - HPMHooking improvements [Haru]
     
    Related Commits:
    1ec9328 - https://github.com/HerculesWS/Hercules/commit/1ec9328 - Sun, 28 Feb 2016 02:12:48 +0100 Moved HPMHooking-related definitions to plugins/HPMHooking.h [Haru]
    5db7c79 - https://github.com/HerculesWS/Hercules/commit/5db7c79 - Sun, 28 Feb 2016 02:17:21 +0100 Added type-checking for the addHookPre() and addHookPost() macros [Haru]
    4e49441 - https://github.com/HerculesWS/Hercules/commit/4e49441 - Sun, 28 Feb 2016 02:20:40 +0100 HPM Hooks Update [Haru]
    2788afc - https://github.com/HerculesWS/Hercules/commit/2788afc - Sun, 28 Feb 2016 02:40:15 +0100 Replaced memset with braced initializers in the HPMHooking hook handlers [Haru]
    fa2f2f4 - https://github.com/HerculesWS/Hercules/commit/fa2f2f4 - Sun, 28 Feb 2016 02:41:01 +0100 HPM Hooks Update [Haru]
    8aacecc - https://github.com/HerculesWS/Hercules/commit/8aacecc - Fri, 15 Apr 2016 19:37:54 +0200 Removed extra indirection level in HPMHooking post-hooks [Haru]
    7eb4ae4 - https://github.com/HerculesWS/Hercules/commit/7eb4ae4 - Sun, 17 Apr 2016 00:38:37 +0200 HPM Hooks Update [Haru]
    89e0550 - https://github.com/HerculesWS/Hercules/commit/89e0550 - Sun, 28 Feb 2016 02:48:47 +0100 Added one level of indirection to all variables in pre-hook functions [Haru]
    e9c98a1 - https://github.com/HerculesWS/Hercules/commit/e9c98a1 - Sun, 28 Feb 2016 02:50:40 +0100 HPM Hooks Update [Haru]
    95b4e32 - https://github.com/HerculesWS/Hercules/commit/95b4e32 - Sun, 1 May 2016 20:22:03 +0300 Merge pull request #1253 from HerculesWS/hpmhooking [Andrei Karas]
  7. Upvote
    Haru got a reaction from Mystery in [2016-05-01] HPMHooking improvements   
    Rationale:
    This changeset offers improvements to the HPMHooking, making it capable to detect, at compile time, an error in the type of a hook function, as well as allowing pre-hooks to be more powerful when it comes to pointer-type arguments.
     
    Contents:
    The HPMHooking macros addHookPre() and addHookPost() have been slightly edited, and they can now detect if the type of the passed function is the correct type for the hooked function. In order to do so, the HPMHookingGen script produces one more header (HPMHooking.Defs.inc) that lists the hook function types.
    This means that, if a plugin hooks into a function through HPMHooking, and the core function changes, the plugin will show a compile-time warning instead of silently compiling (and crashing at runtime or causing undesired effects).
    The post-hook function types have been simplified, dropping all the extra indirection levels that were added originally.
    The pre-hook function types have been changed, increasing the indirection level for pointers (now all variable types require an extra '*' in pre-hooks). This makes it possible to override const pointers from pre-hooks.
     
    Impact:
    Scripts that use the HPMHooking will need some small syntax changes.
     
    Details:
    All plugins that want to use the HPMHooking will need to #include "plugins/HPMHooking.h" (it's recommended to include it just above HPMDataCheck.h)
    #include "plugins/HPMHooking.h" // Included by plugins that use the HPMHooking #include "common/HPMDataCheck.h" // Included by all plugins Then the addHookPre() and addHookPost() calls need to be updated to the new syntax, separating interface name and function name:/* Before */ HPExport void plugin_init (void) { addHookPre("pc->dropitem", my_pc_dropitem_pre); addHookPost("pc->dropitem", my_pc_dropitem_post); } /* Now */ HPExport void plugin_init (void) { addHookPre(pc, dropitem, my_pc_dropitem_pre); addHookPost(pc, dropitem, my_pc_dropitem_post); } Pre-hook functions will need an additional indirection level in their pointer-type arguments:/* Hooked function: */ int (*dropitem) (struct map_session_data *sd, int n, int amount); /* Pre-hook (before) */ int my_pc_dropitem_pre(struct map_session_data *sd, int *n, int *amount) // Only adds '*' to the non-pointers /* Pre-hook (after) */ int my_pc_dropitem_pre(struct map_session_data **sd, int *n, int *amount) // Adds '*' to everything Note: arguments of type va_list do not require an additional indirection level. 'va_list ap' remains 'va_list ap' and does not become 'va_list *ap' 
    Post-hook functions will no longer need any additional indirection level in their arguments:
    /* Hooked function: */ int (*dropitem) (struct map_session_data *sd, int n, int amount); /* Post-hook (before) */ int my_pc_dropitem_post(int retVal, struct map_session_data *sd, int *n, int *amount) // Adds '*' to the non-pointers /* Post-hook (after) */ int my_pc_dropitem_post(int retVal, struct map_session_data *sd, int n, int amount) // No longer adds any '*' Merge Date:Sun, 1 May 2016 20:22:03 +0300
     
    Related Pull Requests:
    - #1253 - https://github.com/HerculesWS/Hercules/pull/1253 - HPMHooking improvements [Haru]
     
    Related Commits:
    1ec9328 - https://github.com/HerculesWS/Hercules/commit/1ec9328 - Sun, 28 Feb 2016 02:12:48 +0100 Moved HPMHooking-related definitions to plugins/HPMHooking.h [Haru]
    5db7c79 - https://github.com/HerculesWS/Hercules/commit/5db7c79 - Sun, 28 Feb 2016 02:17:21 +0100 Added type-checking for the addHookPre() and addHookPost() macros [Haru]
    4e49441 - https://github.com/HerculesWS/Hercules/commit/4e49441 - Sun, 28 Feb 2016 02:20:40 +0100 HPM Hooks Update [Haru]
    2788afc - https://github.com/HerculesWS/Hercules/commit/2788afc - Sun, 28 Feb 2016 02:40:15 +0100 Replaced memset with braced initializers in the HPMHooking hook handlers [Haru]
    fa2f2f4 - https://github.com/HerculesWS/Hercules/commit/fa2f2f4 - Sun, 28 Feb 2016 02:41:01 +0100 HPM Hooks Update [Haru]
    8aacecc - https://github.com/HerculesWS/Hercules/commit/8aacecc - Fri, 15 Apr 2016 19:37:54 +0200 Removed extra indirection level in HPMHooking post-hooks [Haru]
    7eb4ae4 - https://github.com/HerculesWS/Hercules/commit/7eb4ae4 - Sun, 17 Apr 2016 00:38:37 +0200 HPM Hooks Update [Haru]
    89e0550 - https://github.com/HerculesWS/Hercules/commit/89e0550 - Sun, 28 Feb 2016 02:48:47 +0100 Added one level of indirection to all variables in pre-hook functions [Haru]
    e9c98a1 - https://github.com/HerculesWS/Hercules/commit/e9c98a1 - Sun, 28 Feb 2016 02:50:40 +0100 HPM Hooks Update [Haru]
    95b4e32 - https://github.com/HerculesWS/Hercules/commit/95b4e32 - Sun, 1 May 2016 20:22:03 +0300 Merge pull request #1253 from HerculesWS/hpmhooking [Andrei Karas]
  8. Upvote
    Haru got a reaction from bWolfie in [2016-04-24] Visual Studio 2015 fully supported (and Visual Studio 2010 dropped)   
    Rationale:
    This is according to our Supported Platforms policy.
     
    For an overview of supported OSes and compilers, please see the wiki page https://github.com/HerculesWS/Hercules/wiki/Supported-Platforms
     
    Contents:
    VS2015 is our primary target compiler on Windows, and this merge removes all the warnings that were present when compiling with that version of Visual Studio.
    VS2010 isn't one of our supported platforms (and hasn't been for a while), so maintaining its solution inside the repository adds unnecessary work to the dev team.
     
    Impact:
    While it's currently still possible to build on VS2010 (download the files `Hercules-10.sln` and `vcproj-10/*` from an older snapshot of the repository such as https://github.com/HerculesWS/Hercules/tree/bbcb040 and put them in your Hercules directory), we offer no support for any build issues causd by future commits, nor we'll update the project/solution files.
     
    Merge Date:
    Sun, 24 Apr 2016 13:13:19 +0200
     
    Related Pull Requests:
    - #1264 - https://github.com/HerculesWS/Hercules/pull/1264 - V2015 improved compatibility and dropped VS2010 solution [Haru]
     
    Related Commits:
     
    - a92fa36 - https://github.com/HerculesWS/Hercules/commit/a92fa36 - Sun, 17 Apr 2016 13:37:08 +0200 Updated README file [Haru]
    - e69e8c5 - https://github.com/HerculesWS/Hercules/commit/e69e8c5 - Sun, 17 Apr 2016 13:43:30 +0200 Removed VS2010 project [Haru]
    - 3af03d2 - https://github.com/HerculesWS/Hercules/commit/3af03d2 - Tue, 19 Apr 2016 11:32:04 +0200 Improved parsing of the server name/port in the irc bot configuration [Haru]
    - 2b1dce1 - https://github.com/HerculesWS/Hercules/commit/2b1dce1 - Tue, 19 Apr 2016 15:26:36 +0200 Changed map_session_data::chatID to int (and renamed to chat_id) [Haru]
    - dc23fd3 - https://github.com/HerculesWS/Hercules/commit/dc23fd3 - Tue, 19 Apr 2016 16:31:57 +0200 Corrected the type for several variables through the code [Haru]
    - e4feddf - https://github.com/HerculesWS/Hercules/commit/e4feddf - Wed, 20 Apr 2016 15:40:19 +0200 Corrected the type of the 'length' argument of various broadcast-related functions [Haru]
    - d7ffa6a - https://github.com/HerculesWS/Hercules/commit/d7ffa6a - Wed, 20 Apr 2016 17:06:18 +0200 Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message() [Haru]
    - 4788c81 - https://github.com/HerculesWS/Hercules/commit/4788c81 - Thu, 21 Apr 2016 20:38:18 +0200 Removed the 'len' argument from various message-related functions [Haru]
    - f5b88f9 - https://github.com/HerculesWS/Hercules/commit/f5b88f9 - Wed, 20 Apr 2016 17:23:03 +0200 Corrected the type of the 'length' argument of other message-related functions [Haru]
    - 9e58db4 - https://github.com/HerculesWS/Hercules/commit/9e58db4 - Wed, 20 Apr 2016 17:24:37 +0200 Added some files specific to VS2015 (Update 2) to gitignore [Haru]
    - 9fdb456 - https://github.com/HerculesWS/Hercules/commit/9fdb456 - Thu, 21 Apr 2016 20:57:56 +0200 HPM Hooks Update [Haru]
    - 31e27a1 - https://github.com/HerculesWS/Hercules/commit/31e27a1 - Sun, 24 Apr 2016 13:13:19 +0200 Merge pull request #1264 from HerculesWS/vs2015 [ibrahem Hossam]
  9. Upvote
    Haru got a reaction from evilpuncker in [2016-04-24] Visual Studio 2015 fully supported (and Visual Studio 2010 dropped)   
    That page, just like most of the stuff in the wiki is severely outdated and contains misleading information unfortunately (it should be rewritten from scratch). For the time being, I patched it up a little so that it's less misleading.
  10. Upvote
    Haru got a reaction from evilpuncker in [2016-04-24] Visual Studio 2015 fully supported (and Visual Studio 2010 dropped)   
    Rationale:
    This is according to our Supported Platforms policy.
     
    For an overview of supported OSes and compilers, please see the wiki page https://github.com/HerculesWS/Hercules/wiki/Supported-Platforms
     
    Contents:
    VS2015 is our primary target compiler on Windows, and this merge removes all the warnings that were present when compiling with that version of Visual Studio.
    VS2010 isn't one of our supported platforms (and hasn't been for a while), so maintaining its solution inside the repository adds unnecessary work to the dev team.
     
    Impact:
    While it's currently still possible to build on VS2010 (download the files `Hercules-10.sln` and `vcproj-10/*` from an older snapshot of the repository such as https://github.com/HerculesWS/Hercules/tree/bbcb040 and put them in your Hercules directory), we offer no support for any build issues causd by future commits, nor we'll update the project/solution files.
     
    Merge Date:
    Sun, 24 Apr 2016 13:13:19 +0200
     
    Related Pull Requests:
    - #1264 - https://github.com/HerculesWS/Hercules/pull/1264 - V2015 improved compatibility and dropped VS2010 solution [Haru]
     
    Related Commits:
     
    - a92fa36 - https://github.com/HerculesWS/Hercules/commit/a92fa36 - Sun, 17 Apr 2016 13:37:08 +0200 Updated README file [Haru]
    - e69e8c5 - https://github.com/HerculesWS/Hercules/commit/e69e8c5 - Sun, 17 Apr 2016 13:43:30 +0200 Removed VS2010 project [Haru]
    - 3af03d2 - https://github.com/HerculesWS/Hercules/commit/3af03d2 - Tue, 19 Apr 2016 11:32:04 +0200 Improved parsing of the server name/port in the irc bot configuration [Haru]
    - 2b1dce1 - https://github.com/HerculesWS/Hercules/commit/2b1dce1 - Tue, 19 Apr 2016 15:26:36 +0200 Changed map_session_data::chatID to int (and renamed to chat_id) [Haru]
    - dc23fd3 - https://github.com/HerculesWS/Hercules/commit/dc23fd3 - Tue, 19 Apr 2016 16:31:57 +0200 Corrected the type for several variables through the code [Haru]
    - e4feddf - https://github.com/HerculesWS/Hercules/commit/e4feddf - Wed, 20 Apr 2016 15:40:19 +0200 Corrected the type of the 'length' argument of various broadcast-related functions [Haru]
    - d7ffa6a - https://github.com/HerculesWS/Hercules/commit/d7ffa6a - Wed, 20 Apr 2016 17:06:18 +0200 Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message() [Haru]
    - 4788c81 - https://github.com/HerculesWS/Hercules/commit/4788c81 - Thu, 21 Apr 2016 20:38:18 +0200 Removed the 'len' argument from various message-related functions [Haru]
    - f5b88f9 - https://github.com/HerculesWS/Hercules/commit/f5b88f9 - Wed, 20 Apr 2016 17:23:03 +0200 Corrected the type of the 'length' argument of other message-related functions [Haru]
    - 9e58db4 - https://github.com/HerculesWS/Hercules/commit/9e58db4 - Wed, 20 Apr 2016 17:24:37 +0200 Added some files specific to VS2015 (Update 2) to gitignore [Haru]
    - 9fdb456 - https://github.com/HerculesWS/Hercules/commit/9fdb456 - Thu, 21 Apr 2016 20:57:56 +0200 HPM Hooks Update [Haru]
    - 31e27a1 - https://github.com/HerculesWS/Hercules/commit/31e27a1 - Sun, 24 Apr 2016 13:13:19 +0200 Merge pull request #1264 from HerculesWS/vs2015 [ibrahem Hossam]
  11. Upvote
    Haru got a reaction from Nebraskka in [2016-04-24] Visual Studio 2015 fully supported (and Visual Studio 2010 dropped)   
    Rationale:
    This is according to our Supported Platforms policy.
     
    For an overview of supported OSes and compilers, please see the wiki page https://github.com/HerculesWS/Hercules/wiki/Supported-Platforms
     
    Contents:
    VS2015 is our primary target compiler on Windows, and this merge removes all the warnings that were present when compiling with that version of Visual Studio.
    VS2010 isn't one of our supported platforms (and hasn't been for a while), so maintaining its solution inside the repository adds unnecessary work to the dev team.
     
    Impact:
    While it's currently still possible to build on VS2010 (download the files `Hercules-10.sln` and `vcproj-10/*` from an older snapshot of the repository such as https://github.com/HerculesWS/Hercules/tree/bbcb040 and put them in your Hercules directory), we offer no support for any build issues causd by future commits, nor we'll update the project/solution files.
     
    Merge Date:
    Sun, 24 Apr 2016 13:13:19 +0200
     
    Related Pull Requests:
    - #1264 - https://github.com/HerculesWS/Hercules/pull/1264 - V2015 improved compatibility and dropped VS2010 solution [Haru]
     
    Related Commits:
     
    - a92fa36 - https://github.com/HerculesWS/Hercules/commit/a92fa36 - Sun, 17 Apr 2016 13:37:08 +0200 Updated README file [Haru]
    - e69e8c5 - https://github.com/HerculesWS/Hercules/commit/e69e8c5 - Sun, 17 Apr 2016 13:43:30 +0200 Removed VS2010 project [Haru]
    - 3af03d2 - https://github.com/HerculesWS/Hercules/commit/3af03d2 - Tue, 19 Apr 2016 11:32:04 +0200 Improved parsing of the server name/port in the irc bot configuration [Haru]
    - 2b1dce1 - https://github.com/HerculesWS/Hercules/commit/2b1dce1 - Tue, 19 Apr 2016 15:26:36 +0200 Changed map_session_data::chatID to int (and renamed to chat_id) [Haru]
    - dc23fd3 - https://github.com/HerculesWS/Hercules/commit/dc23fd3 - Tue, 19 Apr 2016 16:31:57 +0200 Corrected the type for several variables through the code [Haru]
    - e4feddf - https://github.com/HerculesWS/Hercules/commit/e4feddf - Wed, 20 Apr 2016 15:40:19 +0200 Corrected the type of the 'length' argument of various broadcast-related functions [Haru]
    - d7ffa6a - https://github.com/HerculesWS/Hercules/commit/d7ffa6a - Wed, 20 Apr 2016 17:06:18 +0200 Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message() [Haru]
    - 4788c81 - https://github.com/HerculesWS/Hercules/commit/4788c81 - Thu, 21 Apr 2016 20:38:18 +0200 Removed the 'len' argument from various message-related functions [Haru]
    - f5b88f9 - https://github.com/HerculesWS/Hercules/commit/f5b88f9 - Wed, 20 Apr 2016 17:23:03 +0200 Corrected the type of the 'length' argument of other message-related functions [Haru]
    - 9e58db4 - https://github.com/HerculesWS/Hercules/commit/9e58db4 - Wed, 20 Apr 2016 17:24:37 +0200 Added some files specific to VS2015 (Update 2) to gitignore [Haru]
    - 9fdb456 - https://github.com/HerculesWS/Hercules/commit/9fdb456 - Thu, 21 Apr 2016 20:57:56 +0200 HPM Hooks Update [Haru]
    - 31e27a1 - https://github.com/HerculesWS/Hercules/commit/31e27a1 - Sun, 24 Apr 2016 13:13:19 +0200 Merge pull request #1264 from HerculesWS/vs2015 [ibrahem Hossam]
  12. Upvote
    Haru got a reaction from fiction in [2016-04-24] Visual Studio 2015 fully supported (and Visual Studio 2010 dropped)   
    Rationale:
    This is according to our Supported Platforms policy.
     
    For an overview of supported OSes and compilers, please see the wiki page https://github.com/HerculesWS/Hercules/wiki/Supported-Platforms
     
    Contents:
    VS2015 is our primary target compiler on Windows, and this merge removes all the warnings that were present when compiling with that version of Visual Studio.
    VS2010 isn't one of our supported platforms (and hasn't been for a while), so maintaining its solution inside the repository adds unnecessary work to the dev team.
     
    Impact:
    While it's currently still possible to build on VS2010 (download the files `Hercules-10.sln` and `vcproj-10/*` from an older snapshot of the repository such as https://github.com/HerculesWS/Hercules/tree/bbcb040 and put them in your Hercules directory), we offer no support for any build issues causd by future commits, nor we'll update the project/solution files.
     
    Merge Date:
    Sun, 24 Apr 2016 13:13:19 +0200
     
    Related Pull Requests:
    - #1264 - https://github.com/HerculesWS/Hercules/pull/1264 - V2015 improved compatibility and dropped VS2010 solution [Haru]
     
    Related Commits:
     
    - a92fa36 - https://github.com/HerculesWS/Hercules/commit/a92fa36 - Sun, 17 Apr 2016 13:37:08 +0200 Updated README file [Haru]
    - e69e8c5 - https://github.com/HerculesWS/Hercules/commit/e69e8c5 - Sun, 17 Apr 2016 13:43:30 +0200 Removed VS2010 project [Haru]
    - 3af03d2 - https://github.com/HerculesWS/Hercules/commit/3af03d2 - Tue, 19 Apr 2016 11:32:04 +0200 Improved parsing of the server name/port in the irc bot configuration [Haru]
    - 2b1dce1 - https://github.com/HerculesWS/Hercules/commit/2b1dce1 - Tue, 19 Apr 2016 15:26:36 +0200 Changed map_session_data::chatID to int (and renamed to chat_id) [Haru]
    - dc23fd3 - https://github.com/HerculesWS/Hercules/commit/dc23fd3 - Tue, 19 Apr 2016 16:31:57 +0200 Corrected the type for several variables through the code [Haru]
    - e4feddf - https://github.com/HerculesWS/Hercules/commit/e4feddf - Wed, 20 Apr 2016 15:40:19 +0200 Corrected the type of the 'length' argument of various broadcast-related functions [Haru]
    - d7ffa6a - https://github.com/HerculesWS/Hercules/commit/d7ffa6a - Wed, 20 Apr 2016 17:06:18 +0200 Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message() [Haru]
    - 4788c81 - https://github.com/HerculesWS/Hercules/commit/4788c81 - Thu, 21 Apr 2016 20:38:18 +0200 Removed the 'len' argument from various message-related functions [Haru]
    - f5b88f9 - https://github.com/HerculesWS/Hercules/commit/f5b88f9 - Wed, 20 Apr 2016 17:23:03 +0200 Corrected the type of the 'length' argument of other message-related functions [Haru]
    - 9e58db4 - https://github.com/HerculesWS/Hercules/commit/9e58db4 - Wed, 20 Apr 2016 17:24:37 +0200 Added some files specific to VS2015 (Update 2) to gitignore [Haru]
    - 9fdb456 - https://github.com/HerculesWS/Hercules/commit/9fdb456 - Thu, 21 Apr 2016 20:57:56 +0200 HPM Hooks Update [Haru]
    - 31e27a1 - https://github.com/HerculesWS/Hercules/commit/31e27a1 - Sun, 24 Apr 2016 13:13:19 +0200 Merge pull request #1264 from HerculesWS/vs2015 [ibrahem Hossam]
  13. Upvote
    Haru got a reaction from Ridley in [2016-04-24] Visual Studio 2015 fully supported (and Visual Studio 2010 dropped)   
    Rationale:
    This is according to our Supported Platforms policy.
     
    For an overview of supported OSes and compilers, please see the wiki page https://github.com/HerculesWS/Hercules/wiki/Supported-Platforms
     
    Contents:
    VS2015 is our primary target compiler on Windows, and this merge removes all the warnings that were present when compiling with that version of Visual Studio.
    VS2010 isn't one of our supported platforms (and hasn't been for a while), so maintaining its solution inside the repository adds unnecessary work to the dev team.
     
    Impact:
    While it's currently still possible to build on VS2010 (download the files `Hercules-10.sln` and `vcproj-10/*` from an older snapshot of the repository such as https://github.com/HerculesWS/Hercules/tree/bbcb040 and put them in your Hercules directory), we offer no support for any build issues causd by future commits, nor we'll update the project/solution files.
     
    Merge Date:
    Sun, 24 Apr 2016 13:13:19 +0200
     
    Related Pull Requests:
    - #1264 - https://github.com/HerculesWS/Hercules/pull/1264 - V2015 improved compatibility and dropped VS2010 solution [Haru]
     
    Related Commits:
     
    - a92fa36 - https://github.com/HerculesWS/Hercules/commit/a92fa36 - Sun, 17 Apr 2016 13:37:08 +0200 Updated README file [Haru]
    - e69e8c5 - https://github.com/HerculesWS/Hercules/commit/e69e8c5 - Sun, 17 Apr 2016 13:43:30 +0200 Removed VS2010 project [Haru]
    - 3af03d2 - https://github.com/HerculesWS/Hercules/commit/3af03d2 - Tue, 19 Apr 2016 11:32:04 +0200 Improved parsing of the server name/port in the irc bot configuration [Haru]
    - 2b1dce1 - https://github.com/HerculesWS/Hercules/commit/2b1dce1 - Tue, 19 Apr 2016 15:26:36 +0200 Changed map_session_data::chatID to int (and renamed to chat_id) [Haru]
    - dc23fd3 - https://github.com/HerculesWS/Hercules/commit/dc23fd3 - Tue, 19 Apr 2016 16:31:57 +0200 Corrected the type for several variables through the code [Haru]
    - e4feddf - https://github.com/HerculesWS/Hercules/commit/e4feddf - Wed, 20 Apr 2016 15:40:19 +0200 Corrected the type of the 'length' argument of various broadcast-related functions [Haru]
    - d7ffa6a - https://github.com/HerculesWS/Hercules/commit/d7ffa6a - Wed, 20 Apr 2016 17:06:18 +0200 Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message() [Haru]
    - 4788c81 - https://github.com/HerculesWS/Hercules/commit/4788c81 - Thu, 21 Apr 2016 20:38:18 +0200 Removed the 'len' argument from various message-related functions [Haru]
    - f5b88f9 - https://github.com/HerculesWS/Hercules/commit/f5b88f9 - Wed, 20 Apr 2016 17:23:03 +0200 Corrected the type of the 'length' argument of other message-related functions [Haru]
    - 9e58db4 - https://github.com/HerculesWS/Hercules/commit/9e58db4 - Wed, 20 Apr 2016 17:24:37 +0200 Added some files specific to VS2015 (Update 2) to gitignore [Haru]
    - 9fdb456 - https://github.com/HerculesWS/Hercules/commit/9fdb456 - Thu, 21 Apr 2016 20:57:56 +0200 HPM Hooks Update [Haru]
    - 31e27a1 - https://github.com/HerculesWS/Hercules/commit/31e27a1 - Sun, 24 Apr 2016 13:13:19 +0200 Merge pull request #1264 from HerculesWS/vs2015 [ibrahem Hossam]
  14. Upvote
    Haru got a reaction from Angelmelody in [2016-04-24] Visual Studio 2015 fully supported (and Visual Studio 2010 dropped)   
    Rationale:
    This is according to our Supported Platforms policy.
     
    For an overview of supported OSes and compilers, please see the wiki page https://github.com/HerculesWS/Hercules/wiki/Supported-Platforms
     
    Contents:
    VS2015 is our primary target compiler on Windows, and this merge removes all the warnings that were present when compiling with that version of Visual Studio.
    VS2010 isn't one of our supported platforms (and hasn't been for a while), so maintaining its solution inside the repository adds unnecessary work to the dev team.
     
    Impact:
    While it's currently still possible to build on VS2010 (download the files `Hercules-10.sln` and `vcproj-10/*` from an older snapshot of the repository such as https://github.com/HerculesWS/Hercules/tree/bbcb040 and put them in your Hercules directory), we offer no support for any build issues causd by future commits, nor we'll update the project/solution files.
     
    Merge Date:
    Sun, 24 Apr 2016 13:13:19 +0200
     
    Related Pull Requests:
    - #1264 - https://github.com/HerculesWS/Hercules/pull/1264 - V2015 improved compatibility and dropped VS2010 solution [Haru]
     
    Related Commits:
     
    - a92fa36 - https://github.com/HerculesWS/Hercules/commit/a92fa36 - Sun, 17 Apr 2016 13:37:08 +0200 Updated README file [Haru]
    - e69e8c5 - https://github.com/HerculesWS/Hercules/commit/e69e8c5 - Sun, 17 Apr 2016 13:43:30 +0200 Removed VS2010 project [Haru]
    - 3af03d2 - https://github.com/HerculesWS/Hercules/commit/3af03d2 - Tue, 19 Apr 2016 11:32:04 +0200 Improved parsing of the server name/port in the irc bot configuration [Haru]
    - 2b1dce1 - https://github.com/HerculesWS/Hercules/commit/2b1dce1 - Tue, 19 Apr 2016 15:26:36 +0200 Changed map_session_data::chatID to int (and renamed to chat_id) [Haru]
    - dc23fd3 - https://github.com/HerculesWS/Hercules/commit/dc23fd3 - Tue, 19 Apr 2016 16:31:57 +0200 Corrected the type for several variables through the code [Haru]
    - e4feddf - https://github.com/HerculesWS/Hercules/commit/e4feddf - Wed, 20 Apr 2016 15:40:19 +0200 Corrected the type of the 'length' argument of various broadcast-related functions [Haru]
    - d7ffa6a - https://github.com/HerculesWS/Hercules/commit/d7ffa6a - Wed, 20 Apr 2016 17:06:18 +0200 Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message() [Haru]
    - 4788c81 - https://github.com/HerculesWS/Hercules/commit/4788c81 - Thu, 21 Apr 2016 20:38:18 +0200 Removed the 'len' argument from various message-related functions [Haru]
    - f5b88f9 - https://github.com/HerculesWS/Hercules/commit/f5b88f9 - Wed, 20 Apr 2016 17:23:03 +0200 Corrected the type of the 'length' argument of other message-related functions [Haru]
    - 9e58db4 - https://github.com/HerculesWS/Hercules/commit/9e58db4 - Wed, 20 Apr 2016 17:24:37 +0200 Added some files specific to VS2015 (Update 2) to gitignore [Haru]
    - 9fdb456 - https://github.com/HerculesWS/Hercules/commit/9fdb456 - Thu, 21 Apr 2016 20:57:56 +0200 HPM Hooks Update [Haru]
    - 31e27a1 - https://github.com/HerculesWS/Hercules/commit/31e27a1 - Sun, 24 Apr 2016 13:13:19 +0200 Merge pull request #1264 from HerculesWS/vs2015 [ibrahem Hossam]
  15. Upvote
    Haru got a reaction from hemagx in [2016-04-16] introduction of private headers   
    Opinions like these are what drove the project to the situation it is in right now. Through the years we have accumulated a level of technical debt that I'm not confident we'll ever be able to fill.
    If we keep implementing new features the way we did until now, the project will turn into a big ball of mud (or rather, it already is). Architectural changes are very needed.
     
    Now, the change the broke compatibility with your patches, isn't this one (the change in order to implement the private headers is almost irrelevant in terms of changed lines of code). What you should blame is, instead, the redesign of the client interface in the login server.
     
     
    In my optinion, both changes were necessary in order for the project to go forward. I'll point out some of the reasons why I want changes like these:
     
    - The private interfaces: the change may seem pointless if the only reason is compile time (in fact, they aren't pointless - even if server owners don't recompile it often, we developers do -- and by shortening the compilation time, you increase the amount of tests we're likely to do on a patch before submitting it, or reduce the time we take to fully implement and test something). There are, though, other more important reasons. By making some methods private, we're ensuring that they aren't called by other modules, reducing the chance that new features will be implemented in a half-assed way like it happened in the past (resulting in a cleaner and more manageable codebase overall).
    Once again, keep in mind that the changes to the lclif.c file that were necessary in order to implement this were almost zero (just some lclif->xxxx or lclif_xxxx replaced by lclif->p->xxx), so this is very unlikely to break any of your patches.
     
    - The clif changes: This is important for at least three different reasons.
    Firstly, right now we're mixing login logic with packet sending logic, and that's just plain wrong (login code should be independent from the client, and clif code should be client-specific, just like it's important to separate logic from presentation in any well designed application).
    Secondly, implementing new packets, or editing old ones has become much easier and less prone to very subtle errors (think of 'WFIFOW(fd, 13 + 7 * i + 4) = foo;' versus 'packet->item[7].nameid = foo;').
    Finally, it addressed some long standing issues that made it very hard for HPM plugins to hook into packet handling. Writing a plugin that performs additional actions on a specific packet (or that completely overrides the handling of a packet) is much easier now.
     
    I already merged these changes into my own (private) codebase, where I have very large changes to the login interface, and the merge wasn't as painful as you describe it (you should consider doing it commit by commit rather than all at once - that's what I did when I merged it, and that's the reason why I refused to merge this as one mega-commit).
    On a side note, have you considered implementing your changes as a HPM plugin? If not, we'd like to hear the reasons, so that we can improve the HPM so that it's flexible enough for most use cases.
  16. Upvote
    Haru got a reaction from Nebraskka in [2016-04-16] introduction of private headers   
    Opinions like these are what drove the project to the situation it is in right now. Through the years we have accumulated a level of technical debt that I'm not confident we'll ever be able to fill.
    If we keep implementing new features the way we did until now, the project will turn into a big ball of mud (or rather, it already is). Architectural changes are very needed.
     
    Now, the change the broke compatibility with your patches, isn't this one (the change in order to implement the private headers is almost irrelevant in terms of changed lines of code). What you should blame is, instead, the redesign of the client interface in the login server.
     
     
    In my optinion, both changes were necessary in order for the project to go forward. I'll point out some of the reasons why I want changes like these:
     
    - The private interfaces: the change may seem pointless if the only reason is compile time (in fact, they aren't pointless - even if server owners don't recompile it often, we developers do -- and by shortening the compilation time, you increase the amount of tests we're likely to do on a patch before submitting it, or reduce the time we take to fully implement and test something). There are, though, other more important reasons. By making some methods private, we're ensuring that they aren't called by other modules, reducing the chance that new features will be implemented in a half-assed way like it happened in the past (resulting in a cleaner and more manageable codebase overall).
    Once again, keep in mind that the changes to the lclif.c file that were necessary in order to implement this were almost zero (just some lclif->xxxx or lclif_xxxx replaced by lclif->p->xxx), so this is very unlikely to break any of your patches.
     
    - The clif changes: This is important for at least three different reasons.
    Firstly, right now we're mixing login logic with packet sending logic, and that's just plain wrong (login code should be independent from the client, and clif code should be client-specific, just like it's important to separate logic from presentation in any well designed application).
    Secondly, implementing new packets, or editing old ones has become much easier and less prone to very subtle errors (think of 'WFIFOW(fd, 13 + 7 * i + 4) = foo;' versus 'packet->item[7].nameid = foo;').
    Finally, it addressed some long standing issues that made it very hard for HPM plugins to hook into packet handling. Writing a plugin that performs additional actions on a specific packet (or that completely overrides the handling of a packet) is much easier now.
     
    I already merged these changes into my own (private) codebase, where I have very large changes to the login interface, and the merge wasn't as painful as you describe it (you should consider doing it commit by commit rather than all at once - that's what I did when I merged it, and that's the reason why I refused to merge this as one mega-commit).
    On a side note, have you considered implementing your changes as a HPM plugin? If not, we'd like to hear the reasons, so that we can improve the HPM so that it's flexible enough for most use cases.
  17. Upvote
    Haru got a reaction from evilpuncker in [2016-04-16] introduction of private headers   
    Opinions like these are what drove the project to the situation it is in right now. Through the years we have accumulated a level of technical debt that I'm not confident we'll ever be able to fill.
    If we keep implementing new features the way we did until now, the project will turn into a big ball of mud (or rather, it already is). Architectural changes are very needed.
     
    Now, the change the broke compatibility with your patches, isn't this one (the change in order to implement the private headers is almost irrelevant in terms of changed lines of code). What you should blame is, instead, the redesign of the client interface in the login server.
     
     
    In my optinion, both changes were necessary in order for the project to go forward. I'll point out some of the reasons why I want changes like these:
     
    - The private interfaces: the change may seem pointless if the only reason is compile time (in fact, they aren't pointless - even if server owners don't recompile it often, we developers do -- and by shortening the compilation time, you increase the amount of tests we're likely to do on a patch before submitting it, or reduce the time we take to fully implement and test something). There are, though, other more important reasons. By making some methods private, we're ensuring that they aren't called by other modules, reducing the chance that new features will be implemented in a half-assed way like it happened in the past (resulting in a cleaner and more manageable codebase overall).
    Once again, keep in mind that the changes to the lclif.c file that were necessary in order to implement this were almost zero (just some lclif->xxxx or lclif_xxxx replaced by lclif->p->xxx), so this is very unlikely to break any of your patches.
     
    - The clif changes: This is important for at least three different reasons.
    Firstly, right now we're mixing login logic with packet sending logic, and that's just plain wrong (login code should be independent from the client, and clif code should be client-specific, just like it's important to separate logic from presentation in any well designed application).
    Secondly, implementing new packets, or editing old ones has become much easier and less prone to very subtle errors (think of 'WFIFOW(fd, 13 + 7 * i + 4) = foo;' versus 'packet->item[7].nameid = foo;').
    Finally, it addressed some long standing issues that made it very hard for HPM plugins to hook into packet handling. Writing a plugin that performs additional actions on a specific packet (or that completely overrides the handling of a packet) is much easier now.
     
    I already merged these changes into my own (private) codebase, where I have very large changes to the login interface, and the merge wasn't as painful as you describe it (you should consider doing it commit by commit rather than all at once - that's what I did when I merged it, and that's the reason why I refused to merge this as one mega-commit).
    On a side note, have you considered implementing your changes as a HPM plugin? If not, we'd like to hear the reasons, so that we can improve the HPM so that it's flexible enough for most use cases.
  18. Upvote
    Haru got a reaction from Nebraskka in Why the emulator is not Object Oriented?   
    I'd like to add a note here: Object oriented has nothing to do with C or C++. You can write object-oriented code in C, just like you can write non-object-oriented code in C++.
     
    There are several reasons not to use C++, including the terrible choices that were made by the language designers, when they tried to engineer solutions for non-problems, or the fact that the majority of C++ developers only know about 20% of the language (too bad, the 20% they know, is a different 20% for each of them).
     
    If Hercules was written in C++, I wouldn't even have considered joining the project (it's more than enough having to cope with that absurd language during my day job).
     
    For some interesting (even if a bit outdated perhaps) reads:
    Linus Torvalds - http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918
    Yossi Kreinin - http://yosefk.com/c++fqa/
     
     
    Now, back to the main question - why Hercules isn't written using an object-oriented paradigm. That's a question that the original developers might be able to answer, but I'm not. I'm only able to guess, they wrote it the way they knew to.
    Some parts of Hercules are object-oriented though. See the DBMap (common/db.c, common/db.h) for an example.
  19. Upvote
    Haru got a reaction from Lavenblade in Why the emulator is not Object Oriented?   
    I'd like to add a note here: Object oriented has nothing to do with C or C++. You can write object-oriented code in C, just like you can write non-object-oriented code in C++.
     
    There are several reasons not to use C++, including the terrible choices that were made by the language designers, when they tried to engineer solutions for non-problems, or the fact that the majority of C++ developers only know about 20% of the language (too bad, the 20% they know, is a different 20% for each of them).
     
    If Hercules was written in C++, I wouldn't even have considered joining the project (it's more than enough having to cope with that absurd language during my day job).
     
    For some interesting (even if a bit outdated perhaps) reads:
    Linus Torvalds - http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918
    Yossi Kreinin - http://yosefk.com/c++fqa/
     
     
    Now, back to the main question - why Hercules isn't written using an object-oriented paradigm. That's a question that the original developers might be able to answer, but I'm not. I'm only able to guess, they wrote it the way they knew to.
    Some parts of Hercules are object-oriented though. See the DBMap (common/db.c, common/db.h) for an example.
  20. Upvote
    Haru got a reaction from JulioCF in [2016-02-05] MobDB2SQL plugin and Mob DB improvements   
    Rationale:
    This is a follow-up to the Mob DB conversion to libconfig format from some months ago, and brings it on par with the Item DB.
     
    Contents:
    - The JName field has been restored (and made optional), for the entries that need it.
    - Several numeric values in the mob DB have been replaced with constants (race, size, element), to make it more readable.
    - The db2sql plugin can now produce SQL scripts for both item and mob databases.
    - Some floating point rounding errors have been fixed (i.e. before this update, the 100% of 820 was, apparently, 819).
     
    Impact:
    - This changeset does not affect backwards compatibility of the mob database, although it's recommended to update any custom entries to use the new constants.
    - When running the db2sql plugin, only the current mode (renewal or pre-renewal) is generated. If both are wanted, both the core and the plugin will need to be compiled twice, in each of the modes.
     
    Details:
     
    The format of Mob DB entries was changed (but the old format is still supported, although not recommended):

    { /* Before */ Id: 1001 SpriteName: "SCORPION" Name: "Scorpion" Lv: 24 // ... ViewRange: 10 ChaseRange: 12 Size: 0 Race: 4 Element: (3, 1) Mode: { // ... } MoveSpeed: 200 // ... }, { /* After */ Id: 1001 SpriteName: "SCORPION" Name: "Scorpion" Lv: 24 // ... ViewRange: 10 ChaseRange: 12 Size: "Size_Small" Race: "RC_Insect" Element: ("Ele_Fire", 1) Mode: { // ... } MoveSpeed: 200 // ... }, The mob_db scripts are now updated automatically by the HerculesWSAPI bot, like the Item Database.
     
    Merge Date:
    Fri, 5 Feb 2016 00:19:58 +0300
     
    Related Pull Requests:
    - #993 - https://github.com/HerculesWS/Hercules/pull/993 - Mob DB support for the db2sql plugin [Haru]
     
    Related Commits:
    - 50de6b4 - https://github.com/HerculesWS/Hercules/commit/50de6b4 - Mon, 7 Dec 2015 02:58:02 +0100 - Modified Mob DB loader to behave like the Item DB loader [Haru]
    - b7c5b53 - https://github.com/HerculesWS/Hercules/commit/b7c5b53 - Sat, 19 Dec 2015 18:15:04 +0100 - Added apply_percentrate and apply_percentrate64 functions [Haru]
    - 8121e1d - https://github.com/HerculesWS/Hercules/commit/8121e1d - Sun, 20 Dec 2015 02:24:07 +0100 - Replaced several floating-point operations with integer operations [Haru]
    - 84a16af - https://github.com/HerculesWS/Hercules/commit/84a16af - Sat, 19 Dec 2015 16:07:22 +0100 - Removed duplicate code from the db2sql plugin [Haru]
    - 9e92231 - https://github.com/HerculesWS/Hercules/commit/9e92231 - Sat, 19 Dec 2015 16:11:43 +0100 - Changed DB2SQL plugin to not cross-convert databases [Haru]
    - 25451ef - https://github.com/HerculesWS/Hercules/commit/25451ef - Sun, 6 Dec 2015 18:40:27 +0100 - Renamed some db2sql* plugin functions to itemdb2sql* [Haru]
    - e1c5556 - https://github.com/HerculesWS/Hercules/commit/e1c5556 - Mon, 7 Dec 2015 04:29:55 +0100 - Added modb2sql converter to the db2sql plugin [Haru]
    - 519263f - https://github.com/HerculesWS/Hercules/commit/519263f - Sun, 20 Dec 2015 02:53:44 +0100 - Preliminary update of the mob_db sql scripts to the latest txt snapshot [Haru]
    - 867b94b - https://github.com/HerculesWS/Hercules/commit/867b94b - Sun, 20 Dec 2015 03:27:24 +0100 - Replaced numeric elements with Ele_* constants in the mob database [Haru]
    - 2e13fef - https://github.com/HerculesWS/Hercules/commit/2e13fef - Sun, 20 Dec 2015 13:35:20 +0100 - Replaced numeric races with RC_* constants in the mob db [Haru]
    - ca40527 - https://github.com/HerculesWS/Hercules/commit/ca40527 - Sun, 20 Dec 2015 13:38:45 +0100 - Replaced numeric sizes with Size_* constants in the mob db [Haru]
    - 0426f8c - https://github.com/HerculesWS/Hercules/commit/0426f8c - Sun, 20 Dec 2015 03:28:55 +0100 - Re-added support for the JName field in the mob db [Haru]
    - f434a9f - https://github.com/HerculesWS/Hercules/commit/f434a9f - Sun, 20 Dec 2015 05:03:08 +0100 - Re-added JName for the monsters that require it [Haru]
    - dcc9ee4 - https://github.com/HerculesWS/Hercules/commit/dcc9ee4 - Sun, 20 Dec 2015 05:19:46 +0100 - Updated Mob Skill DB SQL script [Haru]
    - 88a6bbe - https://github.com/HerculesWS/Hercules/commit/88a6bbe - Fri, 5 Feb 2016 00:19:58 +0300 - Merge pull request #993 from HerculesWS/mobdb2sql [Andrei Karas]
    - 3414587 - https://github.com/HerculesWS/Hercules/commit/3414587 - Thu, 4 Feb 2016 22:20:40 +0100 - HPM Hooks Update [Hercules.ws]
    - f6ee3f1 - https://github.com/HerculesWS/Hercules/commit/f6ee3f1 - Thu, 4 Feb 2016 22:20:42 +0100 - ItemDB SQL Sync [Hercules.ws]
  21. Upvote
    Haru got a reaction from Angelmelody in [2016-02-05] MobDB2SQL plugin and Mob DB improvements   
    Rationale:
    This is a follow-up to the Mob DB conversion to libconfig format from some months ago, and brings it on par with the Item DB.
     
    Contents:
    - The JName field has been restored (and made optional), for the entries that need it.
    - Several numeric values in the mob DB have been replaced with constants (race, size, element), to make it more readable.
    - The db2sql plugin can now produce SQL scripts for both item and mob databases.
    - Some floating point rounding errors have been fixed (i.e. before this update, the 100% of 820 was, apparently, 819).
     
    Impact:
    - This changeset does not affect backwards compatibility of the mob database, although it's recommended to update any custom entries to use the new constants.
    - When running the db2sql plugin, only the current mode (renewal or pre-renewal) is generated. If both are wanted, both the core and the plugin will need to be compiled twice, in each of the modes.
     
    Details:
     
    The format of Mob DB entries was changed (but the old format is still supported, although not recommended):

    { /* Before */ Id: 1001 SpriteName: "SCORPION" Name: "Scorpion" Lv: 24 // ... ViewRange: 10 ChaseRange: 12 Size: 0 Race: 4 Element: (3, 1) Mode: { // ... } MoveSpeed: 200 // ... }, { /* After */ Id: 1001 SpriteName: "SCORPION" Name: "Scorpion" Lv: 24 // ... ViewRange: 10 ChaseRange: 12 Size: "Size_Small" Race: "RC_Insect" Element: ("Ele_Fire", 1) Mode: { // ... } MoveSpeed: 200 // ... }, The mob_db scripts are now updated automatically by the HerculesWSAPI bot, like the Item Database.
     
    Merge Date:
    Fri, 5 Feb 2016 00:19:58 +0300
     
    Related Pull Requests:
    - #993 - https://github.com/HerculesWS/Hercules/pull/993 - Mob DB support for the db2sql plugin [Haru]
     
    Related Commits:
    - 50de6b4 - https://github.com/HerculesWS/Hercules/commit/50de6b4 - Mon, 7 Dec 2015 02:58:02 +0100 - Modified Mob DB loader to behave like the Item DB loader [Haru]
    - b7c5b53 - https://github.com/HerculesWS/Hercules/commit/b7c5b53 - Sat, 19 Dec 2015 18:15:04 +0100 - Added apply_percentrate and apply_percentrate64 functions [Haru]
    - 8121e1d - https://github.com/HerculesWS/Hercules/commit/8121e1d - Sun, 20 Dec 2015 02:24:07 +0100 - Replaced several floating-point operations with integer operations [Haru]
    - 84a16af - https://github.com/HerculesWS/Hercules/commit/84a16af - Sat, 19 Dec 2015 16:07:22 +0100 - Removed duplicate code from the db2sql plugin [Haru]
    - 9e92231 - https://github.com/HerculesWS/Hercules/commit/9e92231 - Sat, 19 Dec 2015 16:11:43 +0100 - Changed DB2SQL plugin to not cross-convert databases [Haru]
    - 25451ef - https://github.com/HerculesWS/Hercules/commit/25451ef - Sun, 6 Dec 2015 18:40:27 +0100 - Renamed some db2sql* plugin functions to itemdb2sql* [Haru]
    - e1c5556 - https://github.com/HerculesWS/Hercules/commit/e1c5556 - Mon, 7 Dec 2015 04:29:55 +0100 - Added modb2sql converter to the db2sql plugin [Haru]
    - 519263f - https://github.com/HerculesWS/Hercules/commit/519263f - Sun, 20 Dec 2015 02:53:44 +0100 - Preliminary update of the mob_db sql scripts to the latest txt snapshot [Haru]
    - 867b94b - https://github.com/HerculesWS/Hercules/commit/867b94b - Sun, 20 Dec 2015 03:27:24 +0100 - Replaced numeric elements with Ele_* constants in the mob database [Haru]
    - 2e13fef - https://github.com/HerculesWS/Hercules/commit/2e13fef - Sun, 20 Dec 2015 13:35:20 +0100 - Replaced numeric races with RC_* constants in the mob db [Haru]
    - ca40527 - https://github.com/HerculesWS/Hercules/commit/ca40527 - Sun, 20 Dec 2015 13:38:45 +0100 - Replaced numeric sizes with Size_* constants in the mob db [Haru]
    - 0426f8c - https://github.com/HerculesWS/Hercules/commit/0426f8c - Sun, 20 Dec 2015 03:28:55 +0100 - Re-added support for the JName field in the mob db [Haru]
    - f434a9f - https://github.com/HerculesWS/Hercules/commit/f434a9f - Sun, 20 Dec 2015 05:03:08 +0100 - Re-added JName for the monsters that require it [Haru]
    - dcc9ee4 - https://github.com/HerculesWS/Hercules/commit/dcc9ee4 - Sun, 20 Dec 2015 05:19:46 +0100 - Updated Mob Skill DB SQL script [Haru]
    - 88a6bbe - https://github.com/HerculesWS/Hercules/commit/88a6bbe - Fri, 5 Feb 2016 00:19:58 +0300 - Merge pull request #993 from HerculesWS/mobdb2sql [Andrei Karas]
    - 3414587 - https://github.com/HerculesWS/Hercules/commit/3414587 - Thu, 4 Feb 2016 22:20:40 +0100 - HPM Hooks Update [Hercules.ws]
    - f6ee3f1 - https://github.com/HerculesWS/Hercules/commit/f6ee3f1 - Thu, 4 Feb 2016 22:20:42 +0100 - ItemDB SQL Sync [Hercules.ws]
  22. Upvote
    Haru got a reaction from kyeme in [2016-02-05] MobDB2SQL plugin and Mob DB improvements   
    Rationale:
    This is a follow-up to the Mob DB conversion to libconfig format from some months ago, and brings it on par with the Item DB.
     
    Contents:
    - The JName field has been restored (and made optional), for the entries that need it.
    - Several numeric values in the mob DB have been replaced with constants (race, size, element), to make it more readable.
    - The db2sql plugin can now produce SQL scripts for both item and mob databases.
    - Some floating point rounding errors have been fixed (i.e. before this update, the 100% of 820 was, apparently, 819).
     
    Impact:
    - This changeset does not affect backwards compatibility of the mob database, although it's recommended to update any custom entries to use the new constants.
    - When running the db2sql plugin, only the current mode (renewal or pre-renewal) is generated. If both are wanted, both the core and the plugin will need to be compiled twice, in each of the modes.
     
    Details:
     
    The format of Mob DB entries was changed (but the old format is still supported, although not recommended):

    { /* Before */ Id: 1001 SpriteName: "SCORPION" Name: "Scorpion" Lv: 24 // ... ViewRange: 10 ChaseRange: 12 Size: 0 Race: 4 Element: (3, 1) Mode: { // ... } MoveSpeed: 200 // ... }, { /* After */ Id: 1001 SpriteName: "SCORPION" Name: "Scorpion" Lv: 24 // ... ViewRange: 10 ChaseRange: 12 Size: "Size_Small" Race: "RC_Insect" Element: ("Ele_Fire", 1) Mode: { // ... } MoveSpeed: 200 // ... }, The mob_db scripts are now updated automatically by the HerculesWSAPI bot, like the Item Database.
     
    Merge Date:
    Fri, 5 Feb 2016 00:19:58 +0300
     
    Related Pull Requests:
    - #993 - https://github.com/HerculesWS/Hercules/pull/993 - Mob DB support for the db2sql plugin [Haru]
     
    Related Commits:
    - 50de6b4 - https://github.com/HerculesWS/Hercules/commit/50de6b4 - Mon, 7 Dec 2015 02:58:02 +0100 - Modified Mob DB loader to behave like the Item DB loader [Haru]
    - b7c5b53 - https://github.com/HerculesWS/Hercules/commit/b7c5b53 - Sat, 19 Dec 2015 18:15:04 +0100 - Added apply_percentrate and apply_percentrate64 functions [Haru]
    - 8121e1d - https://github.com/HerculesWS/Hercules/commit/8121e1d - Sun, 20 Dec 2015 02:24:07 +0100 - Replaced several floating-point operations with integer operations [Haru]
    - 84a16af - https://github.com/HerculesWS/Hercules/commit/84a16af - Sat, 19 Dec 2015 16:07:22 +0100 - Removed duplicate code from the db2sql plugin [Haru]
    - 9e92231 - https://github.com/HerculesWS/Hercules/commit/9e92231 - Sat, 19 Dec 2015 16:11:43 +0100 - Changed DB2SQL plugin to not cross-convert databases [Haru]
    - 25451ef - https://github.com/HerculesWS/Hercules/commit/25451ef - Sun, 6 Dec 2015 18:40:27 +0100 - Renamed some db2sql* plugin functions to itemdb2sql* [Haru]
    - e1c5556 - https://github.com/HerculesWS/Hercules/commit/e1c5556 - Mon, 7 Dec 2015 04:29:55 +0100 - Added modb2sql converter to the db2sql plugin [Haru]
    - 519263f - https://github.com/HerculesWS/Hercules/commit/519263f - Sun, 20 Dec 2015 02:53:44 +0100 - Preliminary update of the mob_db sql scripts to the latest txt snapshot [Haru]
    - 867b94b - https://github.com/HerculesWS/Hercules/commit/867b94b - Sun, 20 Dec 2015 03:27:24 +0100 - Replaced numeric elements with Ele_* constants in the mob database [Haru]
    - 2e13fef - https://github.com/HerculesWS/Hercules/commit/2e13fef - Sun, 20 Dec 2015 13:35:20 +0100 - Replaced numeric races with RC_* constants in the mob db [Haru]
    - ca40527 - https://github.com/HerculesWS/Hercules/commit/ca40527 - Sun, 20 Dec 2015 13:38:45 +0100 - Replaced numeric sizes with Size_* constants in the mob db [Haru]
    - 0426f8c - https://github.com/HerculesWS/Hercules/commit/0426f8c - Sun, 20 Dec 2015 03:28:55 +0100 - Re-added support for the JName field in the mob db [Haru]
    - f434a9f - https://github.com/HerculesWS/Hercules/commit/f434a9f - Sun, 20 Dec 2015 05:03:08 +0100 - Re-added JName for the monsters that require it [Haru]
    - dcc9ee4 - https://github.com/HerculesWS/Hercules/commit/dcc9ee4 - Sun, 20 Dec 2015 05:19:46 +0100 - Updated Mob Skill DB SQL script [Haru]
    - 88a6bbe - https://github.com/HerculesWS/Hercules/commit/88a6bbe - Fri, 5 Feb 2016 00:19:58 +0300 - Merge pull request #993 from HerculesWS/mobdb2sql [Andrei Karas]
    - 3414587 - https://github.com/HerculesWS/Hercules/commit/3414587 - Thu, 4 Feb 2016 22:20:40 +0100 - HPM Hooks Update [Hercules.ws]
    - f6ee3f1 - https://github.com/HerculesWS/Hercules/commit/f6ee3f1 - Thu, 4 Feb 2016 22:20:42 +0100 - ItemDB SQL Sync [Hercules.ws]
  23. Upvote
    Haru got a reaction from evilpuncker in [2016-02-05] MobDB2SQL plugin and Mob DB improvements   
    Rationale:
    This is a follow-up to the Mob DB conversion to libconfig format from some months ago, and brings it on par with the Item DB.
     
    Contents:
    - The JName field has been restored (and made optional), for the entries that need it.
    - Several numeric values in the mob DB have been replaced with constants (race, size, element), to make it more readable.
    - The db2sql plugin can now produce SQL scripts for both item and mob databases.
    - Some floating point rounding errors have been fixed (i.e. before this update, the 100% of 820 was, apparently, 819).
     
    Impact:
    - This changeset does not affect backwards compatibility of the mob database, although it's recommended to update any custom entries to use the new constants.
    - When running the db2sql plugin, only the current mode (renewal or pre-renewal) is generated. If both are wanted, both the core and the plugin will need to be compiled twice, in each of the modes.
     
    Details:
     
    The format of Mob DB entries was changed (but the old format is still supported, although not recommended):

    { /* Before */ Id: 1001 SpriteName: "SCORPION" Name: "Scorpion" Lv: 24 // ... ViewRange: 10 ChaseRange: 12 Size: 0 Race: 4 Element: (3, 1) Mode: { // ... } MoveSpeed: 200 // ... }, { /* After */ Id: 1001 SpriteName: "SCORPION" Name: "Scorpion" Lv: 24 // ... ViewRange: 10 ChaseRange: 12 Size: "Size_Small" Race: "RC_Insect" Element: ("Ele_Fire", 1) Mode: { // ... } MoveSpeed: 200 // ... }, The mob_db scripts are now updated automatically by the HerculesWSAPI bot, like the Item Database.
     
    Merge Date:
    Fri, 5 Feb 2016 00:19:58 +0300
     
    Related Pull Requests:
    - #993 - https://github.com/HerculesWS/Hercules/pull/993 - Mob DB support for the db2sql plugin [Haru]
     
    Related Commits:
    - 50de6b4 - https://github.com/HerculesWS/Hercules/commit/50de6b4 - Mon, 7 Dec 2015 02:58:02 +0100 - Modified Mob DB loader to behave like the Item DB loader [Haru]
    - b7c5b53 - https://github.com/HerculesWS/Hercules/commit/b7c5b53 - Sat, 19 Dec 2015 18:15:04 +0100 - Added apply_percentrate and apply_percentrate64 functions [Haru]
    - 8121e1d - https://github.com/HerculesWS/Hercules/commit/8121e1d - Sun, 20 Dec 2015 02:24:07 +0100 - Replaced several floating-point operations with integer operations [Haru]
    - 84a16af - https://github.com/HerculesWS/Hercules/commit/84a16af - Sat, 19 Dec 2015 16:07:22 +0100 - Removed duplicate code from the db2sql plugin [Haru]
    - 9e92231 - https://github.com/HerculesWS/Hercules/commit/9e92231 - Sat, 19 Dec 2015 16:11:43 +0100 - Changed DB2SQL plugin to not cross-convert databases [Haru]
    - 25451ef - https://github.com/HerculesWS/Hercules/commit/25451ef - Sun, 6 Dec 2015 18:40:27 +0100 - Renamed some db2sql* plugin functions to itemdb2sql* [Haru]
    - e1c5556 - https://github.com/HerculesWS/Hercules/commit/e1c5556 - Mon, 7 Dec 2015 04:29:55 +0100 - Added modb2sql converter to the db2sql plugin [Haru]
    - 519263f - https://github.com/HerculesWS/Hercules/commit/519263f - Sun, 20 Dec 2015 02:53:44 +0100 - Preliminary update of the mob_db sql scripts to the latest txt snapshot [Haru]
    - 867b94b - https://github.com/HerculesWS/Hercules/commit/867b94b - Sun, 20 Dec 2015 03:27:24 +0100 - Replaced numeric elements with Ele_* constants in the mob database [Haru]
    - 2e13fef - https://github.com/HerculesWS/Hercules/commit/2e13fef - Sun, 20 Dec 2015 13:35:20 +0100 - Replaced numeric races with RC_* constants in the mob db [Haru]
    - ca40527 - https://github.com/HerculesWS/Hercules/commit/ca40527 - Sun, 20 Dec 2015 13:38:45 +0100 - Replaced numeric sizes with Size_* constants in the mob db [Haru]
    - 0426f8c - https://github.com/HerculesWS/Hercules/commit/0426f8c - Sun, 20 Dec 2015 03:28:55 +0100 - Re-added support for the JName field in the mob db [Haru]
    - f434a9f - https://github.com/HerculesWS/Hercules/commit/f434a9f - Sun, 20 Dec 2015 05:03:08 +0100 - Re-added JName for the monsters that require it [Haru]
    - dcc9ee4 - https://github.com/HerculesWS/Hercules/commit/dcc9ee4 - Sun, 20 Dec 2015 05:19:46 +0100 - Updated Mob Skill DB SQL script [Haru]
    - 88a6bbe - https://github.com/HerculesWS/Hercules/commit/88a6bbe - Fri, 5 Feb 2016 00:19:58 +0300 - Merge pull request #993 from HerculesWS/mobdb2sql [Andrei Karas]
    - 3414587 - https://github.com/HerculesWS/Hercules/commit/3414587 - Thu, 4 Feb 2016 22:20:40 +0100 - HPM Hooks Update [Hercules.ws]
    - f6ee3f1 - https://github.com/HerculesWS/Hercules/commit/f6ee3f1 - Thu, 4 Feb 2016 22:20:42 +0100 - ItemDB SQL Sync [Hercules.ws]
  24. Upvote
    Haru got a reaction from JulioCF in [2016-01-13] ConstDB converted to libconfig format, added doc/constants.md   
    Rationale:
    This is an (unplanned) episode in the txt->libconfig conversion project. The reason for the conversion is that we suddenly needed a way to add attributes (specifically, "deprecated" to some constants, since simply removing them would mean that any scripts using them would silently fail (talk about terrible script engine).
     
    Contents:
    The Constants Database (db/const.txt) has been converted to the usual libconfig format. This allows us to add new attributes to the constants.
    Old, unused, constants have been marked as deprecated using the facilities provided by the new database format (mostly, Job_Alchem, VAR_*), and their use will now trigger a warning at parse time (previously, it would result in a value of zero being used silently, in a very nasty way).
    A new docuemntation file (doc/constants.md) is provided, listing all the constants available to the scripting engine (coming from Constants DB, Item DB, Mob DB, Skill DB or even hardcoded in source), since there wasn't any centralized place where all the constants were listed. The file will get automatically updated in future through the HerculesWSAPI bot.
    The document is readily available online through the following link: https://github.com/HerculesWS/Hercules/blob/master/doc/constants.md (it will always point to the latest version)
     
    Impact:
    The impact of this changeset on customizations is low. If using custom constants in const.txt, users can either use the provided script to re-generate their constants.conf, or add the entries manually.
     
    Details:
    The format of constants.conf is the following:

    constants_db: { /************* Entry structure (short) ************************************ Identifier: value // (int) ************* Entry structure (full) ************************************* Identifier: { Value: value // (int) Parameter: true // (boolean) Defaults to false. Deprecated: true // (boolean) Defaults to false. } **************************************************************************/ (each entry can use either the short or full format).
     
    A special "comment__" field can be added, to generate a corresponding title in the documentation file. Comments will have no other effects (they're not normally parsed, but they're available to plugins).
     
    Merge Date:
    Wed, 13 Jan 2016 19:22:45 +0300
     
    Related Pull Requests:
    - #1088 - https://github.com/HerculesWS/Hercules/pull/1088 - Constdb revamp [Haru]
    - #908 - https://github.com/HerculesWS/Hercules/pull/908 - Add EQP_ = Equipment Position constants [AnnieRuru]
    - #1124 - https://github.com/HerculesWS/Hercules/pull/1124 - Constdb2doc plugin (doc/constants.md) [Haru]
     
    Related Commits:
    - a815472 - https://github.com/HerculesWS/Hercules/commit/a815472 - Sun, 10 Jan 2016 02:01:55 +0100 Converted const.txt to libconfig format [Haru]
    - 6ae9045 - https://github.com/HerculesWS/Hercules/commit/6ae9045 - Sun, 10 Jan 2016 02:33:15 +0100 Added support to mark constants in db/constants.conf as deprecated [Haru]
    - 3f56ffc - https://github.com/HerculesWS/Hercules/commit/3f56ffc - Sun, 10 Jan 2016 02:33:41 +0100 Marked Job_Alchem and Job_Baby_Alchem as deprecated [Haru]
    - 99f707e - https://github.com/HerculesWS/Hercules/commit/99f707e - Wed, 13 Jan 2016 11:47:47 +0100 Added converter script from const.txt to constants.conf [Haru]
    - 49081f4 - https://github.com/HerculesWS/Hercules/commit/49081f4 - Wed, 13 Jan 2016 19:22:45 +0300 Merge pull request #1088 from HerculesWS/constdb [Andrei Karas]
    - 9e48e2a - https://github.com/HerculesWS/Hercules/commit/9e48e2a - Wed, 13 Jan 2016 17:23:31 +0100 HPM Hooks Update [Hercules.ws] (dastgir/master)
    - de33b02 - https://github.com/HerculesWS/Hercules/commit/de33b02 - Fri, 15 Jan 2016 20:34:26 +0100 Fixed a typo in the constdb converter script [Haru]
    - a1310e2 - https://github.com/HerculesWS/Hercules/commit/a1310e2 - Wed, 6 Jan 2016 16:38:43 +0800 Remove VAR_ constants - there are 2 same constants for setlook script command, remove the wrong one - VAR_ constant added by l
    one_wolf is invalid https://github.com/HerculesWS/Hercules/commit/f4278f36db32f35e535a0ea8feb1cf83ca95019e, so use the LOOK_ constant [AnnieRuru]
    - 7610346 - https://github.com/HerculesWS/Hercules/commit/7610346 - Sat, 16 Jan 2016 20:23:57 +0100 Merge pull request #908 from AnnieRuru/request_26 [Haru]
    - e3253b4 - https://github.com/HerculesWS/Hercules/commit/e3253b4 - Mon, 25 Jan 2016 16:52:27 +0100 Added source support for special comments in the constdb [Haru]
    - 72a75cb - https://github.com/HerculesWS/Hercules/commit/72a75cb - Mon, 25 Jan 2016 15:53:56 +0100 Added constdb2doc plugin [Haru]
    - 15bca8f - https://github.com/HerculesWS/Hercules/commit/15bca8f - Mon, 25 Jan 2016 16:00:44 +0100 Generated doc/constants.md [Haru] (HEAD -> constdb2doc, origin/constdb2doc)
     
    Trivia:
    The constdb2doc plugin introduced in 72a75cb is based on my 'vimsyntaxgen' plugin (see https://github.com/HerculesWS/StaffPlugins/tree/master/Haru/vimsyntaxgen).
  25. Upvote
    Haru got a reaction from Skyline in [2015-12-31] FAKE_NPC and the NPC View ID -1   
    @@Oxxy 49 66 20 79 6F 75 20 70 72 65 66 65 72 20 72 65 61 64 69 6E 67 20 6E 75 6D 62 65 72 73 20 74 68 61 6E 20 77 6F 72 64 73 2C 20 6E 6F 74 68 69 6E 67 20 70 72 65 76 65 6E 74 73 20 79 6F 75 20 66 72 6F 6D 20 64 65 66 69 6E 69 6E 67 20 74 68 6F 73 65 20 6E 75 6D 62 65 72 73 20 61 73 20 63 6F 6E 73 74 61 6E 74 73 2C 20 62 79 20 65 64 69 74 69 6E 67 20 63 6F 6E 73 74 61 6E 74 73 2E 63 6F 6E 66 2E. Sarcasm aside, it's just ASCII codes. If you decode it, it contains a solution that should work for you.
     
    @@vykimo If you're not pleased, you can use any other emulator. We provide both content updates and architecture modernization, and we will keep doing so as long as the project lives. If you want to stick to the early 2000's coding practices *and* use Hercules at the same time, then feel free to make your own fork, and undo the changes you don't like. As you can see in my post, I specified the related commits, so they're easy to revert.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.