diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2015-08-02 04:54:11 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2015-08-02 04:54:11 +0800 |
commit | e900608cc45f33399b12f109548da515df82e723 (patch) | |
tree | 3669888c564fe0527650cccd92af744058290b4a /src/map/skill.h | |
parent | cca4271c9350203bffa2feeb753708f434b71d41 (diff) | |
parent | f780bc47486289acd70fee5dc4f34efca1440eaa (diff) | |
download | hercules-e900608cc45f33399b12f109548da515df82e723.tar.gz hercules-e900608cc45f33399b12f109548da515df82e723.tar.bz2 hercules-e900608cc45f33399b12f109548da515df82e723.tar.xz hercules-e900608cc45f33399b12f109548da515df82e723.zip |
Merge pull request #601 from 4144/hpmreduce
Reduce map server memory usage for 3 MB with loaded HPM
Diffstat (limited to 'src/map/skill.h')
-rw-r--r-- | src/map/skill.h | 28 |
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]; |