summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-08 19:30:07 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-08 19:30:07 +0000
commit31825ccc2dde034a218d9ad466dd721c40b5651d (patch)
tree961b976e45988f7f7158d33b3f11a18688f34b1f /src/config
parent22c75b070526de8b103032f5bf13504af81e0095 (diff)
downloadhercules-31825ccc2dde034a218d9ad466dd721c40b5651d.tar.gz
hercules-31825ccc2dde034a218d9ad466dd721c40b5651d.tar.bz2
hercules-31825ccc2dde034a218d9ad466dd721c40b5651d.tar.xz
hercules-31825ccc2dde034a218d9ad466dd721c40b5651d.zip
Okie ladies and gentleman if this commit breaks anything it's jman's and maki's fault, yes, blame them.
Fixing pre-re / re npc support, moving /config/ folder to src root so other servers may also make use of the #define renewal dir and other stuff. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16382 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/config')
-rw-r--r--src/config/classes/general.h24
-rw-r--r--src/config/classes/swordsman.h16
-rw-r--r--src/config/const.h114
-rw-r--r--src/config/core.h58
-rw-r--r--src/config/renewal.h78
-rw-r--r--src/config/secure.h33
6 files changed, 323 insertions, 0 deletions
diff --git a/src/config/classes/general.h b/src/config/classes/general.h
new file mode 100644
index 000000000..a2c9c64c3
--- /dev/null
+++ b/src/config/classes/general.h
@@ -0,0 +1,24 @@
+// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+#ifndef _CONFIG_GENERAL_H_
+#define _CONFIG_GENERAL_H_
+
+/**
+ * rAthena configuration file (http://rathena.org)
+ * For detailed guidance on these check http://rathena.org/wiki/SRC/map/config/
+ **/
+
+/**
+ * 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.
+ * @values 1 (enabled) or 0 (disabled)
+ **/
+#define MAGIC_REFLECTION_TYPE 1
+
+/**
+ * No settings past this point
+ **/
+#include "swordsman.h"
+
+#endif // _CONFIG_GENERAL_H_
diff --git a/src/config/classes/swordsman.h b/src/config/classes/swordsman.h
new file mode 100644
index 000000000..44ae922d5
--- /dev/null
+++ b/src/config/classes/swordsman.h
@@ -0,0 +1,16 @@
+// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+#ifndef _CONFIG_SKILLS_SWORDS_H_
+#define _CONFIG_SKILLS_SWORDS_H_
+/**
+ * rAthena configuration file (http://rathena.org)
+ * For detailed guidance on these check http://rathena.org/wiki/SRC/map/config/
+ **/
+
+/// rune knight
+///
+/// maximum number of runes that a rune knight character can carry at any given time
+/// default: 20
+#define MAX_RUNE 20
+
+#endif // _CONFIG_SKILLS_SWORDS_H_
diff --git a/src/config/const.h b/src/config/const.h
new file mode 100644
index 000000000..85a76b1ab
--- /dev/null
+++ b/src/config/const.h
@@ -0,0 +1,114 @@
+// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+#ifndef _RRCONFIGS_CONST_
+#define _RRCONFIGS_CONST_
+
+/**
+ * rAthena configuration file (http://rathena.org)
+ * For detailed guidance on these check http://rathena.org/wiki/SRC/map/config/
+ **/
+
+/**
+ * @INFO: This file holds constants that aims at making code smoother and more efficient
+ */
+
+/**
+ * "Constants"
+ **/
+#ifdef RENEWAL_CAST
+
+ #ifndef RENEWAL
+ #error RENEWAL_CAST requires RENEWAL enabled
+ #endif
+
+ #define CONST_CASTRATE_SCALE RENEWAL_CAST_VMIN
+ /**
+ * Cast Rate Formula: (DEX x 2)+INT
+ **/
+ #define CONST_CASTRATE_CALC ((status_get_dex(bl)*2)+status_get_int(bl))
+#else
+ #define CONST_CASTRATE_SCALE battle_config.castrate_dex_scale
+ /**
+ * Cast Rate Formula: (DEX)
+ **/
+ #define CONST_CASTRATE_CALC (status_get_dex(bl))
+#endif
+
+/**
+ * "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)
+#endif
+#if SECURE_NPCTIMEOUT < 0
+ #error SECURE_NPCTIMEOUT cannot be lower than 0
+#endif
+
+/**
+ * Path within the /db folder to (non-)renewal specific db files
+ **/
+#ifdef RENEWAL
+ #define DBPATH "re/"
+#else
+ #define DBPATH "pre-re/"
+#endif
+
+/**
+ * DefType
+ **/
+#ifdef RENEWAL
+ typedef short defType;
+ #define DEFTYPE_MIN SHRT_MIN
+ #define DEFTYPE_MAX SHRT_MAX
+#else
+ typedef signed char defType;
+ #define DEFTYPE_MIN CHAR_MIN
+ #define DEFTYPE_MAX CHAR_MAX
+#endif
+
+/* pointer size fix which fixes several gcc warnings */
+#ifdef __64BIT__
+ #define __64BPRTSIZE(y) (intptr)y
+#else
+ #define __64BPRTSIZE(y) y
+#endif
+
+/* ATCMD_FUNC(mobinfo) HIT and FLEE calculations */
+#ifdef RENEWAL
+ #define MOB_FLEE(mob) ( mob->lv + mob->status.dex + mob->status.luk/3 + 175 )
+ #define MOB_HIT(mob) ( mob->lv + mob->status.agi + mob->status.luk/5 + 100 )
+#else
+ #define MOB_FLEE(mob) ( mob->lv + mob->status.dex )
+ #define MOB_HIT(mob) ( mob->lv + mob->status.agi )
+#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;
+ /* 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;
+#else
+ #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
+
+/**
+ * End of File
+ **/
+#endif
diff --git a/src/config/core.h b/src/config/core.h
new file mode 100644
index 000000000..848829ea2
--- /dev/null
+++ b/src/config/core.h
@@ -0,0 +1,58 @@
+// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+#ifndef _CONFIG_CORE_H_
+#define _CONFIG_CORE_H_
+
+/**
+ * rAthena configuration file (http://rathena.org)
+ * For detailed guidance on these check http://rathena.org/wiki/SRC/map/config/
+ **/
+
+/**
+ * Max number of items on @autolootid list
+ **/
+#define AUTOLOOTITEM_SIZE 10
+
+/**
+ * The maximum number of atcommand suggestions
+ **/
+#define MAX_SUGGESTIONS 10
+
+//Comment to disable the official walk path
+// -- The official walkpath disables users from taking non-clear walk paths,
+// -- e.g. if they want to get around a obstacle they have to walk around it,
+// -- while with OFFICIAL_WALKPATH disabled if they click to walk around a obstacle the server will do it automatically
+#define OFFICIAL_WALKPATH
+
+/// leave this line uncommented to enable callfunc checks when processing scripts.
+/// while allowed, the script engine will attempt to match user-defined functions
+/// in scripts allowing direct function callback (without the use of callfunc.)
+/// this CAN affect performance, so if you find scripts running slower or find
+/// your map-server using more resources while this is active, comment the line
+#define SCRIPT_CALLFUNC_CHECK
+
+//Uncomment to enable the Cell Stack Limit mod.
+//It's only config is the battle_config cell_stack_limit.
+//Only chars affected are those defined in BL_CHAR (mobs and players currently)
+//#define CELL_NOSTACK
+
+//Uncomment to enable circular area checks.
+//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.
+//#define CIRCULAR_AREA
+
+/**
+ * No settings past this point
+ **/
+#include "./renewal.h"
+#include "./secure.h"
+#include "./classes/general.h"
+
+/**
+ * Constants come last; so they process anything that could've been modified in early includes
+ **/
+#include "./const.h"
+
+#endif // _CONFIG_CORE_H_
diff --git a/src/config/renewal.h b/src/config/renewal.h
new file mode 100644
index 000000000..c169c5642
--- /dev/null
+++ b/src/config/renewal.h
@@ -0,0 +1,78 @@
+// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+#ifndef _CONFIG_RENEWAL_H_
+#define _CONFIG_RENEWAL_H_
+
+/**
+ * rAthena configuration file (http://rathena.org)
+ * For detailed guidance on these check http://rathena.org/wiki/SRC/map/config/
+ **/
+
+/**
+ * @INFO: This file holds general-purpose renewal settings, for class-specific ones check /src/map/config/Skills folder
+ **/
+
+/// game renewal server mode
+/// (disable by commenting the line)
+///
+/// leave this line to enable renewal specific support such as renewal formulas
+#define RENEWAL
+
+/// renewal cast time
+/// (disable by commenting the line)
+///
+/// leave this line to enable renewal casting time algorithms
+/// cast time is decreased by DEX * 2 + INT while 20% of the cast time is not reduced by stats.
+/// example:
+/// on a skill whos cast time is 10s, only 8s may be reduced. the other 2s are part of a
+/// "fixed cast time" which can only be reduced by specialist items and skills
+#define RENEWAL_CAST
+
+/// renewal drop rate algorithms
+/// (disable by commenting the line)
+///
+/// leave this line to enable renewal item drop rate algorithms
+/// while enabled a special modified based on the difference between the player and monster level is applied
+/// based on the http://irowiki.org/wiki/Drop_System#Level_Factor table
+#define RENEWAL_DROP
+
+/// renewal exp rate algorithms
+/// (disable by commenting the line)
+///
+/// leave this line to enable renewal item exp rate algorithms
+/// while enabled a special modified based on the difference between the player and monster level is applied
+#define RENEWAL_EXP
+
+/// renewal level modifier on damage
+/// (disable by commenting the line)
+///
+// leave this line to enable renewal base level modifier on skill damage (selected skills only)
+#define RENEWAL_LVDMG
+
+/// renewal cast time variable cast requirement
+///
+/// this is the value required for no variable cast-time with stats.
+/// formula: (DEX * 2) + INT
+/// default: 530
+#define RENEWAL_CAST_VMIN 530
+
+/// renewal enchant deadly poison algorithm
+///
+/// leave this line to enable the renewed EDP algorithm
+/// under renewal mode:
+/// - damage is NOT increased by 400%
+/// - it does NOT affect grimtooth
+/// - weapon and status ATK are increased
+#define RENEWAL_EDP
+
+/// renewal ASPD [malufett]
+/// (disable by commenting the line)
+///
+/// leave this line to enable renewal ASPD
+/// - shield penalty is applied
+/// - agi has a greater factor to your ASPD increase
+/// - there is a change in how skill/items give ASPD
+/// - some skills/items ASPD bonus won't stack
+#define RENEWAL_ASPD
+
+#endif // _CONFIG_RENEWAL_H_
diff --git a/src/config/secure.h b/src/config/secure.h
new file mode 100644
index 000000000..e2b000440
--- /dev/null
+++ b/src/config/secure.h
@@ -0,0 +1,33 @@
+// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+#ifndef _CONFIG_SECURE_H_
+#define _CONFIG_SECURE_H_
+
+/**
+ * rAthena configuration file (http://rathena.org)
+ * For detailed guidance on these check http://rathena.org/wiki/SRC/map/config/
+ **/
+
+/**
+ * @INFO: This file holds optional security settings
+ **/
+
+/**
+ * Optional NPC Dialog Timer
+ * When enabled all npcs dialog will 'timeout' if user is on idle for longer than the amount of seconds allowed
+ * - On 'timeout' the npc dialog window changes it's next/menu to a 'close' button
+ * @values
+ * - ? : Desired idle time in seconds (e.g. 10)
+ * - 0 : Disabled
+ **/
+#define SECURE_NPCTIMEOUT 0
+
+/**
+ * (Secure) Optional NPC Dialog Timer
+ * @requirement : SECURE_NPCTIMEOUT must be enabled
+ * Minimum Interval Between timeout checks in seconds
+ * Default: 1s
+ **/
+#define SECURE_NPCTIMEOUT_INTERVAL 1
+
+#endif // _CONFIG_SECURE_H_