summaryrefslogtreecommitdiff
path: root/src/map/skill.h
diff options
context:
space:
mode:
authorj-tkay <joseph.tk.ea@gmail.com>2013-07-04 05:17:17 +0800
committerj-tkay <joseph.tk.ea@gmail.com>2013-07-04 05:17:17 +0800
commitca0205134beb9ba26e989c9fc3820c086d4d22a7 (patch)
tree6790ece04272e548a46ee2255364b026def3fd6e /src/map/skill.h
parent28a9fec0916db3d92629ae6e6cd62b5777b09e73 (diff)
parentd88be27960c4508c2f61a729fb5e4c89965b7e0b (diff)
downloadhercules-ca0205134beb9ba26e989c9fc3820c086d4d22a7.tar.gz
hercules-ca0205134beb9ba26e989c9fc3820c086d4d22a7.tar.bz2
hercules-ca0205134beb9ba26e989c9fc3820c086d4d22a7.tar.xz
hercules-ca0205134beb9ba26e989c9fc3820c086d4d22a7.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/skill.h')
-rw-r--r--src/map/skill.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/map/skill.h b/src/map/skill.h
index 921a682a2..fceef5556 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1714,11 +1714,29 @@ struct s_skill_magicmushroom_db {
extern struct s_skill_magicmushroom_db skill_magicmushroom_db[MAX_SKILL_MAGICMUSHROOM_DB];
/**
+ * Skill Cool Down Delay Saving
+ * Struct skill_cd is not a member of struct map_session_data
+ * to keep cooldowns in memory between player log-ins.
+ * All cooldowns are reset when server is restarted.
+ **/
+struct skill_cd {
+ int duration[MAX_SKILL_TREE];//milliseconds
+#if PACKETVER >= 20120604
+ int total[MAX_SKILL_TREE];
+#endif
+ short skidx[MAX_SKILL_TREE];//the skill index entries belong to
+ short nameid[MAX_SKILL_TREE];//skill id
+ unsigned int started[MAX_SKILL_TREE];
+ unsigned char cursor;
+};
+
+/**
* Vars
**/
extern int enchant_eff[5];
extern int deluge_eff[5];
DBMap* skilldb_name2id;
+DBMap* skillcd_db; // char_id -> struct skill_cd
/**
* Skill.c Interface
@@ -1917,7 +1935,8 @@ struct skill_interface {
int (*elementalanalysis) (struct map_session_data *sd, int n, uint16 skill_lv, unsigned short *item_list);
int (*changematerial) (struct map_session_data *sd, int n, unsigned short *item_list);
int (*get_elemental_type) (uint16 skill_id, uint16 skill_lv);
-} skill_s;
+ void (*cooldown_save) (struct map_session_data * sd);
+};
struct skill_interface *skill;