TrinityCore
Loading...
Searching...
No Matches
WaypointDefines.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 TRINITY_WAYPOINTDEFINES_H
19#define TRINITY_WAYPOINTDEFINES_H
20
21#include "Define.h"
22#include "Optional.h"
23#include <vector>
24
34
36{
37 WaypointNode() : id(0), x(0.f), y(0.f), z(0.f), delay(0), eventId(0), moveType(WAYPOINT_MOVE_TYPE_RUN), eventChance(0) { }
38 WaypointNode(uint32 _id, float _x, float _y, float _z, Optional<float> _orientation = { }, uint32 _delay = 0)
39 {
40 id = _id;
41 x = _x;
42 y = _y;
43 z = _z;
44 orientation = _orientation;
45 delay = _delay;
46 eventId = 0;
48 eventChance = 100;
49 }
50
52 float x, y, z;
58};
59
61{
62 WaypointPath() : id(0) { }
63 WaypointPath(uint32 _id, std::vector<WaypointNode>&& _nodes)
64 {
65 id = _id;
66 nodes = _nodes;
67 }
68
69 std::vector<WaypointNode> nodes;
71};
72
73#endif
uint8_t uint8
Definition Define.h:135
uint32_t uint32
Definition Define.h:133
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition Optional.h:25
WaypointMoveType
@ WAYPOINT_MOVE_TYPE_RUN
@ WAYPOINT_MOVE_TYPE_LAND
@ WAYPOINT_MOVE_TYPE_MAX
@ WAYPOINT_MOVE_TYPE_TAKEOFF
@ WAYPOINT_MOVE_TYPE_WALK
Optional< float > orientation
WaypointNode(uint32 _id, float _x, float _y, float _z, Optional< float > _orientation={ }, uint32 _delay=0)
WaypointPath(uint32 _id, std::vector< WaypointNode > &&_nodes)
std::vector< WaypointNode > nodes