AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Movement::MoveSplineFlag Class Reference

#include "MoveSplineFlag.h"

Public Types

enum  eFlags {
  None = 0x00000000 ,
  Done = 0x00000100 ,
  Falling = 0x00000200 ,
  No_Spline = 0x00000400 ,
  Parabolic = 0x00000800 ,
  Walkmode = 0x00001000 ,
  Flying = 0x00002000 ,
  OrientationFixed = 0x00004000 ,
  Final_Point = 0x00008000 ,
  Final_Target = 0x00010000 ,
  Final_Angle = 0x00020000 ,
  Catmullrom = 0x00040000 ,
  Cyclic = 0x00080000 ,
  Enter_Cycle = 0x00100000 ,
  Animation = 0x00200000 ,
  Frozen = 0x00400000 ,
  TransportEnter = 0x00800000 ,
  TransportExit = 0x01000000 ,
  Unknown7 = 0x02000000 ,
  Unknown8 = 0x04000000 ,
  OrientationInversed = 0x08000000 ,
  Unknown10 = 0x10000000 ,
  Unknown11 = 0x20000000 ,
  Unknown12 = 0x40000000 ,
  Unknown13 = 0x80000000 ,
  Mask_Final_Facing = Final_Point | Final_Target | Final_Angle ,
  Mask_Animations = 0xFF ,
  Mask_No_Monster_Move = Mask_Final_Facing | Mask_Animations | Done ,
  Mask_CatmullRom = Flying | Catmullrom ,
  Mask_Unused = No_Spline | Enter_Cycle | Frozen | Unknown7 | Unknown8 | Unknown10 | Unknown11 | Unknown12 | Unknown13
}
 

Public Member Functions

uint32raw ()
 
const uint32raw () const
 
 MoveSplineFlag ()
 
 MoveSplineFlag (uint32 f)
 
 MoveSplineFlag (const MoveSplineFlag &f)
 
 MoveSplineFlag (MoveSplineFlag &&)=default
 
MoveSplineFlagoperator= (const MoveSplineFlag &)=default
 
MoveSplineFlagoperator= (MoveSplineFlag &&)=default
 
bool isSmooth () const
 
bool isLinear () const
 
bool isFacing () const
 
uint8 getAnimationId () const
 
bool hasAllFlags (uint32 f) const
 
bool hasFlag (uint32 f) const
 
uint32 operator& (uint32 f) const
 
uint32 operator| (uint32 f) const
 
std::string ToString () const
 
void operator&= (uint32 f)
 
void operator|= (uint32 f)
 
void EnableAnimation (uint8 anim)
 
void EnableParabolic ()
 
void EnableFalling ()
 
void EnableFlying ()
 
void EnableCatmullRom ()
 
void EnableFacingPoint ()
 
void EnableFacingAngle ()
 
void EnableFacingTarget ()
 
void EnableTransportEnter ()
 
void EnableTransportExit ()
 

Public Attributes

uint8 animId: 8
 
bool done: 1
 
bool falling: 1
 
bool no_spline: 1
 
bool parabolic: 1
 
bool walkmode: 1
 
bool flying: 1
 
bool orientationFixed: 1
 
bool final_point: 1
 
bool final_target: 1
 
bool final_angle: 1
 
bool catmullrom: 1
 
bool cyclic: 1
 
bool enter_cycle: 1
 
bool animation: 1
 
bool frozen: 1
 
bool transportEnter: 1
 
bool transportExit: 1
 
bool unknown7: 1
 
bool unknown8: 1
 
bool orientationInversed: 1
 
bool unknown10: 1
 
bool unknown11: 1
 
bool unknown12: 1
 
bool unknown13: 1
 

Detailed Description

Member Enumeration Documentation

◆ eFlags

