Skip to content

Commit

Permalink
Moved MAX_CARTS and NEW_CARTS defines into common/mmo.h
Browse files Browse the repository at this point in the history
- Fixes bugreport:8184, allowing re-commit of
  9465728

Signed-off-by: Haru <haru@dotalux.com>
  • Loading branch information
MishimaHaruna committed May 10, 2014
1 parent 0ab52ac commit 65e43c2
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 19 deletions.
8 changes: 8 additions & 0 deletions src/common/mmo.h
Expand Up @@ -84,6 +84,14 @@
#endif // 20090603
#endif // 20070227

/* Feb 1st 2012 */
#if PACKETVER >= 20120201
# define NEW_CARTS
# define MAX_CARTS 9
#else
# define MAX_CARTS 5
#endif

#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.
#define MAX_CHARS 9
Expand Down
8 changes: 0 additions & 8 deletions src/config/const.h
Expand Up @@ -87,14 +87,6 @@
#define RE_LVL_TMDMOD()
#endif

/* Feb 1st 2012 */
#if PACKETVER >= 20120201
#define NEW_CARTS
#define MAX_CARTS 9
#else
#define MAX_CARTS 5
#endif

// Renewal variable cast time reduction
#ifdef RENEWAL_CAST
#define VARCAST_REDUCTION(val) do { \
Expand Down
12 changes: 11 additions & 1 deletion src/config/renewal.h
Expand Up @@ -13,8 +13,18 @@
* @INFO: This file holds general-purpose renewal settings, for class-specific ones check /src/config/classes folder
**/

/**
* Renewal full toggle switch.
*
* Uncomment this line to disable all of the below settings at once.
* Note: in UNIX builds, this can be easily done without touching this
* line, by passing --disable-renewal to the configure script:
* ./configure --disable-renewal
*/
//#define DISABLE_RENEWAL
#ifndef DISABLE_RENEWAL


#ifndef DISABLE_RENEWAL // Do not change this line

/// game renewal server mode
/// (disable by commenting the line)
Expand Down
4 changes: 2 additions & 2 deletions src/map/atcommand.c
Expand Up @@ -4,7 +4,7 @@

#define HERCULES_CORE

#include "../config/core.h" // AUTOLOOTITEM_SIZE, AUTOTRADE_PERSISTENCY, MAX_CARTS, MAX_SUGGESTIONS, MOB_FLEE(), MOB_HIT(), RENEWAL, RENEWAL_DROP, RENEWAL_EXP
#include "../config/core.h" // AUTOLOOTITEM_SIZE, AUTOTRADE_PERSISTENCY, MAX_SUGGESTIONS, MOB_FLEE(), MOB_HIT(), RENEWAL, RENEWAL_DROP, RENEWAL_EXP
#include "atcommand.h"

#include <math.h>
Expand Down Expand Up @@ -45,7 +45,7 @@
#include "../common/conf.h"
#include "../common/core.h"
#include "../common/malloc.h"
#include "../common/mmo.h"
#include "../common/mmo.h" // MAX_CARTS
#include "../common/nullpo.h"
#include "../common/random.h"
#include "../common/showmsg.h"
Expand Down
3 changes: 2 additions & 1 deletion src/map/clif.c
Expand Up @@ -4,7 +4,7 @@

#define HERCULES_CORE

#include "../config/core.h" // ANTI_MAYAP_CHEAT, NEW_CARTS, RENEWAL, SECURE_NPCTIMEOUT
#include "../config/core.h" // ANTI_MAYAP_CHEAT, RENEWAL, SECURE_NPCTIMEOUT
#include "clif.h"

#include <stdio.h>
Expand Down Expand Up @@ -48,6 +48,7 @@
#include "../common/ers.h"
#include "../common/grfio.h"
#include "../common/malloc.h"
#include "../common/mmo.h" // NEW_CARTS
#include "../common/nullpo.h"
#include "../common/random.h"
#include "../common/showmsg.h"
Expand Down
6 changes: 3 additions & 3 deletions src/map/pc.c
Expand Up @@ -4,7 +4,7 @@

#define HERCULES_CORE

#include "../config/core.h" // DBPATH, GP_BOUND_ITEMS, MAX_CARTS, MAX_SPIRITBALL, NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, SECURE_NPCTIMEOUT
#include "../config/core.h" // DBPATH, GP_BOUND_ITEMS, MAX_SPIRITBALL, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, SECURE_NPCTIMEOUT
#include "pc.h"

#include <stdio.h>
Expand Down Expand Up @@ -45,7 +45,7 @@
#include "../common/conf.h"
#include "../common/core.h" // get_svn_revision()
#include "../common/malloc.h"
#include "../common/mmo.h" //NAME_LENGTH
#include "../common/mmo.h" // NAME_LENGTH, MAX_CARTS, NEW_CARTS
#include "../common/nullpo.h"
#include "../common/random.h"
#include "../common/showmsg.h"
Expand Down Expand Up @@ -8039,7 +8039,7 @@ int pc_setoption(struct map_session_data *sd,int type)
*------------------------------------------*/
int pc_setcart(struct map_session_data *sd,int type) {
#ifndef NEW_CARTS
int cart[6] = {0x0000,OPTION_CART1,OPTION_CART2,OPTION_CART3,OPTION_CART4,OPTION_CART5};
int cart[6] = {OPTION_NOTHING,OPTION_CART1,OPTION_CART2,OPTION_CART3,OPTION_CART4,OPTION_CART5};
int option;
#endif
nullpo_ret(sd);
Expand Down
2 changes: 1 addition & 1 deletion src/map/pc.h
Expand Up @@ -21,7 +21,7 @@
#include "vending.h" // struct s_vending
#include "../common/cbasetypes.h"
#include "../common/ers.h" // struct eri
#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus
#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus, NEW_CARTS

/**
* Defines
Expand Down
3 changes: 2 additions & 1 deletion src/map/script.c
Expand Up @@ -4,7 +4,7 @@

#define HERCULES_CORE

#include "../config/core.h" // NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL
#include "../config/core.h" // RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL
#include "script.h"

#include <math.h>
Expand Down Expand Up @@ -45,6 +45,7 @@
#include "../common/cbasetypes.h"
#include "../common/malloc.h"
#include "../common/md5calc.h"
#include "../common/mmo.h" // NEW_CARTS
#include "../common/nullpo.h"
#include "../common/random.h"
#include "../common/showmsg.h"
Expand Down
4 changes: 2 additions & 2 deletions src/map/status.h
Expand Up @@ -5,10 +5,10 @@
#ifndef _MAP_STATUS_H_
#define _MAP_STATUS_H_

#include "../config/core.h" // defType, NEW_CARTS, RENEWAL, RENEWAL_ASPD
#include "../config/core.h" // defType, RENEWAL, RENEWAL_ASPD

#include "../common/cbasetypes.h"
#include "../common/mmo.h"
#include "../common/mmo.h" // NEW_CARTS

struct block_list;
struct elemental_data;
Expand Down

0 comments on commit 65e43c2

Please sign in to comment.