summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/config')
-rw-r--r--src/config/classes/general.h16
-rw-r--r--src/config/const.h75
-rw-r--r--src/config/core.h22
-rw-r--r--src/config/renewal.h23
-rw-r--r--src/config/secure.h17
5 files changed, 90 insertions, 63 deletions
diff --git a/src/config/classes/general.h b/src/config/classes/general.h
index 206f57b37..b3da4a475 100644
--- a/src/config/classes/general.h
+++ b/src/config/classes/general.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_GENERAL_H_
-#define _CONFIG_GENERAL_H_
+#ifndef CONFIG_GENERAL_H
+#define CONFIG_GENERAL_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -10,8 +10,8 @@
/**
* Default Magical Reflection Behavior
- * - When reflecting, reflected damage depends on gears caster is wearing, not target
- * - When disabled damage depends on gears target is wearing, not caster.
+ * - When reflecting, reflected damage depends on gears caster is wearing, not target (official)
+ * - When disabled damage depends on gears target is wearing, not caster. (old/eathena)
* @values 1 (enabled) or 0 (disabled)
**/
#define MAGIC_REFLECTION_TYPE 1
@@ -22,7 +22,13 @@
#define MAX_SPIRITBALL 15
/**
+ * when enabled, reflect damage doesn't bypass devotion (and thus damage is passed to crusader)
+ * uncomment to enable
+ **/
+//#define DEVOTION_REFLECT_DAMAGE
+
+/**
* No settings past this point
**/
-#endif // _CONFIG_GENERAL_H_
+#endif // CONFIG_GENERAL_H
diff --git a/src/config/const.h b/src/config/const.h
index d8e397b1e..2b5b180c4 100644
--- a/src/config/const.h
+++ b/src/config/const.h
@@ -1,8 +1,9 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _H_CONSTANTS_
-#define _H_CONSTANTS_
+
+#ifndef CONFIG_CONSTANTS_H
+#define CONFIG_CONSTANTS_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -14,7 +15,7 @@
*/
/**
- * "Sane Checks" to save you from compiling with cool bugs
+ * "Sane Checks" to save you from compiling with cool bugs
**/
#if SECURE_NPCTIMEOUT_INTERVAL <= 0
#error SECURE_NPCTIMEOUT_INTERVAL should be at least 1 (1s)
@@ -51,54 +52,47 @@
#define DEFTYPE_MAX CHAR_MAX
#endif
-/* pointer size fix which fixes several gcc warnings */
-#ifdef __64BIT__
- #define __64BPTRSIZE(y) (intptr)y
-#else
- #define __64BPTRSIZE(y) y
-#endif
-
/* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */
#ifdef RENEWAL
- #define MOB_FLEE(mob) ( mob->lv + mob->status.agi + 100 )
- #define MOB_HIT(mob) ( mob->lv + mob->status.dex + 150 )
+ #define MOB_FLEE(mobdata) ( (mobdata)->lv + (mobdata)->status.agi + 100 )
+ #define MOB_HIT(mobdata) ( (mobdata)->lv + (mobdata)->status.dex + 150 )
+ #define RE_SKILL_REDUCTION() do { \
+ wd.damage = battle->calc_elefix(src, target, skill_id, skill_lv, battle->calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage, 0, wd.flag), nk, n_ele, s_ele, s_ele_, false, flag.arrow); \
+ if( flag.lh ) \
+ wd.damage2 = battle->calc_elefix(src, target, skill_id, skill_lv, battle->calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage2, 1, wd.flag), nk, n_ele, s_ele, s_ele_, true, flag.arrow); \
+ } while(0)
#else
- #define MOB_FLEE(mob) ( mob->lv + mob->status.agi )
- #define MOB_HIT(mob) ( mob->lv + mob->status.dex )
+ #define MOB_FLEE(mobdata) ( (mobdata)->lv + (mobdata)->status.agi )
+ #define MOB_HIT(mobdata) ( (mobdata)->lv + (mobdata)->status.dex )
#endif
/* Renewal's dmg level modifier, used as a macro for a easy way to turn off. */
#ifdef RENEWAL_LVDMG
- #define RE_LVL_DMOD(val) \
- if( status_get_lv(src) > 100 && val > 0 ) \
- skillratio = skillratio * status_get_lv(src) / val;
- #define RE_LVL_MDMOD(val) \
- if( status_get_lv(src) > 100 && val > 0) \
- md.damage = md.damage * status_get_lv(src) / val;
+ #define RE_LVL_DMOD(val) do { \
+ if( status->get_lv(src) > 100 && (val) > 0 ) \
+ skillratio = skillratio * status->get_lv(src) / (val); \
+ } while(0)
+ #define RE_LVL_MDMOD(val) do { \
+ if( status->get_lv(src) > 100 && (val) > 0) \
+ md.damage = md.damage * status->get_lv(src) / (val); \
+ } while(0)
/* ranger traps special */
- #define RE_LVL_TMDMOD() \
- if( status_get_lv(src) > 100 ) \
- md.damage = md.damage * 150 / 100 + md.damage * status_get_lv(src) / 100;
+ #define RE_LVL_TMDMOD() do { \
+ if( status->get_lv(src) > 100 ) \
+ md.damage = md.damage * 150 / 100 + md.damage * status->get_lv(src) / 100; \
+ } while(0)
#else
- #define RE_LVL_DMOD(val)
+ #define RE_LVL_DMOD(val)
#define RE_LVL_MDMOD(val)
#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){ \
- if( (varcast_r += val) != 0 && varcast_r >= 0 ) \
- time = time * (1 - (float)min(val, 100) / 100); \
- }
+ #define VARCAST_REDUCTION(val) do { \
+ if( (varcast_r += (val)) != 0 && varcast_r >= 0 ) \
+ time = time * (1 - (float)min((val), 100) / 100); \
+ } while(0)
#endif
/* console_input doesn't go well with minicore */
@@ -106,14 +100,7 @@
#undef CONSOLE_INPUT
#endif
-#ifdef RENEWAL
- #define ITEMDB_SQL_COLUMNS 24
-#else
- #define ITEMDB_SQL_COLUMNS 22
-#endif
-
-
/**
* End of File
**/
-#endif /* _H_CONSTANTS_ */
+#endif /* CONFIG_CONSTANTS_H */
diff --git a/src/config/core.h b/src/config/core.h
index bec6cb507..ac59563b5 100644
--- a/src/config/core.h
+++ b/src/config/core.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_CORE_H_
-#define _CONFIG_CORE_H_
+#ifndef CONFIG_CORE_H
+#define CONFIG_CORE_H
/// Max number of items on @autolootid list
#define AUTOLOOTITEM_SIZE 10
@@ -27,7 +27,7 @@
/// CONSOLE_INPUT allows you to type commands into the server's console,
/// Disabling it saves one thread.
#define CONSOLE_INPUT
-/// Maximum number of caracters 'CONSOLE_INPUT' will support per line.
+/// Maximum number of characters 'CONSOLE_INPUT' will support per line.
#define MAX_CONSOLE_INPUT 150
/// Uncomment to disable Hercules' anonymous stat report
@@ -43,7 +43,7 @@
/// By default, all range checks in Aegis are of Square shapes, so a weapon range
/// - of 10 allows you to attack from anywhere within a 21x21 area.
/// Enabling this changes such checks to circular checks, which is more realistic,
-/// - but is not the official behaviour.
+/// - but is not the official behavior.
//#define CIRCULAR_AREA
//This is the distance at which @autoloot works,
@@ -57,9 +57,15 @@
/// When uncommented the cap takes place after modifiers.
//#define HMAP_ZONE_DAMAGE_CAP_TYPE
-/// Uncomment to enable Non Stackable items unique ID
-/// By enabling it, the system will create an unique id for each new non stackable item created
-//#define NSI_UNIQUE_ID
+/// Comment to disable Guild/Party Bound item system
+#define GP_BOUND_ITEMS
+
+/// Uncomment to enable real-time server stats (in and out data and ram usage). [Ai4rei]
+//#define SHOW_SERVER_STATS
+
+
+/// Comment to disable autotrade persistency (where autotrading merchants survive server restarts)
+#define AUTOTRADE_PERSISTENCY
/**
* No settings past this point
@@ -73,4 +79,4 @@
**/
#include "./const.h"
-#endif // _CONFIG_CORE_H_
+#endif // CONFIG_CORE_H
diff --git a/src/config/renewal.h b/src/config/renewal.h
index 8bd151f57..939ad9b73 100644
--- a/src/config/renewal.h
+++ b/src/config/renewal.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_RENEWAL_H_
-#define _CONFIG_RENEWAL_H_
+#ifndef CONFIG_RENEWAL_H
+#define CONFIG_RENEWAL_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -13,6 +13,19 @@
* @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 // Do not change this line
+
/// game renewal server mode
/// (disable by commenting the line)
///
@@ -57,6 +70,7 @@
/// - damage is NOT increased by 400%
/// - it does NOT affect grimtooth
/// - weapon and status ATK are increased
+/// - some skill's damage ratio has modified
#define RENEWAL_EDP
/// renewal ASPD [malufett]
@@ -69,4 +83,7 @@
/// - some skill/item ASPD bonuses won't stack
#define RENEWAL_ASPD
-#endif // _CONFIG_RENEWAL_H_
+#endif // DISABLE_RENEWAL
+#undef DISABLE_RENEWAL
+
+#endif // CONFIG_RENEWAL_H
diff --git a/src/config/secure.h b/src/config/secure.h
index 7f16ba55a..418d24751 100644
--- a/src/config/secure.h
+++ b/src/config/secure.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_SECURE_H_
-#define _CONFIG_SECURE_H_
+#ifndef CONFIG_SECURE_H
+#define CONFIG_SECURE_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -47,4 +47,15 @@
**/
#define SECURE_NPCTIMEOUT_INTERVAL 1
-#endif // _CONFIG_SECURE_H_
+/**
+ * Uncomment to disable
+ * while enabled, movement of invisible (cloaking, hide, etc [not chase walk]) units is not informed to nearby foes,
+ * rendering any client-side cheat, that would otherwise make these units visible, to not function.
+ * - "Why is this a setting?" because theres a cost, while enabled if a hidden character uses a skill with cast time,
+ * - for example "cloaking -> walk a bit -> soul break another player" the character display will be momentarily abrupted
+ * - on the action of unhiding (its a quick effect, ~0.007s in duration), and due to the nature of the skill cast on the client
+ * - it was not possible to work around this, and thus why it is optional, comment the line to disable.
+ **/
+#define ANTI_MAYAP_CHEAT
+
+#endif // CONFIG_SECURE_H