mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 03:32:28 -04:00
Core/Movement: Added ActionResultSetter for MovementStopReason to LaunchMoveSpline
This commit is contained in:
@@ -1186,7 +1186,7 @@ void MotionMaster::MoveFormation(Unit* leader, float range, float angle, uint32
|
||||
}
|
||||
}
|
||||
|
||||
void MotionMaster::LaunchMoveSpline(std::function<void(Movement::MoveSplineInit& init)>&& initializer, uint32 id/*= 0*/, MovementGeneratorPriority priority/* = MOTION_PRIORITY_NORMAL*/, MovementGeneratorType type/*= EFFECT_MOTION_TYPE*/)
|
||||
void MotionMaster::LaunchMoveSpline(std::function<void(Movement::MoveSplineInit& init)>&& initializer, uint32 id/*= 0*/, MovementGeneratorPriority priority/* = MOTION_PRIORITY_NORMAL*/, MovementGeneratorType type/*= EFFECT_MOTION_TYPE*/, Scripting::v2::ActionResultSetter<MovementStopReason>&& scriptResult /*= {}*/)
|
||||
{
|
||||
if (IsInvalidMovementGeneratorType(type))
|
||||
{
|
||||
@@ -1196,7 +1196,7 @@ void MotionMaster::LaunchMoveSpline(std::function<void(Movement::MoveSplineInit&
|
||||
|
||||
TC_LOG_DEBUG("movement.motionmaster", "MotionMaster::LaunchMoveSpline: '{}', initiates spline Id: {} (Type: {}, Priority: {})", _owner->GetGUID(), id, type, priority);
|
||||
|
||||
GenericMovementGenerator* movement = new GenericMovementGenerator(std::move(initializer), type, id);
|
||||
GenericMovementGenerator* movement = new GenericMovementGenerator(std::move(initializer), type, id, { .ScriptResult = scriptResult });
|
||||
movement->Priority = priority;
|
||||
Add(movement);
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ class TC_GAME_API MotionMaster
|
||||
Scripting::v2::ActionResultSetter<MovementStopReason>&& scriptResult = {});
|
||||
void MoveFormation(Unit* leader, float range, float angle, uint32 point1, uint32 point2);
|
||||
|
||||
void LaunchMoveSpline(std::function<void(Movement::MoveSplineInit& init)>&& initializer, uint32 id = 0, MovementGeneratorPriority priority = MOTION_PRIORITY_NORMAL, MovementGeneratorType type = EFFECT_MOTION_TYPE);
|
||||
void LaunchMoveSpline(std::function<void(Movement::MoveSplineInit& init)>&& initializer, uint32 id = 0, MovementGeneratorPriority priority = MOTION_PRIORITY_NORMAL, MovementGeneratorType type = EFFECT_MOTION_TYPE, Scripting::v2::ActionResultSetter<MovementStopReason>&& scriptResult = {});
|
||||
|
||||
private:
|
||||
typedef std::unique_ptr<MovementGenerator, MovementGeneratorDeleter> MovementGeneratorPointer;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define TRINITYCORE_SCRIPT_ACTIONS_H
|
||||
|
||||
#include "ScriptActionResult.h"
|
||||
#include "Define.h"
|
||||
#include "Duration.h"
|
||||
|
||||
namespace Scripting::v2
|
||||
@@ -28,7 +29,7 @@ class ActionBase;
|
||||
template<typename T>
|
||||
class ActionResultSetter;
|
||||
|
||||
class ActionBase
|
||||
class TC_GAME_API ActionBase
|
||||
{
|
||||
public:
|
||||
ActionBase();
|
||||
|
||||
Reference in New Issue
Block a user