summaryrefslogtreecommitdiff
path: root/src/map
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/map
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/map')
-rw-r--r--src/map/Makefile.in4
-rw-r--r--src/map/config/classes/general.h24
-rw-r--r--src/map/config/classes/swordsman.h16
-rw-r--r--src/map/config/const.h114
-rw-r--r--src/map/config/core.h58
-rw-r--r--src/map/config/renewal.h78
-rw-r--r--src/map/config/secure.h33
-rw-r--r--src/map/map.c10
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/skill.c2
10 files changed, 10 insertions, 331 deletions
diff --git a/src/map/Makefile.in b/src/map/Makefile.in
index 06925bcec..a1f1bbd03 100644
--- a/src/map/Makefile.in
+++ b/src/map/Makefile.in
@@ -26,8 +26,8 @@ MAP_H = map.h chrif.h clif.h pc.h status.h npc.h \
intif.h trade.h party.h vending.h guild.h pet.h \
log.h mail.h date.h unit.h homunculus.h mercenary.h quest.h instance.h mapreg.h \
buyingstore.h searchstore.h duel.h pc_groups.h \
- config/core.h config/renewal.h config/secure.h config/const.h \
- config/classes/general.h config/classes/swordsman.h elemental.h
+ ../config/core.h ../config/renewal.h ../config/secure.h ../config/const.h \
+ ../config/classes/general.h ../config/classes/swordsman.h elemental.h
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
diff --git a/src/map/config/classes/general.h b/src/map/config/classes/general.h
deleted file mode 100644
index a2c9c64c3..000000000
--- a/src/map/config/classes/general.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// 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/map/config/classes/swordsman.h b/src/map/config/classes/swordsman.h
deleted file mode 100644
index 44ae922d5..000000000
--- a/src/map/config/classes/swordsman.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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/map/config/const.h b/src/map/config/const.h
deleted file mode 100644
index 85a76b1ab..000000000
--- a/src/map/config/const.h
+++ /dev/null
@@ -1,114 +0,0 @@
-// 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/map/config/core.h b/src/map/config/core.h
deleted file mode 100644
index 848829ea2..000000000
--- a/src/map/config/core.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// 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/map/config/renewal.h b/src/map/config/renewal.h
deleted file mode 100644
index c169c5642..000000000
--- a/src/map/config/renewal.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// 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/map/config/secure.h b/src/map/config/secure.h
deleted file mode 100644
index e2b000440..000000000
--- a/src/map/config/secure.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// 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_
diff --git a/src/map/map.c b/src/map/map.c
index 3831f7e98..de71d0e84 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -3840,12 +3840,14 @@ int do_init(int argc, char *argv[])
}
map_config_read(MAP_CONF_NAME);
+ /* only temporary until sirius's datapack patch is complete */
+
#ifdef RENEWAL
- /**
- * to make pre-re conflict safe
- **/
- map_config_read("npc/scripts_renewal.conf");
+ map_config_read("npc/re/scripts_main.conf");
+#else
+ map_config_read("npc/pre-re/scripts_main.conf");
#endif
+
chrif_checkdefaultlogin();
if (!map_ip_set || !char_ip_set) {
diff --git a/src/map/map.h b/src/map/map.h
index 2095caf44..fd13bf467 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -13,7 +13,7 @@
/**
* [rAthena.org]
**/
-#include "./config/core.h"
+#include "../config/core.h"
#include <stdarg.h>
diff --git a/src/map/skill.c b/src/map/skill.c
index 9e7b5711a..c9d71af7f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -13024,8 +13024,8 @@ int skill_castfix (struct block_list *bl, int skill_id, int skill_lv)
*------------------------------------------*/
int skill_castfix_sc (struct block_list *bl, int time, int skill_id, int skill_lv) {
struct status_change *sc = status_get_sc(bl);
- struct map_session_data *sd = BL_CAST(BL_PC,bl);
#ifdef RENEWAL_CAST
+ struct map_session_data *sd = BL_CAST(BL_PC,bl);
int fixed = skill_get_fixed_cast(skill_id, skill_lv);
if( !fixed ) {
fixed = skill_get_cast(skill_id, skill_lv);