Enumerator
None 
Done 
Falling 
No_Spline 
Parabolic 
Walkmode 
Flying 
OrientationFixed 
Final_Point 
Final_Target 
Final_Angle 
Catmullrom 
Cyclic 
Enter_Cycle 
Animation 
Frozen 
TransportEnter 
TransportExit 
Unknown7 
Unknown8 
OrientationInversed 
Unknown10 
Unknown11 
Unknown12 
Unknown13 
Mask_Final_Facing 
Mask_Animations 
Mask_No_Monster_Move 
Mask_CatmullRom 
Mask_Unused 
36 {
37 None = 0x00000000,
38 // x00-xFF(first byte) used as animation Ids storage in pair with Animation flag
39 Done = 0x00000100,
40 Falling = 0x00000200, // Affects elevation computation, can't be combined with Parabolic flag
41 No_Spline = 0x00000400,
42 Parabolic = 0x00000800, // Affects elevation computation, can't be combined with Falling flag
43 Walkmode = 0x00001000,
44 Flying = 0x00002000, // Smooth movement(Catmullrom interpolation mode), flying animation
45 OrientationFixed = 0x00004000, // Model orientation fixed
46 Final_Point = 0x00008000,
47 Final_Target = 0x00010000,
48 Final_Angle = 0x00020000,
49 Catmullrom = 0x00040000, // Used Catmullrom interpolation mode
50 Cyclic = 0x00080000, // Movement by cycled spline
51 Enter_Cycle = 0x00100000, // Everytimes appears with cyclic flag in monster move packet, erases first spline vertex after first cycle done
52 Animation = 0x00200000, // Plays animation after some time passed
53 Frozen = 0x00400000, // Will never arrive
54 TransportEnter = 0x00800000,
55 TransportExit = 0x01000000,
56 Unknown7 = 0x02000000,
57 Unknown8 = 0x04000000,
58 OrientationInversed = 0x08000000,
59 Unknown10 = 0x10000000,
60 Unknown11 = 0x20000000,
61 Unknown12 = 0x40000000,
62 Unknown13 = 0x80000000,
63
64 // Masks
66 // animation ids stored here, see AnimType enum, used with Animation flag
67 Mask_Animations = 0xFF,
68 // flags that shouldn't be appended into SMSG_MONSTER_MOVE\SMSG_MONSTER_MOVE_TRANSPORT packet, should be more probably
70 // CatmullRom interpolation mode used
72 // Unused, not suported flags
74 };
@ Unknown10
Definition: MoveSplineFlag.h:59
@ OrientationFixed
Definition: MoveSplineFlag.h:45
@ Unknown11
Definition: MoveSplineFlag.h:60
@ Frozen
Definition: MoveSplineFlag.h:53
@ Final_Angle
Definition: MoveSplineFlag.h:48
@ Mask_CatmullRom
Definition: MoveSplineFlag.h:71
@ No_Spline
Definition: MoveSplineFlag.h:41
@ Parabolic
Definition: MoveSplineFlag.h:42
@ Walkmode
Definition: MoveSplineFlag.h:43
@ Flying
Definition: MoveSplineFlag.h:44
@ TransportExit
Definition: MoveSplineFlag.h:55
@ Cyclic
Definition: MoveSplineFlag.h:50
@ Unknown13
Definition: MoveSplineFlag.h:62
@ Unknown7
Definition: MoveSplineFlag.h:56
@ None
Definition: MoveSplineFlag.h:37
@ Enter_Cycle
Definition: MoveSplineFlag.h:51
@ Catmullrom
Definition: MoveSplineFlag.h:49
@ Unknown8
Definition: MoveSplineFlag.h:57
@ OrientationInversed
Definition: MoveSplineFlag.h:58
@ Unknown12
Definition: MoveSplineFlag.h:61
@ Final_Point
Definition: MoveSplineFlag.h:46
@ Mask_Animations
Definition: MoveSplineFlag.h:67
@ Mask_No_Monster_Move
Definition: MoveSplineFlag.h:69
@ Falling
Definition: MoveSplineFlag.h:40
@ Final_Target
Definition: MoveSplineFlag.h:47
@ Mask_Final_Facing
Definition: MoveSplineFlag.h:65
@ Done
Definition: MoveSplineFlag.h:39
@ TransportEnter
Definition: MoveSplineFlag.h:54
@ Mask_Unused
Definition: MoveSplineFlag.h:73
@ Animation
Definition: MoveSplineFlag.h:52

Constructor & Destructor Documentation

◆ MoveSplineFlag() [1/4]

Movement::MoveSplineFlag::MoveSplineFlag ( )
inline
79{ raw() = 0; }
uint32 & raw()
Definition: MoveSplineFlag.h:76

References raw().

◆ MoveSplineFlag() [2/4]

Movement::MoveSplineFlag::MoveSplineFlag ( uint32  f)
inline
80{ raw() = f; }

References raw().

◆ MoveSplineFlag() [3/4]

Movement::MoveSplineFlag::MoveSplineFlag ( const MoveSplineFlag f)
inline
81{ raw() = f.raw(); }

References raw().

◆ MoveSplineFlag() [4/4]

Movement::MoveSplineFlag::MoveSplineFlag ( MoveSplineFlag &&  )
default

Member Function Documentation

◆ EnableAnimation()

void Movement::MoveSplineFlag::EnableAnimation ( uint8  anim)
inline

◆ EnableCatmullRom()

void Movement::MoveSplineFlag::EnableCatmullRom ( )
inline
108{ raw() = (raw() & ~Flying) | Catmullrom; }

References Catmullrom, and raw().

Referenced by Movement::MoveSplineInit::SetSmooth().

◆ EnableFacingAngle()

void Movement::MoveSplineFlag::EnableFacingAngle ( )
inline
110{ raw() = (raw() & ~Mask_Final_Facing) | Final_Angle; }

References Final_Angle, and raw().

Referenced by Movement::MoveSplineInit::SetFacing().

◆ EnableFacingPoint()

void Movement::MoveSplineFlag::EnableFacingPoint ( )
inline
109{ raw() = (raw() & ~Mask_Final_Facing) | Final_Point; }

References Final_Point, and raw().

Referenced by Movement::MoveSplineInit::SetFacing().

◆ EnableFacingTarget()

void Movement::MoveSplineFlag::EnableFacingTarget ( )
inline
111{ raw() = (raw() & ~Mask_Final_Facing) | Final_Target; }

References Final_Target, and raw().

Referenced by Movement::MoveSplineInit::SetFacing().

◆ EnableFalling()

void Movement::MoveSplineFlag::EnableFalling ( )
inline

◆ EnableFlying()

void Movement::MoveSplineFlag::EnableFlying ( )
inline
107{ raw() = (raw() & ~(Falling | Catmullrom)) | Flying; }

References Catmullrom, Falling, Flying, and raw().

Referenced by Movement::MoveSplineInit::SetFly().

◆ EnableParabolic()

void Movement::MoveSplineFlag::EnableParabolic ( )
inline

◆ EnableTransportEnter()

void Movement::MoveSplineFlag::EnableTransportEnter ( )
inline
112{ raw() = (raw() & ~TransportExit) | TransportEnter; }

References raw(), and TransportEnter.

Referenced by Movement::MoveSplineInit::SetTransportEnter().

◆ EnableTransportExit()

void Movement::MoveSplineFlag::EnableTransportExit ( )
inline
113{ raw() = (raw() & ~TransportEnter) | TransportExit; }

References raw(), and TransportExit.

Referenced by Movement::MoveSplineInit::SetTransportExit().

◆ getAnimationId()

uint8 Movement::MoveSplineFlag::getAnimationId ( ) const
inline
92{ return animId; }
uint8 animId
Definition: MoveSplineFlag.h:115

References animId.

Referenced by Movement::PacketBuilder::WriteCommonMonsterMovePart().

◆ hasAllFlags()

bool Movement::MoveSplineFlag::hasAllFlags ( uint32  f) const
inline
93{ return (raw() & f) == f; }

References raw().

◆ hasFlag()

bool Movement::MoveSplineFlag::hasFlag ( uint32  f) const
inline
94{ return (raw() & f) != 0; }

References raw().

Referenced by Movement::MoveSpline::ComputePosition().

◆ isFacing()

bool Movement::MoveSplineFlag::isFacing ( ) const
inline
90{ return raw() & Mask_Final_Facing; }

References Mask_Final_Facing, and raw().

Referenced by Movement::MoveSpline::ComputePosition().

◆ isLinear()

bool Movement::MoveSplineFlag::isLinear ( ) const
inline
89{ return !isSmooth(); }
bool isSmooth() const
Definition: MoveSplineFlag.h:88

References isSmooth().

◆ isSmooth()

bool Movement::MoveSplineFlag::isSmooth ( ) const
inline
88{ return raw() & Mask_CatmullRom; }

References Mask_CatmullRom, and raw().

Referenced by Movement::MoveSpline::init_spline(), and isLinear().

◆ operator&()

uint32 Movement::MoveSplineFlag::operator& ( uint32  f) const
inline
95{ return (raw() & f); }

References raw().

◆ operator&=()

void Movement::MoveSplineFlag::operator&= ( uint32  f)
inline
101{ raw() &= f; }

References raw().

◆ operator=() [1/2]

MoveSplineFlag & Movement::MoveSplineFlag::operator= ( const MoveSplineFlag )
default

◆ operator=() [2/2]

MoveSplineFlag & Movement::MoveSplineFlag::operator= ( MoveSplineFlag &&  )
default

◆ operator|()

uint32 Movement::MoveSplineFlag::operator| ( uint32  f) const
inline
96{ return (raw() | f); }

References raw().

◆ operator|=()

void Movement::MoveSplineFlag::operator|= ( uint32  f)
inline
102{ raw() |= f; }

References raw().

◆ raw() [1/2]

◆ raw() [2/2]

const uint32 & Movement::MoveSplineFlag::raw ( ) const
inline
77{ return (const uint32&) * this; }

◆ ToString()

std::string Movement::MoveSplineFlag::ToString ( ) const
189 {
190 std::string str;
192 return str;
193 }
void print_flags(Flags t, char const *(&names)[N], std::string &str)
Definition: MovementUtil.cpp:179
char const * g_SplineFlag_names[32]
Definition: MovementUtil.cpp:142

References Movement::g_SplineFlag_names, Movement::print_flags(), and raw().

Referenced by Movement::MoveSpline::ToString().

Member Data Documentation

◆ animation

◆ animId

uint8 Movement::MoveSplineFlag::animId

◆ catmullrom

bool Movement::MoveSplineFlag::catmullrom

◆ cyclic

◆ done

◆ enter_cycle

bool Movement::MoveSplineFlag::enter_cycle

◆ falling

◆ final_angle

◆ final_point

◆ final_target

bool Movement::MoveSplineFlag::final_target

◆ flying

bool Movement::MoveSplineFlag::flying

◆ frozen

bool Movement::MoveSplineFlag::frozen

◆ no_spline

bool Movement::MoveSplineFlag::no_spline

◆ orientationFixed

bool Movement::MoveSplineFlag::orientationFixed

◆ orientationInversed

◆ parabolic

◆ transportEnter

bool Movement::MoveSplineFlag::transportEnter

◆ transportExit

bool Movement::MoveSplineFlag::transportExit

◆ unknown10

bool Movement::MoveSplineFlag::unknown10

◆ unknown11

bool Movement::MoveSplineFlag::unknown11

◆ unknown12

bool Movement::MoveSplineFlag::unknown12

◆ unknown13

bool Movement::MoveSplineFlag::unknown13

◆ unknown7

bool Movement::MoveSplineFlag::unknown7

◆ unknown8

bool Movement::MoveSplineFlag::unknown8

◆ walkmode