summaryrefslogtreecommitdiff
path: root/src/map/skill.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-17 00:06:13 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-25 14:49:04 +0300
commit79ab58428bfde461fb4fa92418624982f181d036 (patch)
treeeb7f99c839dd74b9769bc47ef9759b8665f81853 /src/map/skill.h
parenta929202e304d2cd3d5873272ea5ecb6a0371e314 (diff)
downloadhercules-79ab58428bfde461fb4fa92418624982f181d036.tar.gz
hercules-79ab58428bfde461fb4fa92418624982f181d036.tar.bz2
hercules-79ab58428bfde461fb4fa92418624982f181d036.tar.xz
hercules-79ab58428bfde461fb4fa92418624982f181d036.zip
Reduce memory usage in HPM in skill.c
Diffstat (limited to 'src/map/skill.h')
-rw-r--r--src/map/skill.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/map/skill.h b/src/map/skill.h
index 6e56e276b..aa0188be6 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1814,6 +1814,21 @@ struct s_skill_spellbook_db {
typedef int (*SkillFunc)(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag);
+struct s_skill_dbs {
+BEGIN_ZEROED_BLOCK; // This block will be zeroed in skill_defaults() as well as skill_readdb()
+ struct s_skill_db db[MAX_SKILL_DB];
+ struct s_skill_produce_db produce_db[MAX_SKILL_PRODUCE_DB];
+ struct s_skill_arrow_db arrow_db[MAX_SKILL_ARROW_DB];
+ struct s_skill_abra_db abra_db[MAX_SKILL_ABRA_DB];
+ struct s_skill_magicmushroom_db magicmushroom_db[MAX_SKILL_MAGICMUSHROOM_DB];
+ struct s_skill_improvise_db improvise_db[MAX_SKILL_IMPROVISE_DB];
+ struct s_skill_changematerial_db changematerial_db[MAX_SKILL_PRODUCE_DB];
+ struct s_skill_spellbook_db spellbook_db[MAX_SKILL_SPELLBOOK_DB];
+ bool reproduce_db[MAX_SKILL_DB];
+END_ZEROED_BLOCK;
+ struct s_skill_unit_layout unit_layout[MAX_SKILL_UNIT_LAYOUT];
+};
+
/**
* Skill.c Interface
**/
@@ -1835,18 +1850,7 @@ struct skill_interface {
struct eri *cd_ers; // ERS Storage for skill cool down managers [Ind/Hercules]
struct eri *cd_entry_ers; // ERS Storage for skill cool down entries [Ind/Hercules]
/* */
-BEGIN_ZEROED_BLOCK; // This block will be zeroed in skill_defaults() as well as skill_readdb()
- struct s_skill_db db[MAX_SKILL_DB];
- struct s_skill_produce_db produce_db[MAX_SKILL_PRODUCE_DB];
- struct s_skill_arrow_db arrow_db[MAX_SKILL_ARROW_DB];
- struct s_skill_abra_db abra_db[MAX_SKILL_ABRA_DB];
- struct s_skill_magicmushroom_db magicmushroom_db[MAX_SKILL_MAGICMUSHROOM_DB];
- struct s_skill_improvise_db improvise_db[MAX_SKILL_IMPROVISE_DB];
- struct s_skill_changematerial_db changematerial_db[MAX_SKILL_PRODUCE_DB];
- struct s_skill_spellbook_db spellbook_db[MAX_SKILL_SPELLBOOK_DB];
- bool reproduce_db[MAX_SKILL_DB];
-END_ZEROED_BLOCK;
- struct s_skill_unit_layout unit_layout[MAX_SKILL_UNIT_LAYOUT];
+ struct s_skill_dbs *dbs;
/* */
int enchant_eff[5];
int deluge_eff[5];