Core/Creatures: remove virtual mounts from creatures on death

Closes https://github.com/TrinityCore/TrinityCore/pull/14396

(cherry picked from commit b5393d4b9b)
This commit is contained in:
Northstrider
2015-04-19 14:56:12 +02:00
committed by MitchesD
parent 8096edec15
commit 22ea8cf4d0

View File

@@ -1513,6 +1513,8 @@ void Creature::setDeathState(DeathState s)
SetTarget(ObjectGuid::Empty); // remove target selection in any cases (can be set at aura remove in Unit::setDeathState)
SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0); // if creature is mounted on a virtual mount, remove it at death
setActive(false);
if (HasSearchedAssistance())