448{
451 std::shared_ptr<Unit> source = operand->
get_source();
452 std::shared_ptr<Unit> target = operand->
get_target();
453
455 {
457 {
464 notifier_config.
target_x = target->map_coords().x();
465 notifier_config.
target_y = target->map_coords().y();
467
468 if (source->is_walking())
469 source->stop_walking(true, true);
470
471 HLog(debug) <<
"Casting skill: " << config.
skd->name <<
" on target: " << target->guid() <<
"." << std::endl;
472 source->map()->container()->getScheduler().Schedule(
476 {
477 config.cast_end_function(config.skill_cast_data, config.skd);
478 HLog(debug) << "Cast complete for skill: " << config.skd->name << " on target: " << target->guid() << "." << std::endl;
479 }
480 );
481 }
482 break;
484 {
485 HLog(debug) <<
"Started skill execution on target: " << target->guid() <<
" with skill: " << config.
skd->name <<
"." << std::endl;
487 HLog(debug) <<
"Finished skill execution on target: " << target->guid() <<
" with skill: " << config.
skd->name <<
"." << std::endl;
488 }
489 break;
491 {
494 else
496 }
497 break;
498 }
499}
@ GRID_UNIT_SKILL_USE_NOTIFY_CASTTIME
Definition: GridDefinitions.hpp:89
#define HLog(type)
Definition: Logger.hpp:122
std::chrono::milliseconds Milliseconds
Definition: TaskScheduler.hpp:31
@ UNIT_SCHEDULE_SKILL_CAST
Definition: Unit.hpp:60
std::shared_ptr< Unit > get_target()
Definition: Combat.hpp:263
std::shared_ptr< Unit > get_source()
Definition: Combat.hpp:262
int get_operation_sub_type() const
Definition: Combat.hpp:319
virtual CombatOperand * get_operand() const
Definition: Combat.hpp:317
Definition: Combat.hpp:426
s_skill_execution_operation_config & get_config()
Definition: Combat.hpp:461
Definition: TaskScheduler.hpp:487
Definition: Combat.hpp:429
std::shared_ptr< SkillExecution > skill_execution
Definition: Combat.hpp:435
int16_t pos_y
Definition: Combat.hpp:432
int skill_id
Definition: Combat.hpp:430
int cast_time
Definition: Combat.hpp:437
element_type element
Definition: Combat.hpp:436
std::shared_ptr< const skill_config_data > skd
Definition: Combat.hpp:434
std::string contents
Definition: Combat.hpp:433
int16_t pos_x
Definition: Combat.hpp:431
Definition: GridNotifiers.hpp:364
int target_guid
Definition: GridNotifiers.hpp:365
int source_guid
Definition: GridNotifiers.hpp:365
int target_x
Definition: GridNotifiers.hpp:369
int element
Definition: GridNotifiers.hpp:370
int cast_time
Definition: GridNotifiers.hpp:370
int skill_id
Definition: GridNotifiers.hpp:365
int target_y
Definition: GridNotifiers.hpp:369