From e933db556f62617f24f123a1459cd4245fd3dcf2 Mon Sep 17 00:00:00 2001 From: Cydh Ramdh Date: Wed, 9 Sep 2015 21:05:07 +0700 Subject: [PATCH] Checked some preprocessors on mmo.h and core.h Signed-off-by: Cydh Ramdh --- src/common/mmo.h | 22 +++++++++++++++------- src/config/core.h | 5 ----- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/common/mmo.h b/src/common/mmo.h index c5a4f4c171..dcd41c1944 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -6,6 +6,7 @@ #include "cbasetypes.h" #include "../common/db.h" +#include "../config/core.h" #include // server->client protocol version @@ -31,14 +32,14 @@ #define HOTKEY_SAVING #if PACKETVER < 20090603 - // (27 = 9 skills x 3 bars) (0x02b9,191) - #define MAX_HOTKEYS 27 + // (27 = 9 skills x 3 bars) (0x02b9,191) + #define MAX_HOTKEYS 27 #elif PACKETVER < 20090617 - // (36 = 9 skills x 4 bars) (0x07d9,254) - #define MAX_HOTKEYS 36 + // (36 = 9 skills x 4 bars) (0x07d9,254) + #define MAX_HOTKEYS 36 #else - // (38 = 9 skills x 4 bars & 2 Quickslots)(0x07d9,268) - #define MAX_HOTKEYS 38 + // (38 = 9 skills x 4 bars & 2 Quickslots)(0x07d9,268) + #define MAX_HOTKEYS 38 #endif #define MAX_MAP_PER_SERVER 1500 /// Increased to allow creation of Instance Maps @@ -812,11 +813,18 @@ enum e_pc_reg_loading { PRL_ALL = 0xFF, }; -// sanity checks... +// Sanity checks... #if MAX_ZENY > INT_MAX #error MAX_ZENY is too big #endif +#ifndef VIP_ENABLE + #define MIN_STORAGE MAX_STORAGE // If the VIP system is disabled the min = max. + #define MIN_CHARS MAX_CHARS // Default number of characters per account. + #define MAX_CHAR_BILLING 0 + #define MAX_CHAR_VIP 0 +#endif + #if (MIN_CHARS + MAX_CHAR_VIP + MAX_CHAR_BILLING) > MAX_CHARS #error Config of MAX_CHARS is invalid #endif diff --git a/src/config/core.h b/src/config/core.h index 95f0a861e6..191d9b1379 100644 --- a/src/config/core.h +++ b/src/config/core.h @@ -78,11 +78,6 @@ #define MIN_CHARS 3 // Default number of characters per account. #define MAX_CHAR_VIP 6 // This must be less than MAX_CHARS #define MAX_CHAR_BILLING 0 // This must be less than MAX_CHARS -#else - #define MIN_STORAGE MAX_STORAGE // If the VIP system is disabled the min = max. - #define MIN_CHARS MAX_CHARS // Default number of characters per account. - #define MAX_CHAR_BILLING 0 - #define MAX_CHAR_VIP 0 #endif /// Comment to disable the official packet obfuscation support.