TrinityCore/TrinityCore — Issue #5574: MotionMaster - crashfix
Author: Xter
Created: 2012-03-05 23:00:33+00:00
State: open

this is wrong crashfix
https://github.com/TrinityCore/TrinityCore/commit/af905468355877dd135cd6d1a793765bc2ef9eda

mistake was made here
https://github.com/TrinityCore/TrinityCore/commit/8a72aede1641ae19d539ed807e3bb0458c7a65e8

this is real fix:

--- a/src/server/game/Movement/MotionMaster.h
+++ b/src/server/game/Movement/MotionMaster.h
@@ -83,6 +83,10 @@ class MotionMaster //: private std::stack
private:
//typedef std::stack Impl;
typedef MovementGenerator* _Ty;
+ _Ty Impl[MAX_MOTION_SLOT];
+ bool _needInit[MAX_MOTION_SLOT];
+ typedef std::vector<_Ty> ExpireList;
+ int _top;

void pop()
{
@@ -188,12 +192,8 @@ class MotionMaster //: private std::stack
void DirectExpire(bool reset);
void DelayedExpire();

- typedef std::vector<_Ty> ExpireList;
ExpireList* _expList;
- _Ty Impl[MAX_MOTION_SLOT];
- int _top;
Unit* _owner;
- bool _needInit[MAX_MOTION_SLOT];
uint8 _cleanFlag;
};
#endif

good luck....