SimulationCraft
SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm).
|
DBC-driven proc callback. More...
#include <dbc_proc_callback.hpp>
Public Types | |
enum | trigger_fn_type { trigger_fn_type::NONE, trigger_fn_type::CONDITION, trigger_fn_type::TRIGGER } |
using | execute_fn_t = std::function< void(const dbc_proc_callback_t *, action_t *, action_state_t *)> |
using | trigger_fn_t = std::function< bool(const dbc_proc_callback_t *, action_t *, action_state_t *)> |
Public Member Functions | |
dbc_proc_callback_t (const item_t &i, const special_effect_t &e) | |
dbc_proc_callback_t (const item_t *i, const special_effect_t &e) | |
dbc_proc_callback_t (player_t *p, const special_effect_t &e) | |
void | initialize () override |
Initialize the proc callback. More... | |
cooldown_t * | get_cooldown (player_t *target) |
void | trigger (action_t *a, action_state_t *state) override |
virtual player_t * | target (const action_state_t *state) const |
rng::rng_t & | rng () const |
Public Member Functions inherited from action_callback_t | |
action_callback_t (player_t *l, bool ap=false, bool asp=false) | |
virtual void | reset () |
virtual void | activate () |
virtual void | deactivate () |
Public Attributes | |
const item_t & | item |
const special_effect_t & | effect |
cooldown_t * | cooldown |
target_specific_cooldown_t * | target_specific_cooldown |
real_ppm_t * | rppm |
double | proc_chance |
double | ppm |
buff_t * | proc_buff |
action_t * | proc_action |
weapon_t * | weapon |
bool | expire_on_max_stack |
Expires proc_buff on max stack, automatically set if proc_buff max_stack > 1. | |
trigger_fn_type | trigger_type |
Trigger condition override type. | |
const trigger_fn_t * | trigger_fn |
Override proc trigger condition with a separate callback function. | |
execute_fn_t * | execute_fn |
Override execution behavior with a separate callback function. | |
bool | can_only_proc_from_class_abilites |
bool | can_proc_from_procs |
Public Attributes inherited from action_callback_t | |
player_t * | listener |
bool | active |
bool | allow_self_procs |
bool | allow_procs |
Static Public Attributes | |
static const item_t | default_item_ = item_t() |
Protected Member Functions | |
virtual void | execute (action_t *, action_state_t *state) |
Base rules for proc execution. More... | |
Friends | |
struct | proc_event_t |
Additional Inherited Members | |
Static Public Member Functions inherited from action_callback_t | |
static void | trigger (const std::vector< action_callback_t *> &v, action_t *a, action_state_t *state) |
static void | reset (const std::vector< action_callback_t *> &v) |
DBC-driven proc callback.
Extensively leans on the concept of "driver" spells that blizzard uses to trigger actual proc spells in most cases. Uses spell data as much as possible (through interaction with special_effect_t). Intentionally vastly simplified compared to our other (older) callback systems. The "complex" logic is offloaded either into special_effect_t (creation of buffs/actions), special effect_t initialization (what kind of special effect to create from DBC data or user given options, or when and why to proc things (new DBC based proc system).
The actual triggering logic is also vastly simplified (see execute()), as the majority of procs in WoW are very simple. Custom procs can always be derived off of this struct.
|
strong |
|
protectedvirtual |
Base rules for proc execution.
1) If we proc a buff, trigger it 2a) If the buff triggered and is at max stack, and we have an action, execute the action on the target of the action that triggered this proc. 2b) If we have no buff, trigger the action on the target of the action that triggered this proc.
TODO: Ticking buffs, though that'd be better served by fusing tick_buff_t into buff_t. TODO: Proc delay TODO: Buff cooldown hackery for expressions. Is this really needed or can we do it in a smarter way (better expression support?)
Reimplemented in unique_gear::shadowlands::items::chains_of_domination_cb_t, warlock::actions::demonic_synergy_callback_t, and bfa_darkmoon_deck_cb_t< T >.
|
overridevirtual |
Initialize the proc callback.
This method is called by each actor through player_t::register_callbacks(), which is invoked as the last thing in the actor initialization process.
Reimplemented from action_callback_t.
Reimplemented in covenant::covenant_ability_cast_cb_t.