diff options
Diffstat (limited to 'src/map/skill.h')
-rw-r--r-- | src/map/skill.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/src/map/skill.h b/src/map/skill.h index 0ace19927..65195dc75 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2018 Hercules Dev Team - * Copyright (C) Athena Dev Teams + * Copyright (C) 2012-2020 Hercules Dev Team + * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,7 @@ #include "map/map.h" // struct block_list #include "map/status.h" // enum sc_type +#include "map/unitdefines.h" // enum unit_dir #include "common/hercules.h" #include "common/db.h" #include "common/mmo.h" // MAX_SKILL_DB, struct square @@ -59,6 +60,12 @@ struct status_change_entry; #define MAX_SKILLUNITGROUPTICKSET 25 #define MAX_SKILL_NAME_LENGTH 32 +// Custom Skill Ranges is used in skill_get_index, to allocate indexes based on ID and gaps between 2 SkillID +#ifndef CUSTOM_SKILL_RANGES + #define CUSTOM_SKILL_RANGES +#endif // CUSTOM_SKILL_RANGES + + // (Epoque:) To-do: replace this macro with some sort of skill tree check (rather than hard-coded skill names) #define skill_ischangesex(id) ( \ ((id) >= BD_ADAPTATION && (id) <= DC_SERVICEFORYOU) || ((id) >= CG_ARROWVULCAN && (id) <= CG_MARIONETTE) || \ @@ -124,6 +131,8 @@ enum e_skill_inf2 { INF2_FREE_CAST_REDUCED = 0x10000, INF2_SHOW_SKILL_SCALE = 0x20000, INF2_ALLOW_REPRODUCE = 0x40000, + INF2_HIDDEN_TRAP = 0x80000, // Traps that are hidden (based on trap_visiblity battle conf) + INF2_IS_COMBO_SKILL = 0x100000, // Sets whether a skill can be used in combos or not }; @@ -1715,6 +1724,15 @@ enum { UNT_MAX = 0x190 }; +/** Constants to identify the auto-cast type. **/ +enum autocast_type { + AUTOCAST_NONE = 0, + AUTOCAST_TEMP, // Used when type is only required during the execution of the calling instance. (For example bAutoSpell* skills.) + AUTOCAST_ABRA, // Used for Abracadabra (Hocus pocus). + AUTOCAST_IMPROVISE, // Used for Improvised Song. + AUTOCAST_ITEM, // Used for itemskill() script command. +}; + /** * Structures **/ @@ -1806,6 +1824,7 @@ struct skill_unit { int limit; int val1,val2; + bool visible; short alive,range; int prev; }; @@ -1993,7 +2012,7 @@ struct skill_interface { int (*addtimerskill) (struct block_list *src, int64 tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag); int (*additional_effect) (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 tick); int (*counter_additional_effect) (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick); - int (*blown) (struct block_list* src, struct block_list* target, int count, int8 dir, int flag); + int (*blown) (struct block_list* src, struct block_list* target, int count, enum unit_dir dir, int flag); int (*break_equip) (struct block_list *bl, unsigned short where, int rate, int flag); int (*strip_equip) (struct block_list *bl, unsigned short where, int rate, int lv, int time); struct skill_unit_group* (*id2group) (int group_id); @@ -2035,6 +2054,7 @@ struct skill_interface { int (*not_ok_hom) (uint16 skill_id, struct homun_data *hd); int (*not_ok_hom_unknown) (uint16 skill_id, struct homun_data *hd); int (*not_ok_mercenary) (uint16 skill_id, struct mercenary_data *md); + void (*validate_autocast_data) (struct map_session_data *sd, int skill_id, int skill_lv); int (*chastle_mob_changetarget) (struct block_list *bl,va_list ap); int (*can_produce_mix) ( struct map_session_data *sd, int nameid, int trigger, int qty); int (*produce_mix) ( struct map_session_data *sd, uint16 skill_id, int nameid, int slot1, int slot2, int slot3, int qty ); @@ -2075,8 +2095,8 @@ struct skill_interface { bool (*dance_switch) (struct skill_unit* su, int flag); int (*check_condition_char_sub) (struct block_list *bl, va_list ap); int (*check_condition_mob_master_sub) (struct block_list *bl, va_list ap); - void (*brandishspear_first) (struct square *tc, uint8 dir, int16 x, int16 y); - void (*brandishspear_dir) (struct square* tc, uint8 dir, int are); + void (*brandishspear_first) (struct square *tc, enum unit_dir dir, int16 x, int16 y); + void (*brandishspear_dir) (struct square* tc, enum unit_dir dir, int are); int (*get_fixed_cast) (int skill_id, int skill_lv); int (*sit_count) (struct block_list *bl, va_list ap); int (*sit_in) (struct block_list *bl, va_list ap); @@ -2153,7 +2173,7 @@ struct skill_interface { void (*attack_display_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage); int (*attack_copy_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); int (*attack_dir_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - void (*attack_blow_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir); + void (*attack_blow_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, enum unit_dir *dir); void (*attack_post_unknown) (int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); bool (*timerskill_dead_unknown) (struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); void (*timerskill_target_unknown) (int tid, int64 tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl); |