[11100] Avoid send SMSG_DISMOUNT for non aura source mount state.

This fix problem with lost mount show at multi-node taxi path.

Thanks to blueboy for research problem.
This commit is contained in:
VladimirMangos 2011-02-02 17:30:18 +03:00
parent 6f74fa1be8
commit 06cebecd50
5 changed files with 12 additions and 8 deletions

View file

@ -7638,7 +7638,7 @@ void Unit::Mount(uint32 mount, uint32 spellId)
}
}
void Unit::Unmount()
void Unit::Unmount(bool from_aura)
{
if (!IsMounted())
return;
@ -7648,9 +7648,13 @@ void Unit::Unmount()
SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0);
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT);
WorldPacket data(SMSG_DISMOUNT, 8);
data << GetPackGUID();
SendMessageToSet(&data, true);
// Called NOT by Taxi system / GM command
if (from_aura)
{
WorldPacket data(SMSG_DISMOUNT, 8);
data << GetPackGUID();
SendMessageToSet(&data, true);
}
// only resummon old pet if the player is already added to a map
// this prevents adding a pet to a not created map which would otherwise cause a crash