Core/Transports: Fixed crashes happening when passenger is removed from transport during teleport
Closes #11067
This commit is contained in:
1 parent
f8b1b264d1
commit
b6db622b52
4 files changed
+25
-38
No files matched your search
@@ -13499,9 +13499,12 @@ void Unit::CleanupsBeforeDelete(bool finalCleanup)
|
||||
{
|
||||
CleanupBeforeRemoveFromMap(finalCleanup);
|
||||
|
||||
if (Creature* thisCreature = ToCreature())
|
||||
if (GetTransport())
|
||||
GetTransport()->RemovePassenger(thisCreature);
|
||||
if (GetTransport())
|
||||
{
|
||||
GetTransport()->RemovePassenger(this);
|
||||
SetTransport(NULL);
|
||||
m_movementInfo.transport.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::UpdateCharmAI()
|
||||
|
||||
Reference in new issue
Block a user