TrinityCore
MoveSplineInitArgs.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef TRINITYSERVER_MOVESPLINEINIT_ARGS_H
19#define TRINITYSERVER_MOVESPLINEINIT_ARGS_H
20
21#include "Duration.h"
22#include "MoveSplineFlag.h"
23#include "MovementTypedefs.h"
24#include "ObjectGuid.h"
25#include "Optional.h"
26
27class Unit;
28
29enum class AnimTier : uint8;
30
31namespace Movement
32{
33 typedef std::vector<Vector3> PointsArray;
34
36 {
37 struct
38 {
39 float x, y, z;
40 } f;
42 float angle;
43
45
46 FacingInfo() : angle(0.0f), type(MONSTER_MOVE_NORMAL) { f.x = f.y = f.z = 0.0f; }
47 };
48
50 {
55 };
56
58 {
61 };
62
64 {
65 explicit MoveSplineInitArgs(size_t path_capacity = 16);
68
73 float velocity;
76 float effect_start_time_percent; // fraction of total spline duration
82 bool walk;
85
87 bool Validate(Unit* unit) const;
88
89 private:
90 bool _checkPathLengths() const;
91 };
92}
93
94#endif // TRINITYSERVER_MOVESPLINEINIT_ARGS_H
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition: Duration.h:29
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:25
AnimTier
Definition: UnitDefines.h:69
Definition: Unit.h:627
std::vector< Vector3 > PointsArray
struct Movement::FacingInfo::@323 f
bool Validate(Unit *unit) const
============================================================================================
Definition: MoveSpline.cpp:241
MoveSplineInitArgs(MoveSplineInitArgs &&args) noexcept
MoveSplineInitArgs(size_t path_capacity=16)
Definition: MoveSpline.cpp:275
Optional< AnimTierTransition > animTier
Optional< SpellEffectExtraData > spellEffectExtra