1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
/*
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TRINITY_MOVEMENTDEFINES_H
#define TRINITY_MOVEMENTDEFINES_H
#include "Common.h"
#include "ObjectGuid.h"
#define SPEED_CHARGE 42.0f // assume it is 25 yard per 0.6 second
enum MovementGeneratorType : uint8
{
IDLE_MOTION_TYPE = 0, // IdleMovementGenerator.h
RANDOM_MOTION_TYPE = 1, // RandomMovementGenerator.h
WAYPOINT_MOTION_TYPE = 2, // WaypointMovementGenerator.h
MAX_DB_MOTION_TYPE = 3, // Below motion types can't be set in DB.
CONFUSED_MOTION_TYPE = 4, // ConfusedMovementGenerator.h
CHASE_MOTION_TYPE = 5, // TargetedMovementGenerator.h
HOME_MOTION_TYPE = 6, // HomeMovementGenerator.h
FLIGHT_MOTION_TYPE = 7, // WaypointMovementGenerator.h
POINT_MOTION_TYPE = 8, // PointMovementGenerator.h
FLEEING_MOTION_TYPE = 9, // FleeingMovementGenerator.h
DISTRACT_MOTION_TYPE = 10, // IdleMovementGenerator.h
ASSISTANCE_MOTION_TYPE = 11, // PointMovementGenerator.h
ASSISTANCE_DISTRACT_MOTION_TYPE = 12, // IdleMovementGenerator.h
TIMED_FLEEING_MOTION_TYPE = 13, // FleeingMovementGenerator.h
FOLLOW_MOTION_TYPE = 14,
ROTATE_MOTION_TYPE = 15,
EFFECT_MOTION_TYPE = 16,
SPLINE_CHAIN_MOTION_TYPE = 17, // SplineChainMovementGenerator.h
FORMATION_MOTION_TYPE = 18, // FormationMovementGenerator.h
MAX_MOTION_TYPE // limit
};
enum MovementSlot : uint8
{
MOTION_SLOT_IDLE = 0,
MOTION_SLOT_ACTIVE,
MOTION_SLOT_CONTROLLED,
MAX_MOTION_SLOT
};
enum MotionMasterCleanFlags
{
MOTIONMMASTER_CLEANFLAG_NONE = 0,
MOTIONMMASTER_CLEANFLAG_UPDATE = 1, // Clear or Expire called from update
MOTIONMMASTER_CLEANFLAG_RESET = 2 // Flag if need top()->Reset()
};
enum RotateDirection : uint8
{
ROTATE_DIRECTION_LEFT = 0,
ROTATE_DIRECTION_RIGHT
};
struct TC_GAME_API ChaseRange
{
ChaseRange(float range);
ChaseRange(float _minRange, float _maxRange);
ChaseRange(float _minRange, float _minTolerance, float _maxTolerance, float _maxRange);
// this contains info that informs how we should path!
float MinRange; // we have to move if we are within this range... (min. attack range)
float MinTolerance; // ...and if we are, we will move this far away
float MaxRange; // we have to move if we are outside this range... (max. attack range)
float MaxTolerance; // ...and if we are, we will move into this range
};
struct TC_GAME_API ChaseAngle
{
ChaseAngle(float angle, float _tolerance = M_PI_4);
float RelativeAngle; // we want to be at this angle relative to the target (0 = front, M_PI = back)
float Tolerance; // but we'll tolerate anything within +- this much
float UpperBound() const;
float LowerBound() const;
bool IsAngleOkay(float relativeAngle) const;
};
struct JumpArrivalCastArgs
{
uint32 SpellId;
ObjectGuid Target;
};
inline bool IsInvalidMovementGeneratorType(MovementGeneratorType const type) { return type == MAX_DB_MOTION_TYPE || type == MAX_MOTION_TYPE; }
#endif
|