fix(Core/Movement): despawn mini pets on flight take (#9624)

Fixes #9510
This commit is contained in:
UltraNix
2021-12-17 18:05:12 +01:00
committed by GitHub
parent 74640b2a47
commit a4ff3f6101

View File

@@ -123,6 +123,11 @@ void WorldSession::SendDoFlight(uint32 mountDisplayId, uint32 path, uint32 pathN
if (mountDisplayId)
GetPlayer()->Mount(mountDisplayId);
if (Creature* critter = ObjectAccessor::GetCreature(*GetPlayer(), GetPlayer()->GetCritterGUID()))
{
critter->DespawnOrUnsummon();
}
GetPlayer()->GetMotionMaster()->MoveTaxiFlight(path, pathNode);
sScriptMgr->AnticheatSetSkipOnePacketForASH(GetPlayer(), true);