diff --git a/src/game/Object/Object.cpp b/src/game/Object/Object.cpp index 703f4311..2c7ecde7 100644 --- a/src/game/Object/Object.cpp +++ b/src/game/Object/Object.cpp @@ -261,6 +261,11 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint8 updateFlags) const { moveFlags |= MOVEFLAG_ONTRANSPORT; } + float x, y, z; + if (m_objectTypeId == TYPEID_UNIT && ((Unit*)this)->GetMotionMaster()->GetDestination(x, y, z)) + { + moveFlags |= MOVEFLAG_WALK_MODE | MOVEFLAG_FORWARD | MOVEFLAG_SPLINE_ENABLED; + } *data << uint32(moveFlags); // movement flags *data << uint32(WorldTimer::getMSTime()); // time (in milliseconds) diff --git a/src/game/Object/ObjectMgr.cpp b/src/game/Object/ObjectMgr.cpp index 65271f11..6cb11d39 100644 --- a/src/game/Object/ObjectMgr.cpp +++ b/src/game/Object/ObjectMgr.cpp @@ -6876,6 +6876,8 @@ bool ObjectMgr::IsPlayerMeetToCondition(uint16 conditionId, Player const* pPlaye return false; } +// Attention: make sure to keep this list in sync with ConditionSource to avoid array +// out of bounds access! It is accessed with ConditionSource as index! char const* conditionSourceToStr[] = { "loot system", @@ -6886,6 +6888,7 @@ char const* conditionSourceToStr[] = "hardcoded", "vendor's item check", "spell_area check", + "npc_spellclick_spells check", // Unused. For 3.x and later. "DBScript engine" }; diff --git a/src/game/WorldHandlers/Spell.cpp b/src/game/WorldHandlers/Spell.cpp index 53b26487..6f28240f 100644 --- a/src/game/WorldHandlers/Spell.cpp +++ b/src/game/WorldHandlers/Spell.cpp @@ -4023,7 +4023,6 @@ SpellCastResult Spell::CheckCast(bool strict) if ((*itr)->GetModifier()->m_miscvalue == 4327) { return SPELL_FAILED_FIZZLE; - itr = auraClassScripts.begin(); } else ++itr;