Fixed some additional found nullptrs

This commit is contained in:
Antz 2016-09-21 20:49:06 +01:00 committed by Antz
parent 2e925eddd5
commit 2d960a4b1c
36 changed files with 303 additions and 303 deletions

View file

@ -59,7 +59,7 @@ void MotionMaster::Initialize()
if (m_owner->GetTypeId() == TYPEID_UNIT && !m_owner->hasUnitState(UNIT_STAT_CONTROLLED))
{
MovementGenerator* movement = FactorySelector::selectMovementGenerator((Creature*)m_owner);
push(movement == nullptr ? &si_idleMovement : movement);
push(movement == NULL ? &si_idleMovement : movement);
top()->Initialize(*m_owner);
if (top()->GetMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
(static_cast<WaypointMovementGenerator<Creature>*>(top()))->InitializeWaypointPath(*((Creature*)(m_owner)), 0, PATH_NO_PATH, 0, 0);

View file

@ -121,7 +121,7 @@ class MotionMaster : private std::stack<MovementGenerator*>
void MoveTaxiFlight(uint32 path, uint32 pathnode);
void MoveDistract(uint32 timeLimit);
void MoveJump(float x, float y, float z, float horizontalSpeed, float max_height, uint32 id = 0);
void MoveDestination(float x, float y, float z, float o, float horizontalSpeed, float max_height, Unit* target = nullptr);
void MoveDestination(float x, float y, float z, float o, float horizontalSpeed, float max_height, Unit* target = NULL);
void MoveFall();
void MoveFlyOrLand(uint32 id, float x, float y, float z, bool liftOff);