SimulationCraft
SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm).
special_effect_t Struct Reference

Public Member Functions

 special_effect_t (player_t *p)
 
 special_effect_t (const item_t *item)
 
bool is_custom () const
 
void disable_action ()
 
void disable_buff ()
 
void reset ()
 
bool active ()
 
const spell_data_tdriver () const
 
const spell_data_ttrigger () const
 
std::string name () const
 
std::string cooldown_name () const
 Cooldown name needs some special handling. More...
 
int cooldown_group () const
 
std::string cooldown_group_name () const
 Item-based special effects may have a cooldown group (in the client data). More...
 
timespan_t cooldown_group_duration () const
 
buff_tcreate_buff () const
 
special_effect_buff_e buff_type () const
 
int max_stack () const
 
stat_e stat_buff_type (const spelleffect_data_t &) const
 Detect stat buff type from spelleffect data. More...
 
bool is_stat_buff () const
 
stat_e stat_type () const
 
stat_buff_tinitialize_stat_buff () const
 
bool is_absorb_buff () const
 
absorb_buff_tinitialize_absorb_buff () const
 
action_tcreate_action () const
 
special_effect_action_e action_type () const
 
bool is_offensive_spell_action () const
 
spell_tinitialize_offensive_spell_action () const
 
bool is_heal_action () const
 
heal_tinitialize_heal_action () const
 
bool is_attack_action () const
 
attack_tinitialize_attack_action () const
 
bool is_resource_action () const
 
spell_tinitialize_resource_action () const
 
unsigned proc_flags () const
 
unsigned proc_flags2 () const
 
double ppm () const
 
double rppm () const
 
unsigned rppm_scale () const
 
double rppm_modifier () const
 
double proc_chance () const
 
timespan_t cooldown () const
 Get cooldown duration. More...
 
bool has_target_specific_cooldown () const
 
bool can_proc_from_procs () const
 
bool can_only_proc_from_class_abilites () const
 
void set_can_proc_from_procs (bool)
 
void set_can_only_proc_from_class_abilites (bool)
 
timespan_t duration () const
 
timespan_t tick_time () const
 Get tick time. More...
 

Public Attributes

const item_titem
 
player_tplayer
 
special_effect_e type
 
special_effect_source_e source
 
std::string name_str
 
std::string trigger_str
 
std::string encoding_str
 
unsigned proc_flags_
 
unsigned proc_flags2_
 
stat_e stat
 
school_e school
 
int max_stacks
 
double stat_amount
 
double discharge_amount
 
double discharge_scaling
 
double proc_chance_
 
double ppm_
 
unsigned rppm_scale_
 
double rppm_modifier_
 
int rppm_blp_
 
timespan_t duration_
 
timespan_t cooldown_
 
timespan_t tick
 
unsigned cooldown_category_
 
bool target_specific_cooldown
 
bool cost_reduction
 
int refresh
 
bool chance_to_discharge
 
unsigned int override_result_es_mask
 
unsigned result_es_mask
 
bool reverse
 
int reverse_stack_reduction
 
int aoe
 
bool proc_delay
 
bool unique
 
bool weapon_proc
 
int expire_on_max_stack
 Expire procced buff on max stack, 0 = never, 1 = always, -1 = autodetect (default)
 
unsigned spell_id
 
unsigned trigger_spell_id
 
action_texecute_action
 
buff_tcustom_buff
 
bool action_disabled
 
bool buff_disabled
 
std::string cooldown_group_name_override
 
timespan_t cooldown_group_duration_override
 
std::function< void(special_effect_t &)> custom_init
 
std::vector< scoped_callback_t * > custom_init_object
 
std::function< void(void)> activation_cb
 
const item_enchantment_data_tenchant_data
 

Friends

void sc_format_to (const special_effect_t &, fmt::format_context::iterator)
 

Member Function Documentation

◆ cooldown()

timespan_t special_effect_t::cooldown ( ) const

Get cooldown duration.

Cooldowns are automatically extracted from the driver spell. However, the "Cooldown" value is prioritized over "Internal Cooldown" in DBC data. In reality, there should not be any (single) driver, that includes both.

◆ cooldown_group_name()

std::string special_effect_t::cooldown_group_name ( ) const

Item-based special effects may have a cooldown group (in the client data).

Cooldown groups are a shared cooldown between all item effects (in essence, on-use effects) that use the same group

◆ cooldown_name()

std::string special_effect_t::cooldown_name ( ) const

Cooldown name needs some special handling.

Cooldowns in WoW are global, regardless of the number of procs (i.e., weapon enchants). Thus, we straight up use the driver's name, or override it with the special_effect_t name_str if it's defined. We can also fall back to using the item name and the slot of the item, if ids are not defined.

◆ stat_buff_type()

stat_e special_effect_t::stat_buff_type ( const spelleffect_data_t effect) const

Detect stat buff type from spelleffect data.

Helper function to detect stat buff type from spell effect data, more specifically by mapping Blizzard's effect sub types to actual stats in simc.

◆ tick_time()

timespan_t special_effect_t::tick_time ( ) const

Get tick time.

The tick time is selected from the first periodically executed effect of the triggered spell. Periodically executing drivers are currently not supported. Note that ticking behavior has now moved to buff_t, instead of being kludged in the callback itself (as it was done in the "proc_callback_t" days).