summaryrefslogtreecommitdiff
path: root/src/map/battle.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-05-16 16:23:47 +0200
committerHaru <haru@dotalux.com>2014-05-16 16:23:47 +0200
commitd350bfeb9cc310ec329d968fc57bf4183b7cb527 (patch)
tree9fc7cec46f1e4f19cfd8f36483bd106198e23f99 /src/map/battle.h
parentfddd0a68178da57e0416722ee7c003eab7167ac4 (diff)
downloadhercules-d350bfeb9cc310ec329d968fc57bf4183b7cb527.tar.gz
hercules-d350bfeb9cc310ec329d968fc57bf4183b7cb527.tar.bz2
hercules-d350bfeb9cc310ec329d968fc57bf4183b7cb527.tar.xz
hercules-d350bfeb9cc310ec329d968fc57bf4183b7cb527.zip
Changed battle_config definition to extern to avoid mistakes in plugins
- This avoids plugins incorrectly using battle_config (with unreliable results) instead of using the proper interface, battle->bc. - Edited various #defines to use battle->bc instead of battle_config so that they can work perperly in plugins as well. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/battle.h')
-rw-r--r--src/map/battle.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/map/battle.h b/src/map/battle.h
index 8d7e4183a..0ae18ec30 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -21,12 +21,12 @@ struct status_data;
/**
* Defines
**/
-#define MIN_HAIR_STYLE (battle_config.min_hair_style)
-#define MAX_HAIR_STYLE (battle_config.max_hair_style)
-#define MIN_HAIR_COLOR (battle_config.min_hair_color)
-#define MAX_HAIR_COLOR (battle_config.max_hair_color)
-#define MIN_CLOTH_COLOR (battle_config.min_cloth_color)
-#define MAX_CLOTH_COLOR (battle_config.max_cloth_color)
+#define MIN_HAIR_STYLE (battle->bc->min_hair_style)
+#define MAX_HAIR_STYLE (battle->bc->max_hair_style)
+#define MIN_HAIR_COLOR (battle->bc->min_hair_color)
+#define MAX_HAIR_COLOR (battle->bc->max_hair_color)
+#define MIN_CLOTH_COLOR (battle->bc->min_cloth_color)
+#define MAX_CLOTH_COLOR (battle->bc->max_cloth_color)
#define is_boss(bl) (status_get_mode(bl)&MD_BOSS) // Can refine later [Aru]
@@ -469,7 +469,9 @@ struct Battle_Config {
int mon_trans_disable_in_gvg;
int case_sensitive_aegisnames;
-} battle_config;
+};
+
+extern struct Battle_Config battle_config;
/* criteria for battle_config.idletime_critera */
enum e_battle_config_idletime